Which of the following will programmatically create a shopping cart price rule in Magento?
Answer
Correct Answer: $_voucher = Mage::getModel('salesrule/coupon'); $_voucher->setRule($this)->setIsPrimary(false); $_voucher->setUsageLimit(1) ->setUsagePerCustomer(1) ->setExpirationDate('date'); $_voucher->setCode($vCode); try { $_voucher->save(); }
Explanation:
Note: This Question is unanswered, help us to find answer for this one