Shoppica 2.1.3 error

This topic has been marked as not resolved.

Hi, I found a bug in Shoppica theme.

Versions info:
OpenCart 1.5.3.1
Shoppica 2.1.3

Steps to reproduce:
1. Remove all categories and all products using Admin panel
2. Go to some product through website url (for example: http://myshop.com/index.php?route=product/product&product_id=43)

Result:
Error message recieved on opened page:

“Notice: Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘) AND cd.language_id = 2 AND c2s.s’ at line 7
Error No: 1064
SELECT c.category_id, COUNT(p2c.category_id) AS products_count, GROUP_CONCAT(p2c.product_id) AS ids FROM category c INNER JOIN category_description cd ON (c.category_id = cd.category_id) INNER JOIN category_to_store c2s ON (c.category_id = c2s.category_id) LEFT JOIN product_to_store AS p2s ON p2s.store_id = c2s.store_id LEFT JOIN product_to_category AS p2c ON c.category_id = p2c.category_id AND p2c.product_id = p2s.product_id WHERE c.category_id IN () AND cd.language_id = 2 AND c2s.store_id = 0 AND c.status = 1 AND c.sort_order -1 GROUP BY c.category_id ORDER BY c.sort_order, LCASE(cd.name) in /home/myshop/myshop.com/www/system/database/mysql.php on line 49″

Actual link:

Comments:
It seems that error appears at getCategoryTreeWithTotalProductsMaxLevel2 method (line 64):

WHERE c.category_id IN (‘ . implode(‘,’, $ids) . ‘)

Array $ids is empty (due to all products and categories were removed), which causes error.

August 22, 2012 at 5:47 pm #12834

Thanks for the report. This error has been fixed in the upcoming 2.2.0 update. It should be released within hours.

Regards,
ThemeBurn team

August 27, 2012 at 5:45 pm #12957
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.