Magento Forum

   
moving upsell and another to a different section of the webpage
 
madkad
Member
 
Total Posts:  60
Joined:  2008-12-20
 

Hi

I have been trying to move some sections on my “product view page”

the sections are in my center box called:

upsell
additional

I want to add them in there own center box I have, I tried moving the lines of code:

<?php echo $this->getChildHtml('upsell_products'?>
        <?php 
echo $this->getChildHtml('product_additional_data'?>

out of the view.phtml file to my footer.phtml file, as that would have done the job for me, I would have added the style in there files then.

But when I move them out of the view.phtml file to another file they stop working, any tips on what I can do?

I am using my own full style, but not fully great with any php

hope some one can help, thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
madkad
Member
 
Total Posts:  60
Joined:  2008-12-20
 

I see this has been asked a number of times like

http://www.magentocommerce.com/boards/viewthread/12937/

but no one seems to give an answer to how to do this.

can it be done or is there a tut on this somwhere?

 
Magento Community Magento Community
Magento Community
Magento Community
 
madkad
Member
 
Total Posts:  60
Joined:  2008-12-20
 

plllleeeeaaaassssee any one?

 
Magento Community Magento Community
Magento Community
Magento Community
 
madkad
Member
 
Total Posts:  60
Joined:  2008-12-20
 

there must be some way to do this?

am I missing something here?

 
Magento Community Magento Community
Magento Community
Magento Community
 
madkad
Member
 
Total Posts:  60
Joined:  2008-12-20
 

some one please?

lol crazy

 
Magento Community Magento Community
Magento Community
Magento Community
 
dan_w
Sr. Member
 
Total Posts:  290
Joined:  2008-01-04
 

Ok...what you’re trying to accomplish is pretty simple, but you can’t just move html blocks on templates without moving the appropriate xml as well. For example, if you wanted to put the upsell items in the footer, then you’d add this to footer.phtml

<?php echo $this->getChildHtml('upsell_products'?>

AND, add this to page.xml in the block that defines the footer elements:

<block type="catalog/product_list_upsell" name="product.info.upsell" as="upsell_products" template="catalog/product/list/upsell.phtml">
                    <
action method="setColumnCount"><columns>4</columns></action>
                    <
action method="setItemLimit"><type>upsell</type><limit>4</limit></action>
                </
block>

This will cause the upsell items to display in the footer. However, if you navigate to a page that is not a product view page, you will receive an error in your footer. There’s a couple of different ways to solve this:
1. Don’t put the upsell products in the footer.
2. Redefine your templates to incorporate another html block between the top of the footer and the bottom of the product view box.
3. Use an alternate footer.phtml for the product view only.

Dan

 
Magento Community Magento Community
Magento Community
Magento Community
 
madkad
Member
 
Total Posts:  60
Joined:  2008-12-20
 

thanks for the reply on this.

after you said about the error page I thought I would make a seprate template idea just for the product page the same as my 3 column one but with an extra box in the center.

but couldnt get the upsell to show up for some reason.

if it isnt the footer section I am dealing with do I still try and place infomation in the page.xml file?

Thanks for your time on this

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