Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Zalinar

Pioneers
  • Posts

    6
  • Joined

  • Last visited

Reputation Activity

  1. Like
    Zalinar got a reaction from TITO4 in [Contribution] osc2ebay - oscommerce to ebay synchronization   
    Well, here is everything that I know that should help EVErYONE out greatly.  I am still not getting the cron file to run correctly because it expects cooking.  If I turn cookies off, it seems to run but the sync never happens.
     
    I am currently using it with OSC 2.3.4
     
    Here goes:
     
    Some helpful things I put together that would have saved me hours of time:


    -You have to get your ebay tokens from developers.ebay.com.  It is easy to sign up.  
    -You must have an eBay Store for this to work.

    YOU HAVE TO DELETE ALL OF YOUR  EBAY ITEMS AND RELIST THEM FROM YOUR WEBSITE FOR THIS CONTRIBUTION TO WORK.

    I have not figured out how to load more than one picture, and ebay will not let you add more on the listing side.

    Any items listed on eBay with this addon can ONLY be modified via XML.  Sales, discounts, international shiupping,

    etc...  I have not solved these either...

    I have less than a year PHP and coding experience and everything I have learned is because of getting OSCommerce in

    the first place (and with help from others)


    ________________________________________________

    To download and install eBaySvc.wsdl

    Using internet explorer (Firefox won't do it) go to:  http://developer.ebay.com/webservices/latest/ebaysvc.wsdl

    It should prompt you to open it or save it.  Save it.
    You can also search "eBaySvc.wsdl" in IE.  If the above link pops up, right click and select "Save taget as"
     
    Upload it to your catalog and catalog/admin folder roots.

    Be sure that the file name is exactly eBaySvc.wsdl - The caps matter

    Open eBaySvc.wsdl in Notepad++ or similar.  At the top, find the version number.

    Set $ebay_compatibilityLevel in ebay_config.php to that same number

    _______________________________________________________________
    To modify for a 2.3.4 site:

    IN catalog/admin/includes/boxes/catalog.php:

    Change:

    '<a href="' . tep_href_link("ebay_syncitems.php", '', 'NONSSL') . '" class="menuBoxContentLink">ebay Sync

    Items</a><br>' .
    '<a href="' . tep_href_link("ebay_getcategories.php", '', 'NONSSL') . '" class="menuBoxContentLink">ebay Get

    Categories</a><br>' .

    To:
          //osc2ebay BEGIN
          array(
            'code' => FILENAME_EBAY_SYNCITEMS,
            'title' => BOX_CATALOG_EBAY_SYNC_ITEMS,
            'link' => tep_href_link(FILENAME_EBAY_SYNCITEMS)
            ),
            
          array(
            'code' => FILENAME_EBAY_GETCATEGORIES,
            'title' => BOX_CATALOG_EBAY_GET_CATEGORIES,
            'link' => tep_href_link(FILENAME_EBAY_GETCATEGORIES)
            ),
            
          //osc2ebay END

    ______________________________________

    IN catalog/admin/includes/languages/english.php:

    ADD (in the box_catalog area...):

    //Begin OSC2ebay
    define('BOX_CATALOG_EBAY_SYNC_ITEMS', 'Ebay Sync Items');
    define('BOX_CATALOG_EBAY_GET_CATEGORIES', 'Ebay Get Categories');
    //End OSC2ebay


    ______________________________
    *******  Workaround of UPC, MPN, and Brand requirements:
    ______________________________
    Part 1

    In catalog/ebay_config.php - at the end of the file:

    Add:

    $UPC = "Does Not Apply";
    $MPN = "Does Not Apply";
    $Manufacturer = "Unbranded";

    ***Ebay accepts these settings but you will not have the actual UPC, MPN, or Brand.   It would be cool if someone

    to modify this to use a DB call for those values

    _____________________________
    Part 2a

    In admin/ebay_addproducts.php

    Add after $client = new eBaySOAP($session); but before $params = array(

    $nameAndValues = array(
                array('Name' => "Brand", 'Value' => $Manufacturer),
                array('Name' => "MPN", 'Value' => $MPN),
            );

    ____________________________
    Part 2b

    Add after 'Description' => $Products_Description,

                'ProductListingDetails' => array(
                    'UPC' => $UPC,
                    ),

                'ItemSpecifics' => array('NameValueList' => $nameAndValues),

    _____________________________
    Part 2c

    NOTE:
    Around line 93 in admin/ebay_addproducts.php

    DO NOT uncomment the line //'InventoryTrackingMethod' => "SKU",
    LEAVE THIS LINE ALONE!!!!!

    Ebay defaults to listing by an item number.  If you choose to list by you own SKU, you CAN'T convert the listing to

    use an item number and have to delete and relist

    ______________________________

    Other bugs:

    1) Show only items with price discrepancies button doesn't work properly and shows no items even though ALL of mine

    have different prices. I have no fox for this

    2)Ebay has an "out of stock" setting in "My account/Site Preferences/Selling preferences/Sell Your Item form and

    listings" that will allow all GTC (Good Till Cancelled) listings to remain even if stock reaches Zero.  

    The osc2Ebay contribution's code will end your eBay listings when quantity reaches zero even with that selected.
    To keep it from doing this, you need to:

    Change: if($Quantity > 0) {
    To:  if($Quantity >= 0) {

    In the files (around those lines):
    catalog\ebay_syncitemsactions.php
        Line 61:             
        Line 461:
    catalog\checkout_confirmation_ebay.php
        Line 188:                             
    catalog\checkout_success_ebay.php
        Line 182:
    admin\categories.php
        Line 307:

    If you use Notepad plus, you can search your modified files for EndItem and the line to change it a few above it.     

                                                        

    Note:  Using only GTC (Good Till Canceled) listing types will always keep the same item number.




    3) Local price is shown with tax and ebay price is shown without tax - at least in my case.  To adjust, I changed

    ebay_common.php
    ---Or, you may want to keep ebay prices more expensive to compensate for the final value fees.  If so, keep tax.

    from:

        Line 88:     return ebay_local_format_price($products_pricetot, $products_tax);
        Line 97: function ebay_local_format_price($products_price, $products_tax) {

    To:

        Line 88:     return ebay_local_format_price($products_pricetot);
        Line 97: function ebay_local_format_price($products_price) {

    >>>>>OR<<<<<

    It may be easier to just modify the line (around line 102)

        return tep_round(tep_round($products_price, 2) + tep_round($products_price * $products_tax / 100, 2) , 2);  

    }

    changing the 100 to different values can adjust the price given to ebay to sync without changing your own prices

    ---------This is another thing that is would be amazing for someone to devise
    -------> add a text field to increase or decrease the sync price given to ebay by an amount or percent

     
    Good luck and I hope this helps :)
×
×
  • Create New...