2015-05-22 46 views
1

我一直在修复这个基于magento的商店。这样做的主要问题是,一些在商店查看产品显示有不正确的大小(即属性)Magento商店查看 - 显示不正确的尺寸(属性)

enter image description here

如果你看一下图片,在网格视图(list.phtml )尺寸是US 16/UK 18/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

任何人都熟悉这个问题? 任何答案表示赞赏。 预先感谢您。

+0

你的属性是文本框或downdown类型? –

+0

它是下拉式。 – scottymorg

回答

0

您是否试图从“系统” - >“索引管理”重新索引产品数据?

0

请使用

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