How to Add an Amazon aStore to your WordPress Theme
Amazon Store for WordPress
To date, I have 8 websites. One is a growing article directory which I made Hubpages and Squidoo easy for fellow authors. One is my business website and the rest are Niche sites using Wordpress themes. None of my sites have stores on them, well that is until now. I’m in the process of creating a new site and decided this would be a good time to try and integrate a store into the site navigation. My only requirement is that the store has to look as if it is part of the website. I don’t want my visitors to navigate away from my site to make any purchases.
Whoever thought it could be so difficult to add an Amazon aStore to a WordPress theme? The fact is, it’s not that difficult at all. That is, if you have the right information. I spent the better part of the day searching online for information on how to do just that. There is plenty of information on how to add an Amazon store or “widget” to a website and there were a few tutorials on how to add them to Wordpress. But I could not find the information I needed to fit my requirements in one place, hence this tutorial.
First Step to Success
In 6 steps, I’m going to explain how to add your own Amazon store to your self hosted WordPress blog. You won't need to know anything about programing to complete this task, however you should at least be familiar with uploading pages using an ftp client.
Copy the code I provided below into an editor like PSPad which is free, or into notepad, and save it as a .php file.
Do not worry about the line that leads to my store right now, you will be changing that in a later step.
<?php get_header(); ?> <?php /* Template Name: a Store Page */; ?> <?php get_header(); ?> <!-- Paste your own code below over the example code I've supplied --> <iframe src="http://astore.amazon.com/howtomakeahor-20" width="100%" height="4000" frameborder="0" scrolling="no"></iframe> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <?php the_content(__('[Read more]'));?> <?php endwhile; else: ?> <p><?php _e('Sorry, no posts matched your criteria.'); ?></p><?php endif; ?> <!-- The main column ends --> <?php get_footer(); ?>
The Rest is Easy
Using your ftp client, upload your new astore.php file into the theme of your WordPress content. Once that is complete, you can close your ftp client and you will not need to go back in for the rest of this procedure.
Log into your Amazon Associate page and select aStore. This is where you will configure the look of your store and decide which products you want to promote. You have a few options, one you can manually choose the products for your store, or you can find a “listmania id” and use the item that are in the list you choose. Personally, I would hand select my items manually.
Once your store is configured the way you want you will be given a choice on how you want your aStore to be displayed. Choose the ‘Inline Frame’ then copy the code that is provided.
Login to your WordPress dashboard and select the theme “Appearance” button, then select “editor.” Now on the right side there will be a list of pages which are part of your chosen theme. Select the Amazon aStore Template (looks something like this: Amazon_astore_template.php) You will know it because you just created and uploaded it.
Step 5: Very important step but I wont mind if you skip it J paste the aStore code that you copied from your Amazon Associate page over the default code that is there. The code that is there will lead to my store. Once your new code is pasted over the default code, update the page with the button below the editor.
Step 6: Navigate back to your WordPress dashboard and select “Page,” then “add new.” Name this page Store or Shop or whatever you like. Down below and to the right there should be a place to select a page template. Use the drop down menu and select “Amazon Store.” Now publish that page.
You Are Done
And that is all there is to it. You will now have on your WordPress theme, a fully integrated Amazon aStore that has the same look and feel of the rest of your website. Now go earn some money!
UPDATE 1/21/2010: THE CODE ABOVE WAS MISSING A SEMI-COLON ON LINE 7 WHICH WAS CAUSING A SYNTAX ERROR. IT HAS NOW BEEN RESOLVED AND THE CODE ABOVE UPDATED. IF YOU HAVE HAD SYNTAX ERRORS WHEN TRYING TO INTEGRATE YOU aSTORE THEN YOU MIGHT WANT TO TRY THIS AGAIN WITH THE UPDATED CODE. SORRY FOR THE TROUBLES.
More by this Author
Here is a list of the 10 hottest cartoon girls as they are recreated with Fan Art. Fan Art is an exciting way to see your favorite cartoon characters in a new perspective.
Charleston, South Carolina is one of those cities where you need at least a few days to sample what this gem has to offer. Enjoy these things to do in Charleston, SC
Here are 5 of the most haunted places in America, but not in any order of haunting significance. So, if you ever want to put on your ghost hunting caps and have an adventure, have at it.