If this is your first visit, check our documentation. To post, register or login.

add to cart the first lucky guy

Started by dastyen on 10 Mar 2022, 4:52 AM · Views: 7,172

Results 1 to 20 of 20
10 Mar 2022, 4:52 AM
#1
dastyen avatar

dastyen

New Zenner

Join Date:
Sep 2018
Location:
athens
Posts:
36
Plugin Contributions:
0

add to cart the first lucky guy

Hello

I use zen cart 1.57
PHP Version: 7.3.33

In the Zen cart the quest 1 and the quest 2 (or the customer 1 and the customer 2) both they can add to cart the same product even the quantity it is one 1 piece .
*note The only available shipping module is paypal express checkout.

My question is..

Does will have any risk to come to my store more than one order for the specific product ?.

Can I change something in admin panel (setup) to configure and allowed only one customer (the first lucky or fast) add to his basket this unique product ?

Thanks in advance.

10 Mar 2022, 5:01 AM
#2
dastyen avatar

dastyen

New Zenner

Join Date:
Sep 2018
Location:
athens
Posts:
36
Plugin Contributions:
0

Re: add to cart the first lucky guy

Dastyen:

Hello

I use zen cart 1.57
PHP Version: 7.3.33

In the Zen cart the quest 1 and the quest 2 (or the customer 1 and the customer 2) both they can add to cart the same product even the quantity it is one 1 piece .
*note The only available shipping module is paypal express checkout.

My question is..

Does will have any risk to come to my store more than one order for the specific product ?.

Can I change something in admin panel (setup) to configure and allowed only one customer (the first lucky or fast) add to his basket this unique product ?

Thanks in advance.

I forgot to mention I have already setup in admin the Stock below

  1. Track stock, do not permit backorders

Check stock level = true
Subtract stock = true
Allow Checkout = false

10 Mar 2022, 11:14 AM
#3
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,760
Plugin Contributions:
56

Re: add to cart the first lucky guy

The lucky guy is the one who checks out and pays first. Everyone else snoozes and loses.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

10 Mar 2022, 1:40 PM
#4
dastyen avatar

dastyen

New Zenner

Join Date:
Sep 2018
Location:
athens
Posts:
36
Plugin Contributions:
0

Re: add to cart the first lucky guy

swguy:

The lucky guy is the one who checks out and pays first. Everyone else snoozes and loses.

Yes but maybe two customers can be lucky if they press the place order the same time

10 Mar 2022, 3:42 PM
#5
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: add to cart the first lucky guy

Dastyen:

Yes but maybe two customers can be lucky if they press the place order the same time

As said, the first one to win is the one that confirms their order first. The possibility of two or more individuals accomplishing that at exactly the same microsecond is infinitesimally small. It is true and possible for two or more people to have the same item in their cart, but whomever is slower will be returned to the shopping cart screen if in their attempt to purchase the item(s) are no longer available.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

10 Mar 2022, 5:18 PM
#6
dastyen avatar

dastyen

New Zenner

Join Date:
Sep 2018
Location:
athens
Posts:
36
Plugin Contributions:
0

Re: add to cart the first lucky guy

mc12345678:

As said, the first one to win is the one that confirms their order first. The possibility of two or more individuals accomplishing that at exactly the same microsecond is infinitesimally small. It is true and possible for two or more people to have the same item in their cart, but whomever is slower will be returned to the shopping cart screen if in their attempt to purchase the item(s) are no longer available.

I make test from two different PC on my desktop with differents IP and different beta accounts using temporary the COD payment way.
I press the same time both buttons (I use my two hands) -<place orders>- in the same product with one item quantity.
Both customers receive confirmation email and the orders in their histiry of orders.
The product after was disable of course with (-1) quantity.

10 Mar 2022, 5:45 PM
#7
dastyen avatar

dastyen

New Zenner

Join Date:
Sep 2018
Location:
athens
Posts:
36
Plugin Contributions:
0

Re: add to cart the first lucky guy

Dastyen:

I make test from two different PC on my desktop with differents IP and different beta accounts using temporary the COD payment way.
I press the same time both buttons (I use my two hands) -<place orders>- in the same product with one item quantity.
Both customers receive confirmation email and the orders in their histiry of orders.
The product after was disable of course with (-1) quantity.

Now just make test with the same way again and I count, it tooks 3-5 second to update the database the stock be zero and disable the product from the webshop after the first purchase.
When I try to purchase from the second one acount direct my cart be empty.

10 Mar 2022, 6:05 PM
#8
dastyen avatar

dastyen

New Zenner

Join Date:
Sep 2018
Location:
athens
Posts:
36
Plugin Contributions:
0

Re: add to cart the first lucky guy

Dastyen:

Now just make test with the same way again and I count, it tooks 3-5 second to update the database the stock be zero and disable the product from the webshop after the first purchase.
When I try to purchase from the second one acount direct my cart be empty.

Another new one test.

Both accounts on the final stage of place order each one has 1 piece in their cart.
I press the first place order and the order confirmed.
I go and check the quantity was 0 and the product disable.
When press the place order button from the second account the confirmation of the order comes to my email.

So if 30 customers they run add to their cart the item and arrive to the stage of place order, then I think everyone will have from one email confirmation of their orders.

10 Mar 2022, 6:53 PM
#9
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,760
Plugin Contributions:
56

Re: add to cart the first lucky guy

Set Admin > Configuration > Stock > Allow Checkout = false and people won't be able to complete checkout if the product is out of stock.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

10 Mar 2022, 7:00 PM
#10
dastyen avatar

dastyen

New Zenner

Join Date:
Sep 2018
Location:
athens
Posts:
36
Plugin Contributions:
0

Re: add to cart the first lucky guy

swguy:

Set Admin > Configuration > Stock > Allow Checkout = false and people won't be able to complete checkout if the product is out of stock.

Already I have this setup in the stock configuration.

10 Mar 2022, 7:27 PM
#11
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: add to cart the first lucky guy

swguy:

Set Admin > Configuration > Stock > Allow Checkout = false and people won't be able to complete checkout if the product is out of stock.

See post #2

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

10 Mar 2022, 7:54 PM
#12
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,760
Plugin Contributions:
56

Re: add to cart the first lucky guy

The last check is on the checkout confirmation page. If you wanted to reduce the window further, you could do stock checking in

includes/modules/YOURTEMPLATE/checkout_process.php

But really, you'd be better stopping and asking yourself: is this really a problem for my business?

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

11 Mar 2022, 8:48 AM
#13
dastyen avatar

dastyen

New Zenner

Join Date:
Sep 2018
Location:
athens
Posts:
36
Plugin Contributions:
0

Re: add to cart the first lucky guy

While placing the order, your query will allow only one transaction and after the completion of that it will process another request.

This way use also follow the zen cart when many customers try to purchase from your online store via paypal express checkout ?

11 Mar 2022, 8:50 AM
#14
dastyen avatar

dastyen

New Zenner

Join Date:
Sep 2018
Location:
athens
Posts:
36
Plugin Contributions:
0

Re: add to cart the first lucky guy

swguy:

The last check is on the checkout confirmation page. If you wanted to reduce the window further, you could do stock checking in

includes/modules/YOURTEMPLATE/checkout_process.php

But really, you'd be better stopping and asking yourself: is this really a problem for my business?

you have right in the last sentence I will try avoid in the future.

11 Mar 2022, 8:54 AM
#15
dastyen avatar

dastyen

New Zenner

Join Date:
Sep 2018
Location:
athens
Posts:
36
Plugin Contributions:
0

Re: add to cart the first lucky guy

swguy:

The last check is on the checkout confirmation page. If you wanted to reduce the window further, you could do stock checking in

includes/modules/YOURTEMPLATE/checkout_process.php

But really, you'd be better stopping and asking yourself: is this really a problem for my business?

You have a code to add in this php file or must change something like from false to true

11 Mar 2022, 2:20 PM
#16
dastyen avatar

dastyen

New Zenner

Join Date:
Sep 2018
Location:
athens
Posts:
36
Plugin Contributions:
0

Re: add to cart the first lucky guy

Dastyen:

You have a code to add in this php file or must change something like from false to true

What I realize In Live Store ?
If more than one customer already add to the cart the same product with quantity 1 and already both has going to the next step < Home Checkout Shipping Method > in the end both they had purchase the same product and in admin panel show -1 stock.
So the Stock module work only before the customer go to Home Checkout Shipping Method.

11 Mar 2022, 3:52 PM
#17
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,760
Plugin Contributions:
56

Re: add to cart the first lucky guy

I already told you there's a check when the checkout confirmation page is loaded.

But remember how I told you this probably wouldn't be a problem for your business and you agreed?
It probably won't be a problem for your business. You have plenty to worry about without worrying about this.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

12 Mar 2022, 8:52 AM
#18
dastyen avatar

dastyen

New Zenner

Join Date:
Sep 2018
Location:
athens
Posts:
36
Plugin Contributions:
0

Re: add to cart the first lucky guy

swguy:

I already told you there's a check when the checkout confirmation page is loaded.

But remember how I told you this probably wouldn't be a problem for your business and you agreed?
It probably won't be a problem for your business. You have plenty to worry about without worrying about this.

May I have the specific code lines of the checkout information page

12 Mar 2022, 9:44 AM
#19
dastyen avatar

dastyen

New Zenner

Join Date:
Sep 2018
Location:
athens
Posts:
36
Plugin Contributions:
0

Re: add to cart the first lucky guy

Dastyen:

May I have the specific code lines of the checkout information page

this lines have connection ?

<div class="card card--padding card--bg"> <h4><?php echo HEADING_PRODUCTS; ?></h4> <?php if ($flagAnyOutOfStock) { ?> <?php if (STOCK_ALLOW_CHECKOUT == 'true') { ?> <div class="alert alert-warning alert-dismissable"><?php echo OUT_OF_STOCK_CAN_CHECKOUT; ?></div> <?php } else { ?> <div class="alert alert-warning alert-dismissable"><?php echo OUT_OF_STOCK_CANT_CHECKOUT; ?></div> <?php } //endif STOCK_ALLOW_CHECKOUT ?> <?php } //endif flagAnyOutOfStock ?>
15 Mar 2022, 6:51 AM
#20
dastyen avatar

dastyen

New Zenner

Join Date:
Sep 2018
Location:
athens
Posts:
36
Plugin Contributions:
0

Re: add to cart the first lucky guy

swguy:

I already told you there's a check when the checkout confirmation page is loaded.

But remember how I told you this probably wouldn't be a problem for your business and you agreed?
It probably won't be a problem for your business. You have plenty to worry about without worrying about this.

yep I open another domain and my problem solved.Thank you.