Naming the block checkout.cart
will cause a conflict because the parent block also has this name.
To add the block in the place you want, after the totals use the following XML
<checkout_cart_index>
<reference name="checkout.cart">
<block type="mdeprojects_discount/remainder" name="mdeprojects.remainder" as="mdeprojects.remainder" template="discount/remainder.phtml" />
</reference>
</checkout_cart_index>
Then check the file template/checkout/cart.phtml
on line 151. Here you can see <?php echo $this->getChildHtml('totals'); ?>
. Place the following code on the next line:
<?php echo $this->getChildHtml('mdeprojects.remainder'); ?>
I find the whole XML thing difficult so I am sympathetic to your cause here.
It looks to me like there is a discrepancy with your class name and your block XML
ie
class Crusader_CLHomePage_Block_Qwerty extends Mage_Core_Block_Template
and
<block type="core/template" name="homepage" template="crusader/home.phtml">
<block type="crusaderhome/qwerty" name="homeads" as="homeads" template="crusader/homeads.phtml" />
</block>
Let's start with the block type and work backward. I think here I would expect to see something like
<block type="crusader_home/qwerty" ...
and that type would refer Magento to the class
Crusader_Home_Block_Qwerty extends Mage_Core_Block_Template
Continuing to work backward on this tack, the file app\code\local\Crusader\CLHomePage\etc\config.xml would need to be modified to something like
<global>
<blocks>
<crusader_home>
<class>Crusader_Home_Block</class>
</crusader_home>
</blocks>
</global>
It points Magento to all classes starting 'Crusader_Home_Block_*'. And now I think you need to rename your module Crusader_Home instead of Crusader_CLHomePage and change the folder names accordingly...
AND / BUT I strongly recommend you change your module name. Only ever use one capital letter at the start of the module name not three and don't put capital letters in the middle of the name either.
You may want to look into some of the tools available for generating modules. I find them very useful for avoiding typing errors. I use this one by the very clever people at MGT Commerce (it has simplicity on its side) and this one is all-encompassing and an astonishing piece of coding by Silk Software.
***EDIT following comments below
Additionally based on the error log I think the problem is that Magento can't find your class file. So double-check the caches are refreshed or off, particularly XML cache, and that the compiler is off or re-enabled.
Best Answer
It is because the
awprevnext_prevnext
is added to thecontent
block and not to theproduct.info
block.Here's what you should do:
However, this won't be enough because the
product.info
original templatecatalog/product/view.phtml
does not render all the child block automatically by callingecho $this->getChildHtml();
Thus you need to add the following to your custom theme
catalog/product/view.phtml
template:You need to add that code before the following code: