Jump to content

[Solved]create order in BO


Recommended Posts

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 th
e 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 1050

Who knows a solution?

Thank you in advance,
Frits van Leeuwen

Edited by frits1969 (see edit history)
Link to comment
Share on other sites

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);
  • Like 2
Link to comment
Share on other sites

  • 2 months later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...