-- HikaShop version -- : 2.6.3
-- Joomla version -- : 3.5.1
-- PHP version -- : 5.6
I use shipping methods which are restricted to specific postal codes. The postal code is the first thing the user has to provide when he enters the site.
I now have to show the shipping price with tax when the cart is created (before checkout). I can get the appropriate shipping method, but I'm unable to get the full price with tax, or the shipping price entered in the backend product form (some variants have different shipping prices).
In the product/cart.php Template I get the usable shippings this way:
$fakeAddress = new stdClass();
$fakeAddress->address_post_code = JFactory::getApplication()->getUserState(HIKASHOP_COMPONENT . '.postalcode');
$cartClass = hikashop_get('class.cart');
$cart = $cartClass->loadCart($row->cart_id);
$cart->shipping_address = $fakeAddress;
$shippingClass = hikashop_get('class.shipping');
$rates = $shippingClass->getShippings($cart);
//print_r($rates);