$_product = $this->getProduct();
$_attributes = Mage::helper('core')->decorateArray($this->getAllowAttributes());
?>
<?php if ($_product->isSaleable() && count($_attributes)):?>
<dl>
<?php foreach($_attributes as $_attribute): ?>
<dt><label class="required"><em>*</em><?php echo Mage::helper('catalog')->__($_attribute->getLabel()) ?></label></dt>
<dd <?php if ($_attribute->decoratedIsLast){?> class="last"<?php }?>>
<div class="input-box">
<select name="super_attribute[<?php echo $_attribute->getAttributeId() ?>]" id="attribute<?php echo $_attribute->getAttributeId() ?>" class="required-entry super-attribute-select">
<option><?php echo $this->__('Choose an Option...') ?></option>
</select>
</div>
</dd>
<?php endforeach; ?>
</dl>
<script type="text/javascript">
var spConfig = new Product.Config(<?php echo $this->getJsonConfig() ?>, <?php echo $this->getProductsStockStatus()?>);
var ProChildData = <?php echo $this->getProductsStockStatus()?>;
</script>
这是模板的代码,当通过外部js未选择任何图像时,将在模板上应用隐藏的代码。我要检查它,然后要在禁用的元素中添加不透明度,直到未启用选择选项。在此先感谢您。随时提供建议开发人员。每个建议对我来说都是宝贵的。
使用css
syle。你可以这样
select option:disabled{
opacity: 0;
}
用于偏心元件
select:disabled{
opacity: 0;
}
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句