Jump to content

[question] Reinsurance module help


Recommended Posts

Hi, im working on my store but Im running into a problem. I wanted to change the reinsurance image to a png so I could add my own. I went through the tpl and the blockreinsureance.php file and change the jpg in the file to png and doesn't seem to change anything.

 

Im here to find out if anyone can help me figure out how to make it load the png image instead of the jpg ones.

Link to comment
Share on other sites

Did you edit the following lines in your blockreinsurance.php file, changing the lines below to the name of the .png files you created.

they also must be in ..modules/blockreinsurance/img/ folder

 

 

 

Line 345: array('text' => $this->l('Money back guarantee.'), 'file_name' => 'reinsurance-1-1.jpg'),

Line 346: array('text' => $this->l('In-store exchange.'), 'file_name' => 'reinsurance-2-1.jpg'),

Line 347: array('text' => $this->l('Payment upon shipment.'), 'file_name' => 'reinsurance-3-1.jpg'),

Line 348: array('text' => $this->l('Free Shipping.'), 'file_name' => 'reinsurance-4-1.jpg'),

Line 349: array('text' => $this->l('100% secure payment processing.'), 'file_name' => 'reinsurance-5-1.jpg')

Link to comment
Share on other sites

  • 10 months later...

I found a way to change the type of image, via blockreinsurance.tpl file from your theme module folder, from .jpg to .png or anything else you need without modifying .php file

 

in the blockreinsurance.tpl file on line 30 you have something like this

src="{$link->getMediaLink("`$module_dir`img/`$info.file_name|escape:'htmlall':'UTF-8'`")}"

you just change it to this

src="{$img_dir}{substr($info.file_name, 0, -4)}.png"

first you change the folder where to look for images, from "yourtheme/modules/blockreinsurance/img" to "yourtheme/img"

 

then use substract function to cut the last 4 characters which are ".jpg" and then after you close the brackets simply add your file type, like ".png"

 

hope it helps :)

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