【问题标题】:Magento, showing payment of a product conditions on the homepageMagento,在主页上显示产品付款条件
【发布时间】:2015-03-02 18:12:47
【问题描述】:

有一个phtml文件骑在一个产品的支付价值上,负责它的功能会自动在产品的每一个页面上放上分期条件,但在我选择一个“轮播”的主页上没有出现支付条件推荐产品。

有人会暗示我做什么?

注1:我使用一个AllPago模块设置的条件只有我不能使用stand为没有访问权限的值。

注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>

【问题讨论】:

    标签: php magento payment


    【解决方案1】:

    哈哈工作人员已经得到了,我会在这里发布我所做的事情以帮助其他人。

    <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>
    

    【讨论】:

      猜你喜欢
      • 2013-03-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-01-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多