2016-04-29 51 views
0

我想在结账页面保留强制优惠券代码。我正在使用aw_oncestepcheckout页面模块。如何在不使用折扣码的情况下限制客户购买产品?

  • 我不想让客户在没有输入优惠券代码的情况下购买产品并使用优惠券代码。因此,客户必须先申请优惠券代码,然后才能购买产品。

  • 在结账页面中,我添加了优惠券代码功能。它工作正常。

  • 我使用的是magento版本1.9.2.4。

你能帮我申请这个功能。

感谢 Dhvanit

回答

0

您可以禁用继续通过编辑

项目/应用程序/设计/前端/默认/ yourtheme /模板/结算/ onepage /链接签按钮。 phtml

这样的文件。

<?php if ($this->isPossibleOnepageCheckout()):?> 
<?php if(!empty($couponCode = Mage::getSingleton('checkout/session') 
      ->getQuote() 
      ->getCouponCode())){?> 
    <button type="button" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Proceed to Checkout')) ?>" class="button btn-proceed-checkout btn-checkout<?php if ($this->isDisabled()):?> no-checkout<?php endif; ?>"<?php if ($this->isDisabled()):?> disabled="disabled"<?php endif; ?> onclick="window.location='<?php echo $this->getCheckoutUrl() ?>';"><span><span><?php echo $this->__('Proceed to Checkout') ?></span></span></button> 

<?php } else{ 

    echo "apply coupon first"; 

    }?> 

<?php endif?>