Image mapping or hotspots?

Highlighted
New Member
2 0 1

I want to have 1 image with say 5 clickagle spots on the image? Like something this allows -> https://www.image-map.net/

I found one app that provides close to what i want -> https://apps.shopify.com/image-hotspots-by-widgetic

But it doesn't allow hyperlinks and the hotspots aren't customizable.

 

1 Like
Highlighted
Shopify Partner
1365 24 238

Hey @Adam_Johan 

I've made a simple Shopify section that allows you to place hotspots/tooltips on a prset image.

You can have a look at https://sections.design/blogs/shopify/product-tooltips, there is a demo there, installation instructions and also a link to Github where you can get the code.

 

The tooltip content is HTML so you can add links, images...

There are some color options in the theme settings.

 

Hope it helps

 

 

 

https://sections.design tips, tricks & Shopify sections
1 Like
Highlighted
Excursionist
29 0 42

Hi @Mircea_Piturca - your https://sections.design/blogs/shopify/product-tooltips seems to have great promise, but I can't figure out how to configure my image in Shopify.

 

On a Shopify custom page, do I add something like this?

 

<div id="shopify-section-tooltips" class="shopify-section sd-tooltips" label="Main image"><img src="https://cdn.shopify.com/s/files ... .jpg?v=1000099300"></div>

 

 

Or do I configure the .jpg in tooltips.liquid somehow? I've read your instructions and the code a few times, but Shopify is new to me and I can't figure this out :(

0 Likes
Highlighted
Shopify Partner
1365 24 238

Hey @aj007 

On a product page you can include the section using:

 

{% section "tooltips" %}

On homepage, you can select Tooltips" section from the Theme Editor 

 

Make sure you add these files to their respective folders: https://github.com/mirceapiturca/Sections/tree/master/Tooltips

See assets and sections folders.

 

After this, go to theme editor. In the section settings you can select the image to use and all the tooltips content.

Hope it helps

 

https://sections.design tips, tricks & Shopify sections
0 Likes
Highlighted
Excursionist
29 0 42

Hi @Mircea_Piturca 

 

I had already copied tooltips.liquid into sections and tooltips.js into assets - and finally found the UI you're referring to in the Home page Theme Editor now that you explained it (probably should note that in your docs as well).

 

But... I'm actually looking to add this to one of my custom pages (i.e. in '....myshopify.com/admin/pages'), where all I'm given is an HTML editor. Do I have to create a whole new page template in order to add {% section "tooltips" %} or something?

 

Sorry, I'm quite new at all this Shopify stuff :(

 

 

0 Likes
Highlighted
Excursionist
29 0 42

Hi again @Mircea_Piturca ... think I figured most of it out on my own.

 

One thing I can't figure out - how to change the color of the ordered list's '.tooltip-title' given that my site's background is (almost) black, as you can see in the following screenshot:

 

Screenshot 2019-07-04 at 08.11.00.png

 

 

Other than that this is working great. Thanks so much!

 

PS. for others' benefit, to get this far I...

  • Copied tooltips.liquid into sections and tooltips.js into assets

  • Created new page template called 'page.tooltips.liquid' and pasted this at the bottom:
    {% section "tooltips" %}

  • Changed my custom page to use this new template: 'page.tooltips'

  • Edited my custom page using the Theme Editor (Online Store | Themes | Customize) to add and position the tooltips (and the image itself)

  • Various tweaks to 'tooltips.liquid' to squish things a bit more for small screens
0 Likes
Highlighted
Shopify Partner
1365 24 238

Hey,

Happy you got it going.

 

Hopefully with the new Shopify Sections changes the process will me more straightforward. 

Good point, I will try to update the install guide.

 

There are no section settings for what particular case but you can solve it with CSS.

Assuming that your "mobile" breakpoint is at 660px, you can use a mediaquerry to make the title white:

 

@media (max-width: 660px) { 
  .tooltip-title {
    color: white;
  }
}

 

Looking forward to see a link when this goes live!

  

https://sections.design tips, tricks & Shopify sections
0 Likes
Highlighted
Excursionist
29 0 42

Thanks @Mircea_Piturca - I tried the following and it worked for both laptop and mobile. Not sure if this is a better or worse solution for tooltip-title than what you propose above (??)

 

I only half know what I'm doing :)

 

Wrapped with <span style="color: #E7E7E7;"> ... </span> ... so:

        <span style="color: #E7E7E7;"><strong class="tooltip-title" role="none">{{ block.settings.title }}</strong></span>
0 Likes
Highlighted
Shopify Partner
1365 24 238

That will work but CSS it's a better option and will give you more flexibility in the future.

https://sections.design tips, tricks & Shopify sections
0 Likes