Developer forum

Forum » Templates » Ecom:Product:Stock.DeliveryText in ProductViewModel

Ecom:Product:Stock.DeliveryText in ProductViewModel

Jesper Holm Damgaard
Reply

Hi guys

I am in the process of converting an old product details template with template tags to the new product catalog using ProductViewModel. I cannot seem to find any property or method that can give the data i used to find in the template tag Ecom:Product:Stock.Text and Ecom:Product:Stock.DeliveryText

Am i mising something or i am supposed to get that from somewhere else?

--
All the best, Jesper


Replies

 
Nicolai Pedersen
Reply

Hi Jesper

No - that is currently not available as we have not found a solid solution for it yet. The problem is that stock comes in many more flavors than just those 2 fields from the old catalog. These days we have stock locations, units, BUM, variants and other things to consider to find the right stock levels - and texts. Expect something like the variant info structure.

You can see here how we handle it so far on Swift: https://github.com/dynamicweb/Swift/blob/main/Swift/Files/Templates/Designs/Swift/Paragraph/Swift_ProductDetailsInfo.cshtml#L153

Also you can use the API to get additional information.

Hope this can get you further.

BR Nicolai

 
Jesper Holm Damgaard
Reply

Ok, thanks. I will be looking foward to see what you come up with.

All the best, Jesper

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Is this still the case? Using a standard Swift site with stock locations, but we're not seeing any data. Should this be supported and we're just missing a step or do we have to do this custom?

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Never mind. Found the Stock Location component.

 

You must be logged in to post in the forum