Questions tagged [swatches]
Alternative way of presenting the selection of options for configurable products
258 questions
1 vote
0 answers
33 views
color swatches and dropdown select on product page
Is there a way to get color swatches and a dropdown select for same attribute color on product view page?
0 votes
3 answers
330 views
How to Override the swatch-renderer.js in Magento 2 Custom Theme?
I am trying to override the swatch-renderer.js file in my custom Magento 2 theme. I have created the required directories and the custom JavaScript file but it doesn't seem to work. Here is what I ...
0 votes
1 answer
106 views
Possible to use Advanced Pricing with Swatches/Configurable Product?
I work within a B2B environment and would love to use swatches for colors/sizes of things (so I don't need to have 4 separate product pages for 4 skus, but they can all be accessed on one page), but ...
0 votes
1 answer
245 views
Compilation from source: LESS file is empty:
I have upgraded my magento version from 2.4.0 to 2.4.6-p3 and in exceptions.log file i am continuously getting one error i.e main.CRITICAL: Magento\Framework\View\Asset\ContentProcessorException: ...
0 votes
1 answer
493 views
How to create custom Text Swatch product attribute using Data Patch in Magento 2
This code only saves the value (description). But I want to save values in ADMIN and DESCRIPTION both, can anyone help me here: private function addVisualSwatchAttribute() { /** @...
0 votes
1 answer
45 views
How to copy size data from admin fields to swatch fields
I like to use the plain-size data as a text swatch in the size attribute. This size data is available in the admin fields. We have too many articles to enter the swatch data manually. I know there ...
0 votes
1 answer
430 views
Magento 2 Import Visual Swatch and Text Swatch Attribute Options Programatically
I have an attribute with attribute ID 'color'. Which has options with visual swatches. and another attribute with ID 'material' which has options with Text swatches. Now for the 'color' attribute I ...
1 vote
1 answer
480 views
Magento 2.4.4: How to get Configurable child product id using Swatch option
How can I get the child product Id of Configurable product on selecting swatch option. I have used following code <script type="text/javascript"> requirejs(['jquery','underscore'], ...
0 votes
1 answer
428 views
Magento 2 how to hide swatch on configurable product if it is out of stock?
I don't use MSI and i want so that swatches that are not available are hidden on the configurable product. How can this be done?
2 votes
1 answer
710 views
How to disable "Add to Cart" and Quantity button if product is out of Stock?
I want to disable add to cart and qty option if product is out of stock, but i also want to show price and swatches of the products and the swatches should be clickable and price should be changeable ...
1 vote
1 answer
3k views
Magento 2 Product Salable Quantity shows 0 even if Qty is greater than 0
The products Salable Quantity of Simple products shows zero(0). But its Quantity is greater than zero (>0). Due to this product swatches are not showing correctly on the front end. Magento admin ...
0 votes
1 answer
220 views
Magento 2 swatches
I'm not good at Magento coding, so bear with me. I want to expose swatches for products with quantity 0 in the product list (changing the text with a ligther color with CSS for example) example: I'm ...
0 votes
2 answers
538 views
Pass Simple product id along with the swatch options attribute in swatch renderer .js magento 2.4
We get swatch options by swatch renderer .js file. I want to pass the product id of the simple product along with the swatch option. Please see attached screenshot. I want to pass a simple product id ...
1 vote
0 answers
154 views
How to show all images in configurable product before user has selected an option
It is very comfortable to the user navigate between all images product before select an option, but its confusing show all images when user has an option selected. I'm looking for a way to show all ...
-1 votes
1 answer
844 views
How to make round border with gap in swatch in css?
I have to make orange border of swatches like below image I made round swatches in magneto 2.4 and it look like below image My css code .swatch-option{border-radius:50%;min-width: 18px;width: 18px !...