Jump to content

how to insert different shipping cost in carrier module development


Recommended Posts

in my controller, i have cost value for shipping.i'm trying to send it to `getOrderShippingCost` function. but my cart showing shipping `free`


$cost_val=120; //this value can be change
        $DeliveryWeekSched=new delivery_scheduler();




  public function getOrderShippingCost($params, $shipping_cost)
            if (Context::getContext()->customer->logged == true)
                $id_address_delivery = Context::getContext()->cart->id_address_delivery;
                $address = new Address($id_address_delivery);
                return 100; // i want to return `$shipping_cost`
            return $shipping_cost;

when return `$shipping_cost` shipping value in cart showing `free`.when `100` return cart shipping value showing `100`.why is that?how to return my value?

Edited by Tje123 (see edit history)
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...