Update product_quantity with -1 turns out unlimited

  • Posts: 29
  • Thank you received: 1
7 years 10 months ago #258419

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
7 years 10 months ago #258446

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.054 seconds
Powered by Kunena Forum