Jump to content


Corporate Sponsors


Latest News: (loading..)

pleasureidea

Member Since 10 May 2005
Offline Last Active Aug 19 2011, 20:35
-----

Posts I've Made

In Topic: The Feedmachine Solution

25 May 2011, 14:13

I don't think you can connect using the same settings. Try to duplicate the bing file and rename it to filezilla file. Also I am not sure if filzilla takes the same feed as bing does.

View Postcsiemons, on 29 April 2011, 02:18, said:

Hi Lech,

Great contribution! I got the Google upload working fine in no time, so I decided to add the Bing upload into the FeedMachine: http://addons.oscommerce.com/info/7979
It creates the Bing file okay and I can use Filezilla to connect and upload the file just fine, but with the same FTP settings the FeedMachine automated process does not connect, it gets this error: Could not connect to ftp server: ftps://feeds.adcenter.microsoft.com

Any idea why I can connect using Filezilla, but with the same settings it cannot connect using FeedMachine?

Thanks for the help.

In Topic: The Feedmachine Solution

04 April 2011, 14:55

Lech,
I am trying to upload bing feed and got response from them that the file is not converted to UTF-8. By opening the file in notepad++ I see the file is encoded in unix and after I encode it manually to UTF-8, everything looks good. The question why it is not converting while I see the config have encoding set up it correctly. Could you tell me what is wrong ?

Here is the bing-simple.php file:

<?php
$feed_config = array('name' => 'Bing Product Search Simple Configuration',
                     'authors' => 'Lech', //list of authors
                     'filename' => 'bingshopping.txt', //default feed filename (this can be over-ridden by the user in the admin section)
                     'schema_version' => '2.0', //always set as '2.0' - this is set just to future-proof configurations in case the schema ever changes
                     //the following section of the feed configuration is the most important. It determines the fields that are output.
                     'fields' => array('MPID'               =>   array('output' => 'products_id',
                                                                     'type' => 'DB'
                                                                    ),
                                       'Title'            =>   array('output' => 'FM_UF_fc_manufacturer_and_product',
                                                                     'type' => 'FUNCTION',
                                                                    ),
                                       'Brand'            =>   array('output' => 'manufacturers_name',
                                                                     'type' => 'DB',
                                                                     'options' => array('STRIP_HTML', 'HTML_ENTITIES', 'STRIP_CRLF')
                                                                    ),
                                       'MPN'              =>   array('output' => 'products_model',
                                                                     'type' => 'DB'
                                                                    ),
                                       'UPC'            =>   array('output' => 'products_upc',
                                                                     'type' => 'DB'
                                                                    ),
                                       'ProductURL'             =>   array('output' => 'PRODUCTS_URL',
                                                                     'type' => 'KEYWORD'
                                                                    ),
                                       'Price'            =>   array('output' => 'FINAL_PRICE',
                                                                     'type' => 'KEYWORD'
                                                                    ),
                                       'Description'      =>   array('output' => 'products_description',
                                                                     'type' => 'DB',
                                                                     'options' => array('STRIP_HTML', 'HTML_ENTITIES', 'STRIP_CRLF')
                                                                    ),
                                       'ImageURL'       =>   array('output' => 'IMAGE_URL',
                                                                     'type' => 'KEYWORD'
                                                                    ),
                                       'MerchantCategory'     =>   array('output' => 'CATEGORY_TREE',
                                                                     'type' => 'KEYWORD',
                                                                     'options' => array('STRIP_HTML', 'STRIP_CRLF')
                                                                    ),
                                       'Condition'        =>   array('output' => 'new',
                                                                     'type' => 'VALUE'
                                                                    ),
                                       'B_Category'      =>   array('output' => 'Home Furnishings',
                                                                     'type' => 'VALUE',
                                                                    )
                                      ),
                     'add_field_names' => true, //whether to add header row in the feed with the field names
                     'seperator' => "\t", //the field separator in the feed. (For tab-delimited feeds this should be "\t". For csv feeds this should be ",")
                     'text_qualifier' => '', //the character with which to encapsulate field values. (For tab-delimited feeds this should usually be empty, i.e. ''. For csv feeds this should usually be '"')
                     'category_tree_seperator' => ' ', //the separator to use for the 'CATEGORY_TREE' KEYWORD (see the 'KEYWORD Field Type' section in the notes below)
                     //usually you will not need to worry about the following settings and can leave them as they are
                     'newline' => "\n",
                     'encoding' => 'utf8', //'utf8' or false for standard encoding
                     'currency_decimal_override' => false,
                     'currency_thousands_override' => '',
                     'include_record_function' => '' //(optional) specify a function that determines whether the product should be included in the feed
                    );

function FM_UF_lm_stock_check($product) {
  return $product['products_quantity'] > 0;
}

function FM_UF_fc_manufacturer_and_product($product) {
  return $product['manufacturers_name'] . ' ' . $product['products_name'];
}

?>

In Topic: getting 'easy' csv import to work

10 February 2011, 23:17

Hello!
The problem appears with thumbnail images when the image name have + (pluses) in name. Thumbnail will not show up but when you click on it, the regular popup image appears. Looks like get_image_from_url function must be corrected somehow. I also use 'On The Fly' Auto Thumbnailer using GD Library 2.1 contribution. Please help me to figure out this. Here is the function:

function get_image_from_url($url, $filename) {
	if(function_exists('curl_init')) {
		
		$ch = curl_init();
		curl_setopt($ch, CURLOPT_URL, $url);
		curl_setopt($ch, CURLOPT_HEADER, 0);
		curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

		$out = curl_exec($ch);
		curl_close($ch);
	
		if($out === false) {
			return false;
		}

		if($handle = fopen(DIR_FS_CATALOG_IMAGES . $filename, 'wb')) {
			fwrite($handle, $out);
			fclose($handle);
		}
		
		return true;
	}

	csv_import_message(CSV_CURL_MISSING_CANT_IMPORT_REMOTE_IMAGE, 'warning');
	return false;
}