
Originally Posted by
birdoasis
What file,
what line
what if/then statement did you use please.
JP
Sorry it took so long to respond, we have been busy at the store. The file I changed was
/googlecheckout/shipping_methods.php
What I did, though it is sloppy since I was pressed for time, was take the entire array for $mc_shipping_methods and create two new variables -- one called $freeshipping_on and $freeshipping_off both which included the array from $mc_shipping_methods.
On $freeshipping_on, I left it exactly how the array was originally as I did not need it to change, and on $freeshipping_off I changed the free shipping array to an empty array ( 'freeoptions' => array(), ).
I then created a simple if/else statement that told the program which array to use depending on the cart total. If the cart total is above $29.99 (my free shipping quota) then the free shipping item is displayed, if not, than the free shipping option is not displayed.
PHP Code:
if($_SESSION['cart']->total >= "29.99"){
$mc_shipping_methods = $freeoptions_on;
} else {
$mc_shipping_methods = $freeoptions_off;
}
Once I have more time I will try to pretty-it up for everyone, but since it is working at the moment, it is on the bottom of my to-do list
Bookmarks