VirtueMart Forum

VirtueMart 2 + 3 + 4 => Plugins: Payment, Shipment and others => Topic started by: Ghostgames on September 26, 2020, 20:14:24 PM

Title: Prevent order if not matching shiping method
Post by: Ghostgames on September 26, 2020, 20:14:24 PM
I am running VirtueMart 3.8.4 10335 on Joomla 3.9.21 with popular USPS Shipping module from Park Beach Systems, Inc. We ship just abut everything as USPS (small|medium|large) (DOmestic|International) Flat Rate Box. We have a single item in our product catalog (an $18 poster map) that is an odd size and does not fit in any of these shipping options.

For US customers, we have USPS Domestic Priority Mail - which adds about $7.50 to the $18 product cost. We didn't offer a International option because USPS International Priority Mail returns a shipping price of $56.15! On an $18 item!!!

However, we ran into an issue where if you ordered that poster map from outside the US, because we had no shipping option, the order could still go through with $0.00 charged for shipping! So I have the following questions:

1) If there is no matching shipping options, how do I prevent Virtuemart from allowing the order to go through?

2) If there is only one shipping option, a radio button is presented for the person to select, but if they don't select, then can proceed with the order and no shipping is chosen, How do I set Virtuemart so that if a shipping method matches it is automatically selected?
Title: Re: Prevent order if not matching shiping method
Post by: Ghostgames on September 26, 2020, 20:51:46 PM
I have tried setting the Configuration > Checkout > Enable Automatic Selected Shipment to No Preference or even to something like "USPS International Priority Mail", but the unselected radio button remains on the check out screen, rather than being preset.

Oddly, the Configuration > Checkout > Enable Automatic Selected Payment appears to be working, as out only payment method is PayPal and no radio button is presented for PayPal, it is just stated that PayPal is the payment method on the checkout screen
Title: Re: Prevent order if not matching shiping method
Post by: Ghostgames on September 26, 2020, 21:41:25 PM
I should add that shoppers start as anonymous, pick a product(s) and arrive at the 1-page shopping cart/checkout without a billing/shipping address, so the shipping component starts with "Please select a shipment method
We are sorry, no shipment method matches the characteristics of your order." and then they enter a billing/shipping address and a single shipping option is presented with a un-highlighted radio button. Even with Configuration > Checkout > Enable Automatic Selected Shipment set to No Preference, the radio is still un-selected.
Title: Re: Prevent order if not matching shiping method
Post by: Ghostgames on September 26, 2020, 22:18:56 PM
I also just noticed that if you have items in your cart that gives USPS Domestic Small Flat Rate Box at the checkout screen and you "continue shopping" to add items to your cart that now require a "USPS Domestic Medium Flat Rate Box" that the checkout still shows the "small" box shipping rate with "small" still the selected shipper and a radio button for the Medium. Virtuemart does not clear the no-longer-valid shipping selection (small).
Title: Re: Prevent order if not matching shiping method
Post by: Jörgen on September 27, 2020, 01:17:24 AM
I guess this is an issue with the USPS module. I do not think I have sen this behaviour with the standard shipping method.

Jörgen
Title: Re: Prevent order if not matching shiping method
Post by: GJC Web Design on September 28, 2020, 10:31:15 AM
does the Park Beach USPS have the relatively new options in the config as per the screenshot?

not all commercial plugins have coded these in

Title: Re: Prevent order if not matching shiping method
Post by: Ghostgames on September 28, 2020, 13:25:05 PM
Quote from: GJC Web Design on September 28, 2020, 10:31:15 AM
does the Park Beach USPS have the relatively new options in the config as per the screenshot?

not all commercial plugins have coded these in



No they do not. This is the configuration tab:
https://fudgerpg.com/images/external/USPS.png (https://fudgerpg.com/images/external/USPS.png)
(https://fudgerpg.com/images/external/USPS.png)

I have sent in a support ticket to Park Beach Systems. I am not aware of any other USPS shipper plugin that actually interacts with USPS.com to get the shipping information.