Enjoy unlimited access to all forum features for FREE! Optional upgrade available for extra perks.

How to add eBay Items onto FSB!

Status
Not open for further replies.
Joined
Jun 30, 2011
Posts
400
Reaction score
7
To do this you will need a copy of PHPbay API which you can get here - http://www.phpbay.com/

You will need a bit of an idea about coding, but I am happy to help. I have only used this on a test site so I suggest testing this first rather than a live money site!

1. Upload phpBay & images directory so in your root it is /phpbay

2. Copy the contents of the PHPbay API .htaccess to the FSB .htaccess to below this line: RewriteBase /, it should be like this:

Code:
RewriteBase /
RewriteRule ^images/e/(.*)$ http://thumbs.ebaystatic.com/pict/$1 [R,L]
RewriteRule ^item-(.*)_(.*)_(.*)_(.*).html$ auction.php?title=$1&item=$2&country=$3&ccid=$4
RewriteRule ^item-(.*)_(.*)_(.*).html$ auction.php?title=$1&item=$2&country=$3
RewriteRule ^item-(.*)_(.*).html$ auction.php?title=$1&item=$2
RewriteRule ^install/?$ install/index.php [QSA,L]
RewriteRule ^freshadmin/?$ freshadmin/$1 [QSA,L]
RewriteRule ^api/?$ api/$1 [QSA,L]
RewriteRule ^i/?$ library/phpThumb/index.php$1 [QSA,L]
RewriteRule ^img/(.+).jpg$ image.php?n=productimage&var1=$1 [QSA,L]
RewriteRule ^recommends/(.+)?$ linkfowarder.php?linkname=$1 [QSA,L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php?q=$1 [QSA,L]

3. Edit the PHPbay Config file to suit (aff id etc)

4. Add the following to the top of /controllers/product.php

Code:
require_once("./phpbay/ebay.php");

5. Open up the product.tpl file in your template directory, for fluid it is /templates/fsb-fluid/product.tpl and add the following underneath {include file="product/manufacturerbox"}

Code:
{$ebay = phpBayAPI("{$thisproduct.title}", 15)}

It should now display ebay items based on the title on the product page.

Onto making it look nice!

6. In /phpbay/includes/combo.php line 19 on the select html, add class="form-control" after name="country". It should look like this:

Code:
$form .= '<select onchange="javascript:submit();" id="countrycombo" name="country" class="form-control">' . "\r\n";

7. Use these modified template and form files and place them in the /phpbay directory, please backup your old ones - Modified Template Files

It should end up looking like this:

phpbay.PNG


Please do post up any examples or if you have any issues, I am happy to help.
 
Last edited:
Great work and very gracious of you to share and support, thank you!

Are you making sales from it yet?

Admin
 
I must admit, I haven't done much with FSB yet other than hack it about and fiddle about with the code. :)

I have made a couple of Amazon sales off my test site and made about £4 from long long tail terms but that is about it!

If there is anything else you would like FSB to do then just let me know. I am thinking of sharing snippets I use regularly on a simple blog or something to help people out, I am by no means an expert coding guru but I get things working!
 
Last edited:
Great tip Nick, thanks for sharing!

When you come to upgrade, we include a "files.txt" which includes all the changed files. That should help you stay in sync.
 
Great tip Nick, thanks for sharing!

When you come to upgrade, we include a "files.txt" which includes all the changed files. That should help you stay in sync.


Perfect, I will bear that in mind when it comes to upgrade time!
 
Is there a way to get the "Buy Now" buttons to line up, even when the description is shorter? Just one of my little annoyances with the theme.

Great stuff

Admin
 
Is there a way to get the "Buy Now" buttons to line up, even when the description is shorter? Just one of my little annoyances with the theme.

Great stuff

Admin

You could set a minimum height for the div where the description is, so then it forces the boxes to be the same height even if it fills or not.

If you want to PM me a link I can have a look and send you the css :)
 
Status
Not open for further replies.

The Rule #1

Do not insult any other member. Be polite and do business. Thank you!

Featured Services

Sedo - it.com Premiums

IT.com

Premium Members

AucDom
UKBackorder
Be a Squirrel
Acorn Domains Merch
MariaBuy Marketplace

New Threads

Domain Forum Friends

Other domain-related communities we can recommend.

Our Mods' Businesses

Perfect
Service
Laskos
*the exceptional businesses of our esteemed moderators
Top Bottom