Developer forum

Forum » Dynamicweb 10 » VariantInfo Discounts from dwapi /search

VariantInfo Discounts from dwapi /search

Jóhannes Þorkell Tómasson
Reply

Is there a way to get variant discounts from dwapi when getting the main product through details or search? The variant discount is correct when fetching /dwapi/ecommerce/products/{productId}/{variantId} but no discounts are shown in variantInfo when getting details for the product itself (/dwapi/ecommerce/products/{productId}) or through /dwapi/ecommerce/products/search. The productDiscounts property is also empty unless getting the variant by Id. We want to display specific variant discounts in our product list without having to call each individual endpoint for each variant in the product list.

Best Regards, Jóhannes


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply
This post has been marked as an answer

Hi Johannes

Currently not - it is a performance consideration to not do it. We have solutions with variants in the thousands and calculating the discounts for each variant in the list would become an issue for us.

If you use the price matrix discounts in DW10 it might be a different story.

BR Nicolai

Votes for this answer: 1
 
Jóhannes Þorkell Tómasson
Reply

Yeah, that's along the lines of what I suspected. We're gonna try to extend the view model and see how it performs. The largest amount of products we get at any one time is 20 so here's hoping.

Best Regards, Jóhannes

 

You must be logged in to post in the forum