2014-01-29 52 views
1

应用的优惠券我们可以将促销分配给优惠券并在ATG 10.0.x中进行兑换。我们如何从atg订单中找出应用哪种优惠券?如何找到从atg

我们是否有这个开箱即用或需要做任何定制来添加此?

回答

0

应用促销活动存储为调整与其应用的PriceInfo组件相对应。所以,如果你有一个优惠券Free Shipping你可以拿回所施加的折扣如下:

 OrderPriceInfo orderPriceInfo = order.getPriceInfo(); 
     Map<String, OrderPriceInfo> shippingItemsPriceInfos = orderPriceInfo.getShippingItemsSubtotalPriceInfos(); 

     OrderPriceInfo shippingItemsPriceInfo = shippingItemsPriceInfos.get(shippingGroup.getId()); 

     List<PriceAdjustment> adjs = shippingItemsPriceInfo.getAdjustments(); 
+0

也有是在ClaimableTools的方法来获取优惠券促销活动,如果你想以编程方式找出优惠券。 'RepositoryItem [] getCouponsForPromotion(String pPromotionId)' – boyintello

+0

感谢您的回复。 @ radimpe:我想知道如何通过这个优惠券得到这种价格调整的关系? – Nagarjuna

0

dcs_usr_actvpromo:此表是外部参照表进行促销统计表序列号。

dcs_usr_promostat:这将有标记的配置文件将过期的促销名单

dcs_usr_usedpromo:此表将具有从配置文件中使用的促销活动(已经从客户使用的促销活动)

0

我想问题是查找/查询应用特定优惠券和促销的订单。 可以通过将订单价格信息对象与标记为价格信息对象的调整进行映射来完成此操作。

一个简单的查询会是这样..

select * from dcspp_order where price_info in (
select amount_info_id from dcspp_amtinfo_adj where adjustments in 
(select dcspp_price_adjust.ADJUSTMENT_ID from dcspp_price_adjust where coupon_id = '<coupon_code>'));