VirtueMart Forum

VirtueMart Dev/Coding Central: VM1 (old version) => Quality & Testing VirtueMart 1.1.x => Virtuemart 1.1 Development (Archiv) => Q&T Resolved => Topic started by: winfreepcs on May 07, 2008, 16:27:28 PM

Title: [FIXED] shipvalue stopped working at Shipping charge 10
Post by: winfreepcs on May 07, 2008, 16:27:28 PM
No matter how many times I tried to change shipping at Shipping charge 10, it always reflect the price in Order total value 10:

Order and Shipping from 1 to 9 works fine.

J 1.0.15 and VM 1.1
Title: Re: shipvalue stopped working at Shipping charge 10
Post by: rickei on December 03, 2008, 15:59:23 PM
This is a Bug! It absolutely does NOT work through the backend.
since the mods on this forum don't actually respond to post on this forum, I figured I would answer you.

I have got mine working by editing the shipvalue.cfg.php file.

BUT, as soon as you open the shipvalue from the backend it reverts back to the shipping charge 10 being equal to the purchase amount
IE anything less than $10,000 is charge $10,000 for shipping.
Title: Re: shipvalue stopped working at Shipping charge 10
Post by: chaliet on December 05, 2008, 15:09:46 PM
There appears to be an error in the write_configuration function of the /administrator/components/com_virtuemart/classes/shipping/shipvalue.php file, through VM version 1.1.2.

See if you can find the error in the following code:

$my_config_array = array("BASE_SHIP1" => $d['BASE_SHIP1'],
"BASE_SHIP2" => $d['BASE_SHIP2'],
"BASE_SHIP3" => $d['BASE_SHIP3'],
"BASE_SHIP4" => $d['BASE_SHIP4'],
"BASE_SHIP5" => $d['BASE_SHIP5'],
"BASE_SHIP6" => $d['BASE_SHIP6'],
"BASE_SHIP7" => $d['BASE_SHIP7'],
"BASE_SHIP8" => $d['BASE_SHIP8'],
"BASE_SHIP9" => $d['BASE_SHIP9'],
"BASE_SHIP10" => $d['BASE_SHIP10'],
"BASE_CHARGE1" => $d['BASE_CHARGE1'],
"BASE_CHARGE2" => $d['BASE_CHARGE2'],
"BASE_CHARGE3" => $d['BASE_CHARGE3'],
"BASE_CHARGE4" => $d['BASE_CHARGE4'],
"BASE_CHARGE5" => $d['BASE_CHARGE5'],
"BASE_CHARGE6" => $d['BASE_CHARGE6'],
"BASE_CHARGE7" => $d['BASE_CHARGE7'],
"BASE_CHARGE8" => $d['BASE_CHARGE8'],
"BASE_CHARGE9" => $d['BASE_CHARGE9'],
"BASE_CHARGE10" => $d['BASE_SHIP10'],
"SHIPVALUE_TAX_CLASS" => $d['SHIPVALUE_TAX_CLASS']


The line:
"BASE_CHARGE10" => $d['BASE_SHIP10'],

Should be corrected to:
"BASE_CHARGE10" => $d['BASE_CHARGE10'],

Just looks like a copy/paste error.  In the VM 1.1.2 shipvalue.php file, this would be line 384.
Title: Re: shipvalue stopped working at Shipping charge 10
Post by: aravot on December 06, 2008, 09:40:51 AM
Thank you Fixed in v1.1.3
Title: Re: [FIXED] shipvalue stopped working at Shipping charge 10
Post by: rickei on December 06, 2008, 19:09:42 PM
Thanks Chaliet!

I just caught that BASE_SHIP10 line last night and came back here to post the fix.