Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Quantity already in cart message


Recommended Posts

Would be cool to have a message on the product page that displays if the customer already has the product in their basket and in what quantity. I've seen this on other sites and it's quite helpful.

The water in a vessel is sparkling; the water in the sea is dark. The small truth has words which are clear; the great truth has great silence.

- Rabindranath Tagore

Link to comment
Share on other sites

Yes, of course they can click on the their cart to check. My set up is a little different in that I only display available quantity and if customer adds all that i have in stock to their cart and navigates back to product page they will see an out of stock message, because they have all that is available in their cart already.

The water in a vessel is sparkling; the water in the sea is dark. The small truth has words which are clear; the great truth has great silence.

- Rabindranath Tagore

Link to comment
Share on other sites

13 hours ago, ArtcoInc said:

@Smoky Barnable

I've seen where there's a message that says, "You've bought this item on xx/xx/xxxx", and I find that useful.

M

Wouldnt the customer need to be logged into see that sort of message though.

REMEMBER BACKUP, BACKUP AND BACKUP

Link to comment
Share on other sites

2 hours ago, 14steve14 said:

Wouldnt the customer need to be logged into see that sort of message though.

The message regarding order history is not relevant to this post. This idea is for shops that tightly control their inventory and sell only available stock. It would only be a helpful message to let the buyer know how many items they currently have in their cart, if any.  Just saves the bother of having to check the cart if customer can't remember if they added it or not...and in what quantity.

The water in a vessel is sparkling; the water in the sea is dark. The small truth has words which are clear; the great truth has great silence.

- Rabindranath Tagore

Link to comment
Share on other sites

On a related note, has anyone thought about if two customers checkout out at exactly the same time with the same product in their cart? For example, if you only have 1 in stock and both customers attempt to checkout at the same time. I'm not sure what the default code is but I remember a few years back I wrote code to address this. After the first customer checks out the item would disappear from the others cart. All saved carts would be adjusted to available quantities in real time. Hopefully that is the default logic now...haven't checked in awhile.

The water in a vessel is sparkling; the water in the sea is dark. The small truth has words which are clear; the great truth has great silence.

- Rabindranath Tagore

Link to comment
Share on other sites

15 minutes ago, Smoky Barnable said:

two customers checkout out at exactly the same time

Never thought of that! but would that not be caught earlier? say if stock is only 1 then only one should be able to add to cart! or have I missed somthing? Also the chances of 2 people having the same item in cart that is sock 1 and checking out the exact same second is .....?

 

Link to comment
Share on other sites

8 minutes ago, JcMagpie said:

Never thought of that! but would that not be caught earlier? say if stock is only 1 then only one should be able to add to cart! or have I missed somthing? Also the chances of 2 people having the same item in cart that is sock 1 and checking out the exact same second is .....?

I'm pretty sure the product stays in inventory until checkout. So two or more customers could have the item in their carts or saved carts until someone actually complete purchase, then the item should be removed from all saved carts and session carts.

The water in a vessel is sparkling; the water in the sea is dark. The small truth has words which are clear; the great truth has great silence.

- Rabindranath Tagore

Link to comment
Share on other sites

Ok just checked and item with sock of 1 is able to be added to the cart of more than one person at the same time. Checked on CE Frozen and Edge. To much hassle to checkout

simultaneously check out! not sure how you would achive that, also very unlikly that both would stay in sync all through check out. First one to finish gets the order, second one will see sorry out of stock and can finish depending on your store settings. That's what I found on testing.

 

Link to comment
Share on other sites

27 minutes ago, Smoky Barnable said:

After the first customer checks out the item would disappear from the others cart. All saved carts would be adjusted to available quantities in real time. Hopefully that is the default logic now...haven't checked in awhile.

I think it is the default logic.

366146680_Image002.png.a4a919f97209b2fe64064d786a265dfd.png

I guess this is what you had in mind?  I had it custom coded by someone at this forum.

Thanks, Eddy

Link to comment
Share on other sites

This is where the  product no stock button add-on will be usefull as the person will see the status turn to "out of stock" as soon as checkout is completed and they refresh page. You could also use the product info New JcM Stock Date Available add-on as that too will update to show no stock :) However the Your shopping cart is not beeing updated it still show 1 item in the cart and you have to manualy remove that item.

 

 

image.png.5add0a74f0b57b760311ef80c5963b8d.png

image.png.76ab6afc43c2f0f9fe0e52897345bdd7.png

 

Link to comment
Share on other sites

2 minutes ago, JcMagpie said:

This is where the  product no stock button add-on will be usefull as the person will see the status turn to "out of stock" as soon as checkout is completed and they refresh page. You could also use the product info New JcM Stock Date Available add-on as that too will update to show no stock :) However the Your shopping cart is not beeing updated it still show 1 item in the cart and you have to manualy remove that item.

 

 

image.png.5add0a74f0b57b760311ef80c5963b8d.png

image.png.76ab6afc43c2f0f9fe0e52897345bdd7.png

So it is impossible to checkout even though the out of stock item is still shown in your cart?

 

The water in a vessel is sparkling; the water in the sea is dark. The small truth has words which are clear; the great truth has great silence.

- Rabindranath Tagore

Link to comment
Share on other sites

23 minutes ago, Smoky Barnable said:

I'm pretty sure the product stays in inventory until checkout. So two or more customers could have the item in their carts or saved carts until someone actually complete purchase, then the item should be removed from all saved carts and session carts.

The stock is checked several times during checkout. The first time in shopping cart and the last time in checkout_process.php and the stock level change is done there (or in the payment module if the payment does bypass checkout process). So there is really very little probability or none that 2 customers will be at the same point in checkout process with the same product and access the databse for the stock check at exact the same second (or thousand part of second) if this is possible. Thinking loud I would say it is not possible to access and alter the database for more than one user at exact the same time.

Link to comment
Share on other sites

8 minutes ago, Smoky Barnable said:

So it is impossible to checkout even though the out of stock item is still shown in your cart?

that depends on how you set up the store, In stock osC you can select if checkout is posiable with zero stock in admin. If you use my no stock button add-on it overides stock osC as the button is didabled so you can not add the product to cart once it is zero stock. So belt and braces turn checkout false in admin and use no stock button, which you need to do in product listings as well.

I'm sure it could be done better so that if no checkout on zero stock is set in admin all add to cart buttons get automaticly disabled and show no stock. That however is for a pro.

 

Link to comment
Share on other sites

A balloon tag, or in the following case a tick, can be placed next to the [Add-to-cart] button. So, before the user click on the Add-to-cart button, he will have known the item is already in the cart, and how many.

Quote

// to add a tick and tooltip to show quantity when the item is in the cart
    $products = $cart->get_products();
    $incart = '';
    for ($i=0, $n=sizeof($products); $i<$n; $i++) {
              $first = current(explode("{", $products[$i]['id']));
            if ($first == $product_info['products_id']) {
                $incart = ' <span data-toggle="tooltip" data-placement="bottom" title="' . $products[$i]['quantity'] . ' already in cart">✔</span>';
        }
    }

Do an echo statement after the button:

Quote

echo $incart;

I apply this code to Jack_cms "Product Quantity Box" and it works for me.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...