Adding an aStore to WordPress

September 8, 2009
By Frank

Amazon.com’s Affiliate program offers an easy to use storefront called an “aStore”. The store builder includes plenty of options to configure the colors and choose the products to include, by category or by individual ASIN numbers. But the problem has been incorporating the aStore into a WordPress site while maintaining the same look and feel.

Typically, the webmaster puts the aStore on a separate page and the reader knows they have “left” the well-thought out design of the website. Navigation between the aStore and the rest of the site can suffer. There is a better way, and it takes just a little effort.

WordPress includes the ability to have different templates within the same theme. The solution to the aStore integration problem is to simply create a new template that borrows the header and footer from your main WordPress theme, but doesn’t add the sidebars (the aStore automatically includes its own sidebars). Embed the aStore “inline” code into the new template and publish an empty page using that template.

Here’s a pic of an example “aStore” template. Create this in a plain text or HTML editor. You need to get the code for displaying your store “inline” when you build your store and replace the dummy code shown in the code below.

Code for an aStore Template

Code for an aStore Template

Upload the file to your theme’s folder. Then reload the Admin section of WordPress and click “Editor” under “Appearance”. You should see this “aStore Template” file listed among the theme files. If its not there, you may have uploaded it to the wrong folder.

Now create a page in WordPress and call it “Store”. Don’t put anything in the editor box, but look at the right column under “Attributes”. You should see a notice that you can choose a template for the page to use. Select your new “aStore” template and publish the page.

Page attributes allow you to select the aStore template

Page attributes allow you to select the aStore template

The resulting store incorporates the header and footer of the theme. If you have configured the aStore to match the colors in your theme, it looks well integrated. An example created for my customer at AuroraWolf.com is here.

This is a relatively simple way to incorporate content that ordinarily won’t integrate very well. Once again, the power of WordPress comes to the rescue.

Tags: , ,

blog comments powered by Disqus

Search