I’ve seen several different approaches to getting a particular helper, and I’m hoping someone can explain the pros/cons of each approach. For example, in template/checkout/cart/sidebar/default.phtml, you’ll see both $this->helper(‘checkout’) and Mage::helper(‘checkout’). Is there a good reason for these two different methods in the same template? Below are all the different ways of getting a helper [...]
Archive: checkout cart
Posts Tagged ‘checkout cart’
I want to have on the cart page, for a customer whos not logged in to be taken to the ‘login page’ when they click ‘proceed to checkout’ but then once they’ve logged in/registered for them to be taken to the checkout page. I’m using onepage checkout, and i know that there is a login [...]
Is there an observer which can be used to observe events when a product is removed from the cart? I haven’t found any. What I have found is checkout_cart_update_items_after which can be used if a product is removed by altering the product count, but not when the user uses the remove button. The only alternative [...]
I’ve been reading a lot of tutorials around the internet, but even the ones on the Magento site are for version 1.5 or less and even some of the functions references do not exist any longer. What I am doing is simple, I am sending a item to a custom script outside of Magento where [...]
I have this page for instance that doesn’t have a proper breadcrumb set: http://www.princessly.com/checkout/cart/ It’s just “Home >>” and that’s it. How can I make it “Home >> Shopping Cart”? Thus far I can only find the breadcrumb template which is template/page/html/breadcrumbs.phtml but I have no idea how to make this change. I suppose I [...]
I’m trying to translate “My Cart” to “%s Items in Cart” via /my_theme/locale/en_US/translate.csv. I have a custom cart link like so: <?php $_cartQty = $this->getSummaryCount() ?> <?php $cartText = (!empty($_cartQty)) ? $_cartQty : ’0′; ?> <li class=”cart”> <a href=”<?php echo $this->getUrl(‘checkout/cart’) ?>” class=”cart-link”><?php echo $this->__(‘My Cart (‘ . $cartText . ‘)’) ?></a> All of the [...]
In the default checkout.xml there is: <reference name=”top.links”> <block type=”checkout/links” name=”checkout_cart_link”> <action method=”addCartLink”></action> <action method=”addCheckoutLink”></action> </block> </reference> Renaming links from top menu using local.xml? Possibly Related Posts: magento javascript skin path admin vs frontend in layout Magento extension settings Magento : CRON cannot reindex products Magento 1.6.2 -> 1.7 Upgrade leads to price index corruption [...]
I try to get the cart items for a given product; I have tried this code : $product = Mage::getModel(‘catalog/product’) ->setStoreId(Mage::app()->getStore()->getId()) ->load(’2784′); $quote = Mage::getSingleton(‘checkout/cart’)->getQuote(); $cartItems = $quote->getItemByProduct($product); foreach ($cartItems as $item) { echo $item->getId().”<br/>”; } but it don’t gives anything. How can I modify my code to use “getItemByProduct” in the right form ? [...]
I have an observer listening for the event ‘checkout_quote_init’. When the observer code is run, one of the things it does is: $cart = Mage::helper(‘checkout/cart’)->getCart(); but that fires the checkout_quote_init event again (from Checkout/Model/Session.php) if the user is not logged in. Is this a common problem? Is the answer that I simply cannot do what [...]
When i try to change: <reference name=”right”> <block type=”checkout/cart_sidebar” name=”cart_sidebar” before=”-” template=”checkout/cart/sidebar.phtml”/”> in app\design\frontend\base\default\layout\checkout.xml <reference name=”left”> <block type=”checkout/cart_sidebar” name=”cart_sidebar” before=”-” template=”checkout/cart/sidebar.phtml”/”> my cart vanish. The caching is off. Magento cart disappears when the position is changed Possibly Related Posts: magento javascript skin path admin vs frontend in layout Magento extension settings Magento : CRON cannot [...]