Introduction
Displaying the minimum order amount in Magento can be useful for informing customers about order requirements. This guide demonstrates a simple method to display the minimum order amount in any template file, such as the header.
Implementation
Below is a straightforward way to display a message if the order subtotal is below the minimum amount of £50. This code snippet can be added to any .phtml
file in your Magento theme.
Code Snippet
<div>
<?php if (Mage::getSingleton('checkout/session')->getQuote()->getSubtotal() > 50) : ?>
<?php else : ?>
<p>We have a minimum order of £50</p>
<p>Please continue shopping</p>
<?php endif; ?>
</div>
Explanation
This code checks if the order subtotal is greater than £50. If it is not, it displays a message informing the customer of the minimum order requirement.
Steps to Implement
- Open the desired
.phtml
file in your Magento theme, such as the header template file. - Insert the provided code snippet where you want the message to appear.
- Save the changes and refresh your Magento cache if necessary.
Conclusion
By adding this code snippet, you can effectively communicate the minimum order requirement to your customers, enhancing their shopping experience and ensuring they meet the necessary order criteria.
Further Assistance
If you have any questions or need further help with this implementation, please leave a comment below or reach out for support.