Can i add a category link inside of a product grid?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
6 years ago
I'm  currently in the process of building a productgrid on the homepage.
I have 5 categories and 1 product of each category in this grid.
However in the design is a link to the corresponding category: "view all products in category x".
Is there a way to accomplish this without having to adjust the base NopCommerce models?

- NopCommerce version: 3.90
- Installed locally
- homepageproducts.cshtml

      <div class="item-grid">
            @foreach (var item in Model)
            {
                <div class="item-box">
                    @Html.Partial("_ProductBox", item)
                
                    **link to corresponding category?**
                 </div>
            }
        </div>
6 years ago
don.carlier wrote:

Is there a way to accomplish this without having to adjust the base NopCommerce models?


No, It not possible to do this without change into nopCommerce models.

Another way is possible but if effect on your performance.

Let me know if you need any further assist.
6 years ago
When are you talking about product grid in home page it means product box ?

Yes you can display category link for product. Category id already available in the model. you just need to get sename using categoryid.

No need to customization in c# side. You can do it in view page too.

Thanks,
Jatin
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.