Developer forum

Forum » Swift » Related products in cart

Related products in cart

Ivan Marijanović
Ivan Marijanović
Reply

Hi

In cart I need to access feed of items related products (we have a group with packaging products) so that they can select packaging product and add it to cart from within cart. How can I access feed with all proucts which are in specific related group?

Ivan  


Replies

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

In your Razor template you can access the related products using the relatedproduct service:

Dynamicweb.Ecommerce.Services.ProductRelated.GetRelations(Product.Id)

Alternatively, you can create a query in repositoreis that will find all related products using the product relation group fields:

Votes for this answer: 1
 
Ivan Marijanović
Ivan Marijanović
Reply

Thank you!

I used the API call to get this data!

Ivan

 

You must be logged in to post in the forum