The switcher itself is added automatically. What the theme needs is a call for woocommerce_product_meta_start
action. Essentially, wherever you want this switcher to appear, you put <?php do_action( 'woocommerce_product_meta_start' ); ?>
. In the original theme, it is in single-product/meta.php
, where you can see how it’s used. Your theme should have it as woocommerce/single-product/meta.php
or a very similarly positioned and named file.
As for the button not being clickable, this will also be improved in v1.1.
Essentially, you’ll have a choice (in the plugin’s settings) between using the switcher (it’ll also be less fussy about some CSS details, which is probably its problem on your setup now) or an image simply containing the both sides of the product.
If you want to try the CSS/JS fix from version 1.1, it ought to be enough to remove all three occurrences of .woocommerce-main-image
(don’t forget to remove the dot .
, but keep the space between a
and img
) from script-storefront.js
here (near the end of the file):
{selector: 'a.woocommerce-main-image', field: 'href'},
{selector: 'a.woocommerce-main-image img', field: 'src'},
{selector: 'a.woocommerce-main-image img', field: 'srcset'},
I am not on my work computer at the moment, but if this doesn’t help, please let me know what the browser’s console reports when you click on the switcher (F12 in Chrome) and I’ll try to see if there’s anything more to this.
-
This reply was modified 7 years, 6 months ago by vsego.
-
This reply was modified 7 years, 6 months ago by vsego.
-
This reply was modified 7 years, 6 months ago by vsego.