Developer forum

Forum » Development » Easy way to find a products primary view page, without using the Product object

Easy way to find a products primary view page, without using the Product object

Martin Nielsen
Reply

Hi DW,

I have about 50k products in a solr index, and i'm listing then in a custom module and now i'd like to render a template tag that contains a link to each products individual Primary view page.

Is there an easy way to find a products primary page without making and instance of Product, with is kinde heavy?

Is there and API call that takes in a product ID that i can use for it :)?

// Martin

 


Replies

 
Nicolai Høeg Pedersen
Reply

No direct API call available.

The product is member of one or many groups, one of them primary - that information is in a seperate table. Each group has a primary page. So find the right product/group relation record, find the group and on the group record you have the primary page id.

BR Nicolai

 

You must be logged in to post in the forum