Geolocation

  • Posts: 259
  • Thank you received: 22
9 years 1 month ago #246046

-- HikaShop version -- : 2.6.3
-- Joomla version -- : 3.6.0

I am looking at a site that needs to provide different pricing (not just currency, but a whole different price list) based on country. With the Geolocation plugin is this possible, or does it only allow you to choose the currency?

More detail. The site is in catalogue mode only and shows wholesale prices for potential distributors around the world. The site owners overheads are different in each country and the price of the same product in each country is therefore different as well. eg. a blue widget might cost $5 in one country but because of overheads costs $15 in another country. The difference is not directly related to shipping or exchange rates so the difference must be in the base price for users in that country. The users are not logged on to the site so they are almost a different category of "guest".

An alternative might be to duplicate the products and display them based on the ip.

Any help or suggestions would be appreciated.

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

  • Posts: 84313
  • Thank you received: 13702
  • MODERATOR
9 years 1 month ago #246118

Hi,

Here is what I would do:
- Create one custom product field for each country where you want a different price.
- Configure the geolocation plugin, so that the currency zone is set in the user session automatically when he arrives on the website.
- Create a small HikaShop plugin implementing the onHikashopBeforeDisplayView trigger and update the prices in $view->element or $view->rows by copying the price in the custom field corresponding to the current zone to the prices array:
. www.hikashop.com/support/documentation/6...hopBeforeDisplayView
The current zone can easily be retrieved from the session with the function hikashop_getZone()
So that would only require a small development.

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

  • Posts: 259
  • Thank you received: 22
9 years 1 month ago #246199

Thanks Nicolas. I think I can manage that plugin. I'll let you know how I go.

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

Time to create page: 0.057 seconds
Powered by Kunena Forum