Skip to main content

How to get shipping price

More
14 years 6 months ago #42235 by crinch
Hi,

I have developed and configured a payment method which has a shipping method name. So I have a payment_shipping_methods as input and some cart values which file/function I should used to get the shipping price against this payment_shipping_method value. I am very much thankful to you for any suggestion/help. Thanks in advance.

Please Log in or Create an account to join the conversation.

More
14 years 6 months ago #42402 by nicolas
You will need first to get the $cat object with the content of the whole cart and the $payment_shipping_method string with the name of your shipping method ("manual" for example). Then, you can do like that:
Code:
$shippingClass = hikashop_get('class.shipping'); $shippingMethods = $shippingClass->getMethods($cart); foreach($shippingMethods as $shippingMethod){ if($shippingMethod->shipping_type==$payment_shipping_method){ echo $shippingMethod->shipping_price; break; } }

Please Log in or Create an account to join the conversation.

Time to create page: 0.138 seconds
Powered by Kunena Forum