interactive photo

  • Posts: 12
  • Thank you received: 0
  • Hikashop Business
2 months 2 days ago #313337

-- HikaShop version -- : 4.2.2
-- Joomla version -- : 3.9.13
-- PHP version -- : 7.5.6

Hi

I would like an interactive photo that you can click on. The red items are characteristics in the photo. When you click on it, these must be added to the order. Which code should we use as url / code to have it added to the order when you click oin it? Or is there something standard for this within hikashop?

Greetz

Attachments:

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

  • Posts: 67896
  • Thank you received: 10108
  • MODERATOR
2 months 2 days ago #313344

Hi,

What you could do is add the image in the description of the product. You would also add area/map tags in the description to setup the zones where the image can be clicked on:
www.w3schools.com/tags/tag_area.asp
And for the link on each "area" tag, you can use the add to cart link of each variant:

https://mywebsite.com/index.php?option=com_hikashop&ctrl=product&task=updatecart&cid=XXX&qty=1&add=1
where XXX is the id of the variant (you can see the id of the variant in the link to the product page in the cart after you added the variant to the cart).

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

  • Posts: 12
  • Thank you received: 0
  • Hikashop Business
3 days 7 hours ago #314855

HI,

We'v made the characteristics and the images are ready.
But when you click on a characteristics the page opens the link to the cart and we want it to stay on the same site so the customer can choose all the characteristics he wants en when he's ready then goes to the cart. Is that possible?

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

  • Posts: 67896
  • Thank you received: 10108
  • MODERATOR
2 days 18 hours ago #314872

Hi,

Are you saying that the image is on a different website than the cart/checkout ?
In that case, I don't see a solution.
However, if what you mean is that they are on the same website but on different pages, and you don't want to change the page when the product is added to the cart, then there are solutions.
One solution is to add a "url" parameter to the add to cart link:

https://mywebsite.com/index.php?option=com_hikashop&ctrl=product&task=updatecart&cid=XXX&qty=1&add=1&url=YYY
Where YYY is the urlencoded URL of the page where you have the image.
To Urlencode a URL, you can use that website for example: www.urlencoder.org/
It's important that the YYY URL is urlencoded or the add to cart URL won't be valid.
You can read more about urlencoding here: stackoverflow.com/questions/4667942/why-should-i-use-urlencode

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

  • Posts: 12
  • Thank you received: 0
  • Hikashop Business
2 days 7 hours ago #314898

HI,

Yes, that was exactly what I ment

Thank you very much!

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

Time to create page: 0.058 seconds
Powered by Kunena Forum