Hi All,
Im hoping someone can help with this issue, Im no developer and have some understanding of code.
Im setting an image 2/3 of the page with and have a table to the right of it in the other 1/3.
The image is set at 1000px X 1000px, Im then adding a tooltip/hotspot over the image, Ive then setup a selector on that so you can select a product add your qty and add it to cart. This all works, my issue is adding the tooltips/hotspot onto the image, once its been added and I view the page on the frontend its not keeping the tooltip/hotspot in the correct position. I need to lock the position in the theme editor so it does not move.
Any help would be appreciated. Thanks in Advance
Here is the code Ive put together.
{% schema %}
{
“name”: “Hotspot v6.1”,
“settings”: [
{
“type”: “image_picker”,
“id”: “image”,
“label”: “Image”
}
],
“blocks”: [
{
“type”: “product_block”,
“name”: “Product Block”,
“settings”: [
{
“type”: “product”,
“id”: “product”,
“label”: “Select Product”
},
{
“type”: “range”,
“id”: “x_position”,
“label”: “X Position”,
“min”: 0,
“max”: 100,
“default”: 50
},
{
“type”: “range”,
“id”: “y_position”,
“label”: “Y Position”,
“min”: 0,
“max”: 100,
“default”: 50
}
]
}
],
“presets”: [
{
“name”: “Hotspot v6.1”,
“category”: “Custom”
}
]
}
{% endschema %}
{% assign displayed_products = ‘’ %}
{% for block in section.blocks %}
{% if block.settings.product %}
{% if block.settings.product.variants.size > 0 %}
{% assign product_sku = block.settings.product.variants.first.sku %}
{% assign product_price = block.settings.product.variants.first.price | money %}
{% else %}
{% assign product_sku = ‘No SKU’ %}
{% assign product_price = ‘Price unavailable’ %}
{% endif %}
{% unless displayed_products contains product_sku %}
{% assign displayed_products = displayed_products | append: product_sku | append: ‘,’ %}
{{ product_price }}
Parts Information
{% for block in section.blocks %}
{% if block.settings.product %}
{% if block.settings.product.variants.size > 0 %}
{% assign product_sku = block.settings.product.variants.first.sku %}
{% assign product_price = block.settings.product.variants.first.price | money %}
{% else %}
{% assign product_sku = ‘No SKU’ %}
{% assign product_price = ‘Price unavailable’ %}
{% endif %}
{% unless displayed_products contains product_sku %}
{% assign displayed_products = displayed_products | append: product_sku | append: ‘,’ %}
| # | Title |
0 :shopping_cart:
|
|---|---|---|
| Ref: {{ forloop.index }} |
Sku: {{ product_sku }} {{ block.settings.product.title }} |
Price: {{ product_price }}
{% if block.settings.product %} Add to Cart {% else %} Product not found. {% endif %}Item added to cart!
|