interactive photo

  • Posts: 30
  • Thank you received: 1
4 years 5 months 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: 81540
  • Thank you received: 13071
  • MODERATOR
4 years 5 months 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: 30
  • Thank you received: 1
4 years 3 months 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: 81540
  • Thank you received: 13071
  • MODERATOR
4 years 3 months 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: 30
  • Thank you received: 1
4 years 3 months 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.

  • Posts: 30
  • Thank you received: 1
4 years 2 months ago #315206

HI,

Unfortunately it does not work with html coordinates if you view the site on a telephone.
Now I want to create the file with the links in PDF, but they don't work with mert html code there.
What should the url become?

Grtz

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

  • Posts: 81540
  • Thank you received: 13071
  • MODERATOR
4 years 2 months ago #315207

Hi,

The area/map tags are supposed to work on mobile devices too:
developer.mozilla.org/en-US/docs/Web/HTM...rowser_compatibility
All mobile browsers support it.
Regarding doing the same with PDF files. It sure is possible with acrobat or indesign:
docs.adobe.com/content/help/en/dynamic-m...ting-image-maps.html
You can use the same URLs.

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

Time to create page: 0.054 seconds
Powered by Kunena Forum