获取次数优惠券代码用于Magento

时间:2011-06-27 11:02:26

标签: magento

我如何获得优惠券代码的使用次数和优惠券代码列表。SalesRule模块中提供的信息是什么?

1 个答案:

答案 0 :(得分:9)

是。事实上非常容易:

$coupon = Mage::getModel('salesrule/coupon');
$coupon->load('SOMECOUPONCODE', 'code');
if($coupon->getId()) {
    $timesUsed = $coupon->getTimesUsed();
}
相关问题