Book Image

Magento 1.3 Sales Tactics Cookbook

Book Image

Magento 1.3 Sales Tactics Cookbook

Overview of this book

Magento is a feature-rich, professional open source e-commerce solution that offers users complete flexibility and control over the look, content, and functionality of their online store. Although Magento provides users with the power to create dynamic e-commerce sites, it can be challenging to get beyond the basics and create sites that are tailored to your unique business needs.This book gives you a hands-on experience on Magento, helping you increase your revenue by implementing proven sales tactics on your Magento site.This book contains techniques to help you with each stage of selling to your customers: attracting visitors, driving them to your product pages, making the sale, increasing sales, engaging your customers, and more. It contains a powerful mix of techniques for increasing sales in your online storefront. Over thirty of the techniques are short and stand alone. A few are designed to be used together, such as the seven techniques in the chapter on creating an international storefront. Some techniques make creative use of Magento’s standard features. A few techniques combine Magento with other tools, such as social networking sites. All the techniques are explained in clear, step-by-step directions, with many screenshots. The book uses an example site for each technique, so that you can see exactly how it will affect your storefront. You can jump into the book at any point, or, work through it from beginning to end.
Table of Contents (15 chapters)
Magento 1.3 Sales Tactics Cookbook
Credits
About the Author
About the Reviewer
Preface

Configuring Magento to automatically refresh the site map


After you set this up, you do not need to manually create the site map. Magento will create it whenever you want.

Getting ready

Before you can complete this task, you must have FTP access to your Magento site, that is, you must be able to upload, delete, and edit files in your Magento site.

You must also be able to create cron jobs on your web server. Most hosting services enable you to create cron jobs. You should check the help files for your host, and ensure that you understand how to create a cron job.

Many hosting services offer the cPanel application for managing your files on the host. If your hosting service offers cPanel, then you might find this documentation helpful:

  • The cPanel file manager:

    http://twiki.cpanel.net/twiki/bin/view/AllDocumentation/CpanelDocs/FileManager
    
  • Creating a cron job in cPanel:

    http://twiki.cpanel.net/twiki/bin/view/AllDocumentation/CpanelDocs/CronJobs
    

How to do it...

Let's begin with creating the site map:

  1. 1. Log in to your site's backend or Administrative Panel.

  2. 2. Select Catalog | Google Sitemap.

Note

Although it's called a "Google Sitemap", the major search engines use the same protocol. So this site map will work for all of them.

  1. 3. Click on the Add Sitemap button. The New Sitemap page displays.

  2. 4. In the Filename field, enter a name for the site map.

  3. 5. In the Path field, enter the directory on your Magento server where you want the site map. To place it in the root (home) directory of your site, enter a slash like this: /

  4. 6. Click on the Save & Generate button, and the new site map is generated.

  5. 7. You can see a URL in the Link for Google column. Either copy and paste this URL into a document so that it can easily retrieve it, or minimize this window without closing it. Later, you will want to copy and paste this link.

Pointing search engine crawlers to the site map:

  1. 1. Launch your FTP client, and navigate to the root directory of your Magento site:

    In our example, you can see the two fi les that we will deal with in the root directory: robots.txt and sitemap.xml.

  1. 2. Open the file robots.txt for editing. Exactly how you do this depends upon which FTP client you are using. If you are using WinSCP, as shown here, then you can just double-click on the file, and it will open for editing:

  1. 3. The file might already have some text in it. That's okay. Add this line to the file:

    Sitemap: http://www.yourdomain.com/sitemap.xml

    where:

    www.yourdomain.com is your domain. In our example, it's www.brew-me-a-cup.com.

    /sitemap.xml is the path and filename for the site map. In our example, the site map is in the root directory. If we put Magento in a subdirectory, it might look like this: www.brew-me-a-cup.com/magento/sitemap.xml.

  2. 4. Save the file.

Configuring Magento to periodically refresh the site map:

  1. 1. Log in to your site's backend or Administrative Panel.

  2. 2. Select System | Configuration | Google Sitemap.

  3. 3. Under Categories Options, Products Options, and CMS Pages Options, you will see a drop-down list labeled Frequency. This drop-down list answers the question, "How often do you update this kind of page in your store?"

    For example, if you add or edit products every day, then for Products Options, select a Frequency of Daily. If you add or edit category landing pages every week, then for Categories Options, select a Frequency of Weekly.

  4. 4. For Categories Options, Products Options, and CMS Pages Options, select the correct Frequency for your site.

  5. 5. Under Categories Options, Products Options, and CMS Pages Options, you will see a drop-down list labelled Priority. This drop-down list answers the question, "What is the relative importance of this kind of page?"

  6. 6. For example, if product pages are four times as important as category landing pages, then for Products Options, enter a Priority of 1.0, and for Categories Options, enter a Priority of 0.25.

  7. 7. For Categories Options, Products Options, and CMS Pages Options, enter the correct Priority for your site.

  8. 8. Under Generation Settings, select Yes. This turns on the feature. Magento will not generate the site map until you enable this.

  9. 9. Under Start Time, select the time you want the site map to be generated. On or after this time, Magento will generate your site map.

    For example, suppose you enter 2:30am here and your cron job is set to run every hour. When your cron job runs at 2:00am, it will not cause Magento to generate the site map. When the cron job runs again at 3:00am because the time for generating the site map has passed, Magento will generate the site map.

  10. 10. Under Frequency, select how often you want Magento to generate a site map. This can be Daily, Weekly, or Monthly. There is no point in generating a site map more often than once a day because a web crawler will almost certainly not visit your site any more often than that.

  11. 11. Under Error Email Recipient, enter the email address to which you want Magento to send errors. Magento will notify this email address if it encounters errors while trying to generate the sitemap.

  12. 12. The Error Email Sender is the email address from which the error email will appear to come. These email addresses are set up under Store Email Addresses on the same page.

  13. 13. The Error Email Template is the template that Magento will use when sending the error email. You can leave this at the default selection or create a new template under System | Transactional Emails.

  14. 14. Click on the Save button.

Setting up the Magento cron job:

On your web host, you must create a cron job. The cron job will tell the Magento script cron.php to execute a number of functions. Among those functions will be generating a new site map.

Note

Magento's cron.php is not the cron job. The cron job is script that you create on your web hosting service. The cron job, in turn, tells cron.php to run. The cron.php file then activates many functions, including generating a site map.

The method for creating a cron job will vary from host to host. In all cases, you want the cron job to run the file cron.php, found in Magento's home directory.

You should configure the cron job to run at least as often as you want the site map generated, that is, if you want a new site map generated daily, you should configure the cron job to run at least every day.

How it works...

Under Catalog | Google Sitemap, you told Magento what to call the site map and where to store it. In robots.txt, you told search engine crawlers where to find the site map.

Then, under System | Configuration | Google Sitemap, you told Magento how often to refresh the site map. You also chose some settings for the site map. These settings tell the search engine crawlers how often to check back for updated pages and the relative importance of different types of pages.

Finally, you created a cron job on your hosting service that runs cron.php at set times (every week, day, hour, and so on). The cron job runs cron.php, and cron.php tells Magento to refresh the site map.