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

#   Custom shipping method

##

- **[jesper](/forum/user/8151-jesper "View jesper's Profile")**
- [![jesper's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/dog.png)](/forum/user/8151-jesper "View jesper's Profile") Topic Author
- [ Offline](/forum/user/8151-jesper)

Less More

- Posts: 171
- Thank you received: 4
-
-

11 years 6 months ago -  11 years 6 months ago [\#199306](#199306) by [jesper](/forum/user/8151-jesper "View jesper's Profile")  Replied by *[jesper](/forum/user/8151-jesper "View jesper's Profile")* on topic *[Custom shipping method](/forum/28-shipping-methods/876103-custom-shipping-method?start=20#199306 "-- url of the page with the problem -- : - -- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4.1 -- PHP version -- : 5.4.10 -- Browser(s) name and version -- : -  Hi,  i created a custom shipping method for some stuff i'm working on... and its fine in the backend of J3 but it doesn't show up in the front end...  Now i tried many things and read what you wrote on the page for custom plugins, but can't seem to get it to work.  Any help/idea would be greatly accepted to get it to work, so that i can implement the rest of the code in it.")*

Hi nicolas,

thanx for the info..

in my onShippingDisplay i fetches the delivery places from their feed and does
Code:

foreach ($servicePoints as $shop) { $usable = new stdClass(); $usable-&gt;code = $shop-&gt;servicePointId; $usable-&gt;shipping_currency_id = hikashop_getCurrency(); $usable-&gt;countries = $shop-&gt;visitingAddress-&gt;countryCode; //$usable-&gt;email = $method['email']; $usable-&gt;postal_code = $shop-&gt;visitingAddress-&gt;postalCode; $usable-&gt;shipping_name = $shop-&gt;name; $usable-&gt;shipping_type = "postdk shipping"; $usable-&gt;shipping_id = $shop-&gt;servicePointId; $usable-&gt;shipping_price = $usable_methods[$key]-&gt;shipping_price; $usable-&gt;shipping_ordering = $usable_methods[$key]-&gt;shipping_ordering; $usable-&gt;shipping_description = $shop-&gt;name .' '. $shop-&gt;visitingAddress-&gt;streetName .' '. $shop-&gt;visitingAddress-&gt;streetNumber .', '. $shop-&gt;visitingAddress-&gt;postalCode .' '. $shop-&gt;visitingAddress-&gt;city; $rates[$method-&gt;shipping_type ."-".$shop-&gt;servicePointId] = $usable; } unset($usable_methods[$key]); $usable_methods = array_merge($usable_methods,$rates);

now i just added that the shipping-type in the names in $rates and now they have a name like postdk-7391

but its still not working and i still get same error as before.

I will gladly send you the whole plugin if you give me your email so you can look at it and maybe tell me what i'm doing wrong.

Last edit: 11 years 6 months ago by [jesper](/forum/user/8151-jesper "View jesper's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI4LXNoaXBwaW5nLW1ldGhvZHMvODc2MTAzLWN1c3RvbS1zaGlwcGluZy1tZXRob2Q/c3RhcnQ9MjAmdG1wbD1tYXJrZG93bg==) 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: 86555
- Thank you received: 14304
-
-

11 years 6 months ago [\#199332](#199332) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Custom shipping method](/forum/28-shipping-methods/876103-custom-shipping-method?start=20#199332 "-- url of the page with the problem -- : - -- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4.1 -- PHP version -- : 5.4.10 -- Browser(s) name and version -- : -  Hi,  i created a custom shipping method for some stuff i'm working on... and its fine in the backend of J3 but it doesn't show up in the front end...  Now i tried many things and read what you wrote on the page for custom plugins, but can't seem to get it to work.  Any help/idea would be greatly accepted to get it to work, so that i can implement the rest of the code in it.")*

Hi,

You say that you have postdk-7391 in the id of your shipping methods but that's not what I see in your code:
$usable-&gt;shipping_id = $shop-&gt;servicePointId;
It should be:
$usable-&gt;shipping_id = 'postdk-'.$shop-&gt;servicePointId;

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

- **[jesper](/forum/user/8151-jesper "View jesper's Profile")**
- [![jesper's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/dog.png)](/forum/user/8151-jesper "View jesper's Profile") Topic Author
- [ Offline](/forum/user/8151-jesper)

Less More

- Posts: 171
- Thank you received: 4
-
-

11 years 6 months ago [\#199420](#199420) by [jesper](/forum/user/8151-jesper "View jesper's Profile")  Replied by *[jesper](/forum/user/8151-jesper "View jesper's Profile")* on topic *[Custom shipping method](/forum/28-shipping-methods/876103-custom-shipping-method?start=20#199420 "-- url of the page with the problem -- : - -- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4.1 -- PHP version -- : 5.4.10 -- Browser(s) name and version -- : -  Hi,  i created a custom shipping method for some stuff i'm working on... and its fine in the backend of J3 but it doesn't show up in the front end...  Now i tried many things and read what you wrote on the page for custom plugins, but can't seem to get it to work.  Any help/idea would be greatly accepted to get it to work, so that i can implement the rest of the code in it.")*

changed that, but still get
Fatal error: Call to a member function onShippingSave() on a non-object in components/com_hikashop/controllers/checkout.php on line 979 Code:

foreach ($servicePoints as $shop) { $usable = new stdClass(); $usable-&gt;code = $shop-&gt;servicePointId; $usable-&gt;shipping_currency_id = hikashop_getCurrency(); $usable-&gt;countries = $shop-&gt;visitingAddress-&gt;countryCode; //$usable-&gt;email = $method['email']; $usable-&gt;postal_code = $shop-&gt;visitingAddress-&gt;postalCode; $usable-&gt;shipping_name = $shop-&gt;name; $usable-&gt;shipping_type = "postdk shipping"; $usable-&gt;shipping_id = $method-&gt;shipping_type ."-".$shop-&gt;servicePointId; $usable-&gt;shipping_price = $usable_methods[$key]-&gt;shipping_price; $usable-&gt;shipping_ordering = $usable_methods[$key]-&gt;shipping_ordering; $usable-&gt;shipping_description = $shop-&gt;name .' '. $shop-&gt;visitingAddress-&gt;streetName .' '. $shop-&gt;visitingAddress-&gt;streetNumber .', '. $shop-&gt;visitingAddress-&gt;postalCode .' '. $shop-&gt;visitingAddress-&gt;city; $rates[$method-&gt;shipping_type ."-".$shop-&gt;servicePointId] = $usable; } unset($usable_methods[$key]); JFactory::getApplication()-&gt;enqueueMessage(var_export($rates,true)); $usable_methods = array_merge($usable_methods,$rates);

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI4LXNoaXBwaW5nLW1ldGhvZHMvODc2MTAzLWN1c3RvbS1zaGlwcGluZy1tZXRob2Q/c3RhcnQ9MjAmdG1wbD1tYXJrZG93bg==) 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: 86555
- Thank you received: 14304
-
-

11 years 6 months ago [\#199446](#199446) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Custom shipping method](/forum/28-shipping-methods/876103-custom-shipping-method?start=20#199446 "-- url of the page with the problem -- : - -- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4.1 -- PHP version -- : 5.4.10 -- Browser(s) name and version -- : -  Hi,  i created a custom shipping method for some stuff i'm working on... and its fine in the backend of J3 but it doesn't show up in the front end...  Now i tried many things and read what you wrote on the page for custom plugins, but can't seem to get it to work.  Any help/idea would be greatly accepted to get it to work, so that i can implement the rest of the code in it.")*

Hi,

Then I don't know what else could be the problem.
We would need to look at the whole plugin to be able to say anything else.
you can send it to contact at hikashop dot com with a link to this thread and we'll have a look.

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

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

- **[jesper](/forum/user/8151-jesper "View jesper's Profile")**
- [![jesper's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/dog.png)](/forum/user/8151-jesper "View jesper's Profile") Topic Author
- [ Offline](/forum/user/8151-jesper)

Less More

- Posts: 171
- Thank you received: 4
-
-

11 years 6 months ago [\#199563](#199563) by [jesper](/forum/user/8151-jesper "View jesper's Profile")  Replied by *[jesper](/forum/user/8151-jesper "View jesper's Profile")* on topic *[Custom shipping method](/forum/28-shipping-methods/876103-custom-shipping-method?start=20#199563 "-- url of the page with the problem -- : - -- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4.1 -- PHP version -- : 5.4.10 -- Browser(s) name and version -- : -  Hi,  i created a custom shipping method for some stuff i'm working on... and its fine in the backend of J3 but it doesn't show up in the front end...  Now i tried many things and read what you wrote on the page for custom plugins, but can't seem to get it to work.  Any help/idea would be greatly accepted to get it to work, so that i can implement the rest of the code in it.")*

Hi nicolas,

i have sendt you the plugin and hope you are able to help me get this done ![:)](/media/kunena/emoticons/3.png ":)")

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

- **[jesper](/forum/user/8151-jesper "View jesper's Profile")**
- [![jesper's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/dog.png)](/forum/user/8151-jesper "View jesper's Profile") Topic Author
- [ Offline](/forum/user/8151-jesper)

Less More

- Posts: 171
- Thank you received: 4
-
-

11 years 6 months ago [\#200076](#200076) by [jesper](/forum/user/8151-jesper "View jesper's Profile")  Replied by *[jesper](/forum/user/8151-jesper "View jesper's Profile")* on topic *[Custom shipping method](/forum/28-shipping-methods/876103-custom-shipping-method?start=20#200076 "-- url of the page with the problem -- : - -- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4.1 -- PHP version -- : 5.4.10 -- Browser(s) name and version -- : -  Hi,  i created a custom shipping method for some stuff i'm working on... and its fine in the backend of J3 but it doesn't show up in the front end...  Now i tried many things and read what you wrote on the page for custom plugins, but can't seem to get it to work.  Any help/idea would be greatly accepted to get it to work, so that i can implement the rest of the code in it.")*

Hi Nicolas,

just wanna say thanx for all the help... i now have it working ![:)](/media/kunena/emoticons/3.png ":)")

now i only have one challenge left with is some urlencoding that isn't working as it should, be i will get there.

It would be really nice, if there was alot better documentation for the shipping plugins.

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

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

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26400
- Thank you received: 4080
-
- [](http://obsi.dev)
-

11 years 6 months ago [\#200117](#200117) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Custom shipping method](/forum/28-shipping-methods/876103-custom-shipping-method?start=20#200117 "-- url of the page with the problem -- : - -- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4.1 -- PHP version -- : 5.4.10 -- Browser(s) name and version -- : -  Hi,  i created a custom shipping method for some stuff i'm working on... and its fine in the backend of J3 but it doesn't show up in the front end...  Now i tried many things and read what you wrote on the page for custom plugins, but can't seem to get it to work.  Any help/idea would be greatly accepted to get it to work, so that i can implement the rest of the code in it.")*

Hi,

On which part exactly do you want some improvements ?

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

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

- **[jesper](/forum/user/8151-jesper "View jesper's Profile")**
- [![jesper's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/dog.png)](/forum/user/8151-jesper "View jesper's Profile") Topic Author
- [ Offline](/forum/user/8151-jesper)

Less More

- Posts: 171
- Thank you received: 4
-
-

11 years 6 months ago [\#200135](#200135) by [jesper](/forum/user/8151-jesper "View jesper's Profile")  Replied by *[jesper](/forum/user/8151-jesper "View jesper's Profile")* on topic *[Custom shipping method](/forum/28-shipping-methods/876103-custom-shipping-method?start=20#200135 "-- url of the page with the problem -- : - -- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4.1 -- PHP version -- : 5.4.10 -- Browser(s) name and version -- : -  Hi,  i created a custom shipping method for some stuff i'm working on... and its fine in the backend of J3 but it doesn't show up in the front end...  Now i tried many things and read what you wrote on the page for custom plugins, but can't seem to get it to work.  Any help/idea would be greatly accepted to get it to work, so that i can implement the rest of the code in it.")*

Hey Jerome,

as i wrote to nicolas it would be nice with some complete documentation on the shipping interface to make custom shipping plugins, cause this has been a struckle to get though this.

Also about getShippingAddress it would be nice, if you could just assing the "fields" in array, that then writes it into the default structure instead of a freetext return field.

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

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

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