Post by opentoshopping » Fri Apr 13, 2018 9:30 pm

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

New member

Posts

Joined
Sun Mar 11, 2018 8:45 pm

Post by Johnathan » Fri Apr 13, 2018 10:04 pm

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.

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by opentoshopping » Mon Jul 23, 2018 1:48 am

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.

New member

Posts

Joined
Sun Mar 11, 2018 8:45 pm

Post by synapseindia » Mon Jul 23, 2018 1:05 pm

You should give a try to contact journal theme support . May be there is some compatible issue.

Thanks

User avatar
Active Member

Posts

Joined
Thu Apr 05, 2018 2:27 pm

Post by opentoshopping » Mon Jul 23, 2018 3:08 pm

So I've performed the update to latest Journal 2 files and refreshed modifications, still not working.

New member

Posts

Joined
Sun Mar 11, 2018 8:45 pm

Post by opentoshopping » Mon Aug 06, 2018 9:07 pm

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?

New member

Posts

Joined
Sun Mar 11, 2018 8:45 pm

Post by synapseindia » Thu Aug 09, 2018 8:07 pm

Try disabling extension one by one and check the server error logs.

User avatar
Active Member

Posts

Joined
Thu Apr 05, 2018 2:27 pm

Post by opentoshopping » Thu Aug 09, 2018 8:11 pm

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.

New member

Posts

Joined
Sun Mar 11, 2018 8:45 pm
Who is online

Users browsing this forum: No registered users and 20 guests