Jump to content
sunshinevape

Footer + Category block BUG?

Recommended Posts

recently i installed Yotpo a very functional product comment module. It looked great but made my product block in footer triplicate.. i reset both modules and re installed but keep getting a triplicate list under categories in footer.. I was forced to delete categories hook in footer but now everything is shifted left. kind of ugly

 

i am looking for simple fixes to this while keeping Yopto ( couldnt get prestashop product comment module to work and went elsewhere )

 

i do not need to have categories in footer at all just happens to look ok but

- what do i replace it with?

- how do i center the lists in footer?

- fix bug and keep categories?

- better footer out there ?

 

any free advice or suggestions would be useful and appreciated

 

 

http://vvcap.net/db/...62V_ZR_YHHB.htp (ugly footer without category block)

 

http://vvcap.net/db/...aEiGJ-LZpEr.htp (triplicate categories, still ugly)

Edited by sunshinevape (see edit history)

Share this post


Link to post
Share on other sites

Try this and see if it works for your issue.

 

blockcategories.php - line 245

This appears to be a bug is PS. Basically the query:

 

SELECT c.id_parent, c.id_category, cl.name, cl.description, cl.link_rewrite

FROM `'._DB_PREFIX_.'category` c

LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON (c.`id_category` = cl.`id_category` AND `id_lang` = '.$id_lang.')

LEFT JOIN `'._DB_PREFIX_.'category_group` cg ON (cg.`id_category` = c.`id_category`)

WHERE (c.`active` = 1 OR c.`id_category` = 1)

'.((int)($maxdepth) != 0 ? ' AND `level_depth` <= '.(int)($maxdepth) : '').'

AND cg.`id_group` IN ('.pSQL($groups).')

ORDER BY `level_depth` ASC, c.`position` ASC

 

 

Returns a match for every customer group. So if a category is in multiple groups it is returned multiple times. To fix this add the word DISTINCT to the query in public function hookFooter() blockcategories.php

 

 

 

SELECT DISTINCT c.id_parent, c.id_category, cl.name, cl.description, cl.link_rewrite

FROM `'._DB_PREFIX_.'category` c

LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON (c.`id_category` = cl.`id_category` AND `id_lang` = '.$id_lang.')

LEFT JOIN `'._DB_PREFIX_.'category_group` cg ON (cg.`id_category` = c.`id_category`)

WHERE (c.`active` = 1 OR c.`id_category` = 1)

'.((int)($maxdepth) != 0 ? ' AND `level_depth` <= '.(int)($maxdepth) : '').'

AND cg.`id_group` IN ('.pSQL($groups).')

ORDER BY `level_depth` ASC, c.`position` ASC

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More