Developer forum

Forum » Integration » Liveintrgration - cart doesn't show discount orderline

Liveintrgration - cart doesn't show discount orderline

René Poulsen
Reply

Hi,

I'm having a problem with the liveintegration and the cart.

When I view the cart (before completing the order) my cart won't show orderline discounts. When I complete the order the orderline discount shows up as it's supposed to.
In both steps I get the same orderline XML - the only difference is on the order where OrderCreated is true when I'm on the receipt page + name, company etc. has values as well.

I've attached the response XML I get on step 1 (the overview before completing the order) and step 2 (the receipt).

In step 1 I only get one orderline when looping through the orders - in step 2 i get two orderlines - one with the product and one with the discount.

If i try to write out @GetLoop("OrderLines").Count it also says 1 in step 1 and 2 in step 2.

What is going on here? :-)


Replies

 
Jonas Krarup Dam
Reply

Hi Rene,

The Live Integration project includes a Integration Discount Provider, which you have to activate, in order for the integration discounts to show up.
This is because the discount calculator removes all discount orderlines before recalculating them, which happens after the call to NAV. In order to ensure that the discounts that are returned from NAV are displayed correctly, they have to be applied by this special Live Integration Discount.

Hope this makes sense - if not, let me know, and I'll take some screenshots do illustrate the procedure :-)

/Jonas
 

 
René Poulsen
Reply

Hi Jonas,

Some screenshots would be nice :-)

 
Jonas Krarup Dam
Reply

Hey Rene,

In Sales Discount, you add a new discount, and choose "Live Integration discount". It has no settings, you just just have to make sure it's active.

 

 

 

 

 

It's only available if you have the live integration dll installed, but if you have it mostly working, that shouldn't be a problem :-)

 

You must be logged in to post in the forum