Hi Team
This is the error:
jquery.min.js?ver=3.6.0:2 Uncaught TypeError: Cannot read properties of undefined (reading ‘length’)
at HTMLDocument.<anonymous> (frontend.js?ver=20160615:106)
at e (jquery.min.js?ver=3.6.0:2)
at t (jquery.min.js?ver=3.6.0:2)
I see an uncaught type error, maybe when product is not variable in: asset/js/frontend.js line 106
/*--------------------------------------*/
var price_element = '',
variation_id = '';
if( $(".variations_form").attr("data-product_variations").length ){
var product_attr = jQuery.parseJSON( $(".variations_form").attr("data-product_variations") );
}else{
var product_attr = '';
}
$('input.variation_id').change( function(){
if( $(smart_variable.__price_update_on).length ){
price_element = smart_variable.__price_update_on;
}else{
price_element = '.' + smart_variable.__price_update_on;
}
if( $(this).parents('li.product').length ){
price_element = $(this).parents('li.product').find( price_element );
product_attr = jQuery.parseJSON( $(this).parents('li.product').find(".variations_form").attr("data-product_variations") );
variation_id = $(this).parents('li.product').find('input.variation_id').val() ;
}else{
variation_id = $('input.variation_id').val();
}
Can you help me?
]]>We are seeing a JS error on all site pages except product pages coming from this plugin’s frontend.js file on line 104:
“Unexpected token u in JSON at position 0”
Line 104: product_attr = jQuery.parseJSON( $(“.variations_form”).attr(“data-product_variations”) ),
parseJSON is probably trying to parse “undefined” because there is no product on the page? Is there a check anywhere for whether a product exists?
This site does have an absurd number of plugins installed so it could be a plugin conflict, but I thought I’d start here to see if anyone else can recreate the issue.
]]>Is it possible for this plugin to display a featured product with swatches and image gallery like this? – https://imgur.com/1p05pKU
]]>Using “Smart Variation Swatches for WooCommerce PRO” I have created a colour attribute. When adding the widget to filter by that colour attribute, a text link for each colour variation is showing on the main section of the site, behind the product images (most notable when filtering products to see only 1 – as shown here: https://simple-lines.co.uk/shop-2?smart_taxonomy=pa_orientation&slug_terms=landscape)
I wish to show only the colour swatches in the sidebar menu, without text links.
]]>Hello everyone.
There was a problem with the maximum number of images.
Maximum 279 pictures.
Is this a limitation of the free version or just a plugin bug?
Is there a way to show all variations including unavailable ones and disable those that can’t be selected by graying them out?
Something like this: Image
]]>One of my swatches options is a “Custom Color” for which I would need some fill other than a plain color, for example a letter “C” inside would do the job or just some stripes to make it different from other real color options. Is that possible using CSS somehow??
Thanks.
]]>Is it posible to add a border to the swatches? Specially color swatches as if you have a white background and a white swatch, it shows as if nothing is there.
]]>Hi.
Set up some attributes with Smart Variation Swatches and at the frontend you can’t select any options, only working standard drop down ones. Could you help please? I’m using Pro version 1.3.
Thanks
]]>The tool tip is in the way and users can not select a product. How do I disable the tooltip in the free version. This is useless. Why would I pay for the pro version, when this appears to be broke?
]]>We use your plugin version: 1.2.1 and have found a programming error.
Please check your code in the file “class-frontend.php” in line 246.
The way you write it can’t work!
You cannot have multiple of the same key in an associative array!
1.) I changed that to:
$array[] = $variation['attributes'];
2.) Then the lines in lines 154 to 184 must also be adjusted as follows:
foreach ( $terms as $term ) {
if ( in_array( $term->slug, $options ) ) {
$meta_key = md5( $term->slug );
if ( isset( $swatch_type_options[$key] ) && $swatch_type_options[$key]['type'] == 'product_color' ) {
$meta_options['value'] = ( isset ( $swatch_type_options[ $key ][ $meta_key ]['color'] ) && $swatch_type_options[ $key ][ $meta_key ]['color'] != "" ) ? $swatch_type_options[ $key ][ $meta_key ]['color'] :'';
$meta_options['type'] = 'color';
}
if ( isset( $swatch_type_options[$key] ) && $swatch_type_options[$key]['type'] == 'product_image' ) {
$meta_options['value'] = ( isset ( $swatch_type_options[ $key ][ $meta_key ]['image'] ) && $swatch_type_options[ $key ][ $meta_key ]['image'] != "" ) ? $swatch_type_options[ $key ][ $meta_key ]['image'] :'';
$meta_options['type'] = 'image';
}
if ( isset( $swatch_type_options[$key] ) && $swatch_type_options[$key]['type'] == 'product_label' ) {
$meta_options['value'] = '';
$meta_options['type'] = 'label';
}
//$stock['attribute_'.$attribute]
$meta_options['stock_checker'] = '';
/* if( isset( $stock['attribute_'.$attribute] ) && $stock['attribute_'.$attribute] == $term->slug ){
$meta_options['stock_checker'] = 'out_of_stock';
} */
for($x = 0; $x < count($stock);$x++){
if(isset($stock[$x]['attribute_'.$attribute]) && in_array($term->slug, $stock[$x])){
$meta_options['stock_checker'] = 'out_of_stock';
break;
}
}
$swatches .= apply_filters( 'atawc_swatch_html', '', $term, $attr, $args, $meta_options );
}
}
That’s working fine!
Can you please program this in a next update?
Thanks.
]]>I can’t save attribute if it is set to image – the theme doesn’t store it. After I click save, it dissapears. I am using super popular FLATSOME woocommerce theme
]]>I have a field group with:
– plug start (Radio required – prices without tax)
– plug end (Radio required – prices without tax)
This ist for all products in an category.
The product ist a variable product for the length (meters and centimeters).
Under settings I give them also custom Fields
– hole meter (ganze meter)
– added centimeter (zus?tzliche Zentimeter)
On the Variants. I set the price for 1 meter and 0 centimeter (variant matrix) to 1,07€ (fixed – no tax) .
Plugstart price without tax (11,43€)
On the product page I got the correct total price with 14,87€ (with tax)
On the cart, I got the false price 17,46€ (with tax) in stead of the correct price 14,87€ (with tax)
The wrong price 17,46 I think comes from the calculation:
1,07 (no tax) + 13,6 (with tax) = 14,67 (no tax) + 19% ==> 17,46
I THINK IT CACLED LIKE THIS:
1,07 (no tax) + 11,43 (NO tax) = 12,50 (no tax) + 19% ==> 14,87
So on the product page it works also with taxes. On the cart there are other results if the tax is on.
the prices for product-page and cart are not the same, and i can not get them with a same result value.
should: 14,87 (RIGHT)
Is: 17,46 (WRONG)
The Product selection:
1. start: default (1. Selection)
2. end: default (1. Selection)
3. length: 1 Meter (this is a fpf combination from “whole meter“=?Ganze Meter” and “added centimeter“=?zus?tzliche Zentimeter“)
This link will set the defaults to the written settings: https://profineon.deutschewebdesign.de/produkt/kabeltyp-clf100/?attribute_pa_kabellaengemeter=1-m&attribute_pa_kabellaengezentimeter=00
The prices with tax:
1. 13,60 (1. Stecker)
2. 0 (2. Stecker)
3. 1,27 (1 Meter)
Total (with tax): 14,87 €
If I klick now on the ?add to cart“ button, and go to the cart. The price from 14,87 is now 17,46€ (see top)
You can see it:
The Product:
https://profineon.deutschewebdesign.de/produkt/kabeltyp-clf100/
Examples:
Test: https://profineon.deutschewebdesign.de/produkt/zzz-test-kabeltyp-clf100-kopie/
More Variants: https://profineon.deutschewebdesign.de/produkt/kabeltyp-clf100/
]]>I need to Hide Swatch images for colors that aren’t available based on the size selected… eg: i select size 6, and only Green and Red are Available, but for Size 7 have Green, Red and Blue… how do I get Blue swatch option to disappear if the user selects size 6?
]]>Hi,
This plugin is 99.9% perfect for me, except for one thing – I can’t get it to replace the product image with the swatch image when a variation is selected.
It was working for a while, and then stopped, so I must have done something dumb.
If I can get this to work, I will go PRO.
]]>The tool tips for colors are not working on Safari and Microsoft Edge.
]]>When I add a new product and I use the usual procedure to add an attribute, the attribute appears to be added, but when I save and go back to view it the attribute is not actually saved. I have an attribute called “brand” which is not used for variations, this attribute seems to save no problem. However, when I try to add the attributes for size or colour (which are used for variations), then these are the attributes that do not save. I have tried this on existing products, and also on new products. When I disable the variations swatches plugin then the size & colour attributes save just fine.
This worked when I first installed the plugin, it just seems to be sometime in the past month that one of the updates seems to have broken things.
]]>Is there a way to change the color of the tick mark, so that it doesn’t disappear on the white color?
Thanks.
]]>Hello,
I am using this plugin and now I am facing issue. The issue is, in product detail page I want any one of the variation be to high lighted. This works for Size labels but for color tick-sign is not applied. Only on selection the tick-sign is applied.How to solve this?
]]>Admin > Products > Attributes > Add a new term:
A Display bug occurs in the first line of the term list after the button for adding a new term is clicked. It only occurs when taxonomy=”Containing Non-English, Such as Chinese Character”.
The thumbnail in the first line is MISSED.
I have an item that has attributes for colors and patterns. One of the patterns has all colors available while the other pattern has only two colors. I’d like to hide the color options that are unavailable when the latter pattern is selected. How can I do this?
]]>Hello, we have created several plugins and would like to integrate our PW WooCommerce Gift Cards plugin with your plugin.
Could you create two filters for us to make this possible?
Inside here:
/inc/class-wc-ex-product-data-tab.php
Add a filter hook to line 40 for the ‘class’ options so we can insert our product type.
Add a filter hook to line 67 for $product_type_array so that we can add our product type.
Once we have added it to these two spots users who have your plugin can use it with ours. Let me know if you have any questions!
]]>Hey,
thanks a lot for this great plugin!
However to make it usable for me I would need the title and ideally the price of the variation to show before selection. Ideally a combination of image, label and price to toggle.
Is there a quick php snippet i could implement to solve this? I would also be happy just with the code to show the title of the selected variation.
Thanks in advance!
]]>Hi, First I’d like to say your plugin works great for my color swatch needs! I am wondering if you can help me figure out why the first image in my slider (which is the product variation image) is using a cropped square 100×100 thumbnail, and the rest in the slider are not. I want them all to be uniform (relative to size the of the original image), which they are, except the first one. For example, the first several images in the example link I provided were all uploaded in the size 1500×1126. The thumbs (except the first) shrink down to 92×69, while the first thumbnail you can see in the source is pulling a resized thumb for some reason. I believe this is from your plugin (I’m using in conjunction with Avada theme and its slider). Is this hardcoded somewhere? Please let me know if you can shed any light. Site pw: sirules
Thanks!
j
The plugin has been installed and activated, but no watches are showed. I changed the theme, but nothing.
Please, could you give me a hint on how to solve?
Thank you very much
]]>Hey!
Thank your for the nice Plugin its really awesome!
I found a bug in the file class-frontend.php
In row 256 you use a undefined variable.
esc_attr( $term->slug )
to
esc_attr( $meta_option )
and all work very well for me ??