[Solved] Shopping cart problem after updating to VirtueMart 3.6.10 10211

Started by elanto75, November 25, 2019, 14:19:59 PM

Previous topic - Next topic

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

Assign to the Customer/Shopper BEFORE you add items
Regards
A

Joomla 3.10.11
php 8.0

Milbo

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.


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

jenkinhill

Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

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

AH

My solution still stands as correct -  Change shopper before adding items to cart regardless of the configuration that now exists.


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.


//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:

//behaviour on admin change shopper
if (VmConfig::get('ChangeShopperDeleteCart', 1)) {


Regards
A

Joomla 3.10.11
php 8.0

Milbo

Quote from: AH on November 27, 2019, 09:19:15 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.

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

elanto75

sorry but in my virtuemart.cfg the ChangeShopperDeleteCart parameter is not present what can I do?
thanks

Jörgen

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.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

elanto75

Quote from: Jörgen 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

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

QuoteChangeShopperDeleteCart 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
## 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.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.


Jörgen

Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.