Developer forum

Forum » Development » Ecom:Order:OrderLine get Stock question

Ecom:Order:OrderLine get Stock question

Dmitrij Jazel
Reply

Hei Guys,

I am having troubles while preparing stock value for Product - Order line.

In one ERP connection , in Live Price Provider, we are fetching ProductPrice and ProductStock live from ERP.

But it seams to me that when you add the product to Shopping cart, Price still is comming correctly, but Stock is incorrectly set.

Can it be because while in shopping cart I am requesting 

Ecom:Order:OrderLine.Price

but there is no thing like: Ecom:Order:OrderLine.Stock

There is Ecom:Product.Stock - that is what I am trying to read while in eCom Cart.

Does that makes sence, or should I do Stock fetching in another way?

 

Feels like EcomProduct and EcomOrderLine data is (not only price) is rendered dirrefently. Asides of of Discount etc (price related stuff)... why would it ignore stock sett in PriceProvider?

 

/Dmitrij


Replies

 
Jonas Krarup Dam
Reply

Hi Dmitriy,

In the LiveIntegration implementation, we only look at stock status when showing product lists (as you have noticed).

If you need that information on the orderlines, you will have to add it to a custom field. However,this should be fairly straight forward: simply add a custom field to your DW solution, check the checbox called "include order line fields" and ask your ERP partner to include information for that field in the XML that is being generated.

Then the information should be available, and you can do what you wish with it, in the frontend.

I'm not sure what you need stock information for, in the cart/order, but that is the way I would do it.

 

Regards, Jonas

 

You must be logged in to post in the forum