GET YOUR FIRST 14-DAYS OF PRO FREE

Display input previews in the product image

The Staggs Product configurator comes with support to display input values in the product image. In this article we will show you how you can position the values correctly on the image.

In this post:

Setting up the preview

To make sure the input value will be placed in the image, we have to make sure the field ‘enable preview’ is set to ‘yes’ (default). This makes sure the input value will be placed in the image preview. And you will be provided with additional image settings.

You can also modify the image settings of the attribute to display the preview value on a different slide (defaults to first slide).

Text inputs

When you have enabled the preview, you will see a few additional fields that control the position of the preview in the image:

  1. Preview Top Position: the top position relative to the preview image;
  2. Preview Left Position: the left position relative to the preview image;
  3. Preview Top (Mobile): the top position relative to the preview image on mobile devices;
  4. Preview Left (Mobile): the left position relative to the preview image on mobile devices.

We strongly advise you to use relative CSS units, like percentage units. That will ensure the position of the preview will remain intact when viewing the configurator on different devices.

With the top and left positions you can display your preview anywhere you like. The higher the left value, the more the preview will be displayed on the right. The same goes for the top position.

Image inputs

For the file input we have some additional settings fields when it comes to controlling the preview:

  1. Preview image width: the width of the image preview;
  2. Preview image height: the height of the image preview;
  3. Preview image fill: whether to fill the preview image size with the whole image, or to contain the image within the given width and height.

For the width and height of the preview image we also advise you to use relative CSS units to ensure responsiveness.

With these settings you should be able to display text and images on your main product image.

Custom CSS

If you can’t get the previews on the correct positions in responsive mode, you can always apply some custom CSS to make the preview location pixel perfect for all devices.

Can’t get the preview right? Don’t hesitate to contact support.

Attribute Types

Chevron icon
Toggle widget nav content

Hooks and Filters

Chevron icon
Toggle widget nav content