Frits van Leeuwen Posted March 10, 2015 Share Posted March 10, 2015 (edited) Hi all,I think I found a bug in 1.6.0.14 (I work with a Dutch version. I don't know the right texts to choose in English) When I go to BO - Customers - Shopping trolleys - click on an ordered rule, I'm in a new screen.From that screen, I click on "create an order from Cart" at the bottom of the screen and then on "create order to".At that time the screen is all white.I did the same with the debugging on and get at that time the following line:Fatal error: Call to a member function getOrderTotal () on a non-object in /home/id787913/domains/powerballkracht.nl/public_html/classes/CartRule.php on line 1050Who knows a solution?Thank you in advance,Frits van Leeuwen Edited March 25, 2015 by frits1969 (see edit history) Link to comment Share on other sites More sharing options...
NemoPS Posted March 11, 2015 Share Posted March 11, 2015 It seems this is the issue $context = Context::getContext(); $cart_amount_ti = $context->cart->getOrderTotal(true, Cart::ONLY_PRODUCTS); It can't get a cart out of the context Try this, not sure it works though $context = Context::getContext(); if(!Validate::isLoadedObject($context->cart)) $context->cart = new Cart(); $cart_amount_ti = $context->cart->getOrderTotal(true, Cart::ONLY_PRODUCTS); 2 Link to comment Share on other sites More sharing options...
Frits van Leeuwen Posted March 11, 2015 Author Share Posted March 11, 2015 (edited) Thanks for your answare. I've modified the file /home/id787913/domains/powerballkracht.nl/public_html/classes/CartRule.php With your advice. It looks like to work. Thanks alot. Edited March 11, 2015 by frits1969 (see edit history) Link to comment Share on other sites More sharing options...
sueshi Posted May 24, 2015 Share Posted May 24, 2015 Thanks, this saved my day! Had same problem with creating order + cartrule out of existing shopping cart ... 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