force cart to empty

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 years ago
Hi,

Is there a way I can force a customer logout or a force a cart to empty after a specific time period?

Thanks,
Ben
13 years ago
bump for an answer.
13 years ago
1. To log them out after a specific time period set the timeout property for forms authentication in web.config:

    <authentication mode="Forms">
      <forms name="NOPCOMMERCE.AUTH" loginUrl="~/login.aspx" protection="All" timeout="43200" path="/" requireSSL="false" slidingExpiration="true" defaultUrl="~/default.aspx" enableCrossAppRedirects="false"/>
    </authentication>

See here

2. There is a task that deletes expired customer carts - reduce the deleteExpiredShoppingCartsOlderThanMinutes time (in web.config):

        <task name="DeleteExpiredShoppingCarts" type="NopSolutions.NopCommerce.BusinessLogic.Orders.DeleteExpiredShoppingCartsTask, Nop.BusinessLogic" enabled="true" stopOnError="false" deleteExpiredShoppingCartsOlderThanMinutes="259200"/>

HTH
13 years ago
A belated thank you for that. And is there way to force the cart to empty when a user closes their browser?

Thanks,
Ben
13 years ago
That may not be a good strategy if your goal is to sell products. When a user returns to your website, having items still in their shopping cart may be a good feature to have. It can benefit the customer by remembering what they were interested in their earlier visits.
13 years ago
I agree, but I'm responding to a client request.
13 years ago
nopCommerce team | retroviz wrote:
2. There is a task that deletes expired customer carts - reduce the deleteExpiredShoppingCartsOlderThanMinutes time (in web.config):

        <task name="DeleteExpiredShoppingCarts" type="NopSolutions.NopCommerce.BusinessLogic.Orders.DeleteExpiredShoppingCartsTask, Nop.BusinessLogic" enabled="true" stopOnError="false" deleteExpiredShoppingCartsOlderThanMinutes="259200"/>




Can I use a similar task to mark pending orders as canceled insteasd of manually @ the admin panel?

Please I need some pro advise.
13 years ago
Hi, can anyone give some steps explaing delete sc older than minutes task?
13 years ago
Nobody know ?!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
13 years ago
You can write a task to do anything you want.

Just implement ITask.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.