Using the Sitemap file to improve SEO

by Joe Payne 24. February 2008 00:18

Introduction
I am by no means an authority on SEO optimization. I just learned .Net a year ago and Solunar.com is my first online storefront experience.
What I do know is my experiences in taking advantage of the SiteMap feature included in AC7.
The purpose of this document is to detail my experiences, the steps taken and the bumps in the road along the way.

What is SiteMap?
The three largest search engines came together several years ago and agreed on a standard for bulk site URL submission. You can easily submit a single domain name to any search engine, but getting all 12,000 products in your store submitted as SEO-friendly URLs is a different story.

This standard resulted in the definition of what is known today as the "Sitemap.xml" file format. The format specifies the fields necessary to submit any number of URLS to the search engine for indexing.

Why should I care?
Well, you can't really grow a business if nobody knows it's there. Getting into search engines is the single most important step with an online store. Plus you'd like your business growth to be more than one more order this week than last week.
Using a sitemap file also reduces webmaster effort to maintain search engine presence. And it reduces unnecessary spider/crawler traffic on your site.
Whatever the reason, the benefit of getting into the search engines quickly and accurately is significant. Sales pick up quicker, loss-to-profit timetables accelerate and your customer base grows sooner and at a faster pace.

Where to Start
First you need your products set up in your store. It's not going to do alot of good to tell everyone you're open for business if your shelves are empty. Get your images, descriptions and prices all the way you want before proceeding any further.
Once you feel you're ready, login into your site Admin and click the Website, XML Site Map option.

Don't change anything. Let's not get fancy at all right now. Especially don't change the sitemap.xml file name. That's part of the standard and if you mess with it, you might not be successful in getting your sitemap file read by the search engine provider.
At the bottom of the page, set the dropdown menu to "Create Sitemap" and click the blue arrow. Don't click save settings, that's not going to do the task - that only saves the screen changes I just got done telling you not to make.

When it's done, you'll get a confirmation at the top. The sitemap.xml file is created in the root of your site. Check it out if you want, but don't change it.

Autodiscovery
In the Spring of 2007, the 3 big players (and a few smaller ones) in the search engine provider industry enhanced the sitemap standard by implementing a uniform way to upload your file. it's really incredibly simple: Just send them a URL with a parameter for the URL to your sitemap file.

For example, to tell Ask.com to come get your sitemap file and process it, just enter this URL in your browser:

Code:
http://submissions.ask.com/ping?sitemap=http://www.example.com/sitemap.xml


Or Google.com

Code:
www.google.com/webmasters/tools/ping?sitemap=http://www.example.com/sitemap.xml


Other major search engines should support this same format but check if you aren't sure it worked. You should receive a confirmation page from the search provider indicating the request was received.

How Often?
Well, that's the million dollar question. Nobody really knows for sure. I do mine about once a month, or whenever the mood hits me. I doubt doing it every day is going to help your cause, so you should probably limit it to when you have truly meaniful changes to be uploaded.

Spider autodiscovery
You can also tell any spiders that crawl your site to read your sitemap.xml file. Just add this line to your robots.txt file in the root of your store:

Code:
Sitemap: http://www.example.com/sitemap.xml



Advanced stuff with Google
Google.com has some amazing site tools for webmasters. Just go to Google.com and search for "Google Webmaster Tools". Sign up for it. It's free, it's awesome and you really should check it out. It's worth it, trust me.
One important part of the webmaster tools is "Google Feed" which lists all of your store products into the Google Product Search.
And yes, this just happens to also be where you'll upload the file produced by the AC7 Marketing, Feeds, Google Base Feed menu option. And it's still free because it's beta. But don't let the word "beta" scare you away, I am getting ALOT of orders from Google Products Search.

More Information
There are quite a few great articles on sitemap implementation. Try
http://www.sitemap.orgor search any search engine provider for "sitemap information".

Conclusion
Making yourself known to the internet is the most difficult and most rewarding step in running an online store. AC7 has made this much easier for the site admin by supporting the SiteMap standard. Combined with other forms of online presence development, your site awareness is sure to grow as will your business.

Tags: , ,

AC7 Articles

Enlarge the order history notes field

by Joe Payne 19. February 2008 00:26

Introduction
Maintaining an audit trail of effort and activity as it pertains to an order is important. AC7 gives you that ability using the History and Notes feature on the Order Details screen.
But adding notes to an order, either for yourself or the customer can be a pain because the box is too small. This modification enlarges the size to be far more convenient for the site admin.

File to change
We only have to change one line in one file, so this one is fast and easy. Make a backup of your ~/Admin/Orders/OrderHistory.aspx file before you begin.

Now edit that file and look for this line in the code:

Code:
                    <asp:TextBox ID="AddComment" runat="server" TextMode="MultiLine" Rows="4" Columns="50"></asp:TextBox><br />


Replace the line with this one:

Code:
                    <asp:TextBox ID="AddComment" runat="server" TextMode="MultiLine" Rows="8" Columns="150"></asp:TextBox><br />


Save it.

What just happened
All you've done is change the Rows value and Columns value for the control. I chose 8 and 150 as they give plenty of room and don't affect screen layout. At least on my admin screen anyways.
Feel free to experience with other values to suit your personal tastes.

Conclusion
When order volume reaches a certain level, you'll find you have become quite dependend on History and Notes. It gives you a fast and easy way to see exactly where you with the order within the business process. Now you can more easily add notes and customer communications.

Tags: , ,

AC7 Articles

Add a Delete feature to the Admin Order Summary

by Joe Payne 19. February 2008 00:21
Advisory
Please use extreme caution when using this modification. It is unforgiving. Make a mistake and you're restoring your database. There is no "Undo". Seriously. There is also no "Are you sure?" when using this modification. Real site admins don't need it (plus I don't know how to add one) 

Introduction
There are many times where I have found the need to delete an order. It usually involves my own testing or an unusual payment processing failure.
When an order gets messed up, the customer usually places another order, if they even know there was a problem. Usually this results in 3-4 bad orders on the Admin side. there's no way to delete them, so you're forced to sort "around" them as you work to process your business. It also forces the customer to live with a really confusing order history.

This modification allows the Admin to delete a single or group of orders right from Admin screen using the "Update Selected Orders" feature.

How it works
This modification uses the same concept already built into the Update Selected Orders dropdown. Just click the checkboxes for the orders to delete, select the "Delete" dropdown option and click Go.

Modifications
First make a backup copy of your ~/Admin/Orders/default.aspx and default.aspx.cs files. These are the files we will be changing in this modification.

Edit ~/Admin/orders/Default.aspx file and look for the start of the dropdown list control - here is some of this code:
Code:
                                <asp:DropDownList ID="BatchAction" runat="server">
                                    <asp:ListItem Text=""></asp:ListItem>
                                    <asp:ListItem Text="Process Payment" Value="PAY"></asp:ListItem>
                                    <asp:ListItem Text="Mark Shipped" Value="SHIP"></asp:ListItem>
                                    <asp:ListItem Text="Mark Shipped with Options" Value="SHIPOPT"></asp:ListItem>
                                    <asp:ListItem Text="Cancel" Value="CANCEL"></asp:ListItem>
                                    <asp:ListItem Text="-----------"></asp:ListItem>


Directly below the first "------------" ListItem entry you see, add this code:

Code:
                                    <asp:ListItem Text="* DELETE *" Value="DELETE"></asp:ListItem>
                                    <asp:ListItem Text="-----------"></asp:ListItem>


Save it.

Now edit the ~/Admin/Orders/Default.aspx.cs file. Find the code located in the BatchButton_Click function that looks like this:

Code:
                    case "SHIPOPT":
                        Response.Redirect("Batch/Ship.aspx?orders=" + GetOrderList(orderIds));
                        break;


We need to Insert another CASE section of code like this directly below the "break;" line. So add the following code as described:

Code:
                    case "DELETE":
                        int DelCount = 0;
                        foreach (int orderId in orderIds)
                        {
                            Order order = OrderDataSource.Load(orderId);
                            if (order != null)
                            {
                                order.Delete();
                                messages.Add("Order #" + order.OrderId + " deleted.");
                                DelCount++;
                            }
                        }
                        messages.Add(DelCount + " orders deleted.");
                        break;



Save it.

Testing
It's critical you test this in your development environment first. There is no "Undo" feature - once an order is deleted, it's gone. Note how you can delete one order at a time, or delete multiple orders in a single command. Test both scenarios and confirm the properly selected orders were removed and no others.

Cascade Deletes
Deleting an order cascades through the other files automatically. Payment records, notes and history, shipments etc will also be automatically deleted. There should be no trace of the order left when the command is finished.

Conclusion
Order management is a key point in the business process where mistakes can be made. Clearing out unwanted orders helps the admin keep a clean running store with less potential for errors. It also gives the customer a good looking order history to review their purchases.

Tags: , ,

AC7 Articles

Add an Edit Basket Button on the Admin screen

by Joe Payne 13. February 2008 00:05

Introduction
The purpose of this modification is to give you, the esteemed site admin, the ability to edit the shopping basket of a registered user. Why? Well, I don't really know. But I found a page written to do it and it looks really cool. You want to be a cool site admin, don't you?

Actually it makes a really nice impression with the customer when they are on the phone trying to order something. By handling their basket for them, you encourage them to continue their online experience. This motivates an online checkout instead of the dreaded "Can't I just pay you over the phone" response. It also quite possibly saves the sale.

But I can already do this
Yes, you can create a new order for a customer from the Admin screen. But you cannot edit their existing basket. This can potentially lead to confusion because the customer now has basket items for items they also just ordered. Customers are easily confused, so keeping things simple and painless encourages a return visit.

Gimme
The changes are actually very easy. First make a backup copy of the ~/Admin/People/Users/CurrentBasketDialog.ascx user control.

Now edit the file. Look for this line of code in the Page_Load section near the beginning:

Code:
EditBasketLink.NavigateUrl += _UserId;



Add another line directly below it that looks like this:

Code:
EditBasketLink0.NavigateUrl += _UserId;



So now you should have this:

Code:

EditBasketLink.NavigateUrl += _UserId;
EditBasketLink0.NavigateUrl += _UserId;



Now we need to edit the HTML part of the page, so scroll all the way to the bottom of the file. Find this line:

Code:
        <asp:HyperLink ID="EditBasketLink" runat="server" NavigateUrl="~/Admin/Orders/PlaceOrder1.aspx?UserId=" SkinID="Button" Text="Create Order"></asp:HyperLink>



Replace that line with this exact code:

Code:
        <asp:HyperLink ID="EditBasketLink" runat="server" NavigateUrl="~/Admin/Orders/PlaceOrder1.aspx?UserId=" SkinID="Button" Text="Create Order"></asp:HyperLink>
    &nbsp;&nbsp;&nbsp;&nbsp;
        <asp:HyperLink ID="EditBasketLink0" runat="server" NavigateUrl="~/Admin/People/Users/EditBasket.aspx?UserId=" SkinID="Button" Text="Edit Basket"></asp:HyperLink>



Now save the file. Done!

Testing the changes
Ok, now the fun part. Let's make sure we haven't blown something (else) up. Log into your site and go to the store side. Add some items to your cart. Don't check out.
Click back to the Admin side and log in to the Admin side with the same account you just used to add basket items. Click on the People menu and choose Users.

Find the user account you used and click Edit. Scroll down on the Edit User page and you'll see the current basket contents, a Create Order button and....holy new buttons Batman! There is your new spiffy Edit Basket button. Click it.

Editing a basket
take a look at the edit basket screen. First, you'll notice there's no "Delete item" button. You don't need it. Just set a particular basket item to "0" quantity and hit the Recalculate button at the bottom. The item is then removed.
You can add new items to the basket with the Add Product button, and (insert that 2001 space movie theme) it even allows searching by SKU - how cool is that?!

Conclusion
Anything that improves the customer service experience is a good thing. Customers like instant gratification when it comes to their shopping experience. This modification puts one more tool in your belt when it comes to helping convert site visitors into store customers.

Tags: , ,

AC7 Articles

Show the product image for the selected variant

by Joe Payne 12. February 2008 00:25
Introduction
When a product is added to the basket, an image is displayed along with the item details. However, adding a variant option does not display the variants image, it displays the main product image. This can be confusing to customers who ordered a Red shirt and the basket shows them the green shirt. This modification forces the MiniBasket and Basket pages to show the variant image.

This modification assumes AC7 RC2.

Requirements
For these modifications to work, you must always have your swatch variant as the first set of choices. Any number of choice sets are allowed, but the first set must be the swatches. For non-swatch variants or if the first choice set does not contain an image URL, the main product image will always be displayed.
The code uses the "Thumbnail" URL from the variant choices setup page to display the swatch in the minibasket. What this means is you are going to have to use icon-sized swatches. There's no swatch field for icon, so put your icon URL in the thumbnail swatch field. This is because the minibasket doesn't like images that aren't "mini", hence the name.

File Changes

First, make a back up of your ~/ConLib/ folder.

Edit your ~/ConLib/Minibasket.ascx.cs and replace the entire GetIconUrl function with this code:

Code:
    protected string GetIconUrl(Object obj)
    {
        BasketItem bitem = obj as BasketItem;
        if (bitem != null)
        {
            //We've got a valid basket item.  Now let's see if we should show the product image
            //or the variant image.
            if (bitem.ProductVariantId != 0)
            {
                //Variant detected.  Load the first option that has an image URL and return it
                OptionChoice _TVar = OptionChoiceDataSource.Load(bitem.ProductVariant.Option1);
                if (!string.IsNullOrEmpty(_TVar.ThumbnailUrl))
                {
                    return _TVar.ThumbnailUrl;
                }
                else if (!string.IsNullOrEmpty(_TVar.ImageUrl))
                {
                    return _TVar.ImageUrl;
                }
                else
                {
                    return bitem.Product.ImageUrl;
                }


            }
            else
            {
                if (!string.IsNullOrEmpty(bitem.Product.IconUrl))
                {
                    return bitem.Product.IconUrl;
                }
                else if (!string.IsNullOrEmpty(bitem.Product.ThumbnailUrl))
                {
                    return bitem.Product.ThumbnailUrl;
                }
                else
                {
                    return bitem.Product.ImageUrl;
                }
            }
        }
        return "";
    }


Next, add this line to the top of the file:
using CommerceBuilder.Products;

Save it.

Now edit your ~/ConLib/Basket.ascx.cs file and replace the entire ShowProductImagePanel function with this code:

Code:

    protected bool ShowProductImagePanel(object dataItem)
    {
        BasketItem item = (BasketItem)dataItem;
        return ((item.OrderItemType == OrderItemType.Product) && (!string.IsNullOrEmpty(item.Product.ThumbnailUrl)));
    }

    protected String ProductImage(object dataItem)
    {
        BasketItem item = (BasketItem)dataItem;
        if (item.ProductVariantId != 0)
        {
            // Basket item has variants.  If the first variant choice has an image URL,
            // use it instead of the regular product image.
            OptionChoice _Tvar = OptionChoiceDataSource.Load(item.ProductVariant.Option1);
            if (_Tvar.ThumbnailUrl != "")
            {
                return _Tvar.ThumbnailUrl;
            }
            else
            {
                return item.Product.ThumbnailUrl;
            }
       
        }
        else
        {
            return item.Product.ThumbnailUrl;
        }
    }


Save it.

Finally, edit the ~/ConLib/Basket.ascx file and find this line:
Code:
<asp:Image ID="Thumbnail" runat="server" AlternateText='<%# Eval("Product.Name") %>' ImageUrl='<%#Eval("Product.ThumbnailURL")%>' EnableViewState="false" />


and replace it with this line:

Code:
<asp:Image ID="Thumbnail" runat="server" AlternateText='<%# Eval("Product.Name") %>' ImageUrl='<%#ProductImage(Container.DataItem)%>' EnableViewState="false" />


Save it.

What Just Happened
What you've done is modified the minibasket and basket pages to test to the items in the basket. If the item has a variant, the page will look up the selected variant and retrieve the image specified. If the first set of variant choices does not have an image URL, the product image is used instead.

Conclusion
I am still extensively testing this modification. Please do the same yourself and report any issues here. I will make the necessary changes to the post if any problems arise. Now, if anyone has any hand sanitizer, I'd really like to get this C-Sharp off my hands and get back to my VB programming

 

 

Tags: , ,

AC7 Articles

Month List