Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Confusing but probably simple question about left and right callouts. 
 
fastboxgaming
Sr. Member
 
Avatar
Total Posts:  101
Joined:  2008-10-11
 

I’m trying to figure out how to change the callout’s on the right and the left. I’m using Idark template. Heres the problem:

I understand the catalog.xml works with the left_col.phtml and right_col.phtml to customize the callouts. I’m confused because what I am seeing in the code, does not reflect on the page.

In catalog.xml i see the following code:

<reference name="left">
            <
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 (800DEMO-NUMBER.</alt></action>
                <
action method="setLinkUrl"><url>checkout/cart</url></action>
            </
block>
        </
reference>
        <
reference name="right">
            <
block type="core/template" before="cart_sidebar" name="catalog.compare.sidebar" template="catalog/product/compare/sidebar.phtml"/>
            <
block type="core/template" name="right.permanent.callout" template="callouts/right_col.phtml"/>
            <
block type="customer/form_login" name="customer_form_mini_login" template="customer/form/mini.login.phtml"/>
        </
reference>
        <
reference name="footer_links">
            <
action method="addLink" translate="label title" module="catalog" ifconfig="catalog/seo/site_map"><label>Site Map</label><url helper="catalog/map/getCategoryUrl" /><title>Site Map</title></action>
        </
reference>

My left_col.phtml says the following:

<div class="box">
    
<?php if (strtolower(substr($this->getLinkUrl(),0,4))==='http'): ?>
        
<a href="<?php echo $this->getLinkUrl() ?>">
    
<?php elseif($this->getLinkUrl()): ?>
        
<a href="<?php echo $this->getUrl($this->getLinkUrl()) ?>">
    
<?php endif ?>
    
<img src="<?php echo $this->getSkinUrl($this->getImgSrc()) ?>" width="195" alt="<?php echo $this->__($this->getImgAlt()) ?>" style="display:block;" />
    
<?php if ($this->getLinkUrl()): ?>
    
</a>
    
<?php endif ?>
</div>

My right_col.phtml says the following

<div class="box">
    <
img src="<?php echo $this->getSkinUrl('images/media/italiano_ph_callout_left_top.jpg') ?>" width="195" alt="<?php echo $this->__('Glossyness!') ?>" style="display:block;" />
</
div>

I am confused because on the frontpage, both callouts, left and right, show up as the same identical picture… they are both showing up as italiano_ph_callout_left_top. 

By looking at the above code, shouldn’t the left one show up as col_left_callout.jpg, and the right one should be italiano_ph_callout_left_top?

Why isn’t this the case?

You can see this happening at http://www.fastboxgaming.com

 
Magento Community Magento Community
Magento Community
Magento Community
 
Nicholas Cleef
Jr. Member
 
Avatar
Total Posts:  26
Joined:  2008-10-01
Latrobe Valley - Australia
 

Hello, fastboxgaming,

From my understanding, you want to just change the right and left callout’s images and alt tags, If I’m correct you can just change your left_col.phtml with:

<div class="box">
<?php if (strtolower(substr($this->getLinkUrl(),0,4))==='http'): ?>
<a href="<?php echo $this->getLinkUrl() ?>">
<?php elseif($this->getLinkUrl()): ?>
<a href="<?php echo $this->getUrl($this->getLinkUrl()) ?>">
<?php endif ?>
<img src=”your image url here” width="195" alt=”Your image alt here” style="display:block;" />
<?php if ($this->getLinkUrl()): ?>
</a>
<?php endif ?>
</div>

And define your image url where it says image url and your image alt where it says image alt in the code.

Hopefully this helps.

If not, I have miss-understood you but if you explain what you want to do, I can probably help you out, I guess.

Cheers and Good Luck,

Nicholas Cleef

 
Magento Community Magento Community
Magento Community
Magento Community
 
fastboxgaming
Sr. Member
 
Avatar
Total Posts:  101
Joined:  2008-10-11
 

Yes, I do want to change the callout image, but I also would like to learn how to use more than just images in callouts. I’m trying to understand why the two pictures on my page are identical on the page itself, but in the code i’m listed above, it clearly shows two different image names.

Also I’m confused on what files define what will be displayed on the right and left. Other than callouts. For instance, I dont see in those three files what defines the sign up for the newsletter. What tells it to be there.

 
Magento Community Magento Community
Magento Community
Magento Community
 
fastboxgaming
Sr. Member
 
Avatar
Total Posts:  101
Joined:  2008-10-11
 

Simply, I would like to implement my google ad into the right or left side.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Nicholas Cleef
Jr. Member
 
Avatar
Total Posts:  26
Joined:  2008-10-01
Latrobe Valley - Australia
 

Fastboxgaming,

To edit where your newsletter is displayed:

/app/design/default/your_theme/template/newsletter/subscribe.phtml

Effectively you can add more boxes to the left or right sides in the left_col.phtml or the right_col.phtml,
Just add the following code to the file corresponding to which column you want it in. (e.g. left_col.phtml) for the left side.

<div class="box base-mini">
    <
div class="head">
        <
h4><?php echo $this->__('Your box title'?></h4>
    </
div>
<
div class="content">Content goes here</div>
</
div>

Hope this helps,

Nicholas Cleef

 
Magento Community Magento Community
Magento Community
Magento Community
 
joyously
Guru
 
Total Posts:  447
Joined:  2008-08-21
 

Take a look at this thread: http://www.magentocommerce.com/boards/viewthread/17933/

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top