MemberLevelDiscount.php 1006 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * Name: 芸众商城系统
  5. * Author: 广州市芸众信息科技有限公司
  6. * Profile: 广州市芸众信息科技有限公司位于国际商贸中心的广州,专注于移动电子商务生态系统打造,拥有芸众社交电商系统、区块链数字资产管理系统、供应链管理系统、电子合同等产品/服务。官网 :www.yunzmall.com www.yunzshop.com
  7. * Date: 2021/4/29
  8. * Time: 13:50
  9. */
  10. namespace app\frontend\modules\cart\discount;
  11. class MemberLevelDiscount extends BaseCartDiscount
  12. {
  13. protected $code = 'memberLevel';
  14. protected $name = '会员等级优惠';
  15. /**
  16. * @return float
  17. * @throws \app\common\exceptions\AppException
  18. */
  19. protected function _getAmount()
  20. {
  21. return $this->cartGoods->getVipDiscountAmount();
  22. }
  23. public function getKey()
  24. {
  25. return 'independentGoodsMemberLevel';
  26. }
  27. public function getName()
  28. {
  29. return '商品会员等级优惠';
  30. }
  31. }