Hi there,
I’ve managed to get the following hacked together, but when adding to cart it only ever adds the first variation.
Excluding a good chunk of the template that’s printed out by…
foreach ( $options as $option ) {
if (sanitize_title($name) == 'print-options') {
$variation_type = '<span class="price">'. apply_filters( 'woocommerce_variation_option_name', $option ) .'</span> -';
} else {
$variation_type = null;
}
echo '<label itemprop="price" class="vari_price" for="attribute_'. sanitize_title($name).'-'. esc_attr( $post->ID ) .'-'.$tick.'">
<input type="radio" value="' . apply_filters( 'woocommerce_variation_option_name', $option ) . '" ' . checked( sanitize_title( $checked_value ), sanitize_title( $option ), false ) . ' id="attribute_'. sanitize_title($name).'-'. esc_attr( $post->ID ) .'-'.$tick.'" name="attribute_'. sanitize_title($name).'">'. $variation_type .' ' . $price{$tick} . '</label>';
$tick++;
}
I guess the issue lays with add-to-cart-variation.js, as it’s essentially working only the wrong variation is being added to the cart. Do you have any idea on what code is responsible for adding what variation to the cart??
Failing that, is this bug a priority bug or something that’s not likely to be looked at for a while as I really need a solution?
Thanks for all your hard work!