Misc Tips Archive

Combine Free Shipping and Reg Items in the same cart

You have a flat rate shipping charge for all items in the contiguous United States but you also want to offer free shipping on select items. The confusion arises when the customer combine free shipping and flat rate shipping items together in the cart – naturally, the whole cart can’t be free shipping! Through the

Block Unwanted Bots, Spiders, Crawlers etc from Magento Site

If you need an all-purpose way to block certain crawlers, bots, scrapers etc from your Magento site, here’s a simple way to get the job done. Backup your .htaccess file and add the folowing lines at the top of the file: Block unwanted Crawler Bots ##### RewriteEngine On RewriteCond %{HTTP_USER_AGENT} ^.*(Baidu|spider|Yandex|robot|crawl|wget).*$ [NC] RewriteCond %{HTTP_USER_AGENT} !^.*(Google|MSN|Yahoo|Bing).*$

Random Image/Text Rotator in CMS Block

Here’s a simple way to add a random image/text rotator in a CMS block – no php or template required – pure javascript! I was looking for a way to add random (or specific) information to our customers as they browse the site. I needed (1) specific system message for things like order delays, system issues

Guest Print Order on Checkout Success

Magento doesn’t allow guests to print their order on the checkout success page for security reasons but there’s a solution that doesn’t require any installation of extensions – simply modify one template. OPTIONAL: Before we start, we’re going to be modifying the checkout success template which can be tricky because you’ve got to create a

Combine Javascript confirm prompt with php code

As a general rule, you can’t combine a javascript confirm prompt with your php code because one is server side and the other is client side. Here’s a work-around that will get you a basic confirm prompt if, for example, you’ve done a database inquiry and you want the user to confirm an update before

Create a Zip file of your active images

Here’s a straight-forward and fast way to backup all your images for active items into a zip file that can be downloaded or ftp’d to another site. Another advantage of this methodology is it will also report on any “broken” images you may have (image doesn’t exist even though it’s defined in the product file)

Multi-Column Responsive All-Brands CMS Page

Here’s a simple method to create a separate CMS page that lists all brands and/or manufacturers (uses the manufacturer attribute). Instead of using the advanced search page (which uses the attribute code instead of name) that doesn’t have a dynamic page title, this method uses the regular search page which displays the manufacturer name in

Add breadcrumbs structured data (rich snippets)

I tried various methods to add structured data to the breadcrumbs and found the method below the easiest to implement and most reliable. Inserting the crumbinfo as part of the label link caused display issues, so the safest implementation was to simply create a separate span section with the breadcrumb data. Open: app/design/frontend/default/YOURTHEME/template/page/html/breadcrumbs.phtml Note: if

Assign or link orders to a customer account

Occasionally  you may have an instance where a customer creates an order(s) as a guest and then later decides to set up an account. You want to link those previous orders to this particular customer. This method will also work if you want to move orders from an old customer id to a new one.

Google Structured Data – Quick and Easy

I was trying to find a simple, quick and easy way to add Google Structured Data (Rich Snippets) to the product pages without modifying tons of templates etc. The method below will get you up and running by adding a block of code at the end of one template – total time to make the change