AbanteCart Development > New Features Discussion
API request
Nimitz1061:
Can we get the quantity on hand checks encapsulated and hooked? This would be most helpful for a project we're working on..
(particularly concerned with add to cart and cart validation in checkout)
David
abantecart:
There is no way currently to get quantity for the product. This was hidden for storefront users. There was a concern with unwanted requests for product quantity.
This can be added as easy as creating new controller quantity.php with access to product model.
public_html/storefront/controller/api/product/quantity.php
Nimitz1061:
I'm not looking for a way to serve up quantity on hand to the customer, but for checks of requested quantity against quantity on hand.
It would appear to be necessary to add this to existing controllers....
David
Nimitz1061:
Looking at core/lib/cart.php - I think what we would need would be to have a method added, say checkQOH or checkQuantity that encapsulates existing checks against quantity on hand.
This should allow us to add the additional controllers we need...
abantecart:
2 important points before you change core code:
1. I suggest to extend class rather than change it. This will prevent issues with future upgrades.
2. If you think this is missing or important feature, you can suggest it for us to develop, or even better, you can develop it and suggest for us to add it to the core.
Navigation
[0] Message Index
[#] Next page
Go to full version