Jump to content

Fatal error: Call to undefined method Product::getColorsListCacheId()


baltimirc

Recommended Posts

Hello,

 

I made an upgrade of a prestashop from 1.5.6.3 to 1.6.1.5 via 1-click upgrade. Then I install a 1.6 compatible theme.

 

When I install the new version of module "product extra tabs" (which I had in the old prestashop) I get a 500  error:

 

Fatal error: Call to undefined method Product::getColorsListCacheId() in /Users/baltimirc/www/saltin/classes/controller/FrontController.php on line 1685

 

If I uninstall the module the problem still there. Modules conflict?

 

Also I can see in the product page when I change the color attribute of a product it change the image and URL but for a very few time... like in 3 seconds it redirects to the basic product again (without attributes).

 

Maybe the problem is related.

 

I will apreciate a help because now is a week with trying to fix that upgrade :)

 

Thanks

Link to comment
Share on other sites

Classes/product.php
Add this method:

 

    public static function getColorsListCacheId($id_product, $full = true)
    {
        $cache_id = 'productlist_colors';
        if ($id_product) {
            $cache_id .= '|'.(int)$id_product;
        }

        if ($full) {
            $cache_id .= '|'.(int)Context::getContext()->shop->id.'|'.(int)Context::getContext()->cookie->id_lang;
        }

        return $cache_id;
    }
  • Like 1
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...