![]() |
How do I put an Affiliate Links/Images on category page
Hi, I have been trying to find a way to put affilate links on category pages i.e. if someone clicks on camping category the a link is displayed for a camping holiday company as well as the products or subcategories under camping, or if they click on motoring for oils etc then MoT station or tyre place would show. Is it possible to do something with the thumbnails so that they click on the thumb and it activates the link
Any advice gratefully accepted. Thanks, Kev |
Re: How do I put an Affiliate Links/Images on category page
I'm confused on what you're asking for with the second thing.
Quote:
Could you possibly elaborate more? Are you just wanting a way to display some affiliate images but when clicked it sends them to the other site with your aff ID? If so, this can easily be accomplished. |
Re: How do I put an Affiliate Links/Images on category page
Hello Tal,
Yes that's what I am trying to do. I did try putting the code into the welcome page to test but just saw the code under everything else. Also can't decide wether to allow them to follow the link or open new browser but that's for later I suppose Kev |
Re: How do I put an Affiliate Links/Images on category page
If your site is small, you can do something like this:
{if $cat eq '1'} Affiliate stuff for category ID 1 {elseif $cat eq '2'} Affiliate stuff for category ID 2 {elseif ( $cat eq '3' || $cat eq '4' ) } Affiliate stuff that will show if in either cat #3 or 4. {elseif $cat gte '5'} Affiliate stuff that will show if in cat 5 or higher {elseif $cat gt '5'} Affiliate stuff that will show if in cat 6 or higher. {/if} |
Re: How do I put an Affiliate Links/Images on category page
Quote:
so in {elseif $cat eq '2'} Affiliate stuff for category ID 2 I would put {elseif $cat eq'250'} or do I use =250 then here would put the affiliate code? I have 15 categories with subs how do I put multiple affiliates within one category? Thanks Tal, I will have a play and see what happens. |
Re: How do I put an Affiliate Links/Images on category page
You need an {if} statement first, then an {elseif} or {else} statement and close all of them with a {/if}
So, the bare minimum would look like this: Code:
{if cat eq '1'} Use eq for equels, neq for not equals, gte for greater than or equal, gt for greater than, lt for less than, lte for less than or equal. As for multiple within one category, just put them inside the statement for that such as this: Code:
{if $cat eq '1'} |
Re: How do I put an Affiliate Links/Images on category page
Apologies Tal for not thanking you for your last post.
I've had to put it on back burner for now though |
All times are GMT -8. The time now is 02:55 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.