Jump to content

shipping price is calculated by default carrier. Is it possible to change it.


Recommended Posts

Hello.

The shipping costs are calculated by default carrier until checking out.

I have 2 carriers, one for corporate and one for non-corporate clients.
(group default and group corporate).



I have changed the init.php to

$cookie = new Cookie('ps');
$customer = new Customer(intval($cookie->id_customer));
$trade = $customer->isMemberOfGroup(2);
$smarty->assign('trade', $trade);

Right now i want to read the $trade in Cart.php (classes) to change the carrier.(When they are logged in).


$id_carrier = 27; this is non-corporate

if ($trade)
$id_carrier = 28; this is corporate

But...... this is not working, does someone know what is wrong???

Thanks.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...