Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/magento/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/react-native/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Magento-如何回显选定的产品属性(颜色)_Magento_Attributes_Custom Attributes_Thumbnails - Fatal编程技术网

Magento-如何回显选定的产品属性(颜色)

Magento-如何回显选定的产品属性(颜色),magento,attributes,custom-attributes,thumbnails,Magento,Attributes,Custom Attributes,Thumbnails,我正在运行magento 1.4+ 在“产品视图”页面上,使用可配置的产品,如何获取所选属性以响应其标题 例如,我有彩色缩略图,当你点击它时,也会更新我的下拉列表。我只想回显文本onclick,而不是更改下拉列表。有什么建议吗?这是我的密码- <?php $_product = $this->getProduct(); $_attributes = Mage::helper('core')->decorateArray($this->getA

我正在运行magento 1.4+

在“产品视图”页面上,使用可配置的产品,如何获取所选属性以响应其标题

例如,我有彩色缩略图,当你点击它时,也会更新我的下拉列表。我只想回显文本onclick,而不是更改下拉列表。有什么建议吗?这是我的密码-

    <?php
    $_product    = $this->getProduct();
    $_attributes = Mage::helper('core')->decorateArray($this->getAllowAttributes());
?>
<?php if ($_product->isSaleable() && count($_attributes)):?>
    <dl class="product-options-block">
    <?php foreach($_attributes as $_attribute): ?>
        <dt><label class="required"><?php echo $_attribute->getLabel() ?> <em>*</em></label></dt>
        <dd<?php if ($_attribute->decoratedIsLast){?> class="last"<?php }?>>
            <div class="input-box">
                <select <?php if($this->showIcons()):?>style=""<?php endif;?> 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 style="clear:both;"></div>
            </div>
        </dd>
    <?php endforeach; ?>
    </dl>
    <script type="text/javascript">
        var spConfig = new Product.Config(<?php echo $this->getJsonConfig() ?>, '', optionsPrice, <?php echo $this->showIcons() ?>, '<?php echo $this->getIconsDir() ?>', '<?php echo $this->getIconExt() ?>', <?php echo $this->reloadeImage() ?>);
    </script>
<?php endif;?>

*
class=“last”>
style=”“name=“super_attribute[]”id=“attribute”class=“required entry super attribute select”>
var spConfig=new Product.Config(,“”,optionsPrice,,“”);

从外观上看,您有一个非标准模板。你能发布一个网址吗?