Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [swatches]

Alternative way of presenting the selection of options for configurable products

0
votes
0answers
9 views

Magento2 Swatch change Image does not slide to first Image

I have a problem with product gallery changing swatch (f.e. color). I have a configurable product with different size and different color. each configurable product has it's own color image (I added "...
0
votes
0answers
24 views

Swatches customization in Magento 2

I want to customize swatches as implemented on https://www.sweetpeaandwillow.com/brands/handmade-in-london/astrid-bed# It will showing swatches in popup as well change image on swatch value. Any ...
0
votes
0answers
9 views

How to show Swatches red line when the product is out of stock

Current my swatches are working but not what I expected. I have a product and the colour is black and silver Which has 2 options and if i put black colour and the option 1 out of stock the swatches ...
0
votes
0answers
26 views

How can I have a product attribute with a source model as a swatch?

I have a product attribute that I populate from my own custom table, I have a class that extends from \Magento\Eav\Model\Entity\Attribute\Source\AbstractSource to be able to populate my attribute ...
0
votes
1answer
11 views

How to get product manufacturer swatch image?

I have next string, where I get manufacturer attribute: $brand = $currentProduct->getResource()->getAttribute('manufacturer'); I need to get attribute swatch image. How can I get it? On ...
1
vote
1answer
14 views

How can I get full-sized image on swatch attribute? Magento 2.3

I added swatch images for my brand. I get swatch data in my template: $swatchData = $block->getSwatchData(); Next step - I show image inside my template: $swatchThumbPath = $block->...
2
votes
0answers
6 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 ...
0
votes
0answers
13 views

can't find my new attribute with dynamic options

when i access to stores product my new attribute i found this : ok this is my code to install the new attribute public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $...
0
votes
0answers
19 views

How to set values to “Manage Swatch(Values of Your Attribute)” section of swatch text attribute programmatically?

I have created a swatch text attribute. But the values are not getting saved properly. How to set values to the section "Manage Swatch(Values of Your Attribute)".
1
vote
2answers
100 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
0answers
13 views

Configurable product own url M2

I have configurable product and has size and color options. I want when user clicks the color then want to change Url of the product. My colors are swatches type Looking for good approach. Thanks
2
votes
0answers
20 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 ...
2
votes
0answers
20 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.
0
votes
1answer
39 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
0answers
14 views

How to get swatch image of multiple select attribute values in Magento 2?

I am using Magento 2.2.2 I have an attribute called "Brand" and input type for this attribute is multiple select. In this attribute, I have set "Small Image" in additional settings for one of the ...
0
votes
0answers
35 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 ...
0
votes
1answer
20 views

How to show Size Swatch Option in Reverse Order in magento2

Swatch option coming in asc order but i want to show in reverse order! Is any way for that?
0
votes
0answers
19 views

Exclude Swatch Image from Product Images when creating gallery

I'm trying to find out how to have a swatch image assigned to a product, but ONLY used for the swatch, right now, it also shows up as one of the product's images, and I was hoping there was a way to ...
0
votes
0answers
12 views

Passing data as Javascript variables without caching

I've made some modifications to Magento's swatches via a custom module to display out of stock options on the product page (as non-selectable deactivated swatches, so the user will know that the ...
1
vote
1answer
249 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 ...
2
votes
2answers
187 views

Swatches disappearing

In the table eav_attribute_option_swatch (the one that holds the swatch options for the attributes) I have about 6k records. Some are color codes, others are paths to images and most of them are null (...
0
votes
0answers
47 views

Reload swatches not showing in frontend

My swatch attributes are not showing after i reload my div. <div class="quotation-body"> <ul data-index="<?php echo $step; ?>" class="option option-list"> <?...
0
votes
0answers
45 views

Magento 2 Visual Swatches isn't appear for some products

i have set the color attribute to show as "Visual Swatch" and for some reason the swatches isn't showing up at all for most of the products. All the swatches has values and the simple products has ...
0
votes
0answers
41 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\...
2
votes
2answers
275 views

Magento swatch is not disabled when configurable product is not on stock

I have a little problem at my Magento 2.2.5 store. When a combination of a configurable product is not on stock, the swatch should be disabled with a red strike. But at my store no swatch is disabled, ...
0
votes
0answers
64 views

Magento 2 - Set “Text Swatch” or “Visual Swatch” then images does not changed in frontend

I am trying to create basic text swatches for an attribute (instead of drop downs). I created an attribute (for example, "packgesize"), set the "Catalog Input Type for Store Owner" to "Text Swatch" ...
0
votes
0answers
93 views

How to show simple product size swatches in my wishlist page which can be selected and added to cart?

I have created size attribute as Text Swatch. When you add a config product from product/category page to Wishlist, config product is added and shown in My Wishlist page. In My Wishlist, available ...
0
votes
0answers
18 views

Magento 1.9 Image swatch not switching images

Magento 1.9 image swatch not changing images when clicking swatch options. We have set attribute color with labels and also include it at attribute sets.
0
votes
0answers
67 views

magento 2 cannot add text swatch option via php code

I've got a product attribute "size" set to "text swatch" and already populated with some values. Those values have been added via backend and they work fine. Now I need to add other values to this ...
0
votes
0answers
55 views

Magento 2: Configurable product detail page product name update dynamically

I want to update simple product name once I click on attribute in configurable product. Like I have configurable product T-shirt. So there's attributes named "red", "blue" so on. Now If I click on ...
0
votes
1answer
68 views

In magento 2 mousehover on swatch disable non configurable option?

In Magento2 default swatch function is we are select the color swatch disable the nonconfigurable option like size is not there.Like below image http://prntscr.com/lh9jvl how can i write the same ...
0
votes
1answer
29 views

“As low as” label still displayed after swatch selected

I have a problem in the category products view. I have configurable products as well, for those the swatches and a "As low as [price]" is displayed initially. Which is exactly what i want. When i ...
1
vote
0answers
157 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&...
1
vote
2answers
121 views

Custom swatch message 'This is a required field'

Is there a way to customize the 'This is a required field' message when you don´t select a swatch option? I want to change it to "Please select a color" and "Please select a size" Thanks!
0
votes
1answer
230 views

Adding text to swatch area on product pages?

I'd like to add text below each attribute on the product options form section of the product page. So, for example, something like: Size [s][m] Appended text here I can tell this is directly ...
1
vote
1answer
332 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-<?= /* @...
0
votes
1answer
276 views

Stop swatches from loading images on product detail [closed]

I have two swatches.. color and size. Is there a way to stop the size swatches from reloading the picture of the product and keep the color swatch working as usual? Ty!
0
votes
1answer
238 views

Magento 2 - update product price via swatches on custom page

On a custom page I want to show only the swatches of a configurable product and automatically update the product price based on the chosen swatches. I managed to get the swatches and price to show up ...
0
votes
1answer
217 views

Configurable options (size and color) not load

Some times Configurable options are not loaded in product detail page and i get this error on console In firefox i get this error on console: TypeError: settings.fotoramaApi is undefined In chrome i ...
4
votes
1answer
46 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 ...
2
votes
0answers
93 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 ...
1
vote
1answer
144 views

Magento2 - Get ID for simple product which is associated to configurable product on product listing page

I want to pass product id in a rel tag in the swatch-option class which is on the listing page for swatches. I am aware it has to be done via swatch-renderer.js but not able to do the code. console....
0
votes
1answer
114 views

In Magento 2, how to bypass cache for a custom block template extended from \Magento\Swatches\Block\Product\Renderer\Listing\Configurable?

Recently I customized category listing page to auto-select the color swatch in listing page when a color swatch is selected in the layered navigation filter. Everything is working fine with cache ...
1
vote
1answer
170 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 ...
0
votes
0answers
9 views

Swatches options are not selecting/addtocart after JS merge Magento 1.9.3.1

Swatches option are not able to selecting after merge JS from admin. If set disable JS merge than it works fine. Have you face issue like this with configurable products. Let me know if any one know ...
0
votes
0answers
25 views

Magento 2.1.14 - Swatches are not generated

I'm loading product images via CSV and set some image as a base, thumbnail, small and swatch. But when I go to the website I can't see my swatches. I see only a blank spot without a color/image. ...
0
votes
0answers
35 views

Unable to add to cart configurable product with swatches Magento 1.9.3

I have create the configurable product and assign attribute as swatches instead of drop-down. Swatches will display properly but unable to work for add to cart process like freeze when click on any ...
0
votes
0answers
64 views

show manage Manage Stock in swatches js

im trying to show manage stock when customer choose attribute in configurable product page but it just show Stock Availability when attribute field onchange. this is code that show stock avaibility in ...
2
votes
1answer
223 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 ...
1
vote
0answers
62 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 ...