How do I provide link to image col_right_callout.jpg appearing on right column. (As in demo site)
8 answers
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"
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()): ?>
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>
Thats wonderful. I was able to do it.
Now what I should do If I want to add an additional image anywhere on right column
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>
If instead of col_left_callout.jpg I want to show a test.gif file, where do I make the changes.
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
This question is now closed