[Skip to main content](#vessel-content)

#   Abandoned carts are not deleted

##

- **[StudioPrzyLesie](/forum/user/31654-studioprzylesie "View StudioPrzyLesie's Profile")**
- [![StudioPrzyLesie's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/31654-studioprzylesie "View StudioPrzyLesie's Profile") Topic Author
- [ Offline](/forum/user/31654-studioprzylesie)

Less More

- Posts: 196
- Thank you received: 15
-
-

3 months 3 days ago [\#372945](#372945) by [StudioPrzyLesie](/forum/user/31654-studioprzylesie "View StudioPrzyLesie's Profile")  *[Abandoned carts are not deleted](/forum/27-checkout/910737-abandoned-carts-are-not-deleted#372945 "Hi, Despite setting the cart expiration to 30 days, abandoned carts are not being deleted. Thousands of records have accumulated. How do I restore functionality and delete the outdated carts? The cron job is running. Tom")* was created by *[StudioPrzyLesie](/forum/user/31654-studioprzylesie "View StudioPrzyLesie's Profile")*

Hi,
Despite setting the cart expiration to 30 days, abandoned carts are not being deleted. Thousands of records have accumulated. How do I restore functionality and delete the outdated carts? The cron job is running.
Tom

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0LzkxMDczNy1hYmFuZG9uZWQtY2FydHMtYXJlLW5vdC1kZWxldGVkP3RtcGw9bWFya2Rvd24=) or [Create an account](/register) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86323
- Thank you received: 14284
-
-

3 months 2 days ago [\#372950](#372950) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Abandoned carts are not deleted](/forum/27-checkout/910737-abandoned-carts-are-not-deleted#372950 "Hi, Despite setting the cart expiration to 30 days, abandoned carts are not being deleted. Thousands of records have accumulated. How do I restore functionality and delete the outdated carts? The cron job is running. Tom")*

Hi Tom,

The removal of the old carts is not done by the cron. It is done when a page of the HikaShop backend is displayed, and only once per period configured in the "Frequency of the check for the carts" setting, in the Advanced tab of the HikaShop configuration. The "Last check" date displayed just below that setting tells you when it ran for the last time.

And each check only removes a limited number of carts, 200 by default, so that it does not slow down the page. With thousands of old carts, it therefore takes many checks to catch up. You can raise that limit by adding an entry with the namekey cart_batch_removal_quantity and the value you want, for example 5000, in the hikashop_config table of your database with phpMyAdmin.

To remove the backlog in one go instead, make a backup of your database and run these two queries with phpMyAdmin, after adapting the prefix of the tables and, if needed, the 2592000 seconds which correspond to your 30 days:
Code:

DELETE FROM jos_hikashop_cart_product WHERE cart_id IN (SELECT cart_id FROM jos_hikashop_cart WHERE cart_type = 'cart' AND cart_modified &lt; UNIX_TIMESTAMP() - 2592000); DELETE FROM jos_hikashop_cart WHERE cart_type = 'cart' AND cart_modified &lt; UNIX_TIMESTAMP() - 2592000;

We're going to improve this for the next version of HikaShop.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0LzkxMDczNy1hYmFuZG9uZWQtY2FydHMtYXJlLW5vdC1kZWxldGVkP3RtcGw9bWFya2Rvd24=) or [Create an account](/register) to join the conversation.

- **[StudioPrzyLesie](/forum/user/31654-studioprzylesie "View StudioPrzyLesie's Profile")**
- [![StudioPrzyLesie's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/31654-studioprzylesie "View StudioPrzyLesie's Profile") Topic Author
- [ Offline](/forum/user/31654-studioprzylesie)

Less More

- Posts: 196
- Thank you received: 15
-
-

3 months 1 day ago [\#372964](#372964) by [StudioPrzyLesie](/forum/user/31654-studioprzylesie "View StudioPrzyLesie's Profile")  Replied by *[StudioPrzyLesie](/forum/user/31654-studioprzylesie "View StudioPrzyLesie's Profile")* on topic *[Abandoned carts are not deleted](/forum/27-checkout/910737-abandoned-carts-are-not-deleted#372964 "Hi, Despite setting the cart expiration to 30 days, abandoned carts are not being deleted. Thousands of records have accumulated. How do I restore functionality and delete the outdated carts? The cron job is running. Tom")*

Thank you, I'm waiting for the update ![:)](/media/kunena/emoticons/3.png ":)")
Tom

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0LzkxMDczNy1hYmFuZG9uZWQtY2FydHMtYXJlLW5vdC1kZWxldGVkP3RtcGw9bWFya2Rvd24=) or [Create an account](/register) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.065 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
