News:

Looking for documentation? Take a look on our wiki

Main Menu

stock refresihing / double sale

Started by ntunay, October 02, 2012, 22:35:47 PM

Previous topic - Next topic

ntunay

Hi

i created a product has 1 stock. but if i click two times to add to cart button. it adds two products to cart. it is very big problem because there is only 1 product.
if product has 1 stock. it shoudnt sale two. when i click to add to cart button stock must be '0' untill logout end.

sorry about broken english but it is relly big trouble for me.

besides if i confirmed the cart but didnt finished the proses. ( i mean no credit cart confirm, no sale, stocks is changing)



bytelord

Hi,

http://forum.virtuemart.net/index.php?topic=108215.msg362064#msg362064

But actually you didn't mention your joomla and virtuemart version you are using.

Regards
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!


bytelord

did you read the post after all? did you solve it?
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

ntunay

no i couldnt solve it. The posts dont show a solution for me. they recommend notify option but notify option doesnt stop double order. you can still buy a product twice time which doesnt exist in stock

someone say something about cart.php but i couldnt understand it

bytelord

For me is working. just testing it again. When i click again add-to-cart does not let me to add it twice.
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

ntunay

i tried again again and again. when i click the add to cart button second time it adds to cart second product. when i click third time. it adds  3 products
please click http://shop.ng-style.com/index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=2746&virtuemart_category_id=14

and see


(by the way. thanks for quick help)

bytelord

Hello,

i think the problem is that you have commend the quantity box controls from product page that includes code for the validation. if you want to hide them it's better to use css and not commend them.

Please test it again with the right configuration and by restoring the lines you commented on the productdetails template (addtocart).

Regards
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

ntunay

i already use css to remove quantity. now i upload the original vm product detail page. problem still there.  should i use original css too.
thanks again

ntunay

i remove "language Javascript Fix"
i think it s okey now

bytelord

hi,

i don't think original CSS you cause any issues. I tested many times on two installations and is working (2.0.10 and 2.0.11e).

I have configure the product status as: In Stock:2, Booked:0, Low stock: 1, max product quantity:nothing

Then under configuration -> shopfront on the  Action when a Product is Out of Stock i have select Displays 'Notify Me' instead of 'Add To Cart' button.

Test it and works fine.

Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

bytelord

Quote from: ntunay on October 03, 2012, 10:26:30 AM
i remove "language Javascript Fix"
i think it s okey now

hmm ... didn't see any javascript issues on your site but didn't check if something misses. Also you will need "Using the product Scripts". Some time languages is an issue.

So, you find the solution :)
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

ntunay

i guess i did :)

but quantity button came back :o

i didnt understand why




bytelord

hide it with CSS and clean your browser cache, i think you have commented that lines inside your template
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

ntunay

i dont know why its not working again.