I\'m trying to add a block (button) to mini cart block: either to name=\"cart_sidebar\"
or preferably name=\"topCart.extra_actions\"
as it renders it\'
To anyone looking for a solution to the extra_actions PayPal button, there is a Magento patch fixing it (SUPEE-87_1.12.0.0_v1.patch).
Since it's a Magento patch, you can simply open the file "app/code/core/Enterprise/PageCache/Model/Container/Sidebar/Cart.php" and add these 2 functions after the _renderBlock function, which is exactly what the patch does:
/**
* Get Place Holder Block
*
* @return Mage_Core_Block_Abstract
*/
protected function _getPlaceHolderBlock()
{
$block = parent::_getPlaceHolderBlock();
$block->setChild('extra_actions', $this->_getExtraActionsChildBlock());
return $block;
}
/**
* Get child Block
*
* @return Mage_Core_Block_Abstract
*/
protected function _getExtraActionsChildBlock()
{
$paypalShortcutBlock = Mage::app()->getLayout()->createBlock('paypal/express_shortcut');
$paypalShortcutBlock->setTemplate('paypal/express/shortcut.phtml');
$paypalShortcutBlock->setLayout(Mage::app()->getLayout());
return $paypalShortcutBlock;
}
Understanding how this works can help for other similar problems.
Thanks Vinai by the way, very informative answer.