Skip to main content

Update product_quantity with -1 turns out unlimited

More
9 years 9 months ago #258419 by haur0214
-- HikaShop version -- : 2.6.4

Dear support,

We encounter that when we import csv file to update product_quantity
(with 'Update the product quantity instead of replacing it' turns on),
product quantity become unlimited instead of deduct 1 from current product quantity.

Is this a bug or we have another solution to have this problem solve?

Thank you :)

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

More
9 years 9 months ago #258446 by nicolas
Hi,

Mmm well it's not really a bug. This allows to you update the quantity to unlimited as -1 means unlimited in HikaShop.
The problem is that you can't decrease the quantity with the 'Update the product quantity instead of replacing it' option turned on.
If you want to change that, you can replace the line:
if(JRequest::getInt('update_product_quantity','0') && $field=='product_quantity' && $product->product_quantity != -1){
to:
if(JRequest::getInt('update_product_quantity','0') && $field=='product_quantity'){
in the file administrator/components/com_hikashop/helpers/import.php
The following user(s) said Thank You: haur0214

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

Time to create page: 0.135 seconds
Powered by Kunena Forum