[Skip to main content](#vessel-content)

#   Get Shipping data before Chekout

##

- **[Head](/forum/user/32682-head "View Head's Profile")**
- [![Head's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/32682-head "View Head's Profile") Topic Author
- [ Offline](/forum/user/32682-head)

Less More

- Posts: 18
- Thank you received: 2
-
-

10 years 4 months ago -  10 years 4 months ago [\#244078](#244078) by [Head](/forum/user/32682-head "View Head's Profile")  *[Get Shipping data before Chekout](/forum/28-shipping-methods/885280-get-shipping-data-before-chekout#244078 "-- 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:")* was created by *[Head](/forum/user/32682-head "View Head's Profile")*

-- 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:
Code:

$fakeAddress = new stdClass(); $fakeAddress-&gt;address_post_code = JFactory::getApplication()-&gt;getUserState(HIKASHOP_COMPONENT . '.postalcode'); $cartClass = hikashop_get('class.cart'); $cart = $cartClass-&gt;loadCart($row-&gt;cart_id); $cart-&gt;shipping_address = $fakeAddress; $shippingClass = hikashop_get('class.shipping'); $rates = $shippingClass-&gt;getShippings($cart); //print_r($rates);

Last edit: 10 years 4 months ago by [Head](/forum/user/32682-head "View Head's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI4LXNoaXBwaW5nLW1ldGhvZHMvODg1MjgwLWdldC1zaGlwcGluZy1kYXRhLWJlZm9yZS1jaGVrb3V0P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")**
- [![Mohamed Thelji's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6861.png)](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")
- [ Offline](/forum/user/6861-mohamed-thelji)

Less More

- Posts: 12953
- Thank you received: 1778
-
-
-

10 years 4 months ago [\#244080](#244080) by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")  Replied by *[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")* on topic *[Get Shipping data before Chekout](/forum/28-shipping-methods/885280-get-shipping-data-before-chekout#244080 "-- 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:")*

Hello,
If you succeed to retrieve available shipping methods based on your customer post code, then a solution can be to directly retrieve your shipping price by checking the "hikashop_shipping_price" table.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI4LXNoaXBwaW5nLW1ldGhvZHMvODg1MjgwLWdldC1zaGlwcGluZy1kYXRhLWJlZm9yZS1jaGVrb3V0P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop- Install &amp; Update- Product &amp; Category Display- Content Creation- Sales and Orders- - Orders management- - Reports &amp; Statistics- Customers- Checkout- Payment Methods- Shipping Methods- Import &amp; Export (CSV, XLS…)- Specific Features- - Affilation- - Taxes- - Wishlist- - Vote- - Carousel &amp; Slider- - Mass Actions- - Filters &amp; Search- - Discount &amp; Coupon- - Feature Request- Integrations- Showcase- General Talk about HikaShop- Development- - HikaShop 3.0 Beta- Translation- Commercial Jobs HikaShop Components- HikaMarket- - Market: Feature requests- - Market: How to?- - Market: Bug Report- HikaSerial- - General talk about HikaSerial- - Serial: Bug Report- - Serial: How to?- - Support en Français de HikaSerial (French Support)- - HikaSubscription- HikaAuction- - Auction: Feature requests- - Auction: How to?- - Auction: Bug report Hikashop around the world- Support en Français (French Support)- Russian- - FAQ. Курс выживания с Hikashop. Частые вопросы и о- - Расширения Hikashop- - Наши сайты на Hikashop- 日本語版サポート(Japanese Support)- Thai- German Archives- Bug Report- How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.167 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)

[](#top)
