[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 7 months ago [\#196949](#196949) by [jesper](/forum/user/8151-jesper "View jesper's Profile")  *[Custom shipping method](/forum/28-shipping-methods/876103-custom-shipping-method#196949 "-- 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.")* was created by *[jesper](/forum/user/8151-jesper "View jesper's Profile")*

-- 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.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI4LXNoaXBwaW5nLW1ldGhvZHMvODc2MTAzLWN1c3RvbS1zaGlwcGluZy1tZXRob2Q/c3RhcnQ9MCZ0bXBsPW1hcmtkb3du) 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 7 months ago [\#196951](#196951) 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#196951 "-- 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,

The issue comes from the end of your shipping plugin class where you have these lines: Code:

function onShippingDisplay(&amp;$order,&amp;$methods,&amp;$usable_methods,&amp;$messages){} function onShippingSave(&amp;$order,&amp;$methods,&amp;$shipping_id){} function onShippingConfiguration(&amp;$element){} function onShippingConfigurationSave(&amp;$element){} //function shippingMethods(&amp;$method){} function onAfterProcessShippings(&amp;$usable_rates){}

these methods are defined in the parent class.
If you redefine them without any code and without calling the parent class's method then the code handling the shipping plugin in the parent class won't work and the plugin won't add itself to the list of available shipping methods.
If you don't need them, remove them and you'll see that it will be much better.
If you do, then add the necessary code in them.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI4LXNoaXBwaW5nLW1ldGhvZHMvODc2MTAzLWN1c3RvbS1zaGlwcGluZy1tZXRob2Q/c3RhcnQ9MCZ0bXBsPW1hcmtkb3du) 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 7 months ago [\#197320](#197320) 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#197320 "-- 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.")*

ok i will test and return later if need more help then ![:)](/media/kunena/emoticons/3.png ":)")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI4LXNoaXBwaW5nLW1ldGhvZHMvODc2MTAzLWN1c3RvbS1zaGlwcGluZy1tZXRob2Q/c3RhcnQ9MCZ0bXBsPW1hcmtkb3du) 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 7 months ago -  11 years 7 months ago [\#197517](#197517) 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#197517 "-- 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.")*

well i'm trying to get it display a list of places to ship the package based on the postal code of the shipping address..

i'm not having much luck doing anything at al... as soon as i start to use the function onShippingDisplay(&amp;$order,&amp;$methods,&amp;$usable_methods,&amp;$messages){

i can't get my shipping plugin to show up.... and as far as i have been able to see and deduct from the other shipping plugins, this i s what i need to do it with...

I like your cart alot, but this was so much easier to get to work on virtuemart than it is on here...

more documentation or help is really needed on making custom payment and shipping plugins
or at least an example shipping plugin with some advanced functions like there is for payment.

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

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI4LXNoaXBwaW5nLW1ldGhvZHMvODc2MTAzLWN1c3RvbS1zaGlwcGluZy1tZXRob2Q/c3RhcnQ9MCZ0bXBsPW1hcmtkb3du) 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 7 months ago [\#197523](#197523) 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#197523 "-- 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,

Do like this: Code:

function onShippingDisplay(&amp;$order,&amp;$methods,&amp;$usable_methods,&amp;$messages){ $return = parent::onShippingDisplay($order,$methods,$usable_methods,$messages); foreach($usable_methods as $key =&gt; $method){ if($method-&gt;shipping_type == 'postdk'){ $usable_methods[$key]-&gt;shipping_price = 100; } } }

This example of the onShippingDisplay method will force the price of your shipping method to 100 and display it on the checkout.
I suppose that what you want to do is just to force that shipping_price value to whatever is necessary for postDK based on the user address and the product information and all that can be found in $order.

An example shipping plugin is indeed a good idea. We however didn't had the time to do that yet.
If you have more questions, just ask us and we'll answer you. When we get tired of it, we'll do the example plugin ![;)](/media/kunena/emoticons/24.png ";)")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI4LXNoaXBwaW5nLW1ldGhvZHMvODc2MTAzLWN1c3RvbS1zaGlwcGluZy1tZXRob2Q/c3RhcnQ9MCZ0bXBsPW1hcmtkb3du) 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 7 months ago [\#197574](#197574) 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#197574 "-- 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.")*

Thanx that works... but i need to output a dropdown and some javacript and on choose of the dropdown set it as shipping address of the order

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

11 years 7 months ago [\#197596](#197596) 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 *[Custom shipping method](/forum/28-shipping-methods/876103-custom-shipping-method#197596 "-- 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.")*

Hello,

> but i need to output a dropdown and some javacript and on choose of the dropdown set it as shipping address of the order

The displaying of your shipping methods won't be controlled by your plugin code, can you give me more details about what you exactly want to do through some screenshots for example ?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI4LXNoaXBwaW5nLW1ldGhvZHMvODc2MTAzLWN1c3RvbS1zaGlwcGluZy1tZXRob2Q/c3RhcnQ9MCZ0bXBsPW1hcmtkb3du) 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 7 months ago [\#197665](#197665) 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#197665 "-- 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.")*

My postservice has a webservice that can give the closest place to deliver package to, so when ppl choose this services for shipping, i need to select the place i want to pick up the parsel from.

if you understand what i mean

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

11 years 7 months ago [\#197676](#197676) 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 *[Custom shipping method](/forum/28-shipping-methods/876103-custom-shipping-method#197676 "-- 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.")*

If you have to display a list of delivery place to display, a solution can be to check the envoimoinscher shipping plugin where we display a list of pickup point just after selecting the good shipping method.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI4LXNoaXBwaW5nLW1ldGhvZHMvODc2MTAzLWN1c3RvbS1zaGlwcGluZy1tZXRob2Q/c3RhcnQ9MCZ0bXBsPW1hcmtkb3du) 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 7 months ago [\#198366](#198366) 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#198366 "-- 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.")*

I have gotten it to show me the list of places as individual shipping methods but how can i make this my shipping address for the item when i click on, so that is sets the items shipping adress to be the address i get of this item.

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

11 years 7 months ago [\#198378](#198378) 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 *[Custom shipping method](/forum/28-shipping-methods/876103-custom-shipping-method#198378 "-- 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.")*

Hello,

> how can i make this my shipping address for the item when i click on, so that is sets the items shipping adress to be the address i get of this item.

I didn't totally understood what your issue is and you want to do, can you give me more details through some screenshots for example please ?
Thanks.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI4LXNoaXBwaW5nLW1ldGhvZHMvODc2MTAzLWN1c3RvbS1zaGlwcGluZy1tZXRob2Q/c3RhcnQ9MCZ0bXBsPW1hcmtkb3du) 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 7 months ago [\#198493](#198493) 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#198493 "-- 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.")*

The postal service in denmark has boxes setup at many different locations around the country to where, you can get your package delivered, so that you can pick it up, when you have the time.

Now i have gotten hika to get me a list of them out (seen screenshot)

Now when i click one of them and move on, i need to shop to put in the address info from that, as the shipping address of the order in order for the postal service to know, to where to delivere the package.

- [ ![screeen.jpg](/forum/attachment/23763) ](/forum/attachment/23763 "screeen.jpg") [ ](/forum/attachment/23763?download=1 "screeen.jpg")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI4LXNoaXBwaW5nLW1ldGhvZHMvODc2MTAzLWN1c3RvbS1zaGlwcGluZy1tZXRob2Q/c3RhcnQ9MCZ0bXBsPW1hcmtkb3du) 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 7 months ago [\#198530](#198530) 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#198530 "-- 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,

When you configure a shipping method, you have an option called "override shipping address".
[ www.hikashop.com/support/documentation/i...al-form.html#generic](https://www.hikashop.com/support/documentation/integrated-documentation/10-hikashop/31-hikashop-shipping-manual-form.html#generic)

Regards,

---

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

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

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI4LXNoaXBwaW5nLW1ldGhvZHMvODc2MTAzLWN1c3RvbS1zaGlwcGluZy1tZXRob2Q/c3RhcnQ9MCZ0bXBsPW1hcmtkb3du) 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 [\#198654](#198654) 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#198654 "-- 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.")*

Thanx, i will look at that and write back if more help is needed ![:)](/media/kunena/emoticons/3.png ":)")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI4LXNoaXBwaW5nLW1ldGhvZHMvODc2MTAzLWN1c3RvbS1zaGlwcGluZy1tZXRob2Q/c3RhcnQ9MCZ0bXBsPW1hcmtkb3du) 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 [\#198846](#198846) 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#198846 "-- 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.")*

Jerome it doesn't give me an option to put in a shipping address depending on the selection... thoose 5 have different addresses and are dynamicly fetched from a webservice.

I need to be able to dynamicly set a shipping address for the order.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI4LXNoaXBwaW5nLW1ldGhvZHMvODc2MTAzLWN1c3RvbS1zaGlwcGluZy1tZXRob2Q/c3RhcnQ9MCZ0bXBsPW1hcmtkb3du) 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 [\#198851](#198851) 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#198851 "-- 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.")*

I'm also getting this error on change of shipping method
Fatal error: Call to a member function onShippingSave() on a non-object in components/com_hikashop/controllers/checkout.php on line 979

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

11 years 6 months ago -  11 years 6 months ago [\#198862](#198862) 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 *[Custom shipping method](/forum/28-shipping-methods/876103-custom-shipping-method#198862 "-- 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.")*

Hello,
1.

> Now when i click one of them and move on, i need to shop to put in the address info from that, as the shipping address of the order in order for the postal service to know, to where to delivere the package.

You should then check how we saved the pickup points on the order through the envoimoinscher shipping plugin.

2.
Your issue is probably coming from of your shipping plugin, here is more information about the onShippingSave function : [ www.hikashop.com/forum/2-general-talk-ab...-shipping-costs.html](http://www.hikashop.com/forum/2-general-talk-about-hikashop/31206-user-group-only-shipping-costs.html)

> Calculating shipping amounts on the fly shouldn't be complicated. All happens in the onShippingDisplay function. There you can just put your method in the $usableMethods array and in your method object, set the shipping\_price based on whatever algorithm you need.
> The onShippingSave method is called when the shipping method is selected by user on the checkout.
> If the shipping method is auto selected by default and that the user does not select another shipping method, that method will indeed not be called at all during the checkout, and that's normal.

Last edit: 11 years 6 months ago by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI4LXNoaXBwaW5nLW1ldGhvZHMvODc2MTAzLWN1c3RvbS1zaGlwcGluZy1tZXRob2Q/c3RhcnQ9MCZ0bXBsPW1hcmtkb3du) 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 [\#198941](#198941) 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#198941 "-- 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.")*

1: url for this ?

2: i have created a function like this Code:

function onShippingSave(&amp;$cart, &amp;$methods, &amp;$shipping_id, $warehouse_id = NULL) { //function onShippingSave(&amp;$cart,&amp;$methods,&amp;$shipping_id){ $usable_methods = array(); $errors = array(); $this-&gt;onShippingDisplay($cart,$methods,$usable_methods,$errors); $shipping_id = (int) $shipping_id; foreach($usable_methods as $k =&gt; $usable_method){ if($usable_method-&gt;shipping_id==$shipping_id){ return $usable_method; } } return false; }

But it still gives the error posted before.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI4LXNoaXBwaW5nLW1ldGhvZHMvODc2MTAzLWN1c3RvbS1zaGlwcGluZy1tZXRob2Q/c3RhcnQ9MCZ0bXBsPW1hcmtkb3du) 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 [\#198942](#198942) 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#198942 "-- 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.")*

on 1 i found something on [ www.hikashop.com/support/documentation/2...imoinscher-form.html](http://www.hikashop.com/support/documentation/278-hikashop-shipping-envoimoinscher-form.html)
but can this be used from other plugins, as i get this info dynamicly from a rss feed from my postal service

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI4LXNoaXBwaW5nLW1ldGhvZHMvODc2MTAzLWN1c3RvbS1zaGlwcGluZy1tZXRob2Q/c3RhcnQ9MCZ0bXBsPW1hcmtkb3du) 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 [\#199009](#199009) 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#199009 "-- 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,

The shipping plugin envoimoinscher actually generate its own extra view on the checkout in order for the customer to select his pickup points and then add that extra data to the order.
While that is a possibility, it is much more complex than just generating several virtual shipping methods out of your main shipping method. Nevertheless, you can look at the plugin in the folder plugins/hikashopshipping/envoimoinscher if you want to check that out.

What I would recommend instead is to keep the solution you're using and just figure out a solution to that error.
Based on it, I can say that the problem comes from the way you initialize the virtual shipping methods in the onShippingDisplay method of your plugin, and more specifically the id of the shipping methods. The shipping id of each one should be unique, and should start with the name of the shipping plugin "postdk" in your case, followed by a - and then a unique identifier for the pickup point.
If the format you use for the shipping_id of your virtual shipping methods, the system won't be able to load the shipping plugin for the selected shipping method and the onShippingSave method call will fail during the checkout.

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

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