AbanteCart Development > New Features Discussion

API request

(1/2) > >>

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)


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.


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....


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...

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.


[0] Message Index

[#] Next page

Go to full version
Powered by SMFPacks Social Login Mod