A free sidebar widget based on the Affiliate Window V3 API
I’ve just written a sidebar widget that sits in your WP sidebar and displays 5 products based on a custom field called ‘sidebarquery’
You can see it in action at the bottom right of this page (ignore the sony walkman widget, as thats not Awin, thats POR), the custom field has the keywords ‘ipod nano’ in it, and as you will see, it does what you’d expect of it.
You simply download the zip file, then upload the folder within it to your plugins directory, then activate it, set the parameters (currently just your awin ID and your API password),

sidebar panel
drag the widget to whichever sidebar you want to use it on, then add a custom field ‘sidebarquery’ to each post with the keyword/s you want
Download it here
Comments
29 Comments on A free sidebar widget based on the Affiliate Window V3 API
-
gadget on
Wed, 14th Oct 2009 3:34 pm
-
basu on
Wed, 14th Oct 2009 4:05 pm
-
basu on
Wed, 14th Oct 2009 4:10 pm
-
apimonkey on
Wed, 14th Oct 2009 4:32 pm
-
mansolo on
Thu, 15th Oct 2009 3:43 pm
-
apimonkey on
Thu, 15th Oct 2009 6:12 pm
-
mansolo on
Fri, 16th Oct 2009 7:04 pm
-
apimonkey on
Fri, 16th Oct 2009 7:14 pm
-
mansolo on
Fri, 16th Oct 2009 7:18 pm
-
hicliner on
Mon, 19th Oct 2009 1:58 pm
-
apimonkey on
Mon, 19th Oct 2009 2:05 pm
-
gadget on
Fri, 23rd Oct 2009 12:08 pm
-
mansolo on
Sun, 25th Oct 2009 11:05 am
-
mansolo on
Mon, 9th Nov 2009 7:26 pm
-
apimonkey on
Mon, 9th Nov 2009 7:37 pm
-
kiddaclo on
Sat, 14th Nov 2009 10:14 am
-
apimonkey on
Sun, 15th Nov 2009 12:25 pm
-
kiddaclo on
Mon, 16th Nov 2009 8:14 pm
-
apimonkey on
Mon, 16th Nov 2009 8:38 pm
-
Shrewdie on
Wed, 25th Nov 2009 6:15 pm
-
apimonkey on
Wed, 25th Nov 2009 6:43 pm
-
stalkio on
Tue, 12th Jan 2010 8:57 pm
-
simonok on
Wed, 17th Mar 2010 10:40 pm
-
simonok on
Wed, 17th Mar 2010 11:46 pm
-
apimonkey on
Thu, 18th Mar 2010 1:49 am
-
simonok on
Thu, 18th Mar 2010 8:02 am
-
simonok on
Thu, 18th Mar 2010 8:03 am
-
Fi on
Fri, 14th May 2010 11:00 am
-
apimonkey on
Fri, 14th May 2010 11:20 am
Brilliant. Simply brilliant. Thank you.
I can’t find the link to download!
Sorry, I have found, but look like this is only a part of full working application
I don’t know what you mean, it works as a standalone sidebar widget, thats what it is, thats all it is.
Hi,
Just tested on 2.8.4 and got an error message -
‘Invalid argument supplied for foreach() in home/…../public_html/…../wp-content/plugins/awinsidebar/freesidebarwidgets.php on line 124
Hi, what was/were the keyword/s that you used?
shoes
Have you enabled the V3 in your Awin interface, or, have you enough quota?
oops!
I’ll try again later & let you know how I got on.
I have enabled V3 and used the V3 API password in AWIN
But nothing tried numerous words etc. Any suggestions?
Hi hicliner, have you checked this on a post in your blog (the products won’t show on the homepage)
@Mansolo.
I get that error message when I’ve run out of Quota – are you still on 500 or have you exceeded your limit?
Thanks for you comments gadget,
checked SW V3 Communiity in AW
Remaining operations:
500
Checked constants.inc.php variables again & OK
Also generated a new password but same error.
Fault may be with AW.
Hi,
Glad to report that the sidebar widget now works – no idea why it suddenly started to work but it does.
Thats both bizarre and good news, I assume you didn’t change anything.
Hi,
Great Plug-in!
One thing, it’s showing fine in all my posts and category pages but not on my homepage. Any ideas?
Cheers.
Hi Chris, it’s designed not to show on the homepage, however, if you want to show product on the homepage, then adjust the code like so:
On or about line 103 in freesidebarwidgets.php change this line
if ($thissidebarquery<>” and !is_home()) {
to this
if ($thissidebarquery<>” ) {
I can’t really remember why I didn’t have product showing on the homepage, but, theres the fix.
Tony
Hi Tony,
That’s great, thanks for the fix.
I also wanted the widget have a single title sitewide, I don’t really know php very well but can’t help messing! I had a look in the code and just changed it to this:
echo $before_widget;
$clo .= ‘Widget Title’;
echo $before_title. $clo. $after_title;
foreach($oResponse->oProduct as $details){
It seems to all work ok, is there a problem doing it like this?
Chris.
Chris, this site is all about diving into the code, thats why I don’t encode or lock it.
As you have seen, there are the $before_title and $after_title variables which change depending on your themes sidebar styling, so creating another variable to hold your title is fine, although, I would just insert the title like this:
echo $before_title. ‘Widget Title’. $after_title;
I know it’s just one variable, but, if it’s not going to be re-used, then there’s no need to set the variable. (good coding practice)
Tony
I have a website on V2 but have the coding to upgrade to V3, which has been fully tested. I havent done that as yet because there is no difference (V3 might load marginally quicker) between both versions as far as I’m concerned as I don’t use any of the templates etc.
Is there anyway I could get the carousel to work say on a blank html page using V3 API password etc – if it could work there it could be added to my site.
The carousel? You mean this page? Carousel I’ll get round to updating it to work with V3 at some point, so much code, so little time
You’re a genius. Thank you!!
Where is the download? where it says download its not a link?
sorry found it!
Great work, Any chance you can advise me how to make this work outside the widget structure, I don’t use widget’s
Would be nice to be able to add it to a blog post.
It’s a widget, so, it won’t work outside the widget structure. There is a commercial version available for £23 which is a fully featured wordpress plugin
http://www.wpaffiliateplugins.com/index.php/about/affiliate-window-wordpress-plugin/
That looks wicked, just what I’m after, I’ll but that when I get home tonight. Thank you.
Buy it rather.
Hi! Is this free plugin still available – cannot locate the download link. Thanks. Fi
Hi Fi, yes, it’s here: Awin API Sidebar Widget The download link is just above the comments on this page
Tell me what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!
You must be logged in to post a comment.









