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
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
9 votes
1 answer
494 views

Configurable swatches

We have a online shop with shoes. For example i would like to have a configurable product "Shoes XXX" with following simple products: "Shoes XXX Color Black Size 40" "Shoes XXX Color Black Size 41" "...
diego's user avatar
  • 321
8 votes
1 answer
8k views

How to display swatches on homepage Magento 2

I have two products sliders (based on \Magento\Catalog\Block\Product\Widget\NewWidget) on my homepage. I would like to add swatches to these product sliders. The sliders are added in my homepage....
user1393817's user avatar
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
7 votes
1 answer
286 views

Why does magento need to load all labels from universe to build color swatches?

I'm working on a store that has 23k of possible color values. But, they are not used on every product of course. Now, that we are working on 1.9.2.1, that has native swatches, I see that the produt ...
Ricardo Martins's user avatar
6 votes
2 answers
2k views

Magento color swatch images have black background when created from product image with transparency

I was running into this issue with the new Magento Configurable swatches feature in 1.9: Some of my product images are .png with a transparent background, and the color swatch images seem to default ...
Eric Seastrand's user avatar
6 votes
3 answers
5k views

Main Image not updating when swatch is selected Magento 2.0.8

Having an issue on Magento 2.0.8 where I have a configurable product and simple products associated with it. The simple product have images and on the configurable product there are swatches shown ...
Robert B's user avatar
  • 151
6 votes
1 answer
911 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
5 votes
3 answers
6k views

Execute JavaScript code after swatches are displayed in category view

I'm trying to trigger custom event whenever Magento displays the product swatches in category view. It looks like Magento uses ajax to load these swatches, they are not displayed on page load, they "...
zitix's user avatar
  • 2,192
5 votes
2 answers
3k views

"Undefined Index Notice" in EavAttribute.php when adding a swatch option

I am using Magento 2 and I created an attribute called hair_color that is of a visual swatch input type. I have inputted 140 swatch options for this attribute, but on the 141 I keep getting this error:...
Noemi Quezada's user avatar
5 votes
1 answer
4k views

Visual swatches for attribute with input type multiselect

In Magento 2.1.1 CE visual swatches works with select-type attributes out of box, but not witth multiselect. Is there any simple way to make it work also with multiselect-type? Can it be achieved ...
Bartosz Kubicki's user avatar
5 votes
2 answers
3k views

Configurable swatches - keep correct image proportions

The images created for the configurable swatches are stretched to fit the square div and image proportions are ignored. Images that are rectangle shaped will end up being distorted. This is what the ...
loeffel's user avatar
  • 722
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
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
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
4 votes
3 answers
3k views

Configurable swatch image changes back to default image after selecting attribute

I am experiencing some problems with my configurable swatches. I have set up a configurable product with 2 different attributes(color & size) with 1 configurable swatch being the color. EXAMPLE ...
Jeff's user avatar
  • 41
4 votes
1 answer
5k views

Change configurable swatches order in Magento 2

I want to know how can I change/set configurable swatches sort order in a products list page in Magento 2 ? For example in the case above I want to have from top to bottom: Colors Shapes Sizes ...
user2922294's user avatar
4 votes
1 answer
289 views

How to add svg icons to Swatch attribute (disable admin panel file validation)?

Currently, I can load png/jpg files in swatch attribute, but when I tried to load save attribute with loaded svg file, it's not working. When I load svg from servers - it displays well, but when I ...
Ashen One's user avatar
  • 423
4 votes
1 answer
730 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
4 answers
12k views

Don't display swatches on product listing in Magento 2

I want that the swatches display only in the product detail, but not on the product listing. I'm looking for the option to do not display the swatch options on product list, but I only find how to do ...
Alex's user avatar
  • 811
3 votes
1 answer
4k views

Don't display swatches on product listing

Basically i can see swatches on both the product listing and the product page. How do i remove the ones on the product listing, so I only have them on the product page I only want the swatches to be ...
Nickcap's user avatar
  • 43
3 votes
1 answer
3k views

How to handle click event on configurable product attribute swatch on product page?

How can i handle click event on configurable product attribute on product page. i am trying to below code but its not work. <script type="text/javascript"> require(['jquery'],function($...
Ajay Patel's user avatar
  • 1,513
3 votes
2 answers
3k views

How to create text swatch programmatically?

How to create text swatch programmatically? If, I follow method from saving controller in the product-attribute module (admin) then, I got first and the third field saved but not actual text swatch.
Fred August'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
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
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
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
3 votes
1 answer
201 views

RWD swatches not changing images

When working with the rwd theme and the configurable product image swatches on some products the product images are not changing when changing options. Sadly this does not happen on all products or ...
David Manners's user avatar
3 votes
1 answer
1k views

Display Color names Of Configurable Swatches On Product View Page 1.9

I hope someone can help, I have Configurable Swatches working on my site, Magento 1.9. Some of my customers are confused by the fact that the name of the colour swatch only appears when they hover ...
Silverfernz'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
1k views

Magento 1.9.2.4 configurable swatches don't change main image

I've been stuck for hours on this one. Product I'm working on: this site I've made this configurable product, enabled swatches and added photos for each of those associated products. However when I ...
Marijus's user avatar
  • 31
3 votes
1 answer
809 views

Swatcher PNG trancparency doesn't work and makes background black (Magento 2)

Transparent part of my PNG Files get black on color swatcher images. In product photos it seems to work fine. Anyone know how to fix that?
Oliver Schmid's user avatar
3 votes
1 answer
1k views

Keep select box dropdown for configurable swatches

Magento 1.9.1, using the rwd theme. Is it possible to set an attribute as a configurable swatch but leave the control in the product page as a dropdown? I can see that the JavaScript is using ...
Peter Mellett's user avatar
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
1 answer
642 views

Displaying new set of thumbnails in Configurable Product Swatches

So, this question has been asked multiple times in the past and yet I didn't find an answer for it. I am running Magento 1.9.2 which comes with Configurable Product Swatches. Now I can display ...
Benjamin's user avatar
  • 309
3 votes
2 answers
4k views

Magento 2, List of configurable products with attribute options & add to cart

Scenario: I have a requirement to show a list of products, where a customer can quickly add them to the basket. This list can contain simple or configurable products, and if a configurable is listed, ...
Stanley's user avatar
  • 575
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
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
267 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
5 answers
16k views

Magento 2: How to change image size of swatches?

I found the file to change the image size of Swatches here and it works when I change it in that place: vendor/magento/module-swatches/etc/view.xml However, if I move it to my theme it doesn't ...
Oliver Schmid's user avatar

1
2 3 4 5 6