Xandrea Posted September 8, 2017 Share Posted September 8, 2017 (edited) I do some testing on my site from adding to cart to adding the discount coupon and shipping adjustment when I get an error. I can still access the back office without any issue but not the front office. I do a clear cache on the browser and back office, I do incognito tab and even do some tricks i found on google and youtube but nothing works. Please help. Edited: I sent a ticket to my hosting regarding it and they gave me this error logs and did not resolve the issue. website's error log:> [08-Sep-2017 16:19:25 Hongkong] PHP Fatal error: Uncaught Error: Access to undeclared static property: CartCore::$_total_shipping in /home/xandreac/public_html/classes/Cart.php:3203Stack trace:#0 /home/xandreac/public_html/classes/CartRule.php(1010): CartCore->getCarrierCost(6, true, Object(Country))#1 /home/xandreac/public_html/classes/Cart.php(473): CartRuleCore->getContextualValue(true, Object(Context), 1)#2 /home/xandreac/public_html/classes/Cart.php(2054): CartCore->getCartRules(1)#3 /home/xandreac/public_html/classes/Cart.php(1937): CartCore->getTotalCalculationCartRules(3, true)#4 /home/xandreac/public_html/src/Adapter/Cart/CartPresenter.php(295): CartCore->getOrderTotal(false)#5 /home/xandreac/public_html/classes/controller/FrontController.php(500): PrestaShop\PrestaShop\Adapter\Cart\CartPresenter->present(Object(Cart))#6 /home/xandreac/public_html/classes/controller/FrontController.php(525): FrontControllerCore->assignGeneralPurposeVariables()#7 /home/xandreac/public_html/controllers/front/IndexController.php(37): FrontControllerCore->init in /home/xandreac/public_html/classes/Cart.php on line 3203 ----------This is what I see on my front office error. This page isn’t working www.xandrea.co is currently unable to handle this request. HTTP ERROR 500 Edited September 14, 2017 by Xandrea (see edit history) Link to comment Share on other sites More sharing options...
razaro Posted September 8, 2017 Share Posted September 8, 2017 What version of PrestaShop do you have? Any custom module that interact with cart, discount or shipping ? And could you post part of code around line 3203 in file /home/xandreac/public_html/classes/Cart.php ? Check in Advanced parameters that overrides or modules are not disabled. Link to comment Share on other sites More sharing options...
Xandrea Posted September 9, 2017 Author Share Posted September 9, 2017 (edited) I have version 1.7.2. I have this code below, I don't know if this is what you are looking for. No custom modules. public function getCarrierCost($id_carrier, $useTax = true, Country $default_country = null, $delivery_option = null) { if (empty(self::$_total_shipping)) { if (is_null($delivery_option)) { $delivery_option = $this->getDeliveryOption($default_country); } $total_shipping = 0; $delivery_option_list = $this->getDeliveryOptionList(); foreach ($delivery_option as $id_address => $key) { if (!isset($delivery_option_list[$id_address]) || !isset($delivery_option_list[$id_address][$key])) { continue; } if (isset($delivery_option_list[$id_address][$key]['carrier_list'][$id_carrier])) { if ($useTax) { $total_shipping += $delivery_option_list[$id_address][$key]['carrier_list'][$id_carrier]['price_with_tax']; } else { $total_shipping += $delivery_option_list[$id_address][$key]['carrier_list'][$id_carrier]['price_without_tax']; } } } self::$_total_shipping = $total_shipping; } return self::$_total_shipping; } /** * @deprecated 1.5.0, use Cart->getPackageShippingCost() */ public function getOrderShippingCost($id_carrier = null, $use_tax = true, Country $default_country = null, $product_list = null) { Tools::displayAsDeprecated('Use Cart->getPackageShippingCost()'); return $this->getPackageShippingCost((int)$id_carrier, $use_tax, $default_country, $product_list); } Edited September 9, 2017 by Xandrea (see edit history) Link to comment Share on other sites More sharing options...
Xandrea Posted September 9, 2017 Author Share Posted September 9, 2017 I enable the debug mode in back office and got this ContextErrorException in dor_themeoptions.php line 29:Warning: scandir(/home/xandreac/public_html/themes/luxury1/assets/css/dorado/color): failed to open dir: No such file or directoryin dor_themeoptions.php line 29 at ErrorHandler->handleError('2', 'scandir(/home/xandreac/public_html/themes/luxury1/assets/css/dorado/color): failed to open dir: No such file or directory', '/home/xandreac/public_html/modules/dor_themeoptions/dor_themeoptions.php', '29', array('currentIndex' => null)) at scandir('/home/xandreac/public_html/themes/luxury1/assets/css/dorado/color') in dor_themeoptions.php line 29 at dor_themeoptions->__construct() at ReflectionClass->newInstance() in Container.php line 127 at Container->makeInstanceFromClassName('dor_themeoptions', array('dor_themeoptions' => true)) in Container.php line 160 at Container->doMake('dor_themeoptions', array('dor_themeoptions' => true)) in Container.php line 173 at Container->make('dor_themeoptions') in ServiceLocator.php line 60 at ServiceLocator::get('dor_themeoptions') in Module.php line 1086 at ModuleCore::coreLoadModule('dor_themeoptions') in Module.php line 1066 at ModuleCore::getInstanceByName('dor_themeoptions') in Hook.php line 824 at HookCore::exec('displayHeader') in FrontController.php line 533 at FrontControllerCore->initContent() in IndexController.php line 37 at IndexControllerCore->initContent() in Controller.php line 205 at ControllerCore->run() in Dispatcher.php line 379 at DispatcherCore->dispatch() in index.php line 28 Link to comment Share on other sites More sharing options...
selectshop.at Posted September 9, 2017 Share Posted September 9, 2017 Seems you are not using the default theme. The problem is coming from your theme. There is missing a file or permissions are not correct set. failed to open dir: No such file or directory', '/home/xandreac/public_html/modules/dor_themeoptions/dor_themeoptions.php', '29' You should revert to the theme developer. for to debug the problem. Are you sure the theme you are using is compatible with Prestashop 1.7. ? Themes used in PS 1.6. are not compatible with PS 1.7. Link to comment Share on other sites More sharing options...
Xandrea Posted September 9, 2017 Author Share Posted September 9, 2017 Yes, I'm sure I'm using 1.7 compatible themes. Link to comment Share on other sites More sharing options...
selectshop.at Posted September 9, 2017 Share Posted September 9, 2017 Contact the theme developer Link to comment Share on other sites More sharing options...
Xandrea Posted September 9, 2017 Author Share Posted September 9, 2017 I did, no response yet. Problem is he is not so responsive. I really need to fix this asap. Link to comment Share on other sites More sharing options...
selectshop.at Posted September 9, 2017 Share Posted September 9, 2017 You should wat for his answer. The problem is on your theme in use, PLUS a module coming with this theme. We cannot support you on the forum with this. It's a third party problem. Link to comment Share on other sites More sharing options...
Xandrea Posted September 14, 2017 Author Share Posted September 14, 2017 It's the discount coupon bug. Whenever I do some add to cart test and add the coupon code which has restriction with the carrier, I got this error which affects my site template. It also appears that site is unavailable on my end after the issue but not with the other user. We also suspect it's my browser virus hijacked. I'm getting an extension that can't be disabled or uninstall which also hijack my search engine. Link to comment Share on other sites More sharing options...
lucho1 Posted December 3, 2017 Share Posted December 3, 2017 On 9/8/2017 at 4:41 AM, Xandrea said: Hi I have the same problem , and no the problem is not with the theme as I am using the theme classic that came with prestashop 1.7 and have the same issue. After applying the coupon , I get the HTTP 500 ERROR and I cannot access the page as a client until I delete the browser cookies and history. Can anyone please tell me how to fix this issue? thanks I do some testing on my site from adding to cart to adding the discount coupon and shipping adjustment when I get an error. I can still access the back office without any issue but not the front office. I do a clear cache on the browser and back office, I do incognito tab and even do some tricks i found on google and youtube but nothing works. Please help. Edited: I sent a ticket to my hosting regarding it and they gave me this error logs and did not resolve the issue. website's error log:> [08-Sep-2017 16:19:25 Hongkong] PHP Fatal error: Uncaught Error: Access to undeclared static property: CartCore::$_total_shipping in /home/xandreac/public_html/classes/Cart.php:3203Stack trace:#0 /home/xandreac/public_html/classes/CartRule.php(1010): CartCore->getCarrierCost(6, true, Object(Country))#1 /home/xandreac/public_html/classes/Cart.php(473): CartRuleCore->getContextualValue(true, Object(Context), 1)#2 /home/xandreac/public_html/classes/Cart.php(2054): CartCore->getCartRules(1)#3 /home/xandreac/public_html/classes/Cart.php(1937): CartCore->getTotalCalculationCartRules(3, true)#4 /home/xandreac/public_html/src/Adapter/Cart/CartPresenter.php(295): CartCore->getOrderTotal(false)#5 /home/xandreac/public_html/classes/controller/FrontController.php(500): PrestaShop\PrestaShop\Adapter\Cart\CartPresenter->present(Object(Cart))#6 /home/xandreac/public_html/classes/controller/FrontController.php(525): FrontControllerCore->assignGeneralPurposeVariables()#7 /home/xandreac/public_html/controllers/front/IndexController.php(37): FrontControllerCore->init in /home/xandreac/public_html/classes/Cart.php on line 3203 ----------This is what I see on my front office error. This page isn’t working www.xandrea.co is currently unable to handle this request. HTTP ERROR 500 Link to comment Share on other sites More sharing options...
lucho1 Posted December 3, 2017 Share Posted December 3, 2017 Hi I have the same problem , and no the problem is not with the theme as I am using the theme classic that came with prestashop 1.7 and have the same issue. After applying the coupon , I get the HTTP 500 ERROR and I cannot access the page as a client until I delete the browser cookies and history. Can anyone please tell me how to fix this issue? thanks Link to comment Share on other sites More sharing options...
SOURIRE DES SAVEURS Posted June 1, 2018 Share Posted June 1, 2018 Bonjour, j'ai le problème suivant lorsque côté FO, je mets un article au panier et lorsque je fais commander, j'ai une page blanche. Avec le debug, voici l'erreur que je ne sais pas résoudre : Fatal error: Call to undefined method Product::checkAccessStatic() in /home/souriredessaveur/public_html/classes/Cart.php on line 3225 extrait du fichier cart.php : { if (Configuration::get('PS_CATALOG_MODE')) return true; foreach ($this->getProducts() as $product) if (!Product::checkAccessStatic($product['id_product'], $this->id_customer)) return $product['id_product']; return false; } La ligne 3225 est : if (!Product::checkAccessStatic($product['id_product'], $this->id_customer)) Je vous joins le fichier. Je vous remercie de votre aide. Cart.php Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now