Jump to content

Fatal error when add product into cart in PS versions 1.7.8.0 and above.


Gouravdev

Recommended Posts

Hi Team,
Recently, we've encountered an issue when the product is added to the cart. When we call $cart->getProducts(); this leads to a fatal error and 500 response on the front-end. NO issue encountered for version below 1.7.8.0.

Recording: https://beta.claap.io/sendinblue/fatal-error-c-3YfMIiN6mG-AL7OcMGtoJMg

Can you please have a look at the issue is coming after PS updated to 1.7.8.0 and above.
 

-> `ActionCartSave` called 
-> Under `handleEvent($cart)` , $cart->getProducts(); leads to an fatal error.

Please help with this case, thanks in advance :)

Link to comment
Share on other sites

  • 2 months later...
2 hours ago, Gouravdev said:
    /**
     * @param array $params
     */
    public function hookActionCartSave($params)
    {
        if (!Validate::isLoadedObject($this->context->cart) || !Validate::isLoadedObject($params['cart'])) {
            return;

inside the hook

yes, thanks a lot. it works perfectly :)

Link to comment
Share on other sites

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...