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 [color-swatches]

Color swatches layered navigation

0
votes
0answers
3 views

Magento 2 Color Attribute: How to make the size of uploaded swatches match the default ones?

For our site's color attribute, we would like to use both the default color options and a few uploaded swatches. However, the uploaded swatches are showing up much smaller, with a white border around ...
0
votes
0answers
10 views

Magento 2.3 How to Auto Select Swatch Option Values if Only One Exists in Product View

I'm trying to have swatch option values selected on the Product View page if only one value exists. also, I have tried this reference but not working for me https://magento.stackexchange.com/a/...
1
vote
0answers
19 views

Magento 2 How to dynamically change custom attributes when click on the color attributes in the configurable product?

I need dynamically change custom attribute on the configurable page when I click to the swatch color attribute. On this purpose I programmatically created custom attributes with options on the admin ...
0
votes
1answer
23 views

How to check uniquenes of color options when adding a color magento 2?

I want that when i add an existing color an exception will be raised so how to proceed and which file do i have to override and thanks in advance.
1
vote
0answers
7 views

Magento 1.9 Colour Swatch handling code -

Please can someone help me with some PHP code: Our magento server hosts have identified this section of code as being very resource hungry, is there an alternative route we can take? a module that ...
0
votes
1answer
22 views

Not able to create color swatches Magento ver. 2.2.4

Preconditions Magento ver. 2.2.4 Developer mode/Production Mode Steps to reproduce Add your own colors Expected result You should be able to add as many colors as you want. Actual result After ...
0
votes
0answers
17 views

get selected by default first color in most recent products in magento2

I have the most recent products on the home page and showing color swatches now I want to select the first color by default of all most recent products in magento2 code to display the color swatches ...
0
votes
1answer
28 views

why button not showing in custom theme in magento 2?

when i go customer login and customer module and custom_module related pages button is not showing when i move a mouse over that button the button is showing how to solve this css color ...
1
vote
1answer
27 views

Get option selected image for conformation email attached

I like to get selected option image of swatch option, for design email template. Now i'm getting a parent image instred of selected image. Eg: in my website parent image is black color, i choose ...
1
vote
0answers
18 views

Photos needed for product attributes?

I have some shirts that the client can choose the size, color and also add a custom text and choose the color of the text. My problem is that I'm not sure if I have a photo of each shirt color without ...
0
votes
0answers
56 views

Color Swatch not showing on search result page in magento2

I am using Compo Theme for Magento website. Color swatch showing on category list page correctly. Now ISSUE ON SEARCH RESULT PAGE. When I search product in magento2 https://website.com/catalogsearch/...
0
votes
0answers
124 views

Auto select first color swatches image in product page

I am currently using this code for auto selecting the first swatch option _init: function () { if (_.isEmpty(this.options.jsonConfig.images)) { this.options....
0
votes
0answers
13 views

Magento 1.9.2. - Counter attribute color incorrect after import

Summing up after importing the configurable products the counter of color and size filter (which are the attributes that make up the configurable products) is not updated, even with a new reindex. It ...
0
votes
0answers
60 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
0answers
69 views

Magento 2 Product Variants display

we have created multiwebsite ( Initially use the default website, after that we create other websites). I have assigned the product ( configurable product) newly added website and associated some ...
0
votes
1answer
191 views

Unselect Attribute “Is Default” - Color

Magento 2.2.6 The attribute 'color' had, for as long as I can remember, no "Is Default" value selected. A few days ago, I add a new color to the color value. Upon saving, there is now a color value ...
0
votes
1answer
65 views

Issue while Configuring color swatches in Magento 1.9.3.10

I am using Magento 1.9.2.10 to configure color swatches i have followed the below link to do this: https://www.templatemonster.com/help/magento-how-to-add-and-manage-configurable-swatches.html#gref ...
0
votes
1answer
318 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!
1
vote
0answers
17 views

how to show Color button Options in Product Category Listings page M1

How to show different Color button Options configure Product Category Listings page M1
1
vote
1answer
159 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
121 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
71 views

How to show swatches on category page in Magento 1.9

I was trying to show configurable color swatches on category listing page but unable to get it, I used below code but it just shows the name of color but I want to show swatches same as on product ...
1
vote
1answer
328 views

Magento 2, how to add color swatches to custom widget template

The custom module lists certain configurable products. I need to display the color swatches, I tried below but it returns nothing! in myTempalte.phtml <?php use Magento\Framework\App\...
0
votes
0answers
26 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. ...
2
votes
1answer
513 views

Magento 2 Get all the colors of a single Product?

How can I get all the available colors of a single product in Magento 2?
3
votes
0answers
202 views

Upload custom images dynamically from product edit page magento 2

I want to create custom image swatches for custom option. There is functionality in magento 1 please check this video. https://www.youtube.com/watch?v=tUvVjvgbJzI I want to develop similar ...
1
vote
0answers
222 views

Change configurable product price selecting a swatch

Good morning, i'm working on a magento 2.2.5 store and i have a question about configurable products configurations. I have some products where the price is different betweent the configurations. ...
1
vote
0answers
182 views

Magento 2 visual swatch not working from changing attribute from drop down?

I have created an attribute "color" with drop-down, now as per our customer request we have changed to visual swatch. and did re-index and flush. but color not displaying at front end as we expected. ...
1
vote
0answers
542 views

How to select by default first swatches from dependent options color & size in magento 2

I have tier prices for the products but it is showing after selecting swatches. I have two attributes "Color & Size" for configurable products. Color attributes have swatch image and Size ...
1
vote
0answers
152 views

Filter the configurable products based on the child product's color in Magento 2

In Magento 2 How to filter the configurable products based on the child product's color. For example, if the parent has 4 children with Green, Red, Yellow and Black colors. If I select green in the ...
0
votes
1answer
28 views

Pass extra class for stock in Swatch Magento2

I want to pass an extra class to swatch class which is formed via swatch renderer js based on the stock. The reason is the swatches are not being hidden if they are out of stock. This is what I am ...
1
vote
0answers
173 views

I have an Issue with “Use Product Image for Swatch if Possible” in magento 2.2

I have an issue with swatch image URL on product detail page. You can check this link for color attribute. Swatch Image url is : ` pub/media/catalog/product\cache\f307e558402b572df42bba27be68d88b//...
1
vote
0answers
26 views

Colour swatch switching back to default randomly [Mage2]

For the past 2 days I've been monitoring my configurable products to see if there is an issue and not to my surprise, I see there is. Basically, I set up a test product with a colour, and checked ...
1
vote
0answers
116 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
380 views

Hide base product Images when pick a different color in Configurable Products

what I need is to hide all pics that doesn't bellongs to the selected color in swatch of configurable product, is there any way to achieve this? Thanks. I've seen this similar question, but without ...
3
votes
2answers
467 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 ?
1
vote
1answer
755 views

Magento 2 colour swatches not showing on homepage

I have used Magento's default feature for calling New products on homepage. In the list I have a configurable product with visual swatches. But the visual swatches not showing on homepage, can anyone ...
0
votes
0answers
489 views

Can't change dropdown attribute to visual swatch on Magento 2

I tried to change a dropdown attribute, for color, to a visual swatch on a test magento2 environment but cannot get it working, does anyone have some advice? When I changed the color attribute to a ...
1
vote
0answers
487 views

programmatically add color swatches to color attribute Magento2

I am using Magento 2.1.10 and have around 580 different colors in my color attribute. Since the Javascript obviously has trouble showing all of them in the backend (does not matter which browser, ...
0
votes
1answer
653 views

How can I get the HEX code in Visual Swatch via Rest API

Could anyone help me to find the rest api to get hex or image of visual swatch attribute? I need the api to return the following, Label Value HEX or Image of the swatch. Thanks
1
vote
2answers
823 views

Magneto2 : Add color swatch attribute option with colorcode value programmatically

I am working on Magento 2 and want to add custom color in color swatch attribute option programmatically. I have gone through this post but unable to add options Can anyone helps me to add custom ...
1
vote
0answers
129 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
0answers
22 views

Magento | Configurable Swatches Tab doesn't appear in The Admin page

I am trying to add a product with color swatches. when I searched I found a lot of articles like this: http://docs.magento.com/m1/ce/user_guide/catalog/product-configurable-swatch.html but I can't ...
3
votes
3answers
913 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 ...
7
votes
5answers
2k views

Magento 2 error in swatchRenderer.js at 'updateData' property

I have this error in category page. When i change color from swatch option it star loading in product image container and shows error in SwatchRenderer.js here is the error: Uncaught TypeError: ...
0
votes
1answer
267 views

how to fetch swatch images from another folder ( not from swatches folder )

I have created new attribute color_group. I have added multiple colors to color_group attribute. Now I want to add the color images to that colors. How can I assign color images to that colors.
1
vote
1answer
221 views

Retrieve all the available color in product collection

I have a custom product collection and products inside this collection has variety of colors. I want to retrieve all the colors available inside this product collection and store it in array. $layer ...
0
votes
1answer
211 views

How color swatches work?

Can anyone explain to me how color swatches work when changing images? And where it is done? I want to know where in code it change images.
0
votes
1answer
257 views

Magento 2 - Values required set to no , still get You must choose options for your item

I set to No the Values required and Visible for the size and color from Product Attributes and when I try to add an item to cart , I get this error : You must choose options for your item. What ...
1
vote
1answer
456 views

Magento 2: How to add a Color Picker in Grid?

I'd like to add the standard Magento color picker to a custom grid in the admin panel, as an editable field. I have been able to do this in admin forms using code like the below, but have no idea how ...