You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.
I took the default script thats based on subtotal and based my own on it. It doesn't seem to be working though and instead returns what I think is the default "Standard Shipping - $10" option at checkout. Any ideas?
$info = $this->globals('ecom.customship'); $method = 'Standard Carrier 2'; if($info['total'] >= '0' && $info['total']) <= '20'){ $custship = '7.00'; $custom = array($method => $custship); } elseif($info['total'] >= '20.01' && $info['total'] <= '29.99'){ $custship = $info['total'] * 0.1; $custom = array($method => $custship); } elseif($info['total'] >= '30' && $info['total'] <= '39.99'){ $custship = $info['total'] * 0.2; $custom = array($method => $custship); } elseif($info['total'] >= '40'){ $custship = $info['total'] * 0.4; $custom = array($method => $custship); } $this->globals('ecom.customship_response',$custom);
Offline
<?php $info = $this->globals('ecom.customship'); $method = 'Standard Carrier 2'; if (($info['total'] >= '0') && ($info['total'] <= '20')){ $custship = '7.00'; $custom = array($method => $custship); } elseif (($info['total'] >= '20.01') && ($info['total'] <= '29.99')){ $custship = $info['total'] * 0.1; $custom = array($method => $custship); } elseif (($info['total'] >= '30') && ($info['total'] <= '39.99')){ $custship = $info['total'] * 0.2; $custom = array($method => $custship); } elseif ($info['total'] >= '40'){ $custship = $info['total'] * 0.4; $custom = array($method => $custship); } $this->globals('ecom.customship_response',$custom); ?>
Offline