Show dropdown at single product.
-
I create color swatch to see the color in shop page. But i want use dropdown list inside single product instead of the round color option. Any solution?
Hello,
Thank you for the question.
Unfortunately there is no such option in our theme. But as a solution you try to add the following code to your child theme to make it work as you want (show color circles only on shop page)
function basel_has_swatches( $id, $attr_name, $options, $available_variations, $swatches_use_variation_images = false ) {
$swatches = array();
if( is_singular('product') ) return array();
foreach ($options as $key => $value) {
$swatch = basel_has_swatch($id, $attr_name, $value);
if( ! empty( $swatch ) ) {
if( $swatches_use_variation_images && basel_get_opt( 'grid_swatches_attribute' ) == $attr_name ) {
$variation = basel_get_option_variations( $attr_name, $available_variations, $value );
$swatch = array_merge( $swatch, $variation);
}
$swatches[$key] = $swatch;
}
}
return $swatches;
}
Kind regards,
Xtemos