2013-12-11 4 views
1

이미 생성 된 재고가있는 간단한 제품을 사용하여 그룹화 된 제품을 새로 만들 때 사용자 정의 템플릿을 사용할 때 완료된 그룹화 된 제품에는 테이블 제목과 가격이 오른쪽 열에 나열되지 않습니다.Magento 그룹 제품 제품/가격이 표시되지 않습니다.

사용자 지정 서식 파일을 해제하고 기본 Magento 서식 파일을 사용하면 서식 파일에 제목과 가격이 올바르게 표시됩니다. 그룹화 된 제품 템플릿 코드에 문제가있어이 부분이 표시되지 않지만 /app/design/frontend/mytemplate/default/template/catalog/product/view/type/grouped.phtml의 코드는 다음과 같습니다. Magento의 기본 템플릿과 동일합니다.

아무도이 문제를 해결하는 방법을 알고 있습니까?

답변

0

말하기 어렵지만 템플릿 파일이 사용되지 않은 것 같습니다. 템플릿의 레이아웃 파일에 PRODUCT_TYPE_grouped 노드의 grouped.phtml을 참조하는 블록이 있는지 확인할 수 있습니다. view.phtml이 블록을 참조하는

<?php echo $this->getChildHtml('product_type_data') ?> 

같은 호출을 경우에도 확인합니다.

  • 응용 프로그램 \ 디자인 \ 프론트 엔드 \ 기본 \ 기본 \ 템플릿 \ 카탈로그 \ 제품 \ view.phtml
  • 응용 프로그램 \ 디자인 \ 프론트 엔드 \ 기본 \ 기본 \ 레이아웃 \

    는 당신의 템플릿 파일을 비교 catalog.xml

나는 무슨 뜻인지 알아 봅니다.

+0

은 내가 view.phtml에 문제를 줄이기 위해 관리하고 나는 그것이 작동하는 테마의 이전 버전의 코드를 넣을 때 테마 를 업데이트 할 때 발생하지만, 문제가에 어디 있는지 감지 할 수 없습니다 새로운 버전. – tsantos

+0

새로운 view.phtml을 게시 할 수 있습니까? 거기에

태그가있을 것입니다. 이 태그 안에 무엇을 게시 할 수 있습니까? – Pixelkracht

+0

이 코드를 오랫동안 사용하여 새로운 답변을 작성했습니다. – tsantos

0
<form action="<?php echo $this->getSubmitUrl($_product) ?>" method="post" id="product_addtocart_form"<?php if($_product->getOptions()): ?> enctype="multipart/form-data"<?php endif; ?>> 

    <?php echo $this->getBlockHtml('formkey'); ?> 
    <div class="no-display"> 
     <input type="hidden" name="product" value="<?php echo $_product->getId() ?>" /> 
     <input type="hidden" name="related_product" id="related-products-field" value="" /> 
    </div> 

    <?php 
     //Product collaterals 
     $section = array(); 

     //Related products. $section['related'] is set only if related products (or replacement) exist 
     $replaceRelated = $theme->getCfg('product_page/replace_related'); 
     if ($replaceRelated == 1) //don't replace with static block 
     { 
      if ($tmpHtml = trim($this->getChildHtml('catalog.product.related'))) 
       $section['related'] = $tmpHtml; 
      //$section['related'] = trim($this->getChildHtml('catalog.product.related')); 
     } 
     elseif ($replaceRelated == 2) //if related is empty, replace with static block 
     { 
      if ($tmpHtml = trim($this->getChildHtml('catalog.product.related'))) 
       $section['related'] = $tmpHtml; 
      else //related empty 
       if ($tmpHtml = $this->getChildHtml('block_product_replace_related')) 
        $section['related'] = '<div class="block_product_replace_related">'. $tmpHtml .'</div>'; 
     } 
     elseif ($replaceRelated == 3) //replace with static block 
     { 
      if ($tmpHtml = $this->getChildHtml('block_product_replace_related')) 
       $section['related'] = '<div class="block_product_replace_related">'. $tmpHtml .'</div>'; 
     } 

     //Up-sell products. $section['upsell'] is set only if up-sell products (or replacement) exist 
     $replaceUpsell = $theme->getCfg('product_page/replace_upsell'); 
     if ($replaceUpsell == 1) //don't replace with static block 
     { 
      if ($tmpHtml = trim($this->getChildHtml('upsell_products'))) 
       $section['upsell'] = $tmpHtml; 
      //$section['upsell'] = $this->getChildHtml('upsell_products'); 
     } 
     elseif ($replaceUpsell == 2) //if upsell is empty, replace with static block 
     { 
      if ($tmpHtml = trim($this->getChildHtml('upsell_products'))) 
       $section['upsell'] = $tmpHtml; 
      else //upsell empty 
       if ($tmpHtml = $this->getChildHtml('block_product_replace_upsell')) 
        $section['upsell'] = '<div class="block_product_replace_upsell">'. $tmpHtml .'</div>'; 
     } 
     elseif ($replaceUpsell == 3) //replace with static block 
     { 
      if ($tmpHtml = $this->getChildHtml('block_product_replace_upsell')) 
       $section['upsell'] = '<div class="block_product_replace_upsell">'. $tmpHtml .'</div>'; 
     } 



     //Assign related products to selected position 
     if (isset($section['related'])) 
     { 
      $relatedPosition = $theme->getCfg('product_page/related_position'); 
      //TODO:remove: $relatedPosition = 11; 
      switch ($relatedPosition) 
      { 
       case 10: 
        $p['secondaryCol'][0] = $section['related']; 
        break; 
       case 11: 
        $p['secondaryCol'][1] = $section['related']; 
        break; 
       case 20: 
        $p['collatSecondaryCol'] = $section['related']; 
        break; 
      } 
     } 



     //Width (in grid units) of product page sections 
     $imgColUnits     = $theme->getCfg('product_page/image_column'); 
     $primaryColUnits    = $theme->getCfg('product_page/primary_column'); 
     $secondaryColUnits    = $theme->getCfg('product_page/secondary_column'); 
     $container2ColUnits    = $imgColUnits + $primaryColUnits; 
     $collatPrimaryColUnits   = $imgColUnits + $primaryColUnits; 
     $collatSecondaryColUnits  = $secondaryColUnits; 

     //If no secondary column 
     if (empty($secondaryColUnits)) 
     { 
      $primaryColUnits   += 12 - ($imgColUnits + $primaryColUnits); 
      $container2ColUnits   = $imgColUnits + $primaryColUnits; 
      $collatPrimaryColUnits  = 9; 
      $collatSecondaryColUnits = 3; 
     } 

     //If no related products, stretch collateral primary column 
     if (!isset($section['related'])) 
     { 
      $container2ColUnits   = 12; 
      $collatPrimaryColUnits  = 12; 
      $collatSecondaryColUnits = 0; 
     } 
     elseif (!isset($p['secondaryCol'])) 
     { 
      $container2ColUnits   = 12; 
     } 

     //Grid classes 
     $imgColGridClass    = 'grid12-' . $imgColUnits; 
     $primaryColGridClass   = 'grid12-' . $primaryColUnits; 
     $secondaryColGridClass   = 'grid12-' . $secondaryColUnits; 
     $container2ColGridClass   = 'grid12-' . $container2ColUnits; 
     $collatPrimaryColGridClass  = 'grid12-' . $collatPrimaryColUnits; 
     $collatSecondaryColGridClass = 'grid12-' . $collatSecondaryColUnits; 
     if (empty($secondaryColUnits)) 
     { 
      $secondaryColGridClass = ''; 
     } 
    ?> 

    <div class="product-img-column <?php echo $imgColGridClass; ?>"> 
     <?php echo $this->getChildHtml('media') ?> 
     <?php //Product labels 
      echo $this->helper('ultimo/labels')->getLabels($_product); 
     ?> 
    </div> 

    <div class="product-shop <?php echo $primaryColGridClass; ?>"> 

     <div class="product-name"> 
      <h1><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></h1> 
     </div> 

     <?php echo $this->getReviewsSummaryHtml($_product, false, true); //reviews ?> 

     <?php if ($_product->getShortDescription()): ?> 
      <div class="short-description"> 
       <div class="std"><?php echo $_helper->productAttribute($_product, nl2br($_product->getShortDescription()), 'short_description') ?></div> 
      </div> 
     <?php endif;?> 

     <?php if ($theme->getCfg('product_page/sku')): ?> 
      <div class="sku"><span><?php echo $this->__('SKU'); ?>: </span><?php echo $_product->getSku(); ?></div> 
     <?php endif; ?> 



     <?php if ($extrahint_html = $this->getChildHtml('extrahint')): //qty increments ?> 
      <div class="extrahint-wrapper"><?php echo $extrahint_html; ?></div> 
     <?php endif; ?> 

     <div class="product-type-data<?php echo $productTypeClasses; ?>"><?php echo $this->getChildHtml('product_type_data'); ?></div> 

     <?php echo $this->getTierPriceHtml(); //tier prices ?> 

     <?php if (!$this->hasOptions()): //add to cart when no options ?> 
      <?php if($_product->isSaleable()): ?> 
       <div class="add-to-box"> 
        <?php echo $this->getChildHtml('addtocart') ?> 
       </div> 
      <?php endif; ?> 
      <?php echo $this->getChildHtml('extra_buttons') ?> 
     <?php endif; ?> 

     <?php if ($_product->isSaleable() && $this->hasOptions()): ?> 
      <?php if ($container1_html = $this->getChildChildHtml('container1', '', true, true)): ?> 
       <div class="container1-wrapper"><?php echo $container1_html; ?></div> 
      <?php endif; ?> 
     <?php endif;?> 

     <?php if ($addtoLinksHtml = $this->getChildHtml('addto')): //compare, wishlist, to friend ?> 
      <div class="action-box clearer"> 
       <?php echo $addtoLinksHtml; ?> 
      </div> 
     <?php endif; ?> 
     <?php echo $this->getChildHtml('alert_urls'); //alerts ?> 
     <?php echo $this->getChildHtml('other'); ?> 

     <?php if ($tmpHtml = $this->getChildHtml('block_product_primary_bottom')): ?> 
      <div class="feature-wrapper top-border block_product_primary_bottom"><?php echo $tmpHtml; ?></div> 
     <?php endif; ?> 

     <?php if ($tmpHtml = $this->getChildHtml('product_primary_bottom_placeholder')): //Placeholder for extensions ?> 
      <div class="feature-wrapper top-border"><?php echo $tmpHtml; ?></div> 
     <?php endif; ?> 

    </div> <!-- end: product-shop --> 

    <?php if ($secondaryColUnits): //(!empty($secondaryColUnits)): ?> 
     <div class="product-secondary-column <?php echo $secondaryColGridClass; ?> custom-sidebar-right"> 
      <div class="inner"> 

       <?php //Placeholder for extensions ?> 
       <?php if ($tmpHtml = $this->getChildHtml('product_secondary_top_placeholder')): //Placeholder for extensions ?> 
        <div class="margin-bottom"><?php echo $tmpHtml; ?></div> 
       <?php endif; ?> 

       <?php if (isset($p['secondaryCol'][0])): ?> 
        <?php echo $p['secondaryCol'][0]; ?> 
       <?php endif; ?> 

       <?php if ($tmpHtml = $this->getChildHtml('block_product_secondary_bottom')): ?> 
        <div class="feature-wrapper top-border block_product_secondary_bottom"><?php echo $tmpHtml; ?></div> 
       <?php endif; ?> 

       <?php if (isset($p['secondaryCol'][1])): ?> 
        <div class="margin-top"><?php echo $p['secondaryCol'][1]; ?></div> 
       <?php endif; ?> 

       <?php /*?> 
       <?php if (isset($section['related'])): ?> 
        <div class="margin-top"><?php echo $section['related']; ?></div> 
       <?php endif; ?> 
       <?php */?> 

      </div> 
     </div> <!-- end: product-secondary-column --> 
    <?php endif; ?> 

    <?php if ($_product->isSaleable() && $this->hasOptions()): ?> 
     <?php if ($container2_html = $this->getChildChildHtml('container2', '', true, true)): ?> 
      <div class="box-additional <?php echo $container2ColGridClass; ?>"> 
       <div class="container2-wrapper"><?php echo $container2_html; ?></div> 
      </div> 
     <?php endif; ?> 
    <?php endif; ?> 

</form> 
관련 문제