Copied to clipboard

Flag this post as spam?

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


  • Vineeth 12 posts 122 karma points
    18 days ago
    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 2021 posts 9918 karma points MVP 5x c-trib
    18 days ago
    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 12 posts 122 karma points
    18 days ago
    Vineeth
    0

    Thanks a lot, Matt for your quick response :)

Please Sign in or register to post replies

Write your reply to:

Draft