0 in DB for minimum quantity that is 1 after imprt

  • Posts: 101
  • Thank you received: 12
11 years 5 months ago #106678

Hi,

When I import products with for example :
price_value; price_min_quantity
2.66|2.66;1|4

I get 0 in the product details page as you can see in the first picture below.
In the second picture you can see that in the database it's also 0.
And in the backend number 1 is shown.







It seems that 1 as minimum quantity is not appreciated and converted to 0 in the database.

This is a problem for us.

Thanks.
Cheers.

Last edit: 11 years 5 months ago by SG.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
11 years 5 months ago #106679

Yes. That's normal. 0 and 1 are treated the same for the min quantity since you can't add a product with a quantity of 0 in the cart.
So HikaShop always use 0 in the database while it displays 1 in the interface for historical questions.

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

  • Posts: 101
  • Thank you received: 12
11 years 5 months ago #106687

Hi Nicolas,

I can understand that you can't add a quantity of 0 to a cart :-)
But why did it become zero in the first place since I had 1 in the import csv file.
It shouldn't have altered the values.
The main problem now for the client is that the min. quantity in the product page is now 0 which should be 1.

Thanks

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
11 years 5 months ago #106720

As I said, it's for historical reasons.
HikaShop always set it to 0 in the database so that it works properly.

The min quantity is not displayed on the product page.
If you display it yourself, then simply add a check before...It's not complex:
if($price->price_min_quantity==0) $price->price_min_quantity=1;

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

Time to create page: 0.059 seconds
Powered by Kunena Forum