Close

Change PictureSize of new products on home page

hanz
7 years ago
#12996 Quote
Avatar
  • 19
Hi,

On my homepage I have a section with new products, homepage products and best sellers. The size of the original pictures is defined in Admin - media: product thumbnails (in my case 300px), But these are also for the category product pictures and I want a different size on the homepage. This is done by css, but the actual picture is resized from the original which is not good for Google. I changed the code in themes/native/Index.cshtml from

@Html.Widget("home_page_native_new_products")
@Html.Action("HomepageProducts", "Product")
@Html.Action("HomepageBestSellers", "Product")

to:
            
@Html.Widget("home_page_native_new_products")
@Html.Action("HomepageProducts", "Product",new{productThumbPictureSize=130})
@Html.Action("HomepageBestSellers", "Product",new{productThumbPictureSize=130})

which works perfectly for HomepageProducts and HomepageBestSellers products.

What code should I add to hardcode the picture size for home_page_native_new_products (adding:  "Product",new{productThumbPictureSize=130} gives an error) ?

Thanks for any reply!
SDobrev
7 years ago
#13000 Quote
Avatar
  • 283
Hi,

As I answered you in the ticket that you have submitted the "home_page_native_new_products" widget zone doesn't support additional parameter for the picture size so it is not possible to change the picture size only for the home page. We are using the product thumbnails size from the media settings.

Best Regards,
Stoyan Dobrev
Nop-Templates.com
hanz
7 years ago
#13021 Quote
Avatar
  • 19
Oké thanks.