Page 1 of 1

Error Checkout

Posted: Fri Apr 13, 2018 9:30 pm
by opentoshopping
HI,

I have opencart 2.3.0.2 with Journal theme, and everything used to work, untill suddenly I get a weird error when going to checkout. See below:

Code: Select all

Fatal error: Uncaught Error: Call to undefined method Cart\Currency::set() in /xx/system/storage/modification/catalog/controller/checkout/checkout.php:27 Stack trace: #0 /xx/system/storage/modification/system/engine/action.php(51): ControllerCheckoutCheckout->index() #1 /xx/catalog/controller/startup/router.php(25): Action->execute(Object(Registry)) #2 /xx/system/storage/modification/system/engine/action.php(51): ControllerStartupRouter->index() #3 /xx/system/engine/front.php(59): Action->execute(Object(Registry)) #4 /xx/system/engine/front.php(52): Front->execute(Object(Action)) #5 /xx/system/framework.php(223): Front->dispatch(Object(Action), Object(Action)) #6 /xx/system/startup.php(124): require_once('/home/ibow in /xx/system/storage/modification/catalog/controller/checkout/checkout.php on line 27
I've checked the modification/catalog/ checkout file at line 27 and see:

Code: Select all

$this->load->language('checkout/checkout');
	        $this->currency->set('EUR'); //Help fix this
It looks like the $this->currency->set('EUR') doesn't work. When I remove that line (by commenting it out) the site works again, and checkout works too.
Because it's in the modifications/catalog folder, it looks like it's a plugin or some extension causing the error.
Every time I refresh modifications, that line is added, and the site doesn't work again.

See below some error logs from modifications screen. I've attached full error log.

Who knows where to look? What can be causing this?

Code: Select all

2018-02-26 10:15:31 - MOD: Modification Default

FILE: system/engine/action.php
REGEX: ~(require|include)(_once)?\(([^)]+)~
LINE: 41

FILE: system/engine/loader.php
REGEX: ~(require|include)(_once)?\(([^)]+)~
LINE: 49
LINE: 108
LINE: 120
LINE: 165

FILE: system/library/config.php
REGEX: ~(require|include)(_once)?\(([^)]+)~
LINE: 23

FILE: system/library/language.php
REGEX: ~(require|include)(_once)?\(([^)]+)~
LINE: 38
LINE: 40
LINE: 49
LINE: 51
LINE: 60
LINE: 62

FILE: system/library/template/php.php
REGEX: ~(require|include)(_once)?\(([^)]+)~
LINE: 18

FILE: system/library/template/tiwg.php
REGEX: ~(require|include)(_once)?\(([^)]+)~
LINE: 24
----------------------------------------------------------------
MOD: Journal2
CODE: public function __construct($registry) {
LINE: 15

FILE: admin/controller/extension/extension/module.php
CODE: $this->load->controller('extension/module/' . $this->request->get['extension'] . '/install');
LINE: 33
CODE: $this->load->controller('extension/module/' . $this->request->get['extension'] . '/uninstall');
LINE: 59
----------------------------------------------------------------
MOD: X-Shipping Pro

FILE: catalog/view/theme/journal2/template/journal2/checkout/shipping_methods.tpl
CODE: <?php echo $quote['title']; ?> - <?php echo $quote['text']; ?>
LINE: 24
CODE: <?php echo $quote['title']; ?> - <?php echo $quote['text']; ?>
LINE: 19

FILE: catalog/view/theme/journal2/template/journal2/checkout/checkout.tpl
CODE: $(document).trigger('journal_checkout_reload_cart');
LINE: 437

FILE: catalog/view/theme/default/template/checkout/shipping_method.tpl
CODE: <?php echo $quote['title']; ?> - <?php echo $quote['text']; ?>
LINE: 22
CODE: <?php echo $quote['title']; ?> - <?php echo $quote['text']; ?>
LINE: 17

FILE: catalog/view/theme/journal2/template/checkout/shipping_method.tpl
CODE: <?php echo $quote['title']; ?> - <?php echo $quote['text']; ?>
LINE: 23
CODE: <?php echo $quote['title']; ?> - <?php echo $quote['text']; ?>
LINE: 18

FILE: catalog/model/checkout/order.php
CODE: $data['shipping_method'] = $order_info['shipping_method'];
LINE: 451

Re: Error Checkout

Posted: Fri Apr 13, 2018 10:04 pm
by Johnathan
This is an error caused by an ocMod, so you'll need to figure out which one it is. If you can't tell by the ocMod log, I'd start by disabling all your ocMods, then start enabling a few at a time, until you figure out which one is causing it. Then you can contact the author of the mod and get them to take a look at it.

Don't forget to refresh your ocMod cache in Extensions > Modifications every time you enable/disable an ocMod.

Re: Error Checkout

Posted: Mon Jul 23, 2018 1:48 am
by opentoshopping
I've disabled all extensions, but only when I disable the journal 2 theme ocmod it seems to work again, but then the theme doesn't work..
I'm going to try to update to the latest theme files in a moment and will post results, if updating theme works.

Re: Error Checkout

Posted: Mon Jul 23, 2018 1:05 pm
by synapseindia
You should give a try to contact journal theme support . May be there is some compatible issue.

Thanks

Re: Error Checkout

Posted: Mon Jul 23, 2018 3:08 pm
by opentoshopping
So I've performed the update to latest Journal 2 files and refreshed modifications, still not working.

Re: Error Checkout

Posted: Mon Aug 06, 2018 9:07 pm
by opentoshopping
Another update. I've contacted Journal theme support, and they said it should not be an issue with their theme.
Also when Journal is fully disabled, still same error comes.
Where can I figure this out? Looks like something from payment methods.
How can I figure out what extension/plugin may be adding this line to the checkout.php file?

Re: Error Checkout

Posted: Thu Aug 09, 2018 8:07 pm
by synapseindia
Try disabling extension one by one and check the server error logs.

Re: Error Checkout

Posted: Thu Aug 09, 2018 8:11 pm
by opentoshopping
Found the solution, the core checkout.php file was modified by some plugin, causing this issue. I've replaced the checkout original and now works again.