VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: delphin on November 14, 2019, 16:14:50 PM

Title: Shipment method not a mandatory field after changing cart?
Post by: delphin on November 14, 2019, 16:14:50 PM
Dear Virtuemart-Community,

i have a tricky problem with one page checkout and shipping methods (VirtueMart 3.6.8 10197 on joomla 3.9.13:
When a user changes the quantity of a card-product after selecting the shipment-method, so that the weight needs a change in shipment-method, the select-box for shipment methods looses the "mandatory field"-status and the user can finish the checkout-process without selecting a shipment-method.

The consequence is, that there are not displayed any shipment costs and the user checks out an invalid cart without selecting the correct shipment method.

I'm looking forward for your help.

Thanks a lot!
Title: Re: Shipment method not a mandatory field after changing cart?
Post by: jenkinhill on November 14, 2019, 16:38:13 PM
? See http://forum.virtuemart.net/index.php?topic=143899.msg509085#msg509085
Title: Re: Shipment method not a mandatory field after changing cart?
Post by: delphin on November 14, 2019, 19:38:10 PM
Sorry, this doesn't help. Checkout is still possible without choosing a shipment method after a change of the product-quantity. It looks like, the "cache" for the selected shipment-method is not cleaned after a quantity-change - the old shipment-method is mentioned in the order, but without a price.
Title: Re: Shipment method not a mandatory field after changing cart?
Post by: delphin on November 15, 2019, 19:27:00 PM
I localized the problem a bit better:
It is caused by the "terms of service-check box". When terms of service-check box was once checked and quantity of a product is changed afterwards, there is no force to fill the shipment/delivery-method select box again.

Steps of reproducing the error:
1. Put some products into your cart
2. Start one-page-checkout
3. enter name/adress, shipment-method, payment-method
4. check the "tos-box"
5. change quantity of a product, so that you have to select another shipment method
6. don't select a new shipment method
7. finish the one page-checkout with a click on buy

--> there is no shipment-method selected and check out was possible without a shipment-method.

It seems like an error in the forms-validation after "tos-check box" was once checked.
Title: Re: Shipment method not a mandatory field after changing cart?
Post by: AH on November 18, 2019, 09:43:22 AM
Please provide an url - if you want people to look at this.

The base functionality works in all my test environments
Title: [Solved] Re: Shipment method not a mandatory field after changing cart?
Post by: delphin on November 23, 2019, 12:34:55 PM
Problem solved! Thanks for alle the guys who tested this case in their environments.

The reason was not a bug in virtuemart, not a bug in a template, not a bug in an extension and not a bug in customized files... it was a problem with some (corrupt?) virtuemart-core-files.

The replacement of the com_virtuemart-folder in admin and frontend-section with the new downloaded virtuemart-sources was the solution for my troubles :-).

Many thanks again for your support!


Title: Re: Shipment method not a mandatory field after changing cart?
Post by: AH on November 23, 2019, 18:37:38 PM
Great result

Thank you for posting an update, glad you got it resolved.