Ford Accessories – Live

July 11th, 2011 Posted by Public 0 comments on “Ford Accessories – Live”

The new Ford Motor Company Accessories website is now launched on Magento Enterprise.

Go buy something!

Ford Accessories
Lincoln Accessories
Mercury Accessories

CMS Block in Transactional Email Template – Magento

June 3rd, 2011 Posted by Public 0 comments on “CMS Block in Transactional Email Template – Magento”

Promotional content in order confirmation, shipping notice, etc emails are common in eCommerce – here is a tiny code snippet to make this possible in Magento (Community or Enterprise). I recently added this to the Enterprise implementation for my current customer and everything appears to be working without issue.

1. Add reference to CMS block in transactional email template

 {{block type="cms/block" block_id="ford-order-confirmation-promotions" }}

2. Create CMS block, make sure identifier of block matches.
3. Test your email

Simple right? This could be taken a step further with a little code to select a CMS block based on certain conditions (customer type, purchase history, etc). Anyone want to share that code?

Show SKU in Magento Shopping Cart

April 16th, 2011 Posted by Public 2 comments on “Show SKU in Magento Shopping Cart”

Quick code addition to display the product SKU in the shopping cart in Magento.

Copy the file “default.phtml” from here: “app/design/frontend/default/default/template/checkout/cart/item/” to your local template directory.

Something like “app/design/frontend/default/”your_template”/template/checkout/cart/item/”

Add the following under the product title:

        SKU: <?php echo $_item->getSku() ?>  

Finished:

<h4 class="title"><a href="<?php echo $this->getProductUrl() ?>"><?php echo $this->getProductName() ?> </a></h4>
        SKU: <?php echo $_item->getSku() ?>  

Auto Populate Cross Sell with Products from Current Category Magento

April 16th, 2011 Posted by Public 26 comments on “Auto Populate Cross Sell with Products from Current Category Magento”

eCommerce Data is clear – you need to have cross sell items for every product in your catalog to help conversion.  The usual process consists of manually associating items in the Magento Admin interface.  This process works fine if you have hundreds or even a few thousand items – OR – you have this data in back end systems.

What happens if you don’t have the data and you have 15,000+ items in your catalog?

  • Hire someone to associate all products?
  • Randomly apply products in your data feed?
  • Develop custom code?

All of the above items are true for my Medical Supplies business – Medical Delivered so I needed a solution.  I decided to auto assign cross sell products on the front end on product page render.

In action: http://www.medicaldelivered.com/medline-k1-excel-wheelchair.html

Rules:

  1. The item must be “visible”
  2. The item must reside in the same category as the current item
  3. Don’t display the item from the current product detail page

Results:

  1. All products automatically have cross sells displayed
  2. No need to assign products on the back end
  3. BAD:  Less control over items displayed

This solution won’t work for everyone, if you are an advanced retailer you won’t want to lose this control but if you just want cross sells and don’t have the time/resources to define manually you can try the code below.

Path:  app/design/frontend/default/<template>/catalog/product/list/upsell.phtml

(you may need to create this path – make sure to replace <template> with your template name)


<?php
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE_AFL.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@magentocommerce.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade Magento to newer
* versions in the future. If you wish to customize Magento for your
* needs please refer to http://www.magentocommerce.com for more information.
*
* @category   design_default
* @package    Mage
* @copyright  Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
* @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
* @author        Nick Cron
* @authorweb  www.njcmedia.com
*/
?>
<?php
$_related = $this->getProduct();
// get the parent id to skip
$_parentid = $_related->getId();

if ($_related) {
// get collection of categories this product is associated with
$categories =$_related->getCategoryCollection()
->setPage(1, 1)
->load();

// if the product is associated with any category
if ($categories->count())
foreach ($categories as $_category)
{
$cur_category = Mage::getModel('catalog/category')->load($_category->getId());

?>

<div>
<div><h4><?php echo $this->__('You may also be interested in the following product(s)') ?></h4></div>
<table cellspacing="0" id="upsell-product-table">

<tr>

<?php

$visibility = array(
Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH,
Mage_Catalog_Model_Product_Visibility::VISIBILITY_IN_CATALOG
);

$products = Mage::getResourceModel('catalog/product_collection')
->addCategoryFilter($_category)
->addAttributeToFilter('visibility', $visibility)
->addAttributeToSelect('small_image');

$products->getSelect()->limit(5);

// count the number of displayed products
$_i=0;

foreach ( $products as $productModel )       {
$_related = Mage::getModel('catalog/product')->load($productModel->getId());
$_realtedid = $_related->getId();

// prevents displaying the same product your are already on
if ($_realtedid != $_parentid && $_i<4):

?>

<td>
<p><a href="<?php echo $_related->getProductUrl() ?>"><img src="<?php echo $this->helper('catalog/image')->init($_related, 'small_image')->resize(125) ?>" width="125" height="125" alt="<?php echo $this->htmlEscape($_related->getName()) ?>" /></a></p>
<h5><a href="<?php echo $_related->getProductUrl() ?>"><?php echo $this->htmlEscape($_related->getName()) ?></a></h5>

<?php echo $this->getPriceHtml($_related, true) ?>
<?php echo $this->getReviewsSummaryHtml($_related) ?>
</td>

<?php
// increment displayed products
$_i++;
endif;
}
?>

</tr>

<?php }
}
?>
</table>
<script type="text/javascript">decorateTable('upsell-product-table')</script>
</div>

Room for improvement:

  1. Display items from the back end if exist
  2. Display only items with images
  3. ..?

I hope this helps someone.  If you have any suggestions for improvement or code upgrades/fixes please let me know in the comments.

Magento: Remove auto breaks (“br/”) from product description

April 16th, 2011 Posted by Public 2 comments on “Magento: Remove auto breaks (“br/”) from product description”

By Default Magento automatically adds

 <br/> 

html tags to product descriptions for display on the customer interface.  If you have created a nice description with the WYSIWYG Editor or imported HTML descriptions you most likely want to remove this behavior.   Luckily this is not hard to do.

1.  Find the file “description.phtml” here:  /app/design/frontend/base/default/template/catalog/product/view/description.phtml

2. Make a local copy by copying the file to your local template.  You may need to create the same path in your Magento template (you never want to change core code for upgrade reasons).

New Path: app/design/frontend/default/<template name>/template/catalog/product/view/description.phtml

3.  Remove the “nl2br” tag

Before:


<div>
<?php echo $this->helper('catalog/output')->productAttribute($this->getProduct(), nl2br($this->getProduct()->getDescription()), 'description') ?>
</div>

After:


<div>
<?php echo $this->helper('catalog/output')->productAttribute($this->getProduct(),     $this->getProduct()->getDescription()), 'description' ?>
</div>

4.  Upload the file to your server.

Increase Magic Mouse Speed

April 3rd, 2011 Posted by Public 0 comments on “Increase Magic Mouse Speed”

Here is a simple little fix to increase the speed of your Apple Magic Mouse.  If you are like me you don’t want to move the mouse around alot to get the cursor to the right place.  This is especially true for multi-monitor setups where there is quite a bit of screen space to navigate.

Lucky for us someone has solved this problem with free software for your Mac.   Download MouseZoom X – and you will be off and running.

The program adds a little control under “Other” in your systems settings panel which allows you to increase your magic mouse speed.

Crutchfield Call Center: Customer Redirect Feature

March 17th, 2011 Posted by Public 3 comments on “Crutchfield Call Center: Customer Redirect Feature”

I recently called the Crutchfield (www.crutchfield.com) customer support line at 1-800-319-8264 and had an amazing experience. There are some really interesting things Crutchfield is doing in the their call center, other retailers should take notice.

There were two main features that really impressed me:

1. Indication of the number of call center agents available in real time

2. Web ID value allowing session control from the call center

Real Time Call Center Status

BACKGROUND: I was looking to replace an existing surround sound system with a new receiver with HDMI switching to support some new devices.   I wondered if my existing speakers could be used so I checked the impedance and found they run on 4 ohms but the receiver I was looking at was only stable from 8+ ohms.  I wanted to check into some creative wiring techniques to increase the impedance to 8 ohms so I decided I would give Crutchfield a call.

I noticed in the header of the site the call center number was changing based on my location on the site – I am guessing to send me to the correct department.   The unique aspect was a indication of the number of representatives available to answer my call.  I noticed this number was changing in real time (assuming AJAX) so my expectation was set that an actual human would eventually answer.

When I noticed a few agents were available I called.  I was surprised when after 2 rings an agent answered.  I started by telling them I needed to speak to someone about home audio – I assumed I would be transferred.   Instead the agent said, “What do you need to know”.  I then told him the model of my existing system (I have had it for ~4 years) and he was familiar with it and had all the answers right away.  AWESOME!

Session Control via Web ID

At this point I was impressed with the service and had developed some trust with this agent (he obviously knew what he was talking about).  We had determined that my existing system would need a major overhaul to work as desired so I asked for suggestions on replacing the whole system.  As expected he had lots of suggestions but this is where a feature I have not seen previously came into play.

This is how it went:

Call Center – “I would like to show you an item, can you scroll to the bottom of the page and read me the web id number”

Me – “Sure, let me take a look”

Call Center – “Thanks, now please refresh your page”

Me – “Ok” (wondering what would happen)

After refresh I was on the product detail page for the item he wanted me to see.  WOW!

Why does this matter?

1. The call center agent does not have to read me a SKU and tell me to enter it (lots of room for error)

2. The call center agent is ensured I will be looking at the correct page

3. This method is “idiot proof” – no time telling customers where the search box is, how to search, etc

4. This could be used for multiple purposes – think help pages, checkout, etc

How does it work?

Note: I am guessing here

1. Assign unique session ID for each visitor (most if not all systems do this automatically)

2. Assign Web ID numbers for each active session (display Web ID mapped to session in footer)

3. Allow Call Center agents to enter a next URL for the session by Web ID

4. Control the session via the web/app server and push the redirect URL for the next request

This sounds pretty easy conceptually but would get complicated with a clustered environment and lots of active sessions.

What do you think?  I have a feeling we might see this feature popping up around the web soon.  I might even make a Magento Extension for this session control feature.  Let me know if you would be interested in using this extension.

WordPress 3.1: Show widget content in Thickbox overlay

March 7th, 2011 Posted by Public 1 comment on “WordPress 3.1: Show widget content in Thickbox overlay”

Follow these steps to add thickbox support to your WordPress site and display the contents of a widget in the thickbox overlay.

High Level Process:

  1. Add thickbox support to WordPress theme
  2. Register Custom widget
  3. Reference widget in theme code
  4. Add widget content

Step 1: Add thickbox

There are a number of WordPress plugins for thickbox that should do this for you, however I was unable to get them to work on WordPress 3.1 and not automatically change image behavior.  In this case I want to control when thickbox is used.

1. Get thickbox code at thickbox website http://jquery.com/demo/thickbox/

2. Add reference to js file in header of theme

Path: <root>/wp-content/themes/<your theme>/header.php

Standard


<script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/jquery.js"></script>

<script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/thickbox.js"></script>

Compressed


<script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/jquery.js"></script>

<script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/thickbox-compressed.js"></script>

2.  Create “js” folder and save thickbox.js or thickbox-compressed.js to the folder and upload to your server (also jquery if this does not already exist)

Path: <root>/wp-content/themes/<your theme>/js/

3. Add reference to thickbox.css OR add thickbox styles to your existing style sheet

Step 2: Register Custom Widget

Path: <root>/wp-content/themes/<your theme>/functions.php

Standard


if ( function_exists('register_sidebar') ) {

register_sidebar(array(
'name' => 'Contact Links',

));
}

Step 3. Add link to custom widget with thickbox tags and add custom widget reference:

Path: <root>/wp-content/themes/<your theme>/header.php

NOTE: Could be any page in your theme, in this case the link is in the header of the theme.


<a href="#TB_inline?height=400&width=600&inlineId=contact-links"
title="link title">Link</a>

Path: <root>/wp-content/themes/<your theme>/footer.php

NOTE: Could be any page in your theme, in this case I wanted on all pages but at the bottom of the code for SEO.


<div id="contact-links" style="display:none;">
<div>
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Contact Links') ) : ?>
<?php endif; ?>
</div>
</div>

Step 4. Add widget content in Appearance > Widgets in administration UI

If you added the reference correctly you should see the following:

Add any widget content you wish, in this case a custom text widget was used.

Step 5: Test

Your setup is now complete, upload all new files and test your new thickbox link.  If needed add CSS to style the widget and change the height, width parameters on the link.

Let me know if this works for you or if I can be of assistance.  Also, is there an easier way to do this?  A plugin maybe?

SimpleFolio: Add Custom Menu Support

March 6th, 2011 Posted by Public 12 comments on “SimpleFolio: Add Custom Menu Support”

Adding support for custom menus is simple with WordPress.  Follow the steps described below to add custom support to your SimpleFolio themed site.

1. Add menu support to the theme:

Path: <root>/wp-content/themes/simplefolio/functions.php

Add at the end of the file before closing php  “?>”


add_theme_support( 'menus' );

2. Change header.php and add reference to custom menu

Path: <root>/wp-content/themes/simplefolio/header.php

Line 63


<div id="pagenav">
<ul id="nav">
<?php wp_list_pages('title_li='); ?>
</ul>
</div>

Replace the wp_lis+pages tag with your custom menu reference.


<?php wp_nav_menu( array('menu' => 'Main Navigation' )); ?>

Final:


<div id="pagenav">
<ul id="nav">
<?php wp_nav_menu( array('menu' => 'Main Navigation' )); ?>
</ul>
</div>

In this case the custom menu has the menu name “Main Navigation”.  Look at the WordPress function reference for additional ideas: WordPress Codex Function Reference – wp_nav_menu

3. Create the custom menu in WordPress – http://en.support.wordpress.com/menus/ – name the menu “Main Navigation”

Magento 1.5 Product Import/Export – First Take

February 28th, 2011 Posted by Public 14 comments on “Magento 1.5 Product Import/Export – First Take”

Recently I upgraded from Magento Community 1.4 to 1.5 to take advantage of the next import and export features released in 1.5.  These updates are intended to finally fix the major pain point for many Magento users – it is not easy to import or export products and customers, especially on shared servers or machines with lower resource levels.

I had a specific need to export all of my products, clean the catalog data and import back to Magento.  Here are some things I have found so far.

#1 Menu Location

The new import and export features are in “System > Import/Export > Import” and “System > Import/Export > Export” – the old/legacy profiles have been renamed “Dataflow – profiles” and “Dataflow – Advanced Profiles”

#2 Options

The first screen has two main options “Products” and “Customers” and an option for file type (.csv is the only option)

#3 Products – Detailed Options

Once you select “Products” you have the option to restrict the products included in the .csv file.  This is a much larger list of options than the previous version and nice to see.

(screenshot too large to include)

#4 Run Job

To run the job with the parameters you have specified click the “Continue” button in the lower right to create the file.

Note:  In my case I was trying to export 16,000+ products on a shared server with limited resources (my staging site) and ran into memory errors.  To fix the issue I had to restrict the products exported by setting price ranges in the export and change the ranges until I had a small enough memory usage.

#5 File Created

#5 Resulting File – Columns found in .csv

The following columns were exported:
sku
_store
_attribute_set
_type
_category
_product_websites
color
cost
created_at
custom_design
custom_design_from
custom_design_to
custom_layout_update
description
enable_googlecheckout
gallery
gift_message_available
has_options
image
image_label
is_imported
manufacturer
media_gallery
meta_description
meta_keyword
meta_title
minimal_price
name
news_from_date
news_to_date
options_container
page_layout
price
prices
required_options
short_description
small_image
small_image_label
special_from_date
special_price
special_to_date
status
tax_class_id
thumbnail
thumbnail_label
updated_at
url_key
url_path
visibility
weight
qty
min_qty
use_config_min_qty
is_qty_decimal
backorders
use_config_backorders
min_sale_qty
use_config_min_sale_qty
max_sale_qty
use_config_max_sale_qty
is_in_stock
notify_stock_qty
use_config_notify_stock_qty
manage_stock
use_config_manage_stock
use_config_qty_increments
qty_increments
use_config_enable_qty_increments
enable_qty_increments
_links_related_sku
_links_related_position
_links_crosssell_sku
_links_crosssell_position
_links_upsell_sku
_links_upsell_position
_associated_sku
_associated_default_qty
_associated_position
_tier_price_website
_tier_price_customer_group
_tier_price_qty
_tier_price_price

Note: With my memory restriction I had to create a bunch of these files and manually add them all to a single excel file.

Using this method I was able to export over 16,000 SKUs from a shared server environment in a little over 1 hour.  The export job itself is very much improved from the previous versions and I am happy with the results so far.

Now on to the update and import process, I want to be able to do the following:

  • Change product titles in the export file and import them back to Magento in Bulk
  • Modify the catalog taxonomy and add/change categories by changing in the data file
  • Configure complex products (grouped, configurable, etc) directly in the data file.
  • Reload the updated data feed without experiencing memory issues and failures
  • Reindex the site to pick up the new catalog

I don’t know how many of my wish list items will work… off to begin testing.