Questions tagged [swatches]

Alternative way of presenting the selection of options for configurable products

128 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5
votes
1answer
406 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 ...
4
votes
1answer
516 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 ...
4
votes
0answers
100 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 ...
4
votes
0answers
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 ...
3
votes
0answers
73 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 ...
3
votes
1answer
1k 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 ...
3
votes
0answers
495 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 ...
3
votes
1answer
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 ...
3
votes
1answer
988 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 ...
3
votes
1answer
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 ...
2
votes
1answer
50 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 ...
2
votes
0answers
268 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 ...
2
votes
0answers
21 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.
2
votes
1answer
229 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 ...
2
votes
0answers
138 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
0answers
275 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 ...
2
votes
1answer
277 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 ...
2
votes
0answers
697 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 ...
2
votes
0answers
881 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: ...
2
votes
0answers
656 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
1answer
769 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 ...
2
votes
1answer
423 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 ...
2
votes
0answers
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( [ ...
2
votes
1answer
252 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()->...
2
votes
0answers
411 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.
2
votes
0answers
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-...
2
votes
0answers
95 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 ...
1
vote
0answers
13 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 <...
1
vote
1answer
32 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 ...
1
vote
0answers
49 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
1
vote
0answers
71 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 ...
1
vote
1answer
284 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 ...
1
vote
0answers
27 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 ...
1
vote
0answers
9 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 ...
1
vote
0answers
26 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 ...
1
vote
0answers
28 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 ...
1
vote
0answers
49 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
1answer
1k 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 ...
1
vote
0answers
329 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
822 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 ...
1
vote
0answers
186 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 ...
1
vote
0answers
177 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'...
1
vote
1answer
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 ...
1
vote
0answers
145 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 ...
1
vote
1answer
383 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?
1
vote
1answer
455 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 ...
1
vote
1answer
13 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 ...
1
vote
0answers
497 views

swatches option validation for ajax add to cart issue detail page

I have installed Magento2.1.9 I have enabled ajax add to cart functionalities for product detail page. By following code <script type="text/x-magento-init"> { "#...
1
vote
0answers
917 views

Magento 2 - Get Swatch Image based on swatch label

I want to use a swatch based attribute basically as an image uploader for brand logos. I already have a brand attribute which i want to remain as is so the layered navigation is text however want to ...
1
vote
0answers
204 views

Black and White Magento Visual Swatches displaying Hex instead of color swatch

We have swatches configured for our configurable products for users to select the color of the shirt from, everything seems to work fine except for the two black and white swatches, instead of ...