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

#   How to add the custom shipping method restrictions

##

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

Less More

- Posts: 575
- Thank you received: 11
-
-

3 years 7 months ago [\#350469](#350469) by [ler@singmuiheng.com](/forum/user/3330-ler-singmuiheng-com "View ler@singmuiheng.com's Profile")  *[How to add the custom shipping method restrictions](/forum/4-how-to/906149-how-to-add-the-custom-shipping-method-restrictions#350469 "-- HikaShop version -- : 4.4.5 -- Joomla version -- : 3.9.21 -- PHP version -- : 7.2.34 -- Browser(s) name and version -- : Google Chrome  hi, we have create own shipping plugin but we found that the plugin not in the shipping method restrictions on the payment options, can know where should we add the value options on it? can see the attachment for the payment method restrictions")* was created by *[ler@singmuiheng.com](/forum/user/3330-ler-singmuiheng-com "View ler@singmuiheng.com's Profile")*

-- HikaShop version -- : 4.4.5
-- Joomla version -- : 3.9.21
-- PHP version -- : 7.2.34
-- Browser(s) name and version -- : Google Chrome

hi, we have create own shipping plugin but we found that the plugin not in the shipping method restrictions on the payment options, can know where should we add the value options on it? can see the attachment for the payment method restrictions  [ ![cod&#95;shipping.jpeg](/forum/attachment/56775) ](/forum/attachment/56775 "cod&#95;shipping.jpeg")

- [ ![cod&#95;shipping.jpeg](/forum/attachment/56775) ](/forum/attachment/56775 "cod&#95;shipping.jpeg") [ ](/forum/attachment/56775?download=1 "cod&#95;shipping.jpeg")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzkwNjE0OS1ob3ctdG8tYWRkLXRoZS1jdXN0b20tc2hpcHBpbmctbWV0aG9kLXJlc3RyaWN0aW9ucz90bXBsPW1hcmtkb3du) 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")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86358
- Thank you received: 14293
-
-

3 years 7 months ago [\#350470](#350470) 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 add the custom shipping method restrictions](/forum/4-how-to/906149-how-to-add-the-custom-shipping-method-restrictions#350470 "-- HikaShop version -- : 4.4.5 -- Joomla version -- : 3.9.21 -- PHP version -- : 7.2.34 -- Browser(s) name and version -- : Google Chrome  hi, we have create own shipping plugin but we found that the plugin not in the shipping method restrictions on the payment options, can know where should we add the value options on it? can see the attachment for the payment method restrictions")*

Hi,

Once you install a shipping plugin on your Joomla website, you need to go in the menu System&gt;Shipping methods of HikaShop, click on the "new" button, select your shipping plugin and configure a shipping method for it.
Once done, you'll see the shipping method you created selectable in this option.
Did you do all this first ?

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

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

Less More

- Posts: 575
- Thank you received: 11
-
-

3 years 7 months ago [\#350499](#350499) by [ler@singmuiheng.com](/forum/user/3330-ler-singmuiheng-com "View ler@singmuiheng.com's Profile")  Replied by *[ler@singmuiheng.com](/forum/user/3330-ler-singmuiheng-com "View ler@singmuiheng.com's Profile")* on topic *[How to add the custom shipping method restrictions](/forum/4-how-to/906149-how-to-add-the-custom-shipping-method-restrictions#350499 "-- HikaShop version -- : 4.4.5 -- Joomla version -- : 3.9.21 -- PHP version -- : 7.2.34 -- Browser(s) name and version -- : Google Chrome  hi, we have create own shipping plugin but we found that the plugin not in the shipping method restrictions on the payment options, can know where should we add the value options on it? can see the attachment for the payment method restrictions")*

yes we did it but when do the restriction at payment method the shipping created is not showing

This message contains confidential information

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzkwNjE0OS1ob3ctdG8tYWRkLXRoZS1jdXN0b20tc2hpcHBpbmctbWV0aG9kLXJlc3RyaWN0aW9ucz90bXBsPW1hcmtkb3du) 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")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86358
- Thank you received: 14293
-
-

3 years 7 months ago [\#350504](#350504) 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 add the custom shipping method restrictions](/forum/4-how-to/906149-how-to-add-the-custom-shipping-method-restrictions#350504 "-- HikaShop version -- : 4.4.5 -- Joomla version -- : 3.9.21 -- PHP version -- : 7.2.34 -- Browser(s) name and version -- : Google Chrome  hi, we have create own shipping plugin but we found that the plugin not in the shipping method restrictions on the payment options, can know where should we add the value options on it? can see the attachment for the payment method restrictions")*

Hi,

For the "shipping methods" option in the payment methods and custom order fields, you need to implement the shippingMethods method in your shipping plugin class.
For example, in the Australia Post v2 plugin we have: Code:

function shippingMethods(&amp;$main) { $methods = array(); foreach($this-&gt;shipping_types as $value =&gt; $key){ if(!empty($main-&gt;shipping_params-&gt;$value)) $methods[$main-&gt;shipping_id.'-'.$key] = $this-&gt;shipping_names[$value]; } return $methods; }

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

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

Less More

- Posts: 575
- Thank you received: 11
-
-

3 years 7 months ago [\#350523](#350523) by [ler@singmuiheng.com](/forum/user/3330-ler-singmuiheng-com "View ler@singmuiheng.com's Profile")  Replied by *[ler@singmuiheng.com](/forum/user/3330-ler-singmuiheng-com "View ler@singmuiheng.com's Profile")* on topic *[How to add the custom shipping method restrictions](/forum/4-how-to/906149-how-to-add-the-custom-shipping-method-restrictions#350523 "-- HikaShop version -- : 4.4.5 -- Joomla version -- : 3.9.21 -- PHP version -- : 7.2.34 -- Browser(s) name and version -- : Google Chrome  hi, we have create own shipping plugin but we found that the plugin not in the shipping method restrictions on the payment options, can know where should we add the value options on it? can see the attachment for the payment method restrictions")*

yes the options is showing now at the restrictions, but it not showing at payment page since it cannot capture the shipping options, do you have any suggestions for this?  [ ![hika-02.jpeg](/forum/attachment/56781) ](/forum/attachment/56781 "hika-02.jpeg")

[ ![hika-01.jpeg](/forum/attachment/56782) ](/forum/attachment/56782 "hika-01.jpeg")

[ ![hika-03.png](/forum/attachment/56783) ](/forum/attachment/56783 "hika-03.png")

- [ ![hika-02.jpeg](/forum/attachment/56781) ](/forum/attachment/56781 "hika-02.jpeg") [ ](/forum/attachment/56781?download=1 "hika-02.jpeg")
- [ ![hika-01.jpeg](/forum/attachment/56782) ](/forum/attachment/56782 "hika-01.jpeg") [ ](/forum/attachment/56782?download=1 "hika-01.jpeg")
- [ ![hika-03.png](/forum/attachment/56783) ](/forum/attachment/56783 "hika-03.png") [ ](/forum/attachment/56783?download=1 "hika-03.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzkwNjE0OS1ob3ctdG8tYWRkLXRoZS1jdXN0b20tc2hpcHBpbmctbWV0aG9kLXJlc3RyaWN0aW9ucz90bXBsPW1hcmtkb3du) 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")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86358
- Thank you received: 14293
-
-

3 years 7 months ago [\#350527](#350527) 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 add the custom shipping method restrictions](/forum/4-how-to/906149-how-to-add-the-custom-shipping-method-restrictions#350527 "-- HikaShop version -- : 4.4.5 -- Joomla version -- : 3.9.21 -- PHP version -- : 7.2.34 -- Browser(s) name and version -- : Google Chrome  hi, we have create own shipping plugin but we found that the plugin not in the shipping method restrictions on the payment options, can know where should we add the value options on it? can see the attachment for the payment method restrictions")*

Hi,

Well, for the checkout, you need to implement the onShippingDisplay(&amp;$order,&amp;$dbrates,&amp;$usable_rates,&amp;$messages) method in your plugin and have it request the available shipping services / costs for the shipping address of the user and then duplicate the shipping method object of the shipping plugin from the $dbrates array to the $usable_rates array (one per service / cost you want to offer).

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

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