Muzammil Mac Posted November 18, 2022 Share Posted November 18, 2022 Hi, I'm creting a custom module and I am trying to add carrier id to cart. I'm running 1.7.6.5 The carrier id I want to set it to is 5, but when view it in BO after order is placed, it's using my default carrier with id 6 $cart = new Cart($this->context->cookie->id_cart); $cart->id_address_delivery = 1; $cart->id_address_invoice = 1; $cart->id_carrier = 5; What am I missing? Thankyou in Advance. Link to comment Share on other sites More sharing options...
Daresh Posted November 18, 2022 Share Posted November 18, 2022 You are not saving / updating the cart. Link to comment Share on other sites More sharing options...
Muzammil Mac Posted November 18, 2022 Author Share Posted November 18, 2022 1 minute ago, Daresh said: You are not saving / updating the cart. sorry i forgot to add that in code snippet. I am saving the cart and id_address is also working fine. Link to comment Share on other sites More sharing options...
Daresh Posted November 18, 2022 Share Posted November 18, 2022 In the database, there is also the delivery_option column, maybe you also need to set this field for the carrier to be applied correctly. Link to comment Share on other sites More sharing options...
Muzammil Mac Posted November 18, 2022 Author Share Posted November 18, 2022 1 minute ago, Daresh said: In the database, there is also the delivery_option column, maybe you also need to set this field for the carrier to be applied correctly. Okay I will check it. Thank you. Link to comment Share on other sites More sharing options...
Muzammil Mac Posted November 18, 2022 Author Share Posted November 18, 2022 40 minutes ago, Daresh said: In the database, there is also the delivery_option column, maybe you also need to set this field for the carrier to be applied correctly. I tried adding the delivery option but id carrier is still not working. 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