A Way To TImeout What Is In A Customer's Cart, and Then Empty It?

EricGEricG Member
in General edited September 2015
Hello,

I'm running a flash sale site that is basic html/css/javascript, no CMS. It's a simple one page site and I've been finding an issue lately with customers purchasing things that I've already removed from the site. For example, If all size 8's sell out, I'll remove that from the site. However, I think that customers are placing things in their cart and then purchasing hours later... after the item has been removed from the site.

Is there a way to time out the cart, so that if the customer hasn't purchased in an hour for example, the cart will empty?

Thanks!
Eric
Tagged:
Comments
  • EricGEricG Member
    edited September 2015
    I should also add that I'm using forms for the products, not links...

    <form action="https://samplesaleguy.foxycart.com/cart" method="post" accept-charset="utf-8">
    <input type="hidden" name="name" value="Lindi Zebra Print Dress" />
    <input type="hidden" name="price" value="24" />
    <label class="label_left">Size</label>
    <select name="size">
    <option value="S">S</option>
    <option value="M">M</option>
    <option value="L">L</option>
    </select>
    <input type="submit" value="Add To Cart" class="submit-button" />
    </form><br />
  • fc_adamfc_adam FoxyCart Team
    @EricG,

    What you could look at using here is our expires parameter for products. What that would allow you to do is only allow a product to exist within a customers cart for a certain length of time - and if they don't complete the purchase within that time it's removed from their cart. You can see information on that and all product parameters here: http://wiki.foxycart.com/static/redirect/add_to_cart. This would still technically allow someone to purchase a product once it's removed from your site - but it drops the window of opportunity for that down to whatever the time limit you set on products.

    For a more complex solution, stores which sell one-off items (so maintaining a constant live state of inventory is really important) have set up a system where when a customer adds a product to the cart, it places a temporary lock on that inventory within their systems. When the customers completes that purchase it removes the inventory permanently or if they don't complete it within a certain time it releases the inventory and removes it from the customers cart. This would require a system on your own side which is tracking inventory though.
  • EricGEricG Member
    edited September 2015
    @fc_adam

    Thank you very much for your reply. I think the expires tag will be perfect! So just as an example, it would be:

    <form action="https://samplesaleguy.foxycart.com/cart"; method="post" accept-charset="utf-8">
    <input type="hidden" name="name" value="Lindi Zebra Print Dress" />
    <input type="hidden" name="price" value="24" />
    <input type="hidden" name="expires" value="15" />
    <label class="label_left">Size</label>
    <select name="size">
    <option value="S">S</option>
    <option value="M">M</option>
    <option value="L">L</option>
    </select>
    <input type="submit" value="Add To Cart" class="submit-button" />
    </form><br />


    Is this correct? Also, would this be it, or do I need to enable anything in the foxycart admin site to make this work?

    Thanks!
  • fc_adamfc_adam FoxyCart Team
    @EricG,

    That's spot on - and would expire that product in 15 minutes.
Sign In or Register to comment.