Conflict with YITH Despacho theme
-
It seems to me the YITH DESPACHO theme has done something a bit dodgy and it is affecting this plugin.
I haven’t looked closely at the code, but it seems that this plugin adds an ‘on-change’ event to the quantity input field which has a class of “qty” (which is the standard woocommerce class name)
The Despacho theme adds a label above the quantity input box with the text “Quantity” but they also give it the class “qty”.
This means that the label also gets an “on change” event added to it by this plugin, which causes unexpected bahaviour:
On the single product page the quantity is blank when you first enter the page.The workaround would be to create a child theme of your despahco theme and copy this file:
/wp-content/themes/despacho/woocommerce/global/quantity-input.php
to it and change the class name in this line<?php if ( $show_label ) : ?><label class="qty"><?php _e( 'Quantity', 'despacho' ) ?>:</label><?php endif; ?>
from “qty” to anything else.
Despacho is not using the “qty” class for styling so there is no problem renaming it.I’m not sure if you could change the plugin so that it only adds the onchange event to an ‘input’ field with the class “qty” and not any item with a class of “qty”
- The topic ‘Conflict with YITH Despacho theme’ is closed to new replies.