Author Topic: Shipment method not a mandatory field after changing cart?  (Read 1774 times)

delphin

  • Beginner
  • *
  • Posts: 4
Shipment method not a mandatory field after changing cart?
« 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!

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 27953
  • Always on vacation
    • Jenkin Hill Internet
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 VirtueMart 3.8.7 10374 on Joomla 3.9.23 PHP 7.4.12

delphin

  • Beginner
  • *
  • Posts: 4
Re: Shipment method not a mandatory field after changing cart?
« Reply #2 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.

delphin

  • Beginner
  • *
  • Posts: 4
Re: Shipment method not a mandatory field after changing cart?
« Reply #3 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.

AH

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3300
  • VirtueMart Version: 3.8.4
Re: Shipment method not a mandatory field after changing cart?
« Reply #4 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
regards
A

Joomla 3.9.23
php 7.3

delphin

  • Beginner
  • *
  • Posts: 4
[Solved] Re: Shipment method not a mandatory field after changing cart?
« Reply #5 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!



AH

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3300
  • VirtueMart Version: 3.8.4
Re: Shipment method not a mandatory field after changing cart?
« Reply #6 on: November 23, 2019, 18:37:38 pm »
Great result

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

Joomla 3.9.23
php 7.3