support

Poll

Do you want this as a core feature?

Yes
0 (0%)
No
0 (0%)

Total Members Voted: 0

Voting closed: August 22, 2012, 10:58:05 AM

Author Topic: API request  (Read 15029 times)

Offline Nimitz1061

  • Full Member
  • ***
  • Posts: 190
  • Karma: +22/-0
  • No matter where you go, there you are...
    • View Profile
API request
« on: June 26, 2012, 08:03:34 PM »
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

Offline abantecart

  • Administrator
  • Hero Member
  • *****
  • Posts: 4363
  • Karma: +301/-10
    • View Profile
    • Ideal Open Source Ecommerce Solution
Re: API request
« Reply #1 on: June 27, 2012, 09:38:22 AM »
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
Please  rate your experience or leave your review
We need your help to build better free open source ecommerce platform for everyone. See how you can help

Offline Nimitz1061

  • Full Member
  • ***
  • Posts: 190
  • Karma: +22/-0
  • No matter where you go, there you are...
    • View Profile
Re: API request
« Reply #2 on: June 29, 2012, 12:28:31 PM »
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

Offline Nimitz1061

  • Full Member
  • ***
  • Posts: 190
  • Karma: +22/-0
  • No matter where you go, there you are...
    • View Profile
Re: API request
« Reply #3 on: June 29, 2012, 12:52:55 PM »
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...

Offline abantecart

  • Administrator
  • Hero Member
  • *****
  • Posts: 4363
  • Karma: +301/-10
    • View Profile
    • Ideal Open Source Ecommerce Solution
Re: API request
« Reply #4 on: June 29, 2012, 04:19:01 PM »
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.

Please  rate your experience or leave your review
We need your help to build better free open source ecommerce platform for everyone. See how you can help

Offline Nimitz1061

  • Full Member
  • ***
  • Posts: 190
  • Karma: +22/-0
  • No matter where you go, there you are...
    • View Profile
Re: API request
« Reply #5 on: June 30, 2012, 07:46:33 AM »
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.



I thought suggesting core feature developments was what this sub-forum was about.  We're looking to prevent issues with future upgrades and are asking the core development team to encapsulate this as a method because it extends the standard API in such a way as to limit the impact of future development. 

David

Offline abantecart

  • Administrator
  • Hero Member
  • *****
  • Posts: 4363
  • Karma: +301/-10
    • View Profile
    • Ideal Open Source Ecommerce Solution
Re: API request
« Reply #6 on: July 02, 2012, 08:21:55 AM »
Thank you for suggestion. We will consider this. Unfortunately, I can not give you exact date yet.
Please  rate your experience or leave your review
We need your help to build better free open source ecommerce platform for everyone. See how you can help

Offline Nimitz1061

  • Full Member
  • ***
  • Posts: 190
  • Karma: +22/-0
  • No matter where you go, there you are...
    • View Profile
Re: API request
« Reply #7 on: July 03, 2012, 10:14:06 AM »
I understand the time scale issues.  We are still involved in design activities ourselves, so the timing is good.

We will be doing a number of addon projects which will need to affect quantity on hand tracking throughout the cart.  It will be best for us if we have methods which will remain stable, so I appreciate your efforts here.

Thanks.

David

Offline abantecart

  • Administrator
  • Hero Member
  • *****
  • Posts: 4363
  • Karma: +301/-10
    • View Profile
    • Ideal Open Source Ecommerce Solution
Re: API request
« Reply #8 on: July 03, 2012, 03:06:35 PM »
Stability is a key. We are working on that. I really want to put many features into core, but there is a negative side too that effects stability of core if done too fast.
Leaving some room for developers to create extensions :)
Please  rate your experience or leave your review
We need your help to build better free open source ecommerce platform for everyone. See how you can help

 

Powered by SMFPacks Social Login Mod