Copied to clipboard

Flag this post as spam?

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


These support forums are now closed for new topics and comments.
Please head on over to http://eureka.ucommerce.net/ for support.

  • Kenneth Jakobsen 67 posts 203 karma points hq
    Apr 25, 2014 @ 14:16
    Kenneth Jakobsen
    0

    Applying Discounts to order programmatically

    Hi I'm creating an order from scracth (via ajax) and i'm trying to implement a virable discount. But when i add a discount to the order it is not calculeted into the price Why is that?

  • Martin 181 posts 740 karma points
    Apr 26, 2014 @ 22:19
    Martin
    0

    Hi Kenneth,

    How are you adding the custom discount to the basket? Do you add it before running the order pipeline or as a task during the execution of order pipeline? As a part of order pipeline uCommerce resets all discounts before recalculating them to ensure that a basket has the newest discounts.

    Best regards Martin

  • Kenneth Jakobsen 67 posts 203 karma points hq
    Apr 28, 2014 @ 09:24
    Kenneth Jakobsen
    0

    I'm adding it before Executing the Basket Pipeline

  • Morten Skjoldager 440 posts 1499 karma points
    Apr 28, 2014 @ 10:01
    Morten Skjoldager
    0

    The BasketPipeline are executed and does calculate "everything from scratch" which basically modifies the OrderTotal. And that is the way to do it. All Discounts are removed and applied once again. You have to remove those specific tasks. 

    Are you using marketing foundation ? 

    Best regards

    Morten

  • Kenneth Jakobsen 67 posts 203 karma points hq
    Apr 28, 2014 @ 10:20
    Kenneth Jakobsen
    0

    AFAIK i'm not using marketing foundation, as I don't want to specify the discounts before adding them. I just want to be able to enter an amount and have it discounted. Or am I misunderstanding something?

  • Morten Skjoldager 440 posts 1499 karma points
    Apr 28, 2014 @ 10:36
    Morten Skjoldager
    0

    Allright. Then you want to either use the backend to add discounts (for you POS app), or modify the basket pipeline so discounts aren't removed after you've added them. You can also refer the reply i sent you in the other topic that you've opened :) 

  • Kenneth Jakobsen 67 posts 203 karma points hq
    Apr 28, 2014 @ 11:04
    Kenneth Jakobsen
    0

    I'll give it a try tonight

  • Kenneth Jakobsen 67 posts 203 karma points hq
    Apr 29, 2014 @ 08:29
    Kenneth Jakobsen
    0

    That, unfortunately did not help at all. How would i go about stopping the pipelines from removing the discount i suspect the checkout pipeline removes them as well? Also I have another thing i would like to know. The Internal name on a product how do i edit that, it is now set as the initial SKU name, but changing the SKU does not change it

  • Martin 181 posts 740 karma points
    Apr 29, 2014 @ 18:58
    Martin
    0

    Hi Kenneth,

    You can removed steps in the basket pipeline by changing the basket.config. You should find in the folder umbraco\ucommerce\pipelines\basket.config. I currently don't have a uCommerce installed. If I remember right, then you should be removing or outcomment the following line (Morten should be able to confirm that): 

    ${Basket.ApplyAwards}

    but this will disable discount being applied from Marketing Foundation. The Checkout pipeline will not remove any discounts from your order. Checkout pipeline is run when a basket is converted into an order. One of the things the pipeline does is setting the ordernumber.

    Best regards Martin

  • Kenneth Jakobsen 67 posts 203 karma points hq
    Apr 30, 2014 @ 10:47
    Kenneth Jakobsen
    0

    Hi Again

    I have a couple more questions.

    1. How do i change the (internal) name on a product?
    2. How do i setup uCommerce so that it knows that the product prices is with VAT included?
    Regards Kenneth
  • Martin 181 posts 740 karma points
    Apr 30, 2014 @ 19:03
    Martin
    0

    1. I don't think this is possible by using uCommerce interface. I just took a spin through the page for editing products and it doesn't seem being possible.

    2. On product catalog page there is a checkmark called "Show prices with VAT". If you're using the demo store the catalog name should be "Demo store".

     

    Best regards Martin

Please Sign in or register to post replies

Write your reply to:

Draft