Questions tagged [swatches]

Alternative way of presenting the selection of options for configurable products

Filter by
Sorted by
Tagged with
28
votes
3answers
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....
23
votes
2answers
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 ...
2
votes
3answers
3k 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 ...
0
votes
2answers
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 ...
4
votes
2answers
4k 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 ...
3
votes
3answers
2k 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 ?
4
votes
3answers
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 ...
0
votes
1answer
235 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 ...
0
votes
1answer
553 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?
0
votes
2answers
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 ...
18
votes
1answer
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: ...
7
votes
2answers
11k views

Magento 2 create custom swatch attribute programmatically

I would like to create attributes with swatch option programatically in Magento 2.
4
votes
5answers
4k 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 ...
1
vote
1answer
1k 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.
5
votes
1answer
803 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 ...
3
votes
2answers
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 ...
5
votes
1answer
2k 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 ...
3
votes
2answers
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 ...
3
votes
3answers
2k 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 ...
3
votes
1answer
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 ...
3
votes
1answer
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->...
2
votes
2answers
3k 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-<?= /* @...
2
votes
2answers
763 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 ...
2
votes
2answers
541 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.
2
votes
0answers
699 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 ...
2
votes
2answers
6k 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 ...
2
votes
1answer
5k 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. <?...
1
vote
0answers
54 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
1
vote
0answers
576 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: ...
0
votes
0answers
2k 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 ...