Magento Order Comments

May 17, 2013

order-comments-magentoAdding order comments to the checkout process in your Magento store is quite useful. This functionality can be used to allow customers to provide specific instructions for their order or to collect information from them, for example, asking customers how they heard about your company, which can yield valuable data and marketing ideas.

This guide will detail how to install the Magemaven OrderComments extension as well as configure it for specific purposes.

1) The first step is to install the OrderComments extension via Magento connect. Go to the extension’s listing in the Magento Marketplace and click the install button. Once you have the extension key, open your Magento Connect Manager via the admin panel (System > Magento Connect > Magento Connect Manager) and install the extension.

Typically, this extension works out of the box, but with some custom themes that don’t support all of Magento’s features it is sometimes necessary to update your layout file(s). To do this, locate checkout.xml under app/design/frontend/your_package/your_theme/layout. Open the file and look for the block type checkout/onepage_review_info. Ensure that it contains the following code near the end:

<block type="checkout/agreements" name="checkout.onepage.agreements" as="agreements" template="checkout/onepage/agreements.phtml"/>

If you don’t see it the above code in your layout file, please add it just before the block named checkout.onepage.review.button. Once added, the extension will work with your custom theme.

Customers will now be provided with a text box labled “Order Comment” into which they can enter their comments. To see order comments in the Magento admin, go to Sales > Orders. Order comments will be listed in the far right column.

2) If you would like to change the default “Order Comment” label on the text box to read differently, such as changing it to “How did you hear about us?”, open app/design/frontend/your_package/your_theme/template/ordercomment/checkout/ and edit the agreements.phtml. Around line 21, locate the following code:

<label for="ordercomment-comment"><?php echo Mage::helper('ordercomment')->__('Order Comment') ?></label>

Change 'Order Comment' to 'How did you hear about us?' (or whatever else you would like to label the box) and save the file.

Voila, now you have a custom order comment box for your customers. We hope you found this tutorial helpful. If you are interested in jobs in the IT and telecommunications fields, please visit jobandtalent.

{ 0 comments }

Magento LogoThe ability to change the number of columns in the product grid on Magento category pages from the default of 3 columns is very useful. It allows the display of more products per row and is very useful when developing custom Magento themes.

To change the number of columns on the Magento product grid, edit your catalog.xml layout file (remember to edit the layout file in your current theme or the changes won’t show) and use action name="setColumnCount" to set the number of columns. A guide for changing the number of columns to 4 is below:

Step 1
Open your catalog.xml file and locate the two instances of

<action method="addColumnCountLayoutDepend"><layout>empty</layout><count>6</count></action>

Step 2
Add the following code above the two instances of the code from Step 1.

<action method="setColumnCount"><columns>4</columns></action>

Giving you

<action method="setColumnCount"><columns>4</columns></action>
<action method="addColumnCountLayoutDepend"><layout>empty</layout><count>6</count></action>

Step 3
Flush the cache and your product category grid layout should update to 4 columns across.

Note
Remember to also update your catalogsearch.xml layout file in the same manner as described above if you want the number of columns in the search results grid to match the category pages.

{ 0 comments }

Broken captions aren't fun for anyone.  We detail how to fix caption issues.

Broken captions aren't fun for anyone. We detail how to fix caption issues.

If you are experiencing issues with your WordPress caption text not showing properly and the images themselves not aligning correctly, then you know how annoying this problem can be.  A good caption always complements a picture or graphic and helps draw readers into the actual article or post.  Not being able to utilize such a useful tool effectively is quite frustrating.  

The root cause of this issue has to do with a deliberate change made in WordPress version 3.4. Instead of caption="" being an attribute of the [caption] shortcode, WordPress 3.4+ inserts the caption in the main content of the shortcode, right after the image and between [caption] and [/caption]. This change was made to allow for HTML in captions. In older versions of certain themes, such as Thesis and Headway, this change has resulted in improperly formatted captions and aligned images because of the themes are not using the appropriate 'img_caption_shortcode' filter.

The long term solution to the issue is to upgrade your theme to the latest version; however, since theme upgrades can be a time-intensive process, we have detailed a quick and easy temporary fix below.

Step #1
Locate the caption code in the appropriate post or page and change:

[caption id="attachment_123" align="aligncenter" width="550"]<img src="...">My Caption[/caption]

to

[caption id="attachment_123" align="aligncenter" width="550" caption="My Caption"]<img src="...">[/caption]

by editing to include the caption text within the [caption] shortcode instead of after the html for the image.

Step #2
Now refresh the page. Your image and caption should now be displayed correctly.

More from the WordPress Development Team (via the community forum):

This change in 3.4 was necessary to allow for HTML in captions. But, like everything we develop, it was deliberately coded so it would be backwards compatible. Any theme using the 'img_caption_shortcode' filter to override how a caption is generated would work swimmingly, even though the format changed.

If I had to guess, the common issue for all for these themes is that they call add_shortcode( 'caption', 'some_function_in_their_theme' ); to customize the caption, instead of using the aforementioned filter. This is wrong. Themes should not be doing this. If the theme you are using does this, please contact the theme author. If they disagree it is a problem with their theme, I’d be happy to explain it to them.

{ 0 comments }

Why Aren’t Small Businesses Taking Advantage of Local Listings?

May 7, 2013

As the use of smartphones and mobile search has increased rapidly over recent years, local search has grown by leaps and bounds as well.  With the increasing prevalence of local search, the value of accurate, up-to-date listings on sites like Yelp, Foursquare, Tripadvisor, and Yellow Pages has never been higher.  These listings often typically rank well [...]

Read the full article →

YouTube to Introduce Subscription Option

May 7, 2013

The New York Times reports that YouTube is planning to announce a subscription option for some of its content this week. Select partners will be able to charge a monthly subscription to users who wish to view their channels. While the vast majority of YouTube videos will remain free, the plan is seen as a [...]

Read the full article →

Upgrade Magento 1.4.2.0 to 1.5.1.0

May 3, 2013

Upgrading Magento is quite the undertaking. Finding a clear set of steps to follow, let alone actually performing the upgrade, can be a substantial challenge, so we’ve put together a detailed guide for upgrading from Magento Community Edition 1.4.2.0 to 1.5.1.0. It is tempting to try and upgrade directly from 1.4.2.0 to the latest stable [...]

Read the full article →

Upgrade Magento 1.5.1.0 to 1.7.0.2 with Magento Connect

May 3, 2013

Using Magento Connect when possible makes the Magento upgrade process a lot faster and easier. Errors can still occur however, so we recommend setting up a development store on which to run the upgrade. This way it is easy to upgrade and troubleshoot any errors that may crop up without impacting your live site. Please [...]

Read the full article →

Updating 301 Redirects in Magento Admin via URL Rewrite Management

March 11, 2013

Properly managing 301 and 302 redirects is key for any online store. Over time category and product names may change or be discontinued and promotional pages may become outdated and be removed. It is likely that there are a number of backlinks across the internet and the website itself to any URL that is updated [...]

Read the full article →

Magento – Restrict Shipping to Lower 48 States Using Region Manager Extension

November 19, 2012

Magento gives users the ability to restrict shipping to certain countries under specific shipping methods. However, the is no native functionality for restricting shipping to certain states within countries. Fortunately, there is a Magento Extension that can be configured to restrict shipping to certain states or provinces. This solution works for all shipping methods (UPS, [...]

Read the full article →

Magento Zip+4 Tax Calculation During Checkout – Solution Restrict Length to 5 Digits

November 14, 2012

Problem There is a bug in Magento that prevents Zip+4 tax codes from accurately being calculated. If a customer enters their zip code during Magento checkout in the Zip+4 format (XXXXX-XXXX) or makes a typo during entry, i.e. includes an extra or non-digit character, any applicable taxes are not calculated by Magento. This causes headaches [...]

Read the full article →