- Posts: 101
- Thank you received: 12
0 in DB for minimum quantity that is 1 after imprt
13 years 4 months ago - 13 years 4 months ago #106678
by SG
0 in DB for minimum quantity that is 1 after imprt was created by SG
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.
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: 13 years 4 months ago by SG.
Please Log in or Create an account to join the conversation.
13 years 4 months ago #106679
by nicolas
Replied by nicolas on topic 0 in DB for minimum quantity that is 1 after imprt
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.
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.
13 years 4 months ago #106687
by SG
Replied by SG on topic 0 in DB for minimum quantity that is 1 after imprt
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
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.
13 years 4 months ago #106720
by nicolas
Replied by nicolas on topic 0 in DB for minimum quantity that is 1 after imprt
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;
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.158 seconds