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
我想在magento的产品列表页面上显示可配置属性的选项列表_Magento_Magento 1.9_Php - Fatal编程技术网

我想在magento的产品列表页面上显示可配置属性的选项列表

我想在magento的产品列表页面上显示可配置属性的选项列表,magento,magento-1.9,php,Magento,Magento 1.9,Php,我想在magento的产品列表页面上显示可配置属性的选项列表,就像它出现在可配置产品的产品视图页面上一样。我尝试了所有操作,但没有任何效果,查找了一些类似的主题,但它们没有用。请帮我解决此问题 <?php $_productCollection=$this->getLoadedProductCollection(); $_helper = $this->helper('catalog/output'); $sidebar=Mage::getStoreCo

我想在magento的产品列表页面上显示可配置属性的选项列表,就像它出现在可配置产品的产品视图页面上一样。我尝试了所有操作,但没有任何效果,查找了一些类似的主题,但它们没有用。请帮我解决此问题

<?php
    $_productCollection=$this->getLoadedProductCollection();
    $_helper = $this->helper('catalog/output');
    $sidebar=Mage::getStoreConfig('buyshoplayout/product_listing/sidebar');
    $i=0;
    $count=0;
    $span=3;
    $p_in_row=4;
    $type=Mage::getStoreConfig('buyshoplayout/product_listing/product_listing_image_size');
    if($type=='small')
    {
        $span=2;
        $p_in_row=6;
    }




?>
<?php if(!$_productCollection->count()): ?>
<div class="category-products aligncenter">
    <?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('buyshop_no_products')->toHtml() ?>
</div>
<?php else: ?>
<div class="category-products">
    <?php  echo $this->getToolbarHtml() ?>

    <?php // List mode ?>
    <?php if($this->getMode()!='grid'): ?>
    <?php foreach ($_productCollection as $_product): ?>
        <?php
        $widthBig=258;
        $heightBig=245;
        $widthSmall=71;
        $heightSmall=65;
        $count++;
        ?>

        <!--PRODUCT-->
        <div class="row product-listing">
            <?php echo Mage::helper('buyshopconfig')->getProductHtml($_product,$this,$widthBig,$heightBig,$span,false,true,true,false,$this->getPriceHtml($_product, true))?>
            <div class="span6 product-detailes">
                <h3 class="product-name bottom-line"><a href="<?php echo $_product->getProductUrl()?>"><?php echo $this->stripTags($_product->getName(), null, true)?></a></h3>
                <div class="bottom-line">
                        <?php echo $this->getPriceHtml($_product, true) ?>
                    <div class="product-review">
                        <?php echo Mage::helper('buyshopconfig')->getStars($_product)?>
                    </div>
                </div>
                <div class="bottom-line"><?php echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?></div>
                <div class="product-buttons">
                    <?php echo Mage::helper('buyshopconfig')->addToCartLink($_product,$this,true)?>
                    <div class="add-to-links">
                        <ul>
                            <?php echo Mage::helper('buyshopconfig')->addWishCompLink($_product,$this,true)?>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
        <!--PRODUCT EOF-->




        <?php  endforeach; ?>
    <?php else: ?>

    <?php // Grid Mode ?>


<?php if(!empty(Mage::registry('current_category')->name)):?>
    <h2><?php echo Mage::registry('current_category')->name ?></h2>
<?php endif; ?>

<?php if($sidebar):?><div class="row big_with_description"><?php endif; ?>
    <?php foreach ($_productCollection as $_product): ?>
        <?php  if(!$_product->isSaleable() && !Mage::getStoreConfig('cataloginventory/options/show_out_of_stock'))continue; ?>
        <?php
        $widthBig=258;
        $heightBig=245;
        $widthSmall=71;
        $heightSmall=65;
        $count++;
        ?>

        <?php
            if(!$sidebar)
            {
                $i++;
                if($i==1)echo '<div class="row big_with_description">';
            }
            $price=$this->getPriceHtml($_product, true);
        ?>

        <!--PRODUCT-->
        <?php echo Mage::helper('buyshopconfig')->getProductHtml($_product,$this,$widthBig,$heightBig,$span,false,true,false,true,$price)?>
        <?php echo Mage::helper('buyshopconfig')->getProductHover($_product,$this,$widthBig,$heightBig,$widthSmall,$heightSmall,$type,true,true,$price)?>
        <!--PRODUCT EOF-->


        <?php
        if(!$sidebar)
        {
            if($i==$p_in_row || $count==count($_productCollection))
            {
                echo '</div>';
                $i=0;
            }
        }
        ?>

    <?php endforeach; ?>

<?php if($sidebar):?></div><?php endif; ?>


    <?php endif; ?>

    <?php echo $this->getToolbarHtml() ?>

</div>
<?php endif; ?>

在什么意义上什么都不起作用?你能说得更具体一点吗?我试着从product/view.html中编写一些代码,但由于我是magento的初学者,我不知道应该从中使用哪种代码。此外,我还试着从一个类似的问题中查找堆栈溢出代码,但仍然看不到选项列表。