I have a project currently which with the budget is only allowing me to use the free edition of uCommerce. Basically what I need to do is add a discount/voucher code to a users order programatically. I understand that the voucher code feature is not available in the free edition so I know any work needed for this is going to have to be cusom built for the value and which product/categories the voucher is to effect. But could someone point me in the direction of how to apply an voucher to an session.
Take a look at the UCommerce.EntitiesV2.VoucherTarget class in the UCommerce.dll.
You'll need a UI to manage the voucher codes as well. You can see if you can put something together with the /ucommerce/marketing/dialogs/GenerateVoucher.aspx page.
When doing a discount like that you'll want to remove the ApplyDiscounts task in the basket pipeline as it clears any discounts before reapplying from scratch.
Apply voucher code programatically
Hello,
I have a project currently which with the budget is only allowing me to use the free edition of uCommerce. Basically what I need to do is add a discount/voucher code to a users order programatically. I understand that the voucher code feature is not available in the free edition so I know any work needed for this is going to have to be cusom built for the value and which product/categories the voucher is to effect. But could someone point me in the direction of how to apply an voucher to an session.
Thanks,
John
Take a look at the UCommerce.EntitiesV2.VoucherTarget class in the UCommerce.dll.
You'll need a UI to manage the voucher codes as well. You can see if you can put something together with the /ucommerce/marketing/dialogs/GenerateVoucher.aspx page.
Let me know how you get on.
Current code that I have been trying is:
But PurchaseOrder discount is still coming through as 0 any help would really be appreciated.
John
When doing a discount like that you'll want to remove the ApplyDiscounts task in the basket pipeline as it clears any discounts before reapplying from scratch.
is working on a reply...