owen2345 / camaleon-ecommerce

This is an ecommerce plugin for CAMALEON CMS
MIT License
21 stars 20 forks source link

Able to change product quantity more than available during checkout #23

Open mazharoddin opened 8 years ago

mazharoddin commented 8 years ago

I am able to change product quantity more than available during checkout, but it should be restricted to currently available product quantity.

screen shot 2016-04-06 at 10 29 50 screen shot 2016-04-06 at 10 28 43
mazharoddin commented 8 years ago

@owen2345, also I observed that product availability quantity is not changed even after adding products to cart.

owen2345 commented 8 years ago

Product availability is changed after the cart is paid.

mazharoddin commented 8 years ago

ohh ok, Let me test it.

mazharoddin commented 8 years ago

Hi @owen2345, I have one query, if product availability is changed once payment is done, then how we can avoid two customers trying to add a product at same time, with current design both able to add product to cart, but finally only one customer's checkout will be successful. It would be frustrating experience for customer to complete all steps and finally find out product is not in stock.

So I feel its better update the product quantity whenever a customers added a item to cart, if customer didn't complete the transaction in time then revert back the quantity( e.g after 5 minutes). What do you feel?

mazharoddin commented 8 years ago

@owen2345 , product availability quantity is not changing even after I marked as payment as successful.

owen2345 commented 8 years ago

I agree with you @mazharoddin

mazharoddin commented 8 years ago

sure @owen2345. Thanks.

owen2345 commented 8 years ago

Fixed!

mazharoddin commented 8 years ago

Great ..thanks @owen2345

mazharoddin commented 8 years ago

Hi @owen2345, Now Product availability is changing after I marked as payment as successful. however the issue I originally reported still persists. i.e I am able to change the order quantity to any number during checkout.

screen shot 2016-08-27 at 12 27 16 pm
owen2345 commented 8 years ago

It is strange, I tested again with both kind of products (normal and variations) and works well: Product available (123): screen shot 2016-08-27 at 04 34 52

User x: can not update more than 23 screen shot 2016-08-27 at 04 34 25

User y: already has been taken 100 items but it still in cart screen shot 2016-08-27 at 04 34 07

mazharoddin commented 8 years ago

ohh ok, let me retest, but i am sure it was not working for me..any way thanks for looking it..

mazharoddin commented 8 years ago

Not sure, what's the issue, but I am able to change product quantity more than available at checkout.

screen shot 2016-08-27 at 2 57 37 pm screen shot 2016-08-27 at 2 57 43 pm
owen2345 commented 8 years ago

could you share me a repo or publish in heroku?

mazharoddin commented 8 years ago

Hi @owen2345 , Please find below for the repo, I newly created this repo to create this issue.

https://github.com/mazharoddin/camaleon_cms_debug

mazharoddin commented 8 years ago

One more issue I noticed is, user can checkout a product with '0' quantity, finally after completing all steps payment is failing with error related to coupon, but it should be better if we restrict checkout using '0' quantity.