Arieswe Posted January 28, 2011 Share Posted January 28, 2011 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-corporateif ($trade) $id_carrier = 28; this is corporateBut...... this is not working, does someone know what is wrong???Thanks. Link to comment Share on other sites More sharing options...
Arieswe Posted January 28, 2011 Author Share Posted January 28, 2011 This is working$customer = new Customer($this->id_customer); $corporate = $customer->isMemberOfGroup(2); $id_carrier = 27;if ($corporate) $id_carrier = 28; Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now