You can customize how some of the internal functions of the eBay Library used by the plug-in work.
PHP files in the cron/ebayinludes/overrides folder are included when the plug-in or cron job executes. This allows you to declare methods which will be run to customize some of the things the plug-in and cron job script do.
There is a file called customize.php-doc in the folder. It contains a list and description of the functions that can be defined to customize the library.
You can rename customize.php-doc to customize.php-doc then remove the "X" from the start of the name of the function you wish to implement. Or you can create a new .php file in the folder for the function.
As an example of customizing the eBay library ...
Suppose you want to add a note to the bottom of the descriptions of most products that are added to eBay. Here is an example of an ebayFixDescription function you might implement
/**
*
* ebayFixDescription - fix the description for a product to be listed on eBay
*
* @param product the product
* @param $description the current description (same as $request->item['products_description'])
*
* return the updated description
*/
function ebayFixDescription($product, $description)
{
$text = $description;
if (strpos($text, "<!--#NoNote-->") === false)
{
$text .= "<p>Please note that manufacturers sometimes update their products and packaging. If receiving a specific version of a product is important to you, please contact us before ordering.</p>";
}
return $description;
}
This function will add the note to the description of products added to eBay unless you have included the text "<!--#NoNote-->" in the description.
The $product parameter passed to the method is an array of the product's properties including:
- $product['list_on_ebay]' - List on eBay flag (0 = false, 1 = true)
- $product['manufacturers_id]' - ID of the product's manufacturers_id
- $product['manufacturers_name]' - Name of the product's manufacturer
- $product['master_categories_id]' - Master category ID of the product
- $product['product_is_always_free_shipping]' - Always Free Shipping flag (0 = false, 1 = true)
- $product['product_is_call]' - Product is Call flag (0 = false, 1 = true)
- $product['products_date_added]' - Date Product was Added to store
- $product['products_description]' - Description of the product
- $product['products_id]' - ID of the product
- $product['products_image]' - Mame fo the product's image
- $product['products_model]' - The product's model
- $product['products_name]' - The product's name
- $product['products_price]' - The product's price
- $product['products_quantity]' - The product's quantity