Prestashop 更改不可用产品尺寸的样式

Prestashop change styling of unavailbe product sizes

我面临着更改不可用尺寸产品样式的问题,请帮助我这样做。我的代码如下

<ul id="color_to_pick_list" class="clearfix">
    {assign var="default_colorpicker" value=""}                                             
    {foreach from=$group.attributes key=id_attribute item=group_attribute}
        {assign var='img_color_exists' value=file_exists($col_img_dir|cat:$id_attribute|cat:'.jpg')}
        <li{if $group.default == $id_attribute} class="selected"{/if}>
        <a href="{$link->getProductLink($product)|escape:'html':'UTF-8'}" id="color_{$id_attribute|intval}" name="{$colors.$id_attribute.name|escape:'html':'UTF-8'}" class="color_pick{if ($group.default == $id_attribute)} selected{/if}" title="{$colors.$id_attribute.name|escape:'html':'UTF-8'}">
        {$group_attribute|escape:'html':'UTF-8'}</a></li>
        {if ($group.default == $id_attribute)}
            {$default_colorpicker = $id_attribute}
        {/if}
    {/foreach}
</ul>

所以我想显示 css 行以显示不可用的产品尺寸。

这很复杂,因为库存在 Prestashop 上注册的不是变体而是整体,这将给他这样的产品尺寸 38 红色和产品尺寸 38 绿色的不同库存。

因此对于查询,我们可以看到变体不可用,但这不会发生在两行中。

我建议学习一个模块就够了。

此致,