Author Topic: [Solved] Shopping cart problem after updating to VirtueMart 3.6.10 10211  (Read 590 times)

elanto75

  • Beginner
  • *
  • Posts: 19
  • Skype Name: elanto75
Hello everyone!
when, from the user side, I place an order as administrator and then in the cart page I assign it to another customer the cart is emptied instead of updating only prices or addresses.
How can I solve it?
Thanks

AH

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3025
  • VirtueMart Version: 3.6.3
Re: shopping cart problem after updating to VirtueMart 3.6.10 10211
« Reply #1 on: November 25, 2019, 18:14:00 pm »
Assign to the Customer/Shopper BEFORE you add items
regards
A

Joomla 3.9.12
php 7.2

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10000
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: shopping cart problem after updating to VirtueMart 3.6.10 10211
« Reply #2 on: November 26, 2019, 10:27:13 am »
Ah come on AH, you know better.

The reason is a hidden config, which maybe set public next release.

ChangeShopperDeleteCart is now set by default to 1. It is most time the better behaviour. You can change that using ChangeShopperDeleteCart=0 in the virtuemart.cfg (and store the vm conf one time).

The new workflow is more secure and prevents that old data of a prior customer is left in the cart.


I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 27601
  • Always on vacation
    • Jenkin Hill Internet
Re: shopping cart problem after updating to VirtueMart 3.6.10 10211
« Reply #3 on: November 26, 2019, 11:19:20 am »
@elanto75 hidden configuration settings are explained here:  http://docs.virtuemart.net/manual/general-concepts/206-hidden-configurations.html
Kelvyn

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Currently using VM 3.6.10.10211 on Joomla 3.9.13 PHP 7.0.33

AH

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3025
  • VirtueMart Version: 3.6.3
Re: shopping cart problem after updating to VirtueMart 3.6.10 10211
« Reply #4 on: November 27, 2019, 09:19:15 am »
My solution still stands as correct -  Change shopper before adding items to cart regardless of the configuration that now exists.

Code: [Select]
Ah come on AH, you know better.

The reason is a hidden config, which maybe set public next release.


The default behaviour was NOT to empty cart for people that did not know of this feature as it was designed for a specific use case.

Code: [Select]
//behaviour on admin change shopper
if (VmConfig::get('ChangeShopperDeleteCart', 0)) {

Clearly the default behaviour has now been changed and is now the default - hence the reason for the report of changing behaviour of VM.  Which requires - either for the person to change a hidden config - or add items to the cart After a change of shopper is made.

Latest release code:
Code: [Select]
//behaviour on admin change shopper
if (VmConfig::get('ChangeShopperDeleteCart', 1)) {

regards
A

Joomla 3.9.12
php 7.2

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10000
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: shopping cart problem after updating to VirtueMart 3.6.10 10211
« Reply #5 on: November 27, 2019, 11:31:14 am »
The default behaviour was NOT to empty cart for people that did not know of this feature as it was designed for a specific use case.

uhm, actually Mike wrote a  feature for his customer and wanted it in the core for easier maintenance. Then he did hte maintenance for some years. Then you started to use it and noticed that the behaviour is shit, when you have a lot customers a day. It works the old way quite nice, when there is only one customer per session.

It turned out that it is a lot more secure to always delete the cart, else there could be always rests of old data. So the use case is not specific or special.

That is btw the normal evolution of our features.

I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

elanto75

  • Beginner
  • *
  • Posts: 19
  • Skype Name: elanto75
Re: shopping cart problem after updating to VirtueMart 3.6.10 10211
« Reply #6 on: November 29, 2019, 17:42:47 pm »
sorry but in my virtuemart.cfg the ChangeShopperDeleteCart parameter is not present what can I do?
thanks

Jörgen

  • Global Moderator
  • Full Member
  • *
  • Posts: 2473
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
Re: shopping cart problem after updating to VirtueMart 3.6.10 10211
« Reply #7 on: November 29, 2019, 18:46:41 pm »
Add it and set it to 0 of 1 depending om your needs.
Save the File and Aldo save config in VM backend to make the changes get through.
Jörgen @ kreativ fotografi
Joomla 3.9.8
Virtuemart 3.4.x
Olympiantheme Hera (customized)

elanto75

  • Beginner
  • *
  • Posts: 19
  • Skype Name: elanto75
Re: shopping cart problem after updating to VirtueMart 3.6.10 10211
« Reply #8 on: December 02, 2019, 09:33:20 am »
Add it and set it to 0 of 1 depending om your needs.
Save the File and Aldo save config in VM backend to make the changes get through.
Jörgen @ kreativ fotografi

Thanks for your reply but can you tell me step by step how I can save the file and make the changes made active?
thanks

Jörgen

  • Global Moderator
  • Full Member
  • *
  • Posts: 2473
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
Re: shopping cart problem after updating to VirtueMart 3.6.10 10211
« Reply #9 on: December 02, 2019, 09:56:55 am »
Quote
ChangeShopperDeleteCart is now set by default to 1. It is most time the better behaviour. You can change that using ChangeShopperDeleteCart=0 in the virtuemart.cfg (and store the vm conf one time).

Add this to the virtuemart.cfg
Code: [Select]
## Admin user switch interaction
## ChangeShopperDeleteCart reverting to old behaviour
ChangeShopperDeleteCart=0

Save the config file.

Go into VM configuration and "Save configuration" without changing anything.

Jörgen @ Kreativ Fotografi
Joomla 3.9.8
Virtuemart 3.4.x
Olympiantheme Hera (customized)

elanto75

  • Beginner
  • *
  • Posts: 19
  • Skype Name: elanto75
Re: shopping cart problem after updating to VirtueMart 3.6.10 10211
« Reply #10 on: December 02, 2019, 10:35:59 am »
Thanks, solved!

Jörgen

  • Global Moderator
  • Full Member
  • *
  • Posts: 2473
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
Re: [Solved] Shopping cart problem after updating to VirtueMart 3.6.10 10211
« Reply #11 on: December 02, 2019, 12:58:53 pm »
Nice to hear :)

Jörgen @ Kreativ Fotografi
Joomla 3.9.8
Virtuemart 3.4.x
Olympiantheme Hera (customized)