How to Add an Amazon aStore to your WordPress Theme
90
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.
Step 1:
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
Step 2:
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.
Step 3:
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.
Step 4:
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!
If you want to see how my new site looks with the new store added to it, Click Here!
PrintShare it! — Rate it: up down flag this hub
Comments
Not a problem dohn, Glad my research can help others. If you have any questions I'd be happy to help.
Good stuff. A little php is very helpful.
How in the world do you get your code formatted so nicely?
Good information on your hub!!!
Thanks!!
Thank you nicomp and alwaysabridesmaid for your comments. I hope you can put this info to good use.
Thanks I'll defiantly do something like this on my site. Although isn't the height="4000" not a bit big? Im not sure if editing that code is against amazons rules but wouldn't it fit better with out specifying the height at all?
Thanks again
Thanks for the comment Fianno, and I'm sure you can manipulate the height number to fit your sites needs. No, it's not against amazons rules to do that either.
I have integrated the free wordpress 'thestars' theme with an astore in an iframe. Working pretty well but need to build the traffic!
Elle. www.kiddingabout.com
Totally awesome tips! Just posted my store on my blog.
Great job Kaffana, glad I could help.
This rocks! IT took me about 5 minutes to get an Astore up and running.
Awesome tips! I had purchased a plugin to do the job. Wish I had known this several months ago. Could have saved me some cash! :)
Thank you so much for making this information available. I've now finally been able to add a cool looking store to my blog.
I wish you all the best with your sites.
Nice clearly laid out set of instructions there that are simple to follow. Good Job! :)
Yes, good idea and good hub. You may want to check out the 'archives' on the right hand side of your articles page, I got an error when navigating to it. It might just be my setup though. Cheers.
This is really simple to do and can really add to the revenue from your website.
Anyone who cannot find the astore setup page (like me) can find it on 4th one along of the blue tabs on the top of your associates home page. I found it best to create your own list from items in amazon and then create the astore from that list. Searching through all the products in astore setup takes a long time.
Hi richard
I was searching for a way to customise my astore layout so that it matches my theme, when i came across this wonderful piece of information and thought it would be better to integrate into the website then to change the a store layout.
God bless you for that.
I did exactly as mentioned above, but my astore opens as a stand alone version in the same page.
Could it be that it is not compatible with the theme or am i missing out on something.
Help would be appreciated.
Thanx once again for sharing the information
vijay
Vijay, are you using your own self hosted Wordpress theme? If so, it sounds as if you skipped step 6 where you add a page and select the amazon store template.
First of all, Thanx for such a quick response.
Yes i did do the step 6 initially, but it did not work out.
But now with a little trial and error it has worked out.
I created the page again and this time first uploaded it with the default template.i checked the page and it was opening within the website.
next i went back and edited the page by choosing the astore template and published again. and this time it did not open as a stand alone page like before.
i dont know why that happened, but with these things i would rather not bother.i just do bit of trial and error till it works out.
thanx once again for the wonderfulllllll information.
May you make millions online:)
vijay
I just cant get this to work? I have done all that you say and all i get is a blank white page? Any ideas?
Gary, you must make sure that you are attempting to add an aStore to a self hosted wordpress theme. I have not tried this on other blog platforms, but it's basically all the same. Save that code as "mystore.php" then upload it to your site wp_content folder on your server via ftp. Once you exit and log into your WP dashboard, navigate to your "appearance-editor" if you see the .php that you just uploaded you should be able to follow the rest of the directions. If you do not see it then you did not upload it properly so try agian.
Hi i see the a Store Page Page Template (myastore.php and i also see myastore.php (myastore.php But it still just shows a blank white page?
Are you sure you used the inline frame code for your aStore?
This is easy to do. I added a simple Amazon store to a kids learning website I work on. Adding products to my store is as easy as shopping on Amazon too.
It drove me crazy when I was first trying to figure it out but then after putting it all together I can't believe how easy it actually is. Thanks for visiting Artemus.
I am really kicking myself for not doing research before setting up my aStore. Before finding this concise and very helpful step-by-step, I had a permalink to my store URL and the formatting looked gimpy. After about 10 minutes, I got my new aStore up and running and hopefully now can sell some hunting and fishing items through Amazon. Thanks for taking the time to put this out there for everyone to benefit from.
This may be a dumb question, but I am using TextEdit on a Mac for step 1, and it won't let me save as a .php file. It keeps on adding .html after the .php. I can't get rid of the .html. BTW, this is just the instructions we were looking for - thank you so much!
Hi Joan, try using Textwrangler or Textmate, they are both free text editors for Mac. Just do a Google for them. Hope it works for you.
I get this when I hit the preview button...
Parse error: syntax error, unexpected T_DNUMBER in /home/simplem3/public_html/justtherightthings/wp-content/themes/amazing-grace/astore.php on line 8
(Textwrangler worked like a charm, thanks)
Hi Joan, look over your code real good and compare it to the code I have on this page. The problem may be because you forgot to add a semi-colon on the end of one of your lines of code “;” That is the most common cause for a syntax error with php.
I'm new to hubpages and thrilled with all the information that you provide for newbies like me. Great work!
Hello, I got the store to work on my site for the most part, but the right side of it gets cut off and shows a white screen. can anyone look at my site and tell me what the problem might be? thanks for your help
I have executed your instructions to the T but my astore is larger than the allowed space within the theme. I can not for the life of me figure out how to fix it. how can I delete the wordpress them side pars just for the stores page?
Thanks for the great step-by-step instructions. I'd been wondering how to do that. Will give it a try. Again, thanks.
Fantastic post! It's helped me get 90% of the way there. However the theme that I'm using, "Swift" has a right hand column that seems to get in the way. It's the same on all pages: http://www.outdoorgearadvisor.com. Any recommendations for how to get the right hand column not to show on my store page?
Thanks! -David
Hi David, double check everything listed again because the page template that I have you create above becomes the page of your aStore. The sidebar elements are removed so when you go to the aStore on your site there should be nothing but the store and the categories you made when building your store on Amazon. I checked out your site but there is no "store" page. Or at least I couldn't find one.
Thanks for the quick response! I had not published the page since I was still having issues with it. Here it is:
http://www.outdoorgearadvisor.com/store/
I also tried this recommendation: http://swiftthemes.com/forum/topic/please-help-my-
but still had an issue with the store only appearing in the left hand column. In the latter case the right hand column was blank.
Thanks again! -David
David, just checking, but when you added the store page did you select the astore template from the dropdown menu on the dashboard? It looks like your footer is now in your sidebar which shouldn't be there if the template "astore" was selected. Sorry its causing trouble, I know how frustrating it was when I first figured it out. I'm not a programmer or coder, I'm a trial and error guy..lol
Best advice if the template was not the problem. Using your ftp, go to your theme and delete the astore.php file you uploaded and also the page you created and start fresh. I know its a pain but you may have missed a step.
1. copy and save the code above (dont change the astore code yet) then upload it to the wp-content--->themes--->Swift sub-folder. Then log out of your ftp client.
2. Log into your theme dashboard and go to the appearance tab and select editor. Find the .php file in the right sidebar that you just uploaded and select it. Paste your astore code that you created at Amazon over the code there and save it.
3. Select the page tab and create a page. Name it and on the right side of the dasboard near the middle there should be a drop down menu for page templates. Select the aStore template then save all changes. Publish the page and that should do it.
The page template which is the code above has no sidebar elements and no frames so if it is uploaded properly it should work. Hope this helps.
Hi Richard, thanks again for all of the tips. I'll try going through the process again later today, and hopefully that will do the trick.
-David
Hi Richard! After more tinkering and reading online I was somehow able to get it to work! Very excited. Thanks for your help. http://www.outdoorgearadvisor.com/store-2/
Cheers,
David
Way to go David, now dont forget when you write your posts to link to items in your store. It helps.
30 hubs in 30 days Hubchallenge
More Hubs in the 30 day hubchallenge
- Political marketing and dirty underwear
New travel solutions are on the horizon, thanks to designer underwear and the war on terror. - 7 hours ago
- Tumor Causes and Treatment
A tumor is any swelling of a body tissue. - 26 hours ago
- 20 Great quotes on cars
The car is a symbol of status for many. - 35 hours ago
- How to Make Party Planning Works
Parties are indeed synonymous to fun and excitement, and help the bonds between relatives and acquaintances even stronger. - 2 days ago
















dohn121 says:
5 months ago
Thanks, livewithrichard. I was contemplating on doing this. Thank goodness you did the suffering for me! I will bookmark this and come back to use it. Thanks again.