我如何获得优惠券代码的使用次数和优惠券代码列表。该信息可在 SalesRule
中获得吗?模块?
最佳答案
是的。事实上很容易:
$coupon = Mage::getModel('salesrule/coupon');
$coupon->load('SOMECOUPONCODE', 'code');
if($coupon->getId()) {
$timesUsed = $coupon->getTimesUsed();
}
关于magento - 获取 Magento 中使用优惠券代码的次数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6491847/