Domain Manage

How to add eBay Items onto FSB!

Discussion in 'Fresh Store Builder' started by nick-harper, Jul 2, 2015.

Thread Status:
Not open for further replies.
  1. nick-harper United Kingdom

    nick-harper Active Member

    Joined:
    Jun 2011
    Posts:
    391
    Likes Received:
    8
    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:

    [​IMG]

    Please do post up any examples or if you have any issues, I am happy to help.
     
    Last edited: Jul 2, 2015
  2. Domain Forum

    Acorn Domains Elite Member

    Joined:
    1999
    Messages:
    Many
    Likes Received:
    Lots
     
  3. admin Spain

    admin Administrator Staff Member

    Joined:
    Jun 2004
    Posts:
    10,083
    Likes Received:
    115
    Great work and very gracious of you to share and support, thank you!

    Are you making sales from it yet?

    Admin
     
  4. suggs United Kingdom

    suggs Retired Member

    Joined:
    Feb 2015
    Posts:
    291
    Likes Received:
    6
    Spot on, thanks for sharing that.
     
  5. nick-harper United Kingdom

    nick-harper Active Member

    Joined:
    Jun 2011
    Posts:
    391
    Likes Received:
    8
    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: Jul 2, 2015
  6. careybaird United Kingdom

    careybaird from Fresh Store Builder

    Joined:
    Sep 2010
    Posts:
    113
    Likes Received:
    3
    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.
     
  7. nick-harper United Kingdom

    nick-harper Active Member

    Joined:
    Jun 2011
    Posts:
    391
    Likes Received:
    8

    Perfect, I will bear that in mind when it comes to upgrade time!
     
  8. admin Spain

    admin Administrator Staff Member

    Joined:
    Jun 2004
    Posts:
    10,083
    Likes Received:
    115
    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
     
  9. nick-harper United Kingdom

    nick-harper Active Member

    Joined:
    Jun 2011
    Posts:
    391
    Likes Received:
    8
    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 :)
     
  10. suggs United Kingdom

    suggs Retired Member

    Joined:
    Feb 2015
    Posts:
    291
    Likes Received:
    6
    Has anyone had any sales via Ebay using this method?
     
  11. nick-harper United Kingdom

    nick-harper Active Member

    Joined:
    Jun 2011
    Posts:
    391
    Likes Received:
    8
Thread Status:
Not open for further replies.

Share This Page