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

#   Custom Shipping Plugin

##

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

Less More

- Posts: 48
- Thank you received: 0
-
-

9 years 2 weeks ago [\#281282](#281282) by [ChristianLocal](/forum/user/35348-christianlocal "View ChristianLocal's Profile")  *[Custom Shipping Plugin](/forum/28-shipping-methods/892518-custom-shipping-plugin#281282 "-- HikaShop version -- : 3.2.1 -- Joomla version -- : 3.8.1 -- PHP version -- : 5.6  Our Distributor has a webservice we are connecting to and we we are creating a custom shipping plugin. Our distributor said to display the Shipping rates useing the GetVariousFlatRates, that it will return an array of various ship methods and the cost available. My developer thinks we should use the current shipping plugins and populate the rates from there server but I am not sure that there is a function that does that. Can we display an array of shipping methods and rates brought in from our distributors WS? See link for soap call...thanks    ws.anchordistributors.com/anchorwebservi...=GetVariousFlatRates")* was created by *[ChristianLocal](/forum/user/35348-christianlocal "View ChristianLocal's Profile")*

-- HikaShop version -- : 3.2.1
-- Joomla version -- : 3.8.1
-- PHP version -- : 5.6

Our Distributor has a webservice we are connecting to and we we are creating a custom shipping plugin. Our distributor said to display the Shipping rates useing the GetVariousFlatRates, that it will return an array of various ship methods and the cost available. My developer thinks we should use the current shipping plugins and populate the rates from there server but I am not sure that there is a function that does that. Can we display an array of shipping methods and rates brought in from our distributors WS? See link for soap call...thanks

[ ws.anchordistributors.com/anchorwebservi...=GetVariousFlatRates](http://ws.anchordistributors.com/anchorwebservice.asmx?op=GetVariousFlatRates)

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

9 years 2 weeks ago [\#281289](#281289) 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 Plugin](/forum/28-shipping-methods/892518-custom-shipping-plugin#281289 "-- HikaShop version -- : 3.2.1 -- Joomla version -- : 3.8.1 -- PHP version -- : 5.6  Our Distributor has a webservice we are connecting to and we we are creating a custom shipping plugin. Our distributor said to display the Shipping rates useing the GetVariousFlatRates, that it will return an array of various ship methods and the cost available. My developer thinks we should use the current shipping plugins and populate the rates from there server but I am not sure that there is a function that does that. Can we display an array of shipping methods and rates brought in from our distributors WS? See link for soap call...thanks    ws.anchordistributors.com/anchorwebservi...=GetVariousFlatRates")*

Hello,

I'm not sure to understand what "populate the rate" means.
But the idea is to having a custom shipping plugin which will store in cache the shipping rules (from the API) and use the trigger "onShippingDisplay" to push the available methods.
[ www.hikashop.com/support/documentation/6...tation.html#shipping](https://www.hikashop.com/support/documentation/62-hikashop-developer-documentation.html#shipping)
It's the same than the available shipping plugin in HikaShop (UPS, Fedex, USPS, CanadaPost, etc)

Regards,

---

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

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

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

Less More

- Posts: 48
- Thank you received: 0
-
-

9 years 2 weeks ago [\#281311](#281311) by [ChristianLocal](/forum/user/35348-christianlocal "View ChristianLocal's Profile")  Replied by *[ChristianLocal](/forum/user/35348-christianlocal "View ChristianLocal's Profile")* on topic *[Custom Shipping Plugin](/forum/28-shipping-methods/892518-custom-shipping-plugin#281311 "-- HikaShop version -- : 3.2.1 -- Joomla version -- : 3.8.1 -- PHP version -- : 5.6  Our Distributor has a webservice we are connecting to and we we are creating a custom shipping plugin. Our distributor said to display the Shipping rates useing the GetVariousFlatRates, that it will return an array of various ship methods and the cost available. My developer thinks we should use the current shipping plugins and populate the rates from there server but I am not sure that there is a function that does that. Can we display an array of shipping methods and rates brought in from our distributors WS? See link for soap call...thanks    ws.anchordistributors.com/anchorwebservi...=GetVariousFlatRates")*

I am wanting to call the rates or display the rates from the WS @ [ ws.anchordistributors.com/anchorwebservi...=GetVariousFlatRates](http://ws.anchordistributors.com/anchorwebservice.asmx?op=GetVariousFlatRates)

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

9 years 2 weeks ago [\#281314](#281314) 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 Plugin](/forum/28-shipping-methods/892518-custom-shipping-plugin#281314 "-- HikaShop version -- : 3.2.1 -- Joomla version -- : 3.8.1 -- PHP version -- : 5.6  Our Distributor has a webservice we are connecting to and we we are creating a custom shipping plugin. Our distributor said to display the Shipping rates useing the GetVariousFlatRates, that it will return an array of various ship methods and the cost available. My developer thinks we should use the current shipping plugins and populate the rates from there server but I am not sure that there is a function that does that. Can we display an array of shipping methods and rates brought in from our distributors WS? See link for soap call...thanks    ws.anchordistributors.com/anchorwebservi...=GetVariousFlatRates")*

Hello,

Yes ; it does not change my previous answer : it requires custom development to create a custom plugin and the usage of the function "onShippingDisplay".

Regards,

---

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

The following user(s) said Thank You: [ChristianLocal](/forum/user/35348-christianlocal "View ChristianLocal's Profile")

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

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

Less More

- Posts: 48
- Thank you received: 0
-
-

9 years 2 weeks ago -  9 years 2 weeks ago [\#281343](#281343) by [ChristianLocal](/forum/user/35348-christianlocal "View ChristianLocal's Profile")  Replied by *[ChristianLocal](/forum/user/35348-christianlocal "View ChristianLocal's Profile")* on topic *[Custom Shipping Plugin](/forum/28-shipping-methods/892518-custom-shipping-plugin#281343 "-- HikaShop version -- : 3.2.1 -- Joomla version -- : 3.8.1 -- PHP version -- : 5.6  Our Distributor has a webservice we are connecting to and we we are creating a custom shipping plugin. Our distributor said to display the Shipping rates useing the GetVariousFlatRates, that it will return an array of various ship methods and the cost available. My developer thinks we should use the current shipping plugins and populate the rates from there server but I am not sure that there is a function that does that. Can we display an array of shipping methods and rates brought in from our distributors WS? See link for soap call...thanks    ws.anchordistributors.com/anchorwebservi...=GetVariousFlatRates")*

onShippingDisplay says that "This method will be called by HikaShop when it is displaying the shipping layout of the checkout process. There, it wants to display a list of possible shipping options and asks the shipping plugins what are the possibilities for the current order information. In the $methods array, you will get all the methods found by the system which are published. You will first need to filter the $methods so that your plugin only work on your plugin method(s)" My distributor has the methods that we bring in from there server, i.e. Media mail, 2 Day Air...etc. Do we need to publish the current plugins inside of Hikashop and then populate the rates in there? or can we just display the rates from the distributors server? I hope I am explaining this correctly. thanks

Last edit: 9 years 2 weeks ago by [ChristianLocal](/forum/user/35348-christianlocal "View ChristianLocal's Profile").

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

9 years 2 weeks ago -  9 years 2 weeks ago [\#281344](#281344) 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 Plugin](/forum/28-shipping-methods/892518-custom-shipping-plugin#281344 "-- HikaShop version -- : 3.2.1 -- Joomla version -- : 3.8.1 -- PHP version -- : 5.6  Our Distributor has a webservice we are connecting to and we we are creating a custom shipping plugin. Our distributor said to display the Shipping rates useing the GetVariousFlatRates, that it will return an array of various ship methods and the cost available. My developer thinks we should use the current shipping plugins and populate the rates from there server but I am not sure that there is a function that does that. Can we display an array of shipping methods and rates brought in from our distributors WS? See link for soap call...thanks    ws.anchordistributors.com/anchorwebservi...=GetVariousFlatRates")*

Hello,

We have the HikaShop partner page : [ www.hikashop.com/home/our-partners.html](https://www.hikashop.com/home/our-partners.html)
And we also have a "commercial jobs" section in the forum : [ www.hikashop.com/forum/9-commercial-jobs.html](https://www.hikashop.com/forum/9-commercial-jobs.html)

Afterwards the creation of a shipping plugin can be complicated and for what I remember regarding your request, there was some other tasks which made the final development pretty important.

Regards,

**Note** : Thanks to don't edit your message a long time after posted it, that mess up our work organisation, if you have to add something post a new message, thank you for your understanding.

---

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

Last edit: 9 years 2 weeks ago by [Philip](/forum/user/34318-philip "View Philip's Profile").

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

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

Less More

- Posts: 48
- Thank you received: 0
-
-

8 years 11 months ago -  8 years 11 months ago [\#283123](#283123) by [ChristianLocal](/forum/user/35348-christianlocal "View ChristianLocal's Profile")  Replied by *[ChristianLocal](/forum/user/35348-christianlocal "View ChristianLocal's Profile")* on topic *[Custom Shipping Plugin](/forum/28-shipping-methods/892518-custom-shipping-plugin#283123 "-- HikaShop version -- : 3.2.1 -- Joomla version -- : 3.8.1 -- PHP version -- : 5.6  Our Distributor has a webservice we are connecting to and we we are creating a custom shipping plugin. Our distributor said to display the Shipping rates useing the GetVariousFlatRates, that it will return an array of various ship methods and the cost available. My developer thinks we should use the current shipping plugins and populate the rates from there server but I am not sure that there is a function that does that. Can we display an array of shipping methods and rates brought in from our distributors WS? See link for soap call...thanks    ws.anchordistributors.com/anchorwebservi...=GetVariousFlatRates")*

Problem description
Our shop delivers product to customer via our supplier.
Our supplier can deliver by different shipping company. List of shipping method and shipping companies depends on customer address and product list (total weight, item quantity, etc).

Our supplier has API (SOAP webservice). We send where and what to deliver and supplier webservice returns to us list of possible shipping methods.
There could be different shipping companies in this list. There could be the same shipping company few times but with different deliver terms (different time and cost)

Supplier’s webservice returns to us
- name and delivery time (it is single text field)
- suppliers delivery id (we should send selected shipping method back to supplier with customer’s cart)
- shipping cost

When our customer purchases out the cart, we have to show on shipping page with the list of possible shipping method. This list should contain only shipping methods that our supplier’s webservice returns for this specific customer (for this specific cart).

We could find way how we can show selected by customer shipping method without adding this selected method to Hikashop shipping methods.

Now for every purchase that our customer makes, we have to add new shipping method. Just to remind written above - we have shipping company and delivery terms inside single text field (in shipping name) and we have to send shipping id back to our supplier; so we have to store shipping name and shipping id somewhere, but show it in shipping section inside customer cart).

This solution works for us well, but we disturb that there will be 25000 new shipping method in a year (approximately we will have 25000 purchases in a year)

**Questions
• Is it true solution to make new shipping method in Hikashop for every purchase?
• Is it the only solution without core modification?
• Is there a way to store shipping info somewhere in order and show this info in shipping section inside customer’s cart?**

Implementation description
We created plugin inherited from hikashopShippingPlugin.
We re-declare method onShippingDisplay there.
Inside this method we request supplier’s web service.

We set $usable_rates with shipping methods we get from supplier’s web service. After this customer sees only our supplier’s shipping method.

$usable_rates = array();
foreach ($responce as $id =&gt; $data) {
$rate = clone $templateRate;
$rate-&gt;shipping_id = $id; //id from anchor
$rate-&gt;shipping_name = $data;
$rate-&gt;shipping_price = $data;
$rate-&gt;shipping_seq_id = $id; //save seq_id

$usable_rates[$id] = $rate;
}

We subscribe on event onBeforeOrderCreate.
There we load cart info first:
$cartClass = hikashop_get('class.cart'); $cart = $cartClass-&gt;loadFullCart();

Than we fetch selected shipping method and save in Hikashop shipping method.
$cart-&gt;usable_methods-&gt;shipping
$shippingClass = hikashop_get('class.shipping');
$savedId = $shippingClass-&gt;save($shipping, false);

In order set real id
$order-&gt;order_shipping_id = $savedId; //set real id form db

After this the cart (the order page shows correctly.

Last edit: 8 years 11 months ago by [ChristianLocal](/forum/user/35348-christianlocal "View ChristianLocal's Profile").

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

8 years 11 months ago [\#283128](#283128) 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 Plugin](/forum/28-shipping-methods/892518-custom-shipping-plugin#283128 "-- HikaShop version -- : 3.2.1 -- Joomla version -- : 3.8.1 -- PHP version -- : 5.6  Our Distributor has a webservice we are connecting to and we we are creating a custom shipping plugin. Our distributor said to display the Shipping rates useing the GetVariousFlatRates, that it will return an array of various ship methods and the cost available. My developer thinks we should use the current shipping plugins and populate the rates from there server but I am not sure that there is a function that does that. Can we display an array of shipping methods and rates brought in from our distributors WS? See link for soap call...thanks    ws.anchordistributors.com/anchorwebservi...=GetVariousFlatRates")*

Hello,

Generally speaking, you want to use the way that shipping plugins like UPS, USPS, Fedex, CanadaPost are working.
You got one single instance of your shipping method (one single ID) but the plugin can virtually create methods during the checkout (depending the order content).

These plugins dynamically get shipping rates (using web services) and what the customer see is the price for the products in its cart.
That shipping price (and details) are store in the order afterwards so you still have a trace of the price (and some other stuff if you need it).

So I would really recommend you to check these plugin source code in order to see how they are interacting with the web services provided by these platforms.
It would avoid you to create a lot of entries in your database ; when you just need something dynamic.

Regards,

---

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

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

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

Less More

- Posts: 48
- Thank you received: 0
-
-

8 years 11 months ago -  8 years 11 months ago [\#283271](#283271) by [ChristianLocal](/forum/user/35348-christianlocal "View ChristianLocal's Profile")  Replied by *[ChristianLocal](/forum/user/35348-christianlocal "View ChristianLocal's Profile")* on topic *[Custom Shipping Plugin](/forum/28-shipping-methods/892518-custom-shipping-plugin#283271 "-- HikaShop version -- : 3.2.1 -- Joomla version -- : 3.8.1 -- PHP version -- : 5.6  Our Distributor has a webservice we are connecting to and we we are creating a custom shipping plugin. Our distributor said to display the Shipping rates useing the GetVariousFlatRates, that it will return an array of various ship methods and the cost available. My developer thinks we should use the current shipping plugins and populate the rates from there server but I am not sure that there is a function that does that. Can we display an array of shipping methods and rates brought in from our distributors WS? See link for soap call...thanks    ws.anchordistributors.com/anchorwebservi...=GetVariousFlatRates")*

we reviewed the examples in the plugins in Hikashop.

They create predefined set of shipping method
For example for FedEx they are:
FedEx Ground (USA, PUERTO RICO)
FedEx 2 Day (USA, PUERTO RICO)
FedEx Express Saver Time Pickup (USA, PUERTO RICO)
FedEx First Overnight (USA, PUERTO RICO)
FedEx Ground (Home Delivery) (USA, PUERTO RICO)
FedEx Priority Overnight (USA, PUERTO RICO)
FedEx Smart Post (USA, PUERTO RICO)
FedEx Standard Overnight (USA, PUERTO RICO)
FedEx International Ground ()
FedEx International Economy ()
FedEx International Economy Distribution ()
FedEx International First ()
FedEx International Priority ()
FedEx International Priority Distribution ()
FedEx Europe First ()
In case of Anchor WS we do not have predefined shipping methods,That is why we have to create them dynamically.

Anchor WS returns not only shipping company name by itself, but it sends in the same field shipping time.
For example, "FedEx International Ground 5-7 days" (and not just "FedEx International Ground")

The problem is about shipping method Name: the plugin can virtually create methods during the checkout it uses shipping name that are predefined. The list with fedex method (that I sent to you as example) is predefined and hardcoded in sources.

Last edit: 8 years 11 months ago by [ChristianLocal](/forum/user/35348-christianlocal "View ChristianLocal's Profile").

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

8 years 11 months ago -  8 years 11 months ago [\#283275](#283275) 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 Plugin](/forum/28-shipping-methods/892518-custom-shipping-plugin#283275 "-- HikaShop version -- : 3.2.1 -- Joomla version -- : 3.8.1 -- PHP version -- : 5.6  Our Distributor has a webservice we are connecting to and we we are creating a custom shipping plugin. Our distributor said to display the Shipping rates useing the GetVariousFlatRates, that it will return an array of various ship methods and the cost available. My developer thinks we should use the current shipping plugins and populate the rates from there server but I am not sure that there is a function that does that. Can we display an array of shipping methods and rates brought in from our distributors WS? See link for soap call...thanks    ws.anchordistributors.com/anchorwebservi...=GetVariousFlatRates")*

Hi,

No, these are "types of shipping", but for each type of shipping, the rates are retrieved automatically and dynamically from the shipping plateform. And that's what you want to do.
So it's really the same as these plugins, only that you have one "shipping service" instead of several.
The point of having the services as options in the shipping plugins is that it allows merchants to choose which services they want to allow or not for a shipping plateform.
So for example, if they only want to offer the standard shipping rates and not the express shipping rates of USPS, they can choose to do so, but the rates themselves will still be retrieved on the fly during the checkout.
And regarding the fact that the shipping names returned by your shipping plateform would have to be hard coded, that should not be necessary.
You can implement the shippingMethods function in your plugin to have the shipping method selected match with the shipping method instance anyway you want.
And you can add extra params to the order to store additional information about the shipping and then display it on the order if necessary.
You can see an implementation of that on that shipping plugin:
[ github.com/HikaShop/hikashop-envoimoinscher](https://github.com/HikaShop/hikashop-envoimoinscher)
For example, it has only 1 Fedex service listing in its configuration, but the envoimoinscher shipping plateform can send back several services of fedex with several prices. You can also see the extra data for pickup points added to the order in its order_shipping_params in the onBeforeOrderCreate trigger and then displayed in emails/order/etc with the onAfterOrderProductsListingDisplay trigger.

Last edit: 8 years 11 months ago by [nicolas](/forum/user/63-nicolas "View nicolas's Profile").

The following user(s) said Thank You: [ChristianLocal](/forum/user/35348-christianlocal "View ChristianLocal's Profile")

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

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

Less More

- Posts: 48
- Thank you received: 0
-
-

8 years 11 months ago [\#283342](#283342) by [ChristianLocal](/forum/user/35348-christianlocal "View ChristianLocal's Profile")  Replied by *[ChristianLocal](/forum/user/35348-christianlocal "View ChristianLocal's Profile")* on topic *[Custom Shipping Plugin](/forum/28-shipping-methods/892518-custom-shipping-plugin#283342 "-- HikaShop version -- : 3.2.1 -- Joomla version -- : 3.8.1 -- PHP version -- : 5.6  Our Distributor has a webservice we are connecting to and we we are creating a custom shipping plugin. Our distributor said to display the Shipping rates useing the GetVariousFlatRates, that it will return an array of various ship methods and the cost available. My developer thinks we should use the current shipping plugins and populate the rates from there server but I am not sure that there is a function that does that. Can we display an array of shipping methods and rates brought in from our distributors WS? See link for soap call...thanks    ws.anchordistributors.com/anchorwebservi...=GetVariousFlatRates")*

I have relayed the info to the developers...they are in Russia so it night time now...

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

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