Questions tagged [swatches]

Alternative way of presenting the selection of options for configurable products

125 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
6 votes
1 answer
907 views

How can i change order position of swatch in ascending Magento2

I want to change the sort order of size swatches. I have already put it in sort order from admin but I could not see any result in the front side. Actual Result Expected Result How can I sort it as ...
Jaimin's user avatar
  • 2,136
4 votes
1 answer
726 views

Getting placeholder image instead of swatch image. Magento2.3

I have some issues with swatch images. Clicking swatches in catalog list pages loads placeholder images instead of real product images. I noticed that request to get swatch images returns only small ...
zekia's user avatar
  • 620
4 votes
2 answers
2k views

Magento 2 Init script after page load

Is there any option to init (text/x-magento-init) script after page load? Example, I am working on a simple quickview feature and my controller returns my a layout - phtml file - with rendered html ...
Rob's user avatar
  • 419
4 votes
0 answers
1k views

Is there any way that one swatch is selected by default (magento configurable swatches)

I am trying use Magento Configurable swatches in my website (for colors). But I am facing some issues, in Product details page, we have to select one color swatch. In Product Listing Page, we are ...
Manoj's user avatar
  • 141
3 votes
0 answers
110 views

Magento hierarchical attributes

Does anyone know how to make product attributes visible only when they exist? Ex. you have a T-shirt, models are Spiderman and Thor (model attribute), and available on red, blue and green (color ...
Kalnea's user avatar
  • 31
3 votes
0 answers
263 views

How to add Swatches options to Recently viewed UI component

How to add swatches options for product item to a Recently viewed UI component? I use the following code to show recently viewed block on the page <block class="Magento\Catalog\Block\Widget\...
Anton's user avatar
  • 76
3 votes
0 answers
501 views

using swatches instead of dropdowns 2.1

Is there an option in admin to show swatches instead of drop downs? I seem to remember there being an option in magento 1.9 to do this but can't seem to find it in admin here. Just to clarify this ...
Sackling's user avatar
  • 283
3 votes
1 answer
2k views

text swatch now showing out of stock Magento 2

Setting up configurable products and using the text swatch option to select shirt sizes. The issue is the out of stock shirt text swatches are still showing up, clickable, and have not styling to show ...
user42460's user avatar
3 votes
1 answer
1k views

get configurable swatches in homepage product list (Custom product list)

I have populated bestselling products on homepage. It's populating list of products as desired. Now i have enabled configurable swatches & have enabled on product listing(i'm using rwd theme). I ...
Suman K.C's user avatar
  • 1,159
3 votes
1 answer
2k views

Magento 1.9.1 swatches don't swap images

I've modified my custom template to be able to use swatches with it. (Applied this solution How to use Magento 1.9.1.0 Configurable Swatches in Default package theme (or a custom theme)?) Everything ...
AbdulRahman Al-Mulqi's user avatar
2 votes
1 answer
559 views

How to disable "Add to Cart" and Quantity button if product is out of Stock?

I want to disable add to cart and qty option if product is out of stock, but i also want to show price and swatches of the products and the swatches should be clickable and price should be changeable ...
Afzel Arshad's user avatar
2 votes
0 answers
170 views

Uncaught TypeError: $(...).AddFotoramaVideoEvents is not a function magento 2.3.6

I am facing this uncaught type error in swatch-renderer.js on listing page in magento 2.3.6 Till now i have tried 2 solutions but no luck: 1: added following lines catalog_category_view.xml <...
Umair Nasir Ahmad's user avatar
2 votes
1 answer
255 views

Magento 2.3.2 Single color variation auto selected on product list page

Magento 2.3.2 Single color variation auto selected on product list page, i have added this code in swatch-render.js after container append but it is selecting on all products instead of selecting only ...
Shaikh007's user avatar
2 votes
0 answers
924 views

Magento 2 Create Product Swatch Attribute via API

Is it possible to create a swatch attribute via the API endpoint? Swatch product attributes are seemingly created programatically by setting swatch_input_type data to the attribute, as demonstrated ...
Liam Toohey's user avatar
2 votes
0 answers
22 views

Don't show swatches on product listing magento 1

Don't show swatches on product listing magento 1 In the settings everything turned on Attributes are also all set up correctly.
Konovalov Gleb's user avatar
2 votes
1 answer
402 views

New option value not inserting in eav_attribute_option_swatch

i have 700+ text swatch options.. whenever i add new one, it will insert in eav_attribute_option_value but the Admin value which is supposed to be inserted in eav_attribute_option_swatch is not being ...
butching's user avatar
2 votes
0 answers
551 views

Initialise swatches on product list loaded over ajax

I have noticed that on my infinite scroll the swatches are not showing for products loaded over ajax. I'm guessing that similar to ajax add to cart buttons needing to be initialised the swatch ...
harri's user avatar
  • 5,415
2 votes
1 answer
349 views

How to show all swatches of out of product for a configurable products in magento 2

I want to show all swatches of product for out of stock products. Currently it is showing only in stock products. how to show for out of stocks products. How to display all swatches Can someone ...
Impunkj's user avatar
  • 184
2 votes
0 answers
851 views

magento2: unable to save text swatch attribute, "Admin is a required field in the each row"

on Magento2.2.3 unable to save text swatch attribute, getting error "Admin is a required field in the each row": Value is not Zero. Only possible way to save it is to change type to dropdown or ...
bofh's user avatar
  • 197
2 votes
0 answers
1k views

How to create a custom product view page in a custom url in Magento 2

I need to create a custom product view page in a different custom url. So, i created a custom module for this. But it didn't loads configurable, grouped, bundle swatches. Added the module below: ...
Rita Jose's user avatar
  • 1,842
2 votes
0 answers
876 views

Magento 2 : How to save swatch_text attribute options programatically?

I'm creating a product attribute with input type 'swatch_text'. But I'm able to save option value but swatch text value is not saving. Can anyone help me in saving the marked field in screenshot ...
Shubham Sikarwar's user avatar
2 votes
1 answer
808 views

Product attribute don't save in backend

When trying to save the backend product attribute, it says saved but the same settings are there. I try to change from visual swatch to text swatch, and it saves the text swatch but doesn't update the ...
Axel Dekker's user avatar
2 votes
1 answer
554 views

Remove swatches only in layered navigation Magento 2.1.x

I enabled visual swatches for color attribute and they display correctly but I don't want them in layered navigation. I tried to change code in Magento_LayeredNavigation/templates/layer/view.phtml ...
Sandu's user avatar
  • 41
2 votes
0 answers
1k views

Add programatically a text swatch option attribute

I can use the method addAttributeOption() from Magento\Eav\Setup\EavSetup to add options to a dropdown attribute, something like this: $this->getCategorySetup()->addAttributeOption( [ ...
Shaz's user avatar
  • 180
2 votes
1 answer
255 views

swatches on custom page

I'm trying to load a product view into another page, here is how I'm trying to achieve <?php Mage::register('product',$product);?> <?php $customview = Mage::app()->getLayout()->...
Ahmed's user avatar
  • 758
2 votes
0 answers
418 views

How can I get Visual Swatch option imange in magento 2 product view page

I have attribute option Id but I can't get the image of swatch. Is there any way of getting image.
Sahak T.'s user avatar
2 votes
0 answers
4k views

Swatch customization issues

well we have heavily customized Magento 2 website. The swatch customizing is done in: app\code\My_Package\CustomSwatches\view\frontend\web\js\SwatchRenderer.js by overriding: vendor\magento\module-...
Janaka Dombawela's user avatar
2 votes
0 answers
96 views

swatches not working in list page

Am working in magento 1.9.2.3. The configurable color swatches is not working in list page of mobile view while it is working fine in list page of desktop view.It is also working well in details page ...
Ramya's user avatar
  • 1,088
1 vote
1 answer
346 views

Magento 2.4.4: How to get Configurable child product id using Swatch option

How can I get the child product Id of Configurable product on selecting swatch option. I have used following code <script type="text/javascript"> requirejs(['jquery','underscore'], ...
Divya Rawat's user avatar
1 vote
0 answers
128 views

How to show all images in configurable product before user has selected an option

It is very comfortable to the user navigate between all images product before select an option, but its confusing show all images when user has an option selected. I'm looking for a way to show all ...
jefferson's user avatar
1 vote
1 answer
84 views

Swatch on listing page but image on Product Page

First time posting here. Magento 2.4.0 I am trying to show color swatches on the product listing page but an image of the configurable products on the product page. By selecting use product image as ...
Phil Bradbury's user avatar
1 vote
0 answers
276 views

Magento 2 "More" button on poduct listing page

I want more button next to swatches image and on click of more, it will redirect to the product details page
Akshay Kamble's user avatar
1 vote
0 answers
171 views

Magento 2: 404 for productpage image when click on swatch option

i have used the swatch option for configurable product and each of this color swatch product image are different for that associate products. I have already assign different different image for this ...
Dhaval Vaghela's user avatar
1 vote
0 answers
378 views

Magento 2 - PHP Error After Saving Any Attribute

I am working on a Magento 1 to 2 migration and, after migrating data from 1 to 2, I am receiving an error when attempting to save or create an attribute, and when attempting to load the category and ...
Marisa's user avatar
  • 330
1 vote
1 answer
750 views

Text swatch value for multi store view showing wrong on frontend [ Magento 2.3.3 Enterprise Edition]

Have a look at below. Did anyone get the solution for this? Why product text swatch display admin swatch value instead of specific store value? Magento EE [2.3.3] Steps to reproduce: Create 2 ...
Roshan Rakesh Yadav's user avatar
1 vote
0 answers
143 views

How to dynamically change attribute value depending on the selected swatch or size?

I have a table in which I want to display product attribute data there, depending on the selected size or swatch. So that the value of the attributes in the table changes dynamically How to ...
Pavel Ivatsko's user avatar
1 vote
0 answers
18 views

Magento2 Custom Product Type has no Swatch Image

I have added custom product types that are based on the simple product and this works. However I don't get a swatch image option. I can set base, small_image and thumbnail but no swatch. What have I ...
Henry's Cat's user avatar
  • 2,045
1 vote
0 answers
115 views

Magento 2: Display Swatchs in my template file

I am fetching configuration products from SKU, I am displaying configuration by dropdown, and using selected value I am generating proper SKU of that product. Ex: if customer select 'MH01' and select ...
Sagar Parikh's user avatar
1 vote
0 answers
70 views

Magento 2 : Show Out of Stock Swatch Options On Configurable Product Page

I want to show outofstock swatch options on the configurable product even if the options is outofstock and the main configurable product is also out of stock. I want to show that swatch options with ...
Chirag Gondaliya's user avatar
1 vote
0 answers
134 views

In my custom theme swatch option not display in category page in magento 2

In my custom theme swatch option not display in category page in magento 2 configuration option is not display in the category page refer image : https://prnt.sc/nvegd1
Divya Sekar's user avatar
  • 1,451
1 vote
1 answer
2k views

How to display attribute swatch image in listing page in Magento 2

I am using Magento 2.2.2 I have created one attribute "Manufacturer". Input type of this attribute is visual swatch. I have added values with swatch images in this attribute. I have selected ...
Chintan Kaneriya's user avatar
1 vote
0 answers
424 views

Change swatches images size

I can't change the image size of the swatches of my product. In My/Theme/etc, I have a view.xml file. I've added this : <image id="swatch_image" type="swatch_image"> <width&...
Morgan Tartreau's user avatar
1 vote
2 answers
1k views

Configurable options (size and color) not load

Sometimes Configurable options are not loaded on product detail page and I get this error on the console In firefox I get this error on console: TypeError: settings.fotoramaApi is undefined In ...
Altravista's user avatar
1 vote
0 answers
271 views

Help with Magento 2 extension conflict for configurable product swatches

I am using two extensions which both appear on the product page (configurable product with swatches): MagicZoomPlus - for image zoom ability Amasty Out of Stock notifications - for the ability to ...
YWSW's user avatar
  • 326
1 vote
0 answers
186 views

Issue in product image color in magento 2.2X?

I have two swatches i.e., red and black And when a user clicks red colour it changes the colour of the image But in cart the image is base image only. So the issue is, Selected options image isn'...
Prathap Gunasekaran's user avatar
1 vote
1 answer
2k views

Magento 2 Uncaught SyntaxError: Invalid or unexpected token

When I tried to select the product color swatch and product size I got this error in production mode. Uncaught SyntaxError: Invalid or unexpected token at new Function (<anonymous>) at ...
Vasile Rus's user avatar
1 vote
0 answers
157 views

Magento : Multiple Configurable Swatches on Product Listing Page

I want to show multiple configurable swatches on product listing page. For that I created configurable_category.phtml where I replicated configurable.phtml file to showing the configurable swatches ...
Ciprian's user avatar
  • 527
1 vote
1 answer
641 views

Magento : Remove Swatch Selection

This has probably been asked before but I can't seem to find it. Is there a way with javascript to clear or reset a configurable swatch selection?
Jim's user avatar
  • 537
1 vote
1 answer
519 views

Ordering attribute options on product page

We have a site with a number of colour swatch options. We have ordered the options in the attribute edit section but this does not seem to be taken into account when Magento renders the swatch options ...
Nathan Hastings's user avatar
1 vote
1 answer
15 views

Which version added the core swatch for attributes support via URL hash?

The answer of this question https://magento.stackexchange.com/a/71077/61389 presented a core way to automatically select attributes values using the URL hash. We are developing a module that will ...
user61389's user avatar
  • 183