Adding prices to Featured Items?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
Hace 12 años
Could some one please provide some guidance on how to add item prices to featured items that are displayed on the homepage.

I am using nop 2.20, in case that helps.

Many thanks
Hace 12 años
You have to modify the code source to do that. Roughly, in the Catalog controller, you can change the HomePageProducts action to call PrepareProductOverviewModel with the preparePriceModel to true and in the view use the ProductBox partial view instead of the SmallProductBox.

However, the site will be slower because computing the price model takes a significant amount of time especially if you have complex discounts.

In my implementation, I cached the ProductModels (with appropriate variations for displaying the correct price depending on tax settings, preferences, currency, language, etc) for each product, making things significantly faster. The cache gets refreshed automatically whenever a product, product variant, category or discount is modified.
Hace 12 años
Just set 'CatalogSettings.UseSmallProductBoxOnHomePage' setting to 'false
Hace 12 años
I was sure this action didn't use the setting. I was wrong. That's the easiest way to show the price.
Hace 12 años
This option was added in 2.20
Hace 12 años
Cheers Andrei,
Where do i find that setting please?

Many thanks for your help
Hace 12 años
Admin area > configuration > settings > all settings (advanced)
Hace 12 años
Thanks,
Is this non small product box used anywhere else on the site? i am guessing i will need to style it up multiple times otherwise
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.