You must be logged in to post


Register? | Lost Your Password?

Search Forums:


 






Wildcard Usage:
*    matches any number of characters
%    matches exactly one character

I only want to sell affiliate products…

UserPost

8:20 pm
August 8, 2009


The Q

Member

posts 8

1

I have a content rich blog and I bought Market so I could link to my affiliates with hand-picked products that I want to recommend to my readers. Therefore, I need to:

1.  Remove the cart and the "add to cart" button.

2.  Have a Buy Now button link to my affiliates.

(Right now, there is no buy now button–just an "Add to Cart" button)

Here's an example–my site is still under construction so pardon my mess:  http://happygreenfamily.com/?p=161

ADQ

11:00 pm
August 8, 2009


The Q

Member

posts 8

2

Uh.  Sorry.  Confused  I just read the "READ FIRST" thread.

ADQ

3:04 pm
August 10, 2009


Market Admin

Admin

posts 4756

3

Don't worry about this being posted in the "How To" area.  It may in fact turn into a "How to" post when ultimately completed.

Ok, so let me first say that we don't guarantee support for customization stuff (because there would be no limits to the possibilities), but I think I can give you a direction to go in, and I like to help.

If you only had one affiliate product, you could just hard code it the link into your "buy" button, but since you plan on offering many different affilate products, you'll need to store the affiliate links in your database — and then have the product information details page read the database value and then display it.

The quickest way, would be for you to utilize the "custom fields" area in the "Add product" admin page.   There would be two changes that need to take place.  Adding the affiliate URL to the product record in the admin, and then changing the Product Information details page so that it uses that link, rather than the shopping cart system.

One word of note….  Once you make these changes, your installation of Market will no longer use its shopping cart system.  These changes will convert it over to only using affiliate links that you specify in the "Add product" admin page.

Ok, so when you're in the Administrative area, you'll want to click on "Add Product" (or edit product), and then you'll scroll down to the Custom fields section area.  In that area, you'll go to the "Add a new custom field" portion within.

Change area #1 — Setting URL link in Admin area

===============

Under "Key" enter a variable name to store the affiliate URL.  Let's name it  "aff_URL".

Under "Value", enter the affiliate URL itsefl.  Let's enter " http://www.affiliatewebsite.com/products.php?prod_id=6412 ".

Obviously, you'll enter your affiliate link as given to you.

Click the "Add Custom Field" button to save it. 

Then you'll also want to make sure you save your product by clicking on the main "Save" button also.

Change area #2 — Changing website to display affiliate link instead of shop cart

================

Open the file "single.php" in your Market theme folder for editing.

On or around line #3, you'll find the line:

$thumb = get_post_meta($post->ID, 'pi1', $single = true);  // check for product thumbs

Immediately BEFORE this line, add the following new line:

$affiliateURL = get_post_meta($post->ID, 'aff_URL', $single = true);  // get affiliate URL

This will tell the page to retrieve the data you have saved for that variable name.

Now, scroll down to on or around line #144 and find the line:

      <input type="image" src="<?php bloginfo('template_directory'); ?>/imgs/bn.gif" class="pp" border="0" name="submit" alt="<?php echo mkt_THEME_SINGLE_BUTTON_BUYNOW; ?>">

Replace this line with :

<!–
      <input type="image" src="<?php bloginfo('template_directory'); ?>/imgs/bn.gif" class="pp" border="0" name="submit" alt="<?php echo mkt_THEME_SINGLE_BUTTON_BUYNOW; ?>">
–>
      <a href="<?php echo $affiliateURL; ?>"><img src="<?php bloginfo('template_directory'); ?>/imgs/bn.gif" class="pp" border="0" alt="<?php echo mkt_THEME_SINGLE_BUTTON_BUYNOW; ?>"></a>

This change will replace the shopping cart link with a direct link to your affiliate site.

Save the file.

One last couple of things to note:

=====================

You'll need to go to your Market Options settings area in your administration area, and select the single click "Buy Now" option for your shopping cart setup style.  Make sure to activate your changes.

Lastly, you can change the "Buy Now" image if you like.  It's currently located in the "/imgs/" folder of your Market Theme folder.

I hope this helps.

5:39 pm
August 13, 2009


ibexy

Member

posts 23

4

Post edited 10:11 pm – August 13, 2009 by ibexy


this is not working Frown

My amazon affiliate codes are not being recognised or is there something am missing?

8:19 pm
August 13, 2009


Market Admin

Admin

posts 4756

5

I don't know… I checked your page source, and it didn't have the changes I outlined above, so I can't tell what it's doing wrong.

10:34 am
August 14, 2009


ibexy

Member

posts 23

6

I followed your instruction to the letter. There seems to be a genuine problem with displaying amazon affiliate codes. They are a longer and more complex that that used in yr example above.

Below is a sample amazon affiliate code (text only) I created the custom field (aff_URL) as said and added the codes as the value. 

<a href="http://www.amazon.co.uk/gp/product/B001PKUP9K?ie=UTF8&tag=mywebsiteaffiliatecode">Puma Boy's Ferrari Raikonnen</a><img src="http://www.assoc-amazon.co.uk/e/ir?t=mywebsiteaffiliatecode" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />

The only thing I changed is my affiliate codes (in red).

why is this not working?

3:07 pm
August 14, 2009


Market Admin

Admin

posts 4756

7

It looks like Amazon actually gives you more code than you need.  They provide you link text, and an image.

In your custom field that you've setup for your affiliate URL, you will want to enter only the following:

http://www.amazon.co.uk/gp/pro…..8&tag=mywebsiteaffiliatecode

You don't need the link text "Puma Boy's Ferr… etc.", and you don't need the Image link either.

In fact, if you're curious — the image code

<img src="http://www.assoc-amazon.co.uk/e/ir?t=mywebsiteaffiliatecode" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />

is so they can track your performance of how many times your link is displayed.

It's not needed for them to track affiliate sales, but if that's important to you, then you'll have to enter that as a new line in your "single.php" file. 

In your particular case, your code would be:

<!–
      <input type="image" src="<?php bloginfo('template_directory'); ?>/imgs/bn.gif" class="pp" border="0" name="submit" alt="<?php echo mkt_THEME_SINGLE_BUTTON_BUYNOW; ?>">
–>
      <a href="<?php echo $affiliateURL; ?>"><img src="<?php bloginfo('template_directory'); ?>/imgs/bn.gif" class="pp" border="0" alt="<?php echo mkt_THEME_SINGLE_BUTTON_BUYNOW; ?>"></a>
      
      <img src="http://www.assoc-amazon.co.uk/e/ir?t=mywebsiteaffiliatecode" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />

Hopefully this helps.

10:59 am
August 15, 2009


The Q

Member

posts 8

8

I'm sorry I haven't responded sooner–I've been swamped this week.  I tried this today and it worked beautifully.  Thanks so much for your help!!!

Laugh

ADQ

6:28 pm
August 17, 2009


Market Admin

Admin

posts 4756

9

You're welcome.

6:24 am
September 27, 2009


malcolm

Member

posts 14

10

Can I add some code that will force affiliate links to open in a new window?

3:37 pm
September 28, 2009


Market Admin

Admin

posts 4756

11

In your "href" tag, just enter something like:

target="new"

So, you would go from a link such as:

<a href="http://www.amazon.com/"> </a>

To something like:

<a href="http://www.amazon.com/" target="new"> </a> 

12:55 pm
October 10, 2009


Su

Member

posts 33

12

I'm also including affiliate links on my site. I modified an Amazon (image only) link as indicated in the August 14 post above, but I'm getting the error message"Forbidden Parameter :tag". There is also no image. I tried removing the "tag", but then additional errors were noted. Any ideas?

1:31 pm
October 10, 2009


Su

Member

posts 33

13

I managed to get a little further. I made the changes noted above, and I posted an Amazon link. The link only shows an "Image coming soon" image. I tried adding the link through the .jpeg, but that didn't help.

Additionally, when I click on the BUY NOW, it's taking me to the home page. Help?

2:41 pm
October 10, 2009


Su

Member

posts 33

14

Don't you love it when folks solve their own problems? Apparently it was just taking a really long time for the links to kick in. I believe I've solved the links issue.

I still can't get the pictures though. I think I may need to pull out the portion of the link for the picture to put in the image URL section, but it's not working so far. Any suggestions would be appreciated. You can see what's happening at http://www.GreenHealthBoutique.com Thanks!

10:25 am
October 11, 2009


Su

Member

posts 33

15

Since I want to mix affiliate and own sales, I worked on implementing the code in the 2/3/09 post by ingrusmedia. ('Affiliate links' thread) Well, I'm in a pickle now as my links to the products have broken. I am getting this error . It occured on the last edit to show or hide the button, (I check the site after each edit) and wasn't corrected by deleting the edit. I am going to post this under that post as well.

   Parse error: syntax error, unexpected T_ELSE in /home/content/69/5036069/html/wp-content/themes/mk3/single.php on line 246

11:22 am
October 12, 2009


EuniceC

Member

posts 25

16

I am trying to add linkshare urls to my blog and I've followed these instructions but obviously, it's not working. I think maybe the affiliate links are too long where I define it in the Add Product description? Please help. 

Here's my blog url: http://www.mycomputertrainingcoach.com

Thanks! 

Advice and tips for internet marketing newbies and small businesses online at http://www.simple-internet-strategies.com

4:21 pm
October 12, 2009


Market Admin

Admin

posts 4756

17

Su…  Do you have a backup file that you can revert to?  You should ALWAYS create a backup before you start editing stuff.

I looked at your site, and see the error you mention — but I can't really see what's causing it, because I can't get to the page.

If you can revert to a previous stage where the page is loading, and then tell me the code you're trying to put in — then I can guide you as to what's not working.

EuniceC — I have checked out your website, but cannot see anything except a "sold out" product.  If you enter a price, that will go away.

4:37 pm
October 12, 2009


EuniceC

Member

posts 25

18

The Sold Out issue is not my problem.I posted my blog url so you could look at the code and tell me what I've done wrong.

I'm sorry to be such a bother but I really can't figure this out. The instructions on using Market Theme for affiliate products are very confusing.

Since you mention the ease of use for affiliate links on your sales page, I really think you should post some clear instructions about how to do this in the "Read Me" file.

I previously posted a question about how to use Market theme for affiliate products and you told me to go look in the "How-to" section. The one I found had some information about posting Amazon products but didn't tell me how to address the specific issue of affiliate links.Are all affiliate links like Amazon's?

PLease help with my problem. I am trying to post affiliate links in the Products section. How do I do that?

Thanks.

Advice and tips for internet marketing newbies and small businesses online at http://www.simple-internet-strategies.com

9:40 pm
October 12, 2009


Market Admin

Admin

posts 4756

19

When I mentioned the "sold out" product, it was to say that was preventing me from seeing how your affiliate link was being displayed.  If you enable the pricing, then I can take a look at what the affiliate link is doing.

With it set to "sold out", it doesn't show me any affiliate link — so I can't troubleshoot.

Does that make sense?

Enable the product, so I can see the page code that uses the affiliate link.

Not all afiliate links are like Amazon's.  Some contain image references, while others solely contain the hyperlink.  Generally, the hyperlink is all that's needed.

11:26 am
October 13, 2009


EuniceC

Member

posts 25

20

Sorry, I misunderstood what you were saying. I'll add the price so you can see the affiliate link. I thought that once you added the new field, you didn't have to worry about all the other fields. I'm also going to try and edit the affiliate link in the custom field and see what happens.

Thanks.

Advice and tips for internet marketing newbies and small businesses online at http://www.simple-internet-strategies.com



 

Market takes e-commerce to the next level with an easy to use, quick setup platform. Learn more or take the tour.