Post by itsmetya » Sun Mar 02, 2025 11:38 pm

Hi everyone, I would like to put 1 product on sale, and make sure that it can be put in the cart only 1 time and not in unlimited quantities, how can I do it? I put quantity 1, but even though there are 1 items, the option allows you to put that item in the cart infinite times

Newbie

Posts

Joined
Sat Feb 22, 2025 5:47 am

Post by by mona » Mon Mar 03, 2025 12:11 am

Did you check the marketplace ?

https://www.opencart.com/index.php?rout ... n_id=24641
https://www.opencart.com/index.php?rout ... n_id=31409
https://www.opencart.com/index.php?rout ... n_id=38861
https://www.opencart.com/index.php?rout ... n_id=42053
https://www.opencart.com/index.php?rout ... n_id=41132
https://www.opencart.com/index.php?rout ... n_id=38311
Etc etc etc

Or the forum
viewtopic.php?t=233822
Using google is usually better than the forum

In future please follow the forum rules. A minimum of OC version is always required

If you are using OC4 in any version it is not recommended for production sites. Use OC 3.0.4.0 which is stable.

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by itsmetya » Mon Mar 03, 2025 12:24 am

hi my oc v is 3.0.4.0

Do I have to pay for a module to make the basic maximum and minimum function work?

If I say that there are 3 products available, it still makes me add that same product infinitely, why? I also set it to subtract from the stock, but nothing

Newbie

Posts

Joined
Sat Feb 22, 2025 5:47 am

Post by by mona » Mon Mar 03, 2025 12:33 am

My opinion doesn’t matter but I if it is not viable for developers to create modules then you will be paying for commercial support.
Maximum is not part of Opencart default.
You could hard code it I suppose. Search google maybe someone has asked and someone answered or maybe stackoverflow.com
Maybe if you check the marketplace you will find something free.
Minimum works fine on default opencart as does stock reduction.
If you have extensions or theme you have not mentioned maybe that is the issue.

Maybe provide more information, screenshots, website and any error logs.

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by paulfeakins » Mon Mar 03, 2025 9:00 pm

itsmetya wrote:
Mon Mar 03, 2025 12:24 am
it still makes me add that same product infinitely, why?
It shouldn't let you order more than 1 though?

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Legendary Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by knowband.plugins » Thu Mar 06, 2025 3:16 am

itsmetya wrote:
Sun Mar 02, 2025 11:38 pm
Hi everyone, I would like to put 1 product on sale, and make sure that it can be put in the cart only 1 time and not in unlimited quantities, how can I do it? I put quantity 1, but even though there are 1 items, the option allows you to put that item in the cart infinite times
By default, OpenCart does not prevent users from adding a product to the cart in quantities exceeding the available stock. However, if "Stock Checkout" is disabled, a warning message will appear on the Cart Page, notifying users that the desired quantity is not available. Please refer to the screenshot attached.

Stock Checkout is a feature in OpenCart that, when enabled, allows customers to purchase more than the available stock quantity. If you wish to restrict users from ordering beyond the available stock, please ensure that this feature is disabled in your store settings.

Please follow the below steps to check whether the "Stock Checkout" is enabled or not on your store:
1. Go to System -> Settings from the left menu.
2. Edit your store. Go to the "Option" Tab.
3. Search for Stock Settings on the Page and disable "Stock Checkout".

Let us know if you are facing any other issues.

Attachments

???
Screenshot 2025-03-06 004534.png

Regards,
Knowband Team

Opencart Plugins: Knowband Store
Email: support@knowband.com


User avatar
Active Member

Posts

Joined
Thu Aug 04, 2016 2:56 pm
Who is online

Users browsing this forum: pprmkr and 16 guests