0
votes

I want to keep compulsory coupon code at checkout page. I am using aw_oncestepcheckout page module.

  • I do not want to allow customer to buy product without enter coupon code and apply coupon code. So customer must first apply coupon code and than they can purchase product.

  • In checkout page I have added coupon code functionality. and it is working fine.

  • I am using magento version 1.9.2.4.

Can you please help me to apply this functionality.

Thanks Dhvanit

1

1 Answers

0
votes

you can disable your proceed to checkout button by editing your

project/app/design/frontend/default/yourtheme/template/checkout/onepage/link.phtml

file like this.

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