Developer forum

Forum » Development » Difference in Orderlines accross 2 solutions

Difference in Orderlines accross 2 solutions

Martin Nielsen
Reply

Hi DW,

 

I have a solution running on 8.2.1.11 and i've taken a copy off it for local development, but now i'm seeing differences on the way that Discounts are saved in the EcomOrderlines table.

 

On my local solution the field OrderLineParentLineID contains the ID for the orderline that it is a disocunt for.

 

On the productions solution this does not happen, the field is just empty.

 

Apparently i have checked/unchecked something so the behaviour is different accross my soultions.

 

Do you have any idea where to look?

 

I need the ParentLineID to calculate a price when exporting Orders. Please help :-)

 

// Martin


Replies

 
Martin Nielsen
Reply

Any ideas?

 
Nicolai Høeg Pedersen
Reply

Hi Martin

 

Just checked the code - and there should not be any settings.

 

But there are 2 types of discounts. Product discounts and Order discounts. Only product discounts have a parent id.... Could that be the issue?

 

BR Nicolai

 
Martin Nielsen
Reply

Hi Nicolai,

 

I found the setting that triggered this

<Ecom>
    <Order>
      <VAT>
        <DifferentiateDiscountOnVATGroup>False</DifferentiateDiscountOnVATGroup>

If this settings is False then the discount is created as one row with the entire discount amount.

 

If it's true, then a discount row is created for each product in your cart, and "OrderlineParantID" is set in the discounts.

 

It's not clear in the helptext, that the checkbox has this behaviour, sinces i do not have diffent VAT groups on my products.

 

 

But seems to be working now, so please don't change the logic now :-)

 

// Martin

 

You must be logged in to post in the forum