Author Topic: Clean cart products at logout  (Read 620 times)

acooper

  • Beginner
  • *
  • Posts: 11
Clean cart products at logout
« on: May 28, 2019, 23:34:21 pm »
The connected user is placing the products in the cart, but when he logs out or closes the browser, is not cleaning the cart.

Jörgen

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2747
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
Re: Clean cart products at logout
« Reply #1 on: May 29, 2019, 05:36:02 am »
This is wanted behaviour.
Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)

acooper

  • Beginner
  • *
  • Posts: 11
Re: Clean cart products at logout
« Reply #2 on: May 29, 2019, 06:44:24 am »
I need to clean the cart.
Shop is for product rentals.
Have a calendar to check product availability.
If he puts it in the cart and comes back another day, I will not know product if it is available.
I only check availability for rent when it enters the product.

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 9650
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: Clean cart products at logout
« Reply #3 on: May 29, 2019, 09:08:53 am »
Look in the cart helper file  - the trigger to save the cart to the DB is there .. you need to comment this out
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

acooper

  • Beginner
  • *
  • Posts: 11
Re: Clean cart products at logout
« Reply #4 on: May 30, 2019, 16:26:28 pm »
I can not find this setting.

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 9650
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: Clean cart products at logout
« Reply #5 on: May 30, 2019, 17:10:35 pm »
its not a setting -- its code

try in components\com_virtuemart\helpers\cart.php



GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation