Jump to content

1.5 - image sizes - for homefeatured and ect


kapees

Recommended Posts

Hi Guys,

 

I am wonder how to change image sizes in 1.5

 

Before when I want to change sizes only for homefeatured (center column)

I was adding new images size in Admin Panel

than I opened homefeatured.tpl and changed name of old image size for my image size.

 

Now I can see this:

 

<img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'home_default')}" height="{$homeSize.height}" width="{$homeSize.width}" alt="{$product.name|escape:html:'UTF-8'}" />

 

And when I am changing "home_default" for my name of images let say "homepage" nothing changes.

 

Am I doing something wrong ?

 

 

Thank you in advance,

All the best!

Chris

Link to comment
Share on other sites

Hi Guys,

 

I am wonder how to change image sizes in 1.5

 

Before when I want to change sizes only for homefeatured (center column)

I was adding new images size in Admin Panel

than I opened homefeatured.tpl and changed name of old image size for my image size.

 

Now I can see this:

 

<img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'home_default')}" height="{$homeSize.height}" width="{$homeSize.width}" alt="{$product.name|escape:html:'UTF-8'}" />

 

And when I am changing "home_default" for my name of images let say "homepage" nothing changes.

 

Am I doing something wrong ?

 

 

Thank you in advance,

All the best!

Chris

 

Do you have "force comiliation" setting turned on?

If you don't know how to turn it on, here is a tutorial: how to turn on force compilation in prestashop

Link to comment
Share on other sites

No no, because if I delete line or something in this file it's shows that is broken, it's just don't change the photo size - Presta Magic :D

 

 

Here is what I am doing to change homefeatured photos sizes:

 

1. Preferences -> images -> Add new

 

2. Type name "home_default2"

 

3. Add sizes 154 x 154px

 

4. Check "product"

 

5. Save

 

6. Than I am going to homefeatured.tpl and change "home_default" to "home_default2" in this line :

<a href="{$product.link}" title="{$product.name|escape:html:'UTF-8'}" class="product_image"><img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'home_default')}" height="{$homeSize.height}" width="{$homeSize.width}" alt="{$product.name|escape:html:'UTF-8'}" />{if isset($product.new) && $product.new == 1}<span class="new">{l s='New' mod='homefeatured'}</span>{/if}</a>

 

7. Save that file and that's it.

 

Am I doing some thing wrong?

 

All this process just change the photo to:

photoojs.jpg

 

After regenerating thumbnails, I am getting this:

 

photobyo.jpg

 

It's crap

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

  • 2 weeks later...

No no, because if I delete line or something in this file it's shows that is broken, it's just don't change the photo size - Presta Magic :D

 

 

Here is what I am doing to change homefeatured photos sizes:

 

1. Preferences -> images -> Add new

 

2. Type name "home_default2"

 

3. Add sizes 154 x 154px

 

4. Check "product"

 

5. Save

 

6. Than I am going to homefeatured.tpl and change "home_default" to "home_default2" in this line :

<a href="{$product.link}" title="{$product.name|escape:html:'UTF-8'}" class="product_image"><img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'home_default')}" height="{$homeSize.height}" width="{$homeSize.width}" alt="{$product.name|escape:html:'UTF-8'}" />{if isset($product.new) && $product.new == 1}<span class="new">{l s='New' mod='homefeatured'}</span>{/if}</a>

 

7. Save that file and that's it.

 

Am I doing some thing wrong?

 

All this process just change the photo to:

photoojs.jpg

 

After regenerating thumbnails, I am getting this:

 

photobyo.jpg

 

It's crap

 

kapees, you need to edit the modules\homefeatured\homefeatured.css file in order to get the 'new' sticker correctly displayed over the product image.

try mine for testing, i hope it will help:

#featured-products_block_center .product_image span.new {

display: block;

position: absolute;

top: 7px;

right:4px;

padding: 2px 3px 2px 2px;

width: 70px;

font-size:11px;

font-weight:bold;

color: #fff;

text-align: right;

text-transform: uppercase;

-moz-transform: rotate(90deg);

-webkit-transform: rotate(90deg);

-o-transform:rotate(90deg);

-ms-transform: rotate(90deg);

background-color: #990000

}

 

padding, top, right are the values you need to adjust in your css.

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...