Problems, need help? Have a tip or advice? Post it here.
3 posts Page 1 of 1
I know CouchCMS does not support inventory yet - but we are all hoping it does soon! In the mean time, I am looking to implement a small work around for 'sold out' items.

Would it be possible to add a custom field in the control panel (when adding products) that tells how many of these items are available, then once one is purchased, this number decreases, and at 0 - the front end slaps a "sold out!" over the product and the paypal button is then disabled?

I am assuming this sort of thing would need to be a variable on the back end of the website.
Hi,

Would it be possible to add a custom field in the control panel (when adding products) that tells how many of these items are available, then once one is purchased, this number decreases,
While this would certainly be easily possible using the new data-bound-form feature, there is actually much more to the problem than that meets the eye.

Let us assume the following hypothetical scenario -
a visitor adds a certain amount of a product to his cart and then presses checkout.
This checkout event actually leads him away from our site to PayPal so this is the point where we'll have to adjust our inventory.
We do that.
The visitor now at PayPal, however, changes his mind about the purchase and simply drifts away elsewhere on the Internet leaving our inventory reduced for nothing.

You see the point?
The best point where inventory should be reduced is when we have a confirmation that a purchase has indeed actually been made.
PayPal does that asynchronously using IPN so our Cart needs to first keep persisted information about all 'orders' and their statuses - a checkout will create one with 'pending' status and when we receive the IPN it gets modified to 'confirmed' with the inventory getting reduced.

As you can see, we'll need a full-fledged order-management system for the inventory control to work.
Currently CouchCart does not have that but with databound-forms available now, I think we'll have one shortly.

Thanks.
KK wrote: Currently CouchCart does not have that but with databound-forms available now, I think we'll have one shortly.


Thank you KK! I understand the problem - but as for the new feature, hopefully it comes soon, I cannot wait!
3 posts Page 1 of 1