Questions tagged [swatches]

Alternative way of presenting the selection of options for configurable products

Filter by
Sorted by
Tagged with
28 votes
3 answers
38k views

How to use Magento 1.9.1.0 Configurable Swatches in Default package theme (or a custom theme)?

UPDATE: My answer now supports automated change of the product base image after swatch. You can also find a more detailed tutorial on how to do this including more images here. Magento CE 1.9.1....
MatthijsIJ's user avatar
  • 3,602
23 votes
2 answers
4k views

Enterprise 1.14.1 Swatches causing 35 sec plus load time on category pages

We have implemented the new inbuilt Swatches feature in our latest new site build When we enable the swatches on category pages the page load time goes from 2 seconds to 38 + seconds. I was wondering ...
Dave Bevington's user avatar
3 votes
3 answers
4k views

How to show out of stock product configuration in Magento 2.2.7?

The display of out of stock products is enabled in the store configuration. This means that out of stock simple products are displayed. But if one or more configuration of a configurable product is ...
Peter Karsai's user avatar
0 votes
2 answers
2k views

Configurable Swatches on Listing Page: Show Multiple Color Attributes

Currently Magento 1.9.1.0 allows to show only a single attribute on the listing page as a swatch (product details page can have multiple attributes showing). Since I've 30+ manufacturers (and each ...
Easy's user avatar
  • 31
4 votes
2 answers
5k views

Configurable product image not switching with swatch change

I am trying to get configurable swatches working in a custom theme in a 1.9 build. I am basically using this method of importing the functionality in the theme. The swatches are working fine, they are ...
circlesix's user avatar
  • 4,263
3 votes
3 answers
3k views

How to disable a swatch, once it is been selected in Magento2.2?

I am trying to disable a swatch, once after it has been selected. So it should not be deselected... How to do it in Magento2.2.x ?
Prathap Gunasekaran's user avatar
4 votes
3 answers
2k views

How can I stop other attributes changing my swatch image?

Most of my products have two attributes, Product Colour and Size. When the Product colour is selected it changes the swatch, as expected. However, if the customer then selects the size. It reverts it ...
Max Smith's user avatar
  • 145
1 vote
1 answer
3k views

How to display Swatches into product list page into custom modules with add to cart functionality

How to display Swatches into the product list page into custom modules with add to cart functionality. We need to display properly selected options with the configuration product into cart.
Ravi Dudhara's user avatar
0 votes
1 answer
245 views

Switching picture on a Configurable Product

I use the 1.9.0.1 version of magento and I would like for configurable products when the user selected a color, pictures of the product changes. I saw that there are modules for this but none are ...
strauss's user avatar
  • 461
0 votes
2 answers
3k views

color swatches won't swap images on custom theme magento 1.9.1

After following the tutorial from "format" to apply the color swatches on an custom theme in magento. Everything shows nice and neat, even the zoom works. However I can't get the product image to ...
user18668's user avatar
0 votes
1 answer
842 views

Swatch Option Not showing in ASC order in Magento2

If size swatch not found with color swatch then it showing in last position, But I want to show in ascending order. Any way for this?
Jugal Kishor's user avatar
  • 1,225
18 votes
1 answer
12k views

How to display correct configured product image in shopping cart

I'm able to successfully use the color swatch feature that was introduced in CE 1.9.1, but I was wondering how can I display the selected colored product that was added to the shopping cart. Example: ...
monocat's user avatar
  • 550
8 votes
2 answers
13k views

Magento 2 create custom swatch attribute programmatically

I would like to create attributes with swatch option programatically in Magento 2.
Gideon's user avatar
  • 195
5 votes
1 answer
1k views

Change images as per Swatches using Custom Slider on Product Detail page

I have created Custom Slick slider to display product images on Product detail page. But I want to change images as per change on color Swatches. Note : I'm using getGalleryImagesJson() to retrieve ...
Ronak Chauhan's user avatar
5 votes
1 answer
3k views

Magento 2 error in swatchRenderer.js

I have overridden magento SwatchRenderer.js file in app\code\Mydirectory\CustomSwatches\view\frontend\web\js\SwatchRenderer.js. My problem is I get an error in my product page load: Uncaught ...
Janaka Dombawela's user avatar
4 votes
5 answers
5k views

Magento 2 replace a core javascript

I was trying to replace magento 2 core javascript file for Swatches render which is located at app/code/Magento/Swatches/view/frontend/web/js/SwatchRenderer.js . And I followed official guide for this ...
Chamal Chamikara's user avatar
3 votes
1 answer
5k views

how to get swatches attribute option in magento 2

how to get progmatically swatches attribute option data in magento 2. I tried this:- \Magento\Eav\Model\ResourceModel\Entity\Attribute\Option\CollectionFactory $options = $this->...
Karangar Meghnathi's user avatar
3 votes
1 answer
2k views

Magento 1.9 configurable swatches ordered by position

When I use the new configurable swatches with Magento 1.9.1, the configurable items are not sorted like in the drop-down. For example sizes, I want sizes sorted like S, M, L, XL. That is also how I ...
John's user avatar
  • 63
3 votes
4 answers
3k views

How to Auto Select The Color as Swatch Option for Products with Only One Color (on Magento 2.1 Product View)?

I'm trying to have swatch option value of color auto-selected for Products that only have one color. If a user selects some product from the category page, the product page is displayed with ...
Shahzada Ayub's user avatar
3 votes
2 answers
4k views

Configurable swatches slow site down

My store was extremely slow on the product pages and after a little bit of debugging I found that the product swatches were causing the problem. I've checked the server error log and the ...
Eddie's user avatar
  • 227
3 votes
2 answers
2k views

Configurable Swatches not working after 1.9.3 Upgrade

After upgrading Magento from 1.9.2.4 to 1.9.3, configurable swatches appears to be broken on the product page for all themes. When you click on color swatches (other than the default) the product ...
jw00druff's user avatar
2 votes
2 answers
6k views

Extend Swatch rendered js file

How to extend the Swatch rendered js file in my custom module? I have override the phtml template files. <script type="text/x-magento-init"> { "[data-role=swatch-option-<?= /* @...
Tester's user avatar
  • 347
2 votes
0 answers
878 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
2 answers
560 views

Magento CE 1.9.1.0 greek characters in configurable swatches

How should we replace common Greek characters for Magento to work on the swatches? According to what rules should we name each png file in the swatches folder? Thanks.
Fix's user avatar
  • 43
2 votes
2 answers
1k views

Want to display label or respected value on the visual swatch attribute at Layered navigation?

I have created size attribute with visual swatch field now in the fronted when we hover at option it is displaying the value/s for the users. Instead of changing to text swatch how to display the ...
Nagaraju Kasa's user avatar
2 votes
1 answer
8k views

How to get visual swatch image from attribute_id?

I want to get the visual swatch image from attribute_id, but I could not find how to get it. I want to get swatch image in getBrand() method, I have got attribute_id and attribute_option_id. <?...
Arun Karnawat's user avatar
2 votes
2 answers
8k views

Create Visual Swatch Attribute

Can anyone provide a working example for creating a visual swatch (or even a text swatch) attribute as part of a setup script. I've tried the example on Magento 2 create custom swatch attribute ...
Paul's user avatar
  • 1,696
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
0 answers
579 views

Magento CE 1.9.1 - Multiple Swatches Problem

I've a configurable product with two attributes: Primary Color and Secondary Color. The options names are the same in both attributes. Supposing that I have a product with following options: ...
Elias Soares's user avatar
0 votes
0 answers
3k views

Magento 2.3.1 CE visual swatch images showing blank

We have upgraded Magento 2.2.3 CE to Magento 2.3.1 CE recently we have been facing an issue i.e the visual swatch images are not displaying for the configurable product options on the frontend details ...
Nagaraju Kasa's user avatar