A website. With stuff on it.
October 15th, 2007 at 12:56 pm
Posted By: Jay
Posted in: Rambling

In my previous post, I talked about my wish list for a WordPress plugin that would display contextual embedded Amazon aStore chunk to follow posts and pages.

Let me tell you how I’m currently implementing the category specific (kinda!) aStore into WordPress without a plugin – at least, for pages, which is adequate for my needs at the moment. It’s a bit of a manual process, but it works. So if you wanted to implement it, you already can. You could also do this for other templates, such as ‘single posts’, but you would need to add it to your original single post template, and wouldn’t have the same customisation options since you can’t select a per post template, so it’s very much an all or nothing affair without the as yet fictional plugin.

As I said previously, I chunked up my aStore itself into categories containing 3-6 related products so that I’m not bombarding the viewer with a dozen products in a huge long scrolling page.

I made a copy of my ‘page’ template, and obviously renamed it. After the loop, which probably ends in

<?php endwhile; endif; ?>

I added the code for my astore (in DIV tags which mean I can specify a css if I want to).

<div id = “astore”>
<iframe src=”
http://astore.amazon.com/yourstore” width=100% height=1000 frameborder=0 scrolling=no></iframe>
</div>

Now, whenever you want your aStore to appear within a page, you can simply select the aStore Page template when writing a page instead of the default page template.

To take it one step further towards my original needs outlined for the plugin, I then duplicated this page a number of times and renamed them according to the products they would display, substituting the default code above with a specific permalink to a given aStore category. The format of the permalink will look like this:

http://astore.amazon.com/yourstore?%5Fencoding=UTF8&node=1

where ‘node=1‘ relates to the index of your category. As I said before, you can get the permalink to each of your categories from the category section of your aStore.

So I uploaded these new pages to my theme, one for each chunk of the aStore I want to display, appropriately named. So, for example, you might end up with aStore-Page-Cheese1, aStore-Page-Cheese2, aStore-Page-Chocolate etc.

Now, as before, you can simply choose which template you want to use when you post a page. Hey presto, a very clumsy implementation of targeted products per page! Which I think adequately demonstrates the need for the proposed plugin 😉




No Comments

No comments yet.

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.