Guest Posted September 22, 2010 Share Posted September 22, 2010 Hello, Well I installed a great modification called the FeedMachine. Its nearly perfect but has one flaw that is a huge deal breaker. One of the built in uses does not seem to work and the original poster has disappeared. I would be more than grateful if someone could help me? Here is a link to my post. Basically the feed shows the product name. However, in my case I need the product name to be the combination of the manufacturer name and the product name. function FM_UF_fc_manufacturer_and_product($product) { return $product['manufacturers_name'] . ' ' . $product['products_name']; } I followed the instructions and no matter what I do the 'FUCTION' type never seems to output anything. Many thanks to the person that can help!!! Thanks again Ryan Link to comment Share on other sites More sharing options...
♥mdtaylorlrim Posted September 22, 2010 Share Posted September 22, 2010 Hello, Well I installed a great modification called the FeedMachine. Its nearly perfect but has one flaw that is a huge deal breaker. One of the built in uses does not seem to work and the original poster has disappeared. I would be more than grateful if someone could help me? Here is a link to my post. Basically the feed shows the product name. However, in my case I need the product name to be the combination of the manufacturer name and the product name. function FM_UF_fc_manufacturer_and_product($product) { return $product['manufacturers_name'] . ' ' . $product['products_name']; } I followed the instructions and no matter what I do the 'FUCTION' type never seems to output anything. Many thanks to the person that can help!!! Thanks again Ryan Try reducing the function to the simple statements. function FM_UF_fc_manufacturer_and_product($product) { $product = $product['manufacturers_name'] . " " . $product['products_name']; return $product ; } How are you calling the function? Community Bootstrap Edition, Edge Avoid the most asked question. See How to Secure My Site and How do I...? Link to comment Share on other sites More sharing options...
Guest Posted September 22, 2010 Share Posted September 22, 2010 Try reducing the function to the simple statements. function FM_UF_fc_manufacturer_and_product($product) { $product = $product['manufacturers_name'] . " " . $product['products_name']; return $product ; } How are you calling the function? mdtaylorlrim, Thanks for the response. Here is the code for the file I am using. <?php /** * @license http://opensource.org/licenses/gpl-license.php GNU Public License */ /* Bing US feed configuration for The Feedmachine Solution ---------------------------- */ $feed_config = array('name' => 'Bing Shopping', 'filename' => 'bingshopping.txt', 'authors' => 'RyanRLB', 'schema_version' => '2.0', 'fields' => array('id' => array('output' => 'products_id', 'type' => 'DB' ), 'title' => array('name' => 'FM_UF_fc_manufacturer_and_product', 'type' => 'FUNCTION' ), 'brand' => array('output' => 'manufacturers_name', 'type' => 'DB', 'options' => array('STRIP_HTML', 'HTML_ENTITIES', 'STRIP_CRLF') ), 'price' => array('output' => 'FINAL_PRICE', 'type' => 'KEYWORD' ), 'mpn' => array('output' => 'products_model', 'type' => 'DB' ), 'link' => array('output' => 'PRODUCTS_URL', 'type' => 'KEYWORD' ), 'price' => array('output' => 'FINAL_PRICE', 'type' => 'KEYWORD' ), 'availability' => array('output' => 'In Stock', 'type' => 'VALUE' ), 'description' => array('output' => 'products_description', 'type' => 'DB', 'options' => array('STRIP_HTML', 'HTML_ENTITIES', 'STRIP_CRLF') ), 'image_link' => array('output' => 'IMAGE_URL', 'type' => 'KEYWORD' ), 'shipping' => array('output' => '0.00', 'type' => 'VALUE' ), 'product_type' => array('output' => 'CATEGORY_TREE', 'type' => 'KEYWORD', 'options' => array('STRIP_HTML', 'STRIP_CRLF') ), 'shipping_weight' => array('output' => 'products_weight', 'type' => 'DB' ), 'condition' => array('output' => 'New', '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 ); //FEED FUNCTIONS BEGIN function FM_UF_fc_manufacturer_and_product($product) { return $product['manufacturers_name'] . ' ' . $product['products_name']; } //FEED FUNCTIONS END ?> Link to comment Share on other sites More sharing options...
♥mdtaylorlrim Posted September 22, 2010 Share Posted September 22, 2010 I'm no expert but when you have a function that expects to be passed a value, and you call that function without passing it a value then the function will fail. I do not see where it calls the function and passes a value to it. Community Bootstrap Edition, Edge Avoid the most asked question. See How to Secure My Site and How do I...? Link to comment Share on other sites More sharing options...
lech Posted December 6, 2010 Share Posted December 6, 2010 Hi, Just in case anyone has the same problem, this problem has been solved here: http://www.oscommerce.com/forums/topic/349319-the-feedmachine-solution/page__view__findpost__p__1536075 Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.