2015-05-22 48 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); 
相關問題