Jump to content

Problem with modules Viewed products and Products of the same category


martyn137

Recommended Posts

Viewed products and Products of the same category modules, the price and name of the item are displayed only for the first product. The next tiles are just a photo. Before the file modifications on the ftp server it was ok. What could be the cause?

presta 1.7.7.3 warehouse store template

Regards

Link to comment
Share on other sites

  • 9 months later...

Hello,

I hope you already have a soluce, but for others, change the renderWidget function, for not using cache, and it's ok :

    public function renderWidget($hookName = null, array $configuration = [])
    {
        if (isset($configuration['product']['id_product'])) {
            $this->currentProductId = $configuration['product']['id_product'];
        }

        if ('displayProductAdditionalInfo' === $hookName) {
            $this->addViewedProduct($this->currentProductId);

            return;
        }

        if (!isset($this->context->cookie->viewed) || empty($this->context->cookie->viewed)) {
            return;
        }


            $variables = $this->getWidgetVariables($hookName, $configuration);

            if (empty($variables)) {
                return false;
            }

            $this->smarty->assign($variables);
        

        return $this->fetch($this->templateFile);
    }

 

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