Jump to content

[SOLVED] Hard Coding A Different Home Featured Image


Recommended Posts

Hey everyone. I am getting closer to finishing up my website but am having some trouble hard coding an adjustment to the "homefeatured.tpl" file. What I am trying to do is use a different image for the home page, that will NOT show up in the actual products page. Basically, I want it to be viewed on the home featured area on the bottom of the page and that is it. Once the customer clicks the link a new set of images will pop up.

 

With that said, I am working on adjusting the "homefeatured.tpl" file located in the myshop/eCommerce/module/homefeatured folder. The bit of code that I am pretty sure I need to get to adjust is as follows:

 

" <img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'home')}" "

 

I am trying to rewrite the link from being the default "home.jpg" image to "home-adjusted.jpg" as per my new image file. I really need help getting this figured out because right now, I am lost. Thanks a ton in advance everyone!

 

Cheers,

 

JDub1337

Edited by JDub1337 (see edit history)
Link to comment
Share on other sites

Nevermind everyone. I figured it out. I was in the wrong file location (figures). To anyone looking for the future here is what I did.

 

Under Prestashop/themes/yourtheme/modules/homefeatured you need to edit the "homefeatured.tpl" file. Simply point the 'home' section of the code to its new destination, like 'home-adjusted', save and re-upload. Here is the code before and after:

 

Before:

 

a class="product_image" href="{$product.link}" title="{$product.name|escape:html:'UTF-8'}"><img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'home')}" alt="{$product.name|escape:html:'UTF-8'}" /></a>

<div>

 

After:

 

 

a class="product_image" href="{$product.link}" title="{$product.name|escape:html:'UTF-8'}"><img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'home-adjusted')}" alt="{$product.name|escape:html:'UTF-8'}" /></a>

<div>

 

Now, an important bit to remember is that under your img/p/"file name" you need to adjust your image say from 15-59-home.jpg to 15-59-home-adjusted.jpg, or whichever name you use. I kept it simple and just added "-adjusted" after the original file name that I duplicated. Consider it solved!

 

JDub1377

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...