How to have "My Cart" link outside of Top Links?
I've only been working on Magento for a few days but already it is so confusing. I'm starting to get my head around it but one problem is doing my head in at the moment.
My client wants a shopping basket sort of function NEXT to the top links rather than a "My Cart" in the top links. Simply, all I want to do is move "My Cart" out of the top links and place it in the top right corner next to a hopping bag, but have no idea how to get this link in that position.
For a visual example, the clients sh开发者_运维问答opping basket is going to look similar to the one one Next's website.
Thank you for any help you offer.
To call the cart URL from anywhere, you may utilize the Cart helper:
<?php echo Mage::helper('checkout/cart')->getCartUrl(); ?>
(The helper itself is located under app/code/core/Mage/Checkout/Helper/Cart.php - it has other useful functions, e.g. the items count in the current cart*)
You can utilize this to include a link in the top links, located in app/design/frontend/base/default/template/page/html/top.links.phtml.
I am referring to the base package here, in your own template the path is (most likely) app/design/frontend/[Your Package]/[Your template name]/template/page/html/top.links.phtml
"[Your Package]" is "default" if you don't use an own package.
*which would be
<?php echo Mage::helper('checkout/cart')->getItemsCount(); ?>
精彩评论