Dynamic Shipping Price - From external API

  • Posts: 57
  • Thank you received: 1
8 years 2 months ago #250587

-- HikaShop version -- : Hikashop Business 2.6.3
-- Joomla version -- : 3.6.2
-- PHP version -- : 5.6

Hey,

My site is using an external API to create the product prices and shipping costs.
Is it possible to pass the value of shipping cost that I receive from the API to the price field of the Manual Shipping Method plugin?

If s, which files do I need to edit?

Thanks

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
8 years 2 months ago #250639

Hi,

It's possible yes but the solution will depend on how the shipping price vary.
Do you have it calculated dynamically based on what is in the cart during the checkout ?
In that case, I would recommend to develop a small shipping plugin based on the manual shipping plugin and implement the onShippingDisplay function to set the price of the shipping methods dynamically.
You can read more about that here:
www.hikashop.com/support/documentation/6...ml#onShippingDisplay

Please Log in or Create an account to join the conversation.

  • Posts: 57
  • Thank you received: 1
8 years 2 months ago #250642

Hey Nicolas

Thanks for your reply.
The shipping price is being calculated before the checkout, on the product page. The user is choosing from available options then clicks 'Show Price' (see attached) and that's when the shipping cost is being calculated.

I would like to pass this value to the Manual Shipping plugin.

Possible?

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
8 years 2 months ago #250663

Hi,

Then I would still recommend to develop a small shipping plugin based on the manual shipping plugin and implement the onShippingDisplay function to set the price of the shipping methods dynamically based on the custom item fields values of the products in the cart.
That's for the checkout. For the product page, if you want to display a shipping value after the user selects stuff in the custom fields, you would have to add custom javascript to the file "show_block_custom_item" via the menu Display>Views.

Please Log in or Create an account to join the conversation.

Time to create page: 0.062 seconds
Powered by Kunena Forum