Jump to content

Error in Category.php?


Recommended Posts

I've been trying to get my recently upgraded prestashop going all day. It's version 1.4.6.2. And I'm using the new prestashop theme. I've upgraded my shop once today and then also did a clean install and both times, my category block ceases to appear after a while. It's correctly hooked to left column and footer but doesn't show. After each upgrade it was there, but when I started working with categories and products it just disappeared.

 

I've got this error on my product pages and on my category pages, which might be related to the issue....

 

 

Warning: Invalid argument supplied for foreach() in [.............]classes/Category.php on line 480

 

Line 480 looks like part of the code for generating the subcategory list.

 

Line 480 is marked in bold below...

 

GROUP BY c.`id_category`

ORDER BY `level_depth` ASC, c.`position` ASC');

 

foreach ($result AS &$row)

{

$row['id_image'] = (file_exists(_PS_CAT_IMG_DIR_.$row['id_category'].'.jpg')) ? (int)($row['id_category']) : Language::getIsoById($id_lang).'-default';

$row['legend'] = 'no picture';

}

return $result;

 

Does anybody have any suggestions? This has happened after an upgrade, and then again after a complete re-install. I even got the version code from two different sources. So the common denominator is either me, my host or prestashop.

 

NOTE: Categories do appear in the top horizontal menu. Just not in the blocks.

Link to comment
Share on other sites

The one thing I've done with languages is disable the select language module. As all my products are english language books, I didn't think the select language option would be needed. Do you think that could create this issue? Thanks for taking an interest Bellini13.

Link to comment
Share on other sites

Sorry for the delay in getting back to you, I've been traveling.

 

I reinstalled the language block and viola, my category module was back and running. The layout is wrong, particularly in the footer, but at least it is visible now. I'll have a play and see if I can sort out the layout issue.

 

I haven't associated any pictures with categories.

 

The website is www.pioneerhandbooks.com if you'd like to have a look at that layout issue/

 

Thank you for the support Bellini13. Merry Christmas too.

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