I'm writing an if statement in which a button needs to show if the cart is empty.
For this button I need to get the form key of the product for the data-url
So something like this:
<a href="#" data-url="checkout/cart/add/product/59/form_key/<?php echo Mage::getSingleton('core/session')->getFormKey(); ?>/" class="btn btn-success">Order</a>
As mentioned above I need to wrap this button in an if statement, so something like this:
<?php
$_helper = Mage::helper('checkout/cart');
if (1 > $_helper->getItemsCount()){
echo '<a href="#" data-url="checkout/cart/add/product/59/form_key/<?php echo Mage::getSingleton(\'core/session\')->getFormKey(); ?>/" class="btn btn-success">Order</a>';
}
else{
'<p>hello</p>';
}
?>
But obviously I can't have php echo within echo. Can anybody point me in the right direction of how to do this?
<?php echo('string here '.$string); ?>