Provide a link to image on right column

How do I provide link to image col_right_callout.jpg appearing on right column. (As in demo site)

8 answers

congtq 0.00 $tone July 7, 2010
Public

You can modify some code in 2 files left_col.phtml or right_col.phtml in app\design\frontend\base\defaulttemplate\callouts folder.
However you should copy callouts folder to app\design\frontend\default\jm_orestemplate folder then modify 2 files left_col.phtml or right_col.phtml in app\design\frontend\default\jm_orestemplate\callo uts folder.
Change href="your_link"

#1
Profile photo of G T 0.00 $tone July 7, 2010
Public

You can modify some code in 2 files left_col.phtml or right_col.phtml in app\design\frontend\base\defaulttemplate\callouts folder.
However you should copy callouts folder to app\design\frontend\default\jm_orestemplate folder then modify 2 files left_col.phtml or right_col.phtml in app\design\frontend\default\jm_orestemplate\callo uts folder.
Change href="your_link"

I did as you said. Please let me know if I have undestood clearly. The word in dark is my url link.

<div class="block block-banner">
<div class="block-content">
<?php if(strtolower(substr($this->getLinkUrl(),0,4))===’http’): ?>
<a href="repairservices" title="<?php echo $this->__($this->getImgAlt()) ?>">
<?php elseif($this->getLinkUrl()): ?>
<a href="repairservices" title="<?php echo $this->__($this->getImgAlt()) ?>">
<?php endif; ?>
<img src="<?php echo $this->getSkinUrl($this->getImgSrc()) ?>"<?php if(!$this->getLinkUrl()): ?> title="<?php echo $this->__($this->getImgAlt()) ?>"<?php endif; ?> alt="<?php echo $this->__($this->getImgAlt()) ?>" />
<?php if($this->getLinkUrl()): ?>

#2
congtq 0.00 $tone July 7, 2010
Public

You can hardcode as this

<div class="block block-banner">
<div class="block-content">
<a href="http://www.mobilespares.in/index.php/contacts/">
<img src="<?php echo $this->getSkinUrl($this->getImgSrc()) ?>"<?php if(!$this->getLinkUrl()): ?> title="<?php echo $this->__($this->getImgAlt()) ?>"<?php endif; ?> alt="<?php echo $this->__($this->getImgAlt()) ?>" />
</a>
</div>
</div>

#3
congtq 0.00 $tone July 19, 2010
Public

Open file right_col.phtml in app\design\frontend\base\defaulttemplate\callouts folder and add this code

Code:

<img src="link_to_your_image" />

at where you want to display image
Exp:

Code:

<div class="block block-banner">
<div class="block-content">
<a href="http://www.mobilespares.in/index.php/contacts/">
<img src="<?php echo $this->getSkinUrl($this->getImgSrc()) ?>"<?php if(!$this->getLinkUrl()): ?> title="<?php echo $this->__($this->getImgAlt()) ?>"<?php endif; ?> alt="<?php echo $this->__($this->getImgAlt()) ?>" />
</a>
<br />
<img src="http://mobilespares.in/skin/frontend/default/jm_morganite/images/media/sam-1.jpg" />
</div>
</div>
#6
congtq 0.00 $tone August 11, 2010
Public

You can do following:
1. upload test.jpg file to skin\frontend\default\jm_ores\images\media folder
2. open app\design\frontend\default\jm_ores\layout\catalog .xml and search

Code:

<block type="core/template" name="left.permanent.callout" template="callouts/left_col.phtml">
	<action method="setImgSrc"><src>images/media/col_left_callout.jpg</src></action>
	<action method="setImgAlt" translate="alt" module="catalog"><alt>Our customer service is available 24/7. Call us at (555) 555-0123.</alt></action>
	<action method="setLinkUrl"><url>checkout/cart</url></action>
</block>

replace col_left_callout.jpg with test.jpg

#8

This question is now closed

Written By

Comments