guillaume2vo Posted April 21, 2020 Share Posted April 21, 2020 Bonjour Je suis sur presta 1.7.6.4, J'ai une variante taille / couleur. et chaque variante a un stock différent taile 46/noir, 48, noir, 50, noir taille 46 bleu, 48, bleu, 50 bleu par exemple lors ce que l'une de ses variante n'as plus de stock, j'aimerai que cela soit avec un css different donc, j'ai fait ceci, mais, cela ne passe pas. il me donne des chiffres et je ne sais pas d'ou il les sort! {if $group.group_type == 'color'} <ul id="group_{$id_attribute_group}" class="variant-links list-inline"> {foreach from=$group.attributes key=id_attribute item=group_attribute} {if ( $group.attributes_quantity[{$id_attribute|intval}] == '0' )} {$notshow = "desactive"} {else} {$notshow = ""} {/if} <li class="list-inline-item d-inline-block"> <div class="custom-control custom-checkbox"> <label class="{$notshow} {if $group.name == 'Taille' } custom-control-label-taille {else} custom-control-label {/if}{if $group_attribute.selected} active{/if}" {if $group_attribute.html_color_code}style="background-color: {$group_attribute.html_color_code}"{/if} {if $group_attribute.texture}style="background-image: url({$group_attribute.texture})"{/if} > <input class="custom-control-input input-color" type="radio" data-product-attribute="{$id_attribute_group}" name="group[{$id_attribute_group}]" value="{$id_attribute}"{if $group_attribute.selected} checked="checked"{/if} > <span class="{if $group.name == 'Taille' } sr-only-taille {else} sr-only {/if}">{$group_attribute.name}</span> </label> </div> </li> {/foreach} </ul> {/if} Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now