- Joined
- Jun 30, 2011
- Posts
- 401
- 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:
3. Edit the PHPbay Config file to suit (aff id etc)
4. Add the following to the top of /controllers/product.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"}
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:
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:
Please do post up any examples or if you have any issues, I am happy to help.
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:
Please do post up any examples or if you have any issues, I am happy to help.
Last edited: