VirtueMart Forum

VirtueMart 2 + 3 + 4 => Plugins: Payment, Shipment and others => Topic started by: toad78 on October 14, 2016, 22:24:53 PM

Title: weight_countries not working
Post by: toad78 on October 14, 2016, 22:24:53 PM
Joomla 2.5
VM 2.6.x

I have the following weight_countries rules set up (.jpgs attached).

None seem to be working when I'm at the checkout

All products have the correct weight.

I have only one rule applied to all the products (dollar-deduction.jpg).

Result: no matter how many items are in the cart that, they all get a shipment cost of $10.00. This shouldn't be. If I have products in the cart that are 25lbs, it should have a Shipment Fee of $50.00 and not $10.00.

Any reason why the incorrect shipping is posting?
Title: Re: weight_countries not working
Post by: GJC Web Design on October 14, 2016, 23:04:26 PM
switch on the VM debug .. you will see the reason then
Title: Re: weight_countries not working
Post by: toad78 on October 14, 2016, 23:49:10 PM
Attached is the debug info.

From what I gather, it says that "vmdebug checkConditions Shipping 10-50lbs does not fit Var1:". Why not? The product is 25lbs!
Title: Re: weight_countries not working
Post by: GJC Web Design on October 15, 2016, 01:47:54 AM
would assume because 25lb isn't am integer!
[customsforall_value_name] => 25lb

have u set the actual vm product weight to -> 25
Title: Re: weight_countries not working
Post by: toad78 on October 16, 2016, 02:04:44 AM
VM Product weight is 1lb. I use Custom Fields to allow for additional weights of product options to be added.
Title: Re: weight_countries not working
Post by: GJC Web Design on October 16, 2016, 10:33:16 AM
a custom field will play no part in the conditions testing - how could it?
if the vm weight is 1 then vmdebug shipmentmethod Shipping 1-5lbs is true

if u want to use a custom field as a condition u need to hack the ship method