How to Change Continue Shopping Text in Magento to Button

Many of our Magento sites use the “Modern Theme”. We have obviously made many modifications to the “Modern Theme”, but the basic design and layout is there. We were not happy with the small, obscure text when you added an item to your shopping cart that read “Continue Shopping“.

So, here is how you change the Continue Shopping text in Magento checkout to use a button image.

On your server, go to your root Magento directory and open the file: app/design/frontend/default/modern/template/checkout/cart.phtml.

Find the line that reads:

<a href=”<?php echo $this->getContinueShoppingUrl() ?>” class=”f-left”><?php echo $this->__(’Continue Shopping’) ?></a>

Change that line to read:

<a href=”<?php echo $this->getContinueShoppingUrl() ?>” class=”f-left”><input type=”image” src=”<?php echo $this->getSkinUrl(’images/btn_continue_shopping.gif’) ?>” alt=”<?php echo $this->__(’Continue Shopping’) ?>”/></a>

Save the file. There you go. That’s how you change the Continue Shopping text in Magento checkout to use a button image.

You may want to edit the btn_continue_shopping.gif to something more appealing or create a new button and use that name instead.

How to Remove Credit Card Information From Sales Email in Magento

Another one of those things that should not be included in emails are the credit card details such as expiration date and the last four digits. In a stock implementation of Magento, when sales emails are sent out, the credit card expiration date and last four are included. Once again, this makes no sense, but here is how to remove that information.

  1. Open the file app/design/frontend/default/your_theme/template/payment/info/cc.phtml
  2. Find the lines that read: <?php echo $this->__(’Credit Card Number: xxxx-%s’, $this->htmlEscape($this->getInfo()->getCcLast4())) ?><br/><?php echo $this->__(’Expiration Date: %s/%s’, $this->htmlEscape($this->getCcExpMonth()), $this->htmlEscape($this->getInfo()->getCcExpYear())) ?>
  3. Comment this code out, so it looks like this:<!–<?php echo $this->__(’Credit Card Number: xxxx-%s’, $this->htmlEscape($this->getInfo()->getCcLast4())) ?><br/><?php echo $this->__(’Expiration Date: %s/%s’, $this->htmlEscape($this->getCcExpMonth()), $this->htmlEscape($this->getInfo()->getCcExpYear())) ?>–>
  4. Save the file.

That’s it. Magically, the credit card info is removed from the sales confirmation emails in Magento.

How To Remove Payment Info From Packing Slip

Personally, I think this is a bad idea, including any kind of credit card information on any kind of print information. In Magento, the credit card information is included by default on the PDF packing slip, although it is only just the last four and the expiration date. Still, too much for me. So after much searching, I came up with nothing. Then I stumbled on another post of ours here at Imagedia, that had to do with removing the shipping charges from the packing slip in Magento.

Searching through the code in that same file, we found some code that achieves what we’re looking for. As always, BACKUP YOUR FILES!

Here is the process:

  1. Go to your server and open app/code/local/Mage/Sales/Order/Pdf/Abstract.php
  2. Find this code, around line 294: foreach ($payment as $value){
    if (trim($value)!==”) {
    $page->drawText(strip_tags(trim($value)), $paymentLeft, $yPayments, ‘UTF-8′);
    $yPayments -=10;
  3. Change that code to read: foreach ($payment as $value){
    if (trim($value)!==”) {
    $yPayments -=10;
  4. That gets rid of the payment info.
  5. Next, remove the heading.
  6. Find this code, around 277 or so: $page->drawText(Mage::helper(’sales’)->__(’Payment Method’), 35, $this->y, ‘UTF-8′);
  7. Change it to read: $page->drawText(Mage::helper(’sales’)->__(’Shipping Method:’), 35, $this->y, ‘UTF-8′);
  8. Next line down reads: $page->drawText(Mage::helper(’sales’)->__(’Shipping Method:’), 285, $this->y , ‘UTF-8′);
  9. Delete that.
  10. Now, go down about 30 lines to find this: $page->drawText($shippingMethod, 285, $this->y, ‘UTF-8′);
  11. Change it to: $page->drawText($shippingMethod, 35, $this->y, ‘UTF-8′);
  12. Save your file.

Go to Magento Admin, go to sales, select an order, select a shipment and click “Print”. The result should be a clean packing slip with no payment information included at all, which is how it should be.

This may be a bit of a hack, but it’s the only way we could find how to remove payment and credit card information from Magento packing slips.

How do you customize email notifications sent to customers if you have multiple stores in Magento

Here was another frustrating issue in Magento. How do you customize email notifications sent to customers if you have multiple stores in Magento. The stock Magento system only has one set of email templates, which are hard enough to find as it is. We’ve done a post on that subject, here: Customizing Email Confirmations in Magento

So, if you have multiple stores, here’s the procedure:

  1. Log into Magento admin
  2. Go to “System >> Transactional Emails”
  3. Make sure you select the store you’re working on in the upper left corner under “Current Configuration Scope”
  4. Now, click “Add New Template”
  5. Select the template you want to base the new template on. For this example, let’s select “New Order”
  6. Click “Load Template”
  7. The template information is then shown, but you will need to fill in the infor for “Template Name”. For this example, lets type in “New Order My Second Store”. (Don’t enclose in quotes like here)
  8. Now, in the “Template Content” field, change whatever you like in the box.
  9. Click “Save Template”
  10. Now you have to go to “System >> Configuration”
  11. Make sure to select which store you’re working on.
  12. Go down to “Sales Emails” under the “Sales” heading.
  13. On the page, you’ll see at the top is “Order” and in that box is a selection for “New Order Confirmation Template”
  14. Use the drop down menu and select the new template you just created, in this example, it was “New Order My Second Store”
  15. Click “Save Config”
  16. You’ll have to do this for every email template and every store, but I suppose it’s worth it.

So that’s it for How to Customize Customer Emails for Multiple Stores in Magento.