2015-03-02 83 views
0

有一个phtml文件,用于支付产品的价值,负责的功能自动放在产品安装条件的每一页上,但不会出现付款在主页上的条款我coloto一个“旋转木马”的特色产品。Magento,在主页上显示付款产品条件

有人会暗示我做了什么?

注1:我使用AllPago模块来设置条件,只是我不能使用无法访问的值的值。

注2:根据源代码,我组装分期付款(文件名在Magento找到看起来像这样:allpago_installments/productviewtable.phtml

<?php foreach ($this->getInstallments() as $installment): ?> 
     <?php $result = count($this->getInstallments()); ?> 
     <?php if($installment->getValue()==$result):?> 
     <div class="product-view-parcel"> 
      <?php echo $installment->getValue() . ' x ' . $installment->getInstallment() . ' ' . $installment->getMessage(); ?> 
     </div> 
     <?php endif;?> 
    <?php endforeach; ?> 

注3:在主页的一部分代码,我试着打电话给价格和条件(听从出现价格只有正确的付款条件是不):

<div id="ripplesslider" class="ripplesslider" style="height: 470px!important;"> 
    <?php foreach ($_productCollection_slider as $_product): ?> 
     <div id="slide" style="text-align: center !important;height: 470px!important;" 
      class="latest-slider-item slide slider<?php echo $_product->getId() ?>"> 
      <a href="<?php echo $_product->getProductUrl() ?>" 
       title="<?php echo $this->htmlEscape($_product->getName()) ?>"> 
       <div style="height: 200px!important;"> 
        <img onmouseover="mouseover(<?php echo $_product->getId() ?>)" 
         onmouseout="mouseout(<?php echo $_product->getId() ?>)" 
         style="width:<?php echo $t ?>px; 
          height:<?php echo $imageheight ?>px; " 
         src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image'); ?>" 
         alt="<?php echo $this->htmlEscape($_product->getName()) ?>"/> 
       </div> 
      </a> 

      <div class="desc-item"> 

       <div class="carousel-name-product"> <?php echo $_product->getName() ?></div> 
       <div class="latest-price"> 

        <?php if ($_product->getRatingSummary()): ?> 
         <?php echo $this->getReviewsSummaryHtml($_product, 'short') ?> 
        <?php endif; ?> 
        <?php $this->getPriceHtml($_product, true) ?> 
        <?php echo '<span czlass="price">' . str_replace('R$','', $this->getPriceHtml($_product, true)) . '</span>'; ?> 

       </div> 

      </div> 
     </div> 
    <?php endforeach ?> 
</div> 

回答

0

哈哈人员已经得到了,我会在这里发布我做了什么或许帮助别人。

<div> 
           <?php echo '<span class="price">' . str_replace('R$','', $this->getPriceHtml($_product, true)) . '</span>'; ?> 
           <?php // object reference?> 
           <?php $reference = Mage::getStoreConfig('allpago/installments/active'); ?> 
           <?php//returns a new object. references ?> 
           <?php $installmentModel = Mage::getModel('installments/'.$reference); ?> 
           <?php //access the parameters to get the conditions have to function "getInstallmentHighest" to return the plots?> 
           <?php $installmentModel->setValue($_product->getFinalPrice()); ?> 
           <?php $installment = $installmentModel->getInstallmentHighest(); ?> 

           <span style="text-align: left;color: #A8A0A8;position: absolute;margin-top: -46px !important;margin-left: -78px !important;font-size: 12px;"> 
            <?php echo $installment->getValue().' x '. $installment->getInstallment() . ' ' . $installment->getMessage(); ?> 
           </span> 


          </div> 
相关问题