Jump to content

Actualización productos modulo novedades


Code-Plus

Recommended Posts

Hola a todos, a muchos os pasa que no se actualiza el módulo de novedades por sí solo cuando incluis nuevos productos.

 

Así se soluciona:

 

1. Localizamos el archivo: .../modules/blocknewproducts/blocknewproducts.php

2. Localizamos:

Línea 109:
public function hookRightColumn($params)
{
   if (!$this->isCached('blocknewproducts.tpl', $this->getCacheId()))


Línea 153:
public function hookdisplayHomeTabContent($params)
{
   if (!$this->isCached('blocknewproducts_home.tpl', $this->getCacheId('blocknewproducts-home')))

3. Sustituimos por:

 

Línea 109:
​public function hookRightColumn($params)
{

   $this->_clearCache('*');
   if (!$this->isCached('blocknewproducts.tpl', $this->getCacheId()))


Línea 153:
public function hookdisplayHomeTabContent($params)
{

   $this->_clearCache('*');
   if (!$this->isCached('blocknewproducts_home.tpl', $this->getCacheId('blocknewproducts-home')))

 

Listo!

 

Saludos

Link to comment
Share on other sites

Hola a todos, a muchos os pasa que no se actualiza el módulo de novedades por sí solo cuando incluis nuevos productos.

 

Así se soluciona:

 

1. Localizamos el archivo: .../modules/blocknewproducts/blocknewproducts.php

2. Localizamos:

Línea 109:
public function hookRightColumn($params)
{
   if (!$this->isCached('blocknewproducts.tpl', $this->getCacheId()))


Línea 153:
public function hookdisplayHomeTabContent($params)
{
   if (!$this->isCached('blocknewproducts_home.tpl', $this->getCacheId('blocknewproducts-home')))

3. Sustituimos por:

 

Línea 109:

​public function hookRightColumn($params)

{

   $this->_clearCache('*');

   if (!$this->isCached('blocknewproducts.tpl', $this->getCacheId()))

 

 

Línea 153:

public function hookdisplayHomeTabContent($params)

{

   $this->_clearCache('*');

   if (!$this->isCached('blocknewproducts_home.tpl', $this->getCacheId('blocknewproducts-home')))

 

Listo!

 

Saludos

 

Si no se va a utilizar la caché sería más eficiente quitar el if de comprobación, en vez de borrar y generar cada vez.

 

Por otra parte esta modificación penaliza al rendimiento.

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