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

#   How to get shipping ids

##

- **[kyratn](/forum/user/38342-kyratn "View kyratn's Profile")**
- [![kyratn's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/redswirl.jpg)](/forum/user/38342-kyratn "View kyratn's Profile") Topic Author
- [ Offline](/forum/user/38342-kyratn)

Less More

- Posts: 1119
- Thank you received: 114
-
- [](http://kyra.lt)
-

7 years 6 months ago [\#305964](#305964) by [kyratn](/forum/user/38342-kyratn "View kyratn's Profile")  *[How to get shipping ids](/forum/31-development/897349-how-to-get-shipping-ids#305964 "Hi,  I am building custom page where it will show shipping details based on hikashop shipping zones.  How should i get all shipping ids/methods?  As example i do have this:  This will return all shipping details of shippig method with id '8'.  Should i run query or this can be done with hikashop code itself?  Thanks")* was created by *[kyratn](/forum/user/38342-kyratn "View kyratn's Profile")*

Hi,

I am building custom page where it will show shipping details based on hikashop shipping zones.

How should i get all shipping ids/methods?

As example i do have this:
Code:

$id = '8'; $shippingClass = hikashop_get('class.shipping'); $shipping = $shippingClass-&gt;get($id); var_dump($shipping);

This will return all shipping details of shippig method with id '8'.

Should i run query or this can be done with hikashop code itself?

Thanks

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

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86541
- Thank you received: 14304
-
-

7 years 6 months ago [\#305969](#305969) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[How to get shipping ids](/forum/31-development/897349-how-to-get-shipping-ids#305969 "Hi,  I am building custom page where it will show shipping details based on hikashop shipping zones.  How should i get all shipping ids/methods?  As example i do have this:  This will return all shipping details of shippig method with id '8'.  Should i run query or this can be done with hikashop code itself?  Thanks")*

Hi,

You can use that code: Code:

$pluginClass = hikashop_get('class.plugins'); $shippingMethods = $pluginClass-&gt;getMethods('shipping');

Note that this code will only load the data of the shipping methods you created from the database. It won't process them.
So for example, if you use a shipping method like UPS or Fedex, which calculates the shipping fees dynamically based on what is in the cart and the customer shipping address,
In that case you would need to use: Code:

$shippingClass = hikashop_get('class.shipping'); $shipping = $shippingClass-&gt;getShippings($cart);

But in that case, you need to give it the full cart in $cart which is tricky to do as it needs a whole bunch of data loaded.

The following user(s) said Thank You: [kyratn](/forum/user/38342-kyratn "View kyratn's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg5NzM0OS1ob3ctdG8tZ2V0LXNoaXBwaW5nLWlkcz90bXBsPW1hcmtkb3du) 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.067 seconds

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