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

Insert new block inside of checkout/cart
 
nbasu02
Jr. Member
 
Total Posts:  3
Joined:  2012-08-30
 

Hi everyone,

My final goal of my plugin project is to let an image be uploaded to the database (done) have it do some functionality (done), and then let it be placed in some arbitrary spot on checkout/cart by the admin (oh the horror).

I’m first just trying to hardcode the .phtml into any block on this page (let’s use “checkout.cart.coupon” for sake of discussion).  My xml looks like this:

<checkout_cart_index>
        <
reference name="content">
            <
block type="embeds/projecttemplates" name="project.offers.embed" template="project/button.phtml" after="checkout.cart.coupon">
            </
block>
        </
reference>
</
checkout_cart_index>

With this, my block just appears at the end of the page.  Changing after to before just shifts it all the way to the top.  Using a combination of before and after still keeps it at the top of the page.  Is there any way to get it to stay where I tell it to without having to resort to Prototype?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Pixlhouse
Jr. Member
 
Total Posts:  9
Joined:  2012-10-16
 

Thanks for sharing the code. I will try it out.

 
Magento Community Magento Community
Magento Community
Magento Community
 
MagikSwapna
Sr. Member
 
Total Posts:  97
Joined:  2010-12-14
 

Hi,
Just try to add your code after <block type="checkout/cart_coupon" name="checkout.cart.coupon" as="coupon" template="checkout/cart/coupon.phtml"/>.
Hope it will helps you.

 
Magento Community Magento Community
Magento Community
Magento Community
 
nbasu02
Jr. Member
 
Total Posts:  3
Joined:  2012-08-30
 
MagikSwapna - 04 November 2012 08:18 PM

Hi,
Just try to add your code after <block type="checkout/cart_coupon" name="checkout.cart.coupon" as="coupon" template="checkout/cart/coupon.phtml"/>.
Hope it will helps you.

Ah if only it were that simple.  I need it to be immune to any updates done by Magento.  It’d be overwritten if I added it to coupon.phtml

Edit: Also, even trying that I don’t know how to reference the correct .phtml file

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