Magento商店视图 - 显示不正确的大小(属性)

时间:2015-05-22 01:55:04

标签: php magento attributes

我一直在修理这家商店,基于magento。主要问题是商店视图上显示的某些产品大小不正确(属性)

enter image description here

如果您查看图片,请在网格视图(list.phtml)上查看尺寸为US 16 / UK 18 / EUR 48,而在单一视图页面(view.phtml)上则为US 6 / UK 8 / EUR 38.

看一下这个链接

http://www.sequinqueen.com/shop/in-stock.html

我已经浏览了view.phtml中的代码,并且看起来代码根据下面的代码正确地请求了属性值

<?php
    $categories =$_product->getCategoryCollection();
    foreach($categories as $_category) {
         $cat_arr[] = $_category['entity_id'];
    }
      if($currentCategoryId==102){
        // CATEGORY ID = 102 is IN-STOCK PRODUCT CATEGORY

         $sizeStock=$_product->getAttributeText('size');

      $day="Ready To Ship";
      $searchfabric=$_product->getSearchfabric();
      $searchcolor=$_product->getSearchcolor();
      $make=$_product->getHandmake();
      $handmake="HandMake";
      $topname=$_product->getTopname();

        <?php $i=$j+1;?>
        <?php $j=$j+1;?>
        <?php if($j<5){?>
          <?php if ($i%$_columnCount==1): ?>
           <ul class="products-grid">
           <?php endif ?>
            <?php if($j==1):?>
            <li class="item first" style="height:434px; background:#FFF;">
                <?php echo $this->getChildHtml("catalog"); ?>
            </li>
            <li class="item">
             <?php echo  $topname; ?>
             <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(162,324); ?>" width="162" height="324" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" /></a>
             <div style="width:100%;  border-bottom:none; height:80px;">
                 <?php echo $this->getPriceHtml($_product, true) ?>
                  <?php if($make==1){ echo "<p>".$handmake."</p>";}else{}?>
                  <?php if($currentCategoryId==102){?>
                  <!-- display size -->
                    <p><?php echo $sizeStock; ?></p>
                    <?php } ?>
                  <p>  <?php echo $day; ?></p>
             </div>
            </li>

所以我想到它可能是商店后端的东西,在属性修改的某处。 以下是前一个开发人员如何排序和排列大小值的位置我不确定这是否是问题的原因。

enter image description here

有人熟悉这个问题吗? 任何答案都表示赞赏。 提前谢谢你。

2 个答案:

答案 0 :(得分:0)

您是否尝试重新索引来自&#34;系统&#34; - &gt;&#34;索引管理&#34;的产品数据。 ?

答案 1 :(得分:0)

请使用此

$attribute_value = $product->getResource()->getAttribute($attribute_code)->getFrontend()->getValue($product);
相关问题