Post by austurki@gmail.com » Tue Feb 19, 2019 12:54 am

hi
if i have item stock 1 pcs
it will accept to add 2 pcs to cart and note appeare in cart
how to prevent add more than available stock when i add to cart?

New member

Posts

Joined
Thu May 18, 2017 7:25 am

Post by straightlight » Tue Feb 19, 2019 2:00 am

Vague explanation provided. Please read the forum rules.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.

F. Rules:

- viewtopic.php?f=176&t=200480
- viewtopic.php?f=176&t=200804


Regards,
Straightlight


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by cyclops12 » Wed Feb 20, 2019 1:36 am

straightlight wrote:
Tue Feb 19, 2019 2:00 am
Vague explanation provided. Please read the forum rules.
Not vague at all.....
If you have only 1 stock of a certain product, you can still choose 2 or more in the quantity box on product page then click add to cart.
You will not see an error until you view the cart page as the quantity vs stock isn't checked until the cart page.
It would be better to have the check as you insert the quantity, then you will instantly see the error that there isn't enough quantity to add to cart.
Maybe this should be added to future versions ??

Active Member

Posts

Joined
Sun Sep 27, 2015 1:10 am

Post by straightlight » Wed Feb 20, 2019 2:12 am

It would be better to have the check as you insert the quantity, then you will instantly see the error that there isn't enough quantity to add to cart.
I recently finished programming these types of validations. However, since a sale cannot be stopped electronically as long as the product has been announced on the store and available for purchase despite the quantity of the products, the only alternate way I found was to notify the administrators of the store by email and by the admin reports whenever the product option quantity level is at 0 whether it originates from the store, the cart or from the orders especially since the order options do not handle any quantities for … an unknown reason (still on the latest OC version on this day).

As an alternative, in the latest release, product variants can be used.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.

F. Rules:

- viewtopic.php?f=176&t=200480
- viewtopic.php?f=176&t=200804


Regards,
Straightlight


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON
Who is online

Users browsing this forum: fatelvis and 15 guests