Error after update with product page

  • Posts: 67
  • Thank you received: 4
12 years 2 weeks ago #76337

Hi after doing a new update today for a HikaShop 2.0 in back end I got this error for changing things for the product and also on front end.(disable all the cache and no SEFs)

Error

SQL=SELECT category_id FROM jos_hikashop_product_category WHERE product_id=1 OR product_parent_id=1 ORDER BY ordering ASC


I also tried to add a new product to a category and got this error when clicking on the category that worked but error when clicking on the product 0 SQL=SELECT category_id FROM jos_hikashop_product_category WHERE product_id=2 OR product_parent_id=2 ORDER BY ordering ASC

Any tips to fix this or is this a bug? I tried to remove alla categories and products but the error appear anyhow when new set up with categories and products. The error appear when clicking on the product.

0 SQL=SELECT category_id FROM jos_hikashop_product_category WHERE product_id=3 OR product_parent_id=3 ORDER BY ordering ASC

rgds

Joomla 3.0.2 and HikaShop 2.0

Last edit: 12 years 2 weeks ago by ssnobben.

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
12 years 2 weeks ago #76451

Hi,

Sorry we have forgot a line in the install.hikashop.php file.
A column is missing in your database, thanks to go in your phpMyAdmin, and execute the following request:

ALTER TABLE  `#__hikashop_product_category` ADD  `product_parent_id` INT NOT NULL DEFAULT '0';

Replace "#_" by your database prefix.

The following user(s) said Thank You: ssnobben

Please Log in or Create an account to join the conversation.

  • Posts: 67
  • Thank you received: 4
12 years 1 week ago #77311

Hi

dont forget see above..

(the difference between "__"(double underline) and "_"(single underline))in the explanation above..ALTER TABLE `#__hikashop_product_category` ADD `product_parent_id` INT NOT NULL DEFAULT '0';

should be

ALTER TABLE `#_hikashop_product_category` ADD `product_parent_id` INT NOT NULL DEFAULT '0';

Last edit: 12 years 1 week ago by ssnobben.

Please Log in or Create an account to join the conversation.

  • Posts: 26159
  • Thank you received: 4028
  • MODERATOR
12 years 1 week ago #77314

Hi,

No.

We said you should replace "#_" by your database prefix.
So, if your database prefix is "jos", the table name would be "jos_hikashop_product_category".

As Nicolas said.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 67
  • Thank you received: 4
12 years 1 week ago #77324

Hi

I got this error too when trying to add menu to "Listing categories" after adding this..

Error

SQL=SELECT count(a.product_id) AS number_of_products,a.category_id FROM jos_hikashop_product_category AS a INNER JOIN jos_hikashop_product AS b ON a.product_id=b.product_id AND b.product_published>0 AND product_parent_id=0 WHERE a.category_id IN (17,18) GROUP BY a.category_id

ps Jerome

I did understand to change the # by my database prefix b u t this was not correct `#__hikashop ---> should be `#_hikashop

rgds

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
12 years 1 week ago #77397

Hi,

In the file: "components/com_hikashop/views/cateogry/view.html.php" in the function "listing()" replace the code:

						$database->setQuery('SELECT count(a.product_id) AS number_of_products,a.category_id FROM '.hikashop_table('product_category').' AS a INNER JOIN '.hikashop_table('product').' AS b ON a.product_id=b.product_id AND b.product_published>0 AND product_parent_id=0 WHERE a.category_id IN ('.implode(',',$ids).') GROUP BY a.category_id');
By:
						$database->setQuery('SELECT count(a.product_id) AS number_of_products,a.category_id FROM '.hikashop_table('product_category').' AS a INNER JOIN '.hikashop_table('product').' AS b ON a.product_id=b.product_id AND b.product_published>0 AND b.product_parent_id=0 WHERE a.category_id IN ('.implode(',',$ids).') GROUP BY a.category_id');

It had been already corrected on our end.

Last edit: 12 years 1 week ago by Xavier.
The following user(s) said Thank You: ssnobben

Please Log in or Create an account to join the conversation.

  • Posts: 67
  • Thank you received: 4
12 years 1 week ago #77449

Thanks that did it!

Now everything works.. :P

Please Log in or Create an account to join the conversation.

Time to create page: 0.077 seconds
Powered by Kunena Forum