Want To Add Extra Images Per Product Variations? Download This Free Plugin

No swatches on the first (archive) page – Flatsome theme

Hello,

On a staging site’s first page: http://test.dancemakers.lt/ , after updating version to 2.0.6 , no more color swatches under the product, as opposed to the working version www.dancemakers.lt first page (version 1.1.14).  Theme – Flatsome.

Regards,

Vytenis

Hakik Zaman

Hi Vytenis,

Thanks for reaching out to us. Please add the below snippet using the Code Snippets plugin:

add_action('flatsome_product_box_after', function(){
   woo_variation_swatches()->show_archive_page_swatches();
});

Then let me know if it resolves your issue or not.

Thank You

Update – the swatches on the first page work only in Chrome, but not it Firefox or Edge.

 

Actually, never mind with the staging site.  I installed the pro version on the actual site – and it works well – the swatches are on the first page as well.

Regards,

 

Vytenis

One more update – actually, it does not work in Chrome as well.  So we are now back to square one.

So the problem remains – when I add the code – the swatches appear on the first page, but they double on the rest of the archive pages.

Hakik Zaman

Hi Vytenis,

Please check now, I have added a plugin called Code Snippets and added the below snippet:

add_action('woo_variation_swatches_pro_archive_page_loaded', function($wvs_pro){
   remove_action('woocommerce_init', array( $wvs_pro, 'enable_swatches' ), 1);
}, 10, 1);

add_action('flatsome_product_box_after', function(){
   woo_variation_swatches()->show_archive_page_swatches();
});

Please clear your cache (like- browser cache, caching plugin cache, and server-side cache) before checking.

Thank You