Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Vineeth 71 posts 291 karma points
    Feb 05, 2019 @ 10:13
    Vineeth
    0

    Discount code rule on Mutiple Awards

    Can we use a Discount code rule for multiple Awards on marketting rules?

    There will be a need to have various categories for the same coupons – So products in a group A will have 10 % discount and products in group B will have a 20% discount – To be used with the same coupon code. Is this possible?

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Feb 05, 2019 @ 11:28
    Matt Brailsford
    100

    Hi Vineeth,

    You can create a discount with a discount code that has different award amounts for different products. To do this you create a discount with a discount code rule, then in the awards section add 2 "Order line amount" awards and for each one select the product the discount is associated with and then enter the discount ammount.

    enter image description here

    Unfortunately you can't use the same discount code across multiple discounts though.

    If the "Order line amount" award isn't suitable, it is technically possible to create your own Awards:

    [Award( "MyOrderDiscountAward " )]
    public class MyOrderDiscountAward : AAward, IOrderAward {
        // Implement your own award
    }
    
    [Award( "MyOrderLineDiscountAward " )]
    public class MyOrderLineDiscountAward : AAward, IOrderLineAward {
        // Implement your own award
    }
    

    Then create an award manifest in App_Plugins\TeaCommerce\Marketing\Awards\[MyAwardName]\[my-award-name].manifest to tell Tea Commerce where to find a custom Angular view to act as the UI

    {
      name: 'My award',
      alias: 'MyOrderDiscountAward',
      editor: {
        view: '/App_Plugins/TeaCommerce/Marketing/Awards/[MyAwardName]\[my-award-name].html'
      },
      javascripts: [
        '/App_Plugins/TeaCommerce/Marketing/Awards/[MyAwardName]\[my-award-name].controller.js'
      ]
    }
    

    Unfortunately we don't have much docs on this so it'd have to be a bit of trial and error and looking at the files in the App_Plugins folder to see how this is done.

    Hope this helps

    Matt

  • Vineeth 71 posts 291 karma points
    Feb 05, 2019 @ 12:18
    Vineeth
    0

    Thanks a lot, Matt for your quick response :)

Please Sign in or register to post replies

Write your reply to:

Draft