Jump to content

how change shipping using core function


jina4din

Recommended Posts

Hi,

 

I am using prestashop PrestaShop ™ 1.5.4.0. i am developing a new payment gateway. in payment gateway i need to change address when user has entered wrong address. i am uable to change address using prestashop functions but problem is this after changing address i need to reselect carrier after that i am unable to update shippingcost

 

 

please any body help to update shippingcost/recalculate shipping cost

 

 

$this->context->cart->id_address_invoice = (int)$addressnew->id;
$this->context->cart->id_address_delivery = (int)$addressnew->id;
$this->context->cart->update();			   
$delivery_option = $this->context->cart->getDeliveryOption();
$delivery_option[(int)$addressnew->id] = $carrier_id.',';
$this->context->cart->setDeliveryOption($delivery_option);$this->context->cart->save();

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...