Jump to content
Latest News: (loading..)
lech

The Feedmachine Solution

Recommended Posts

"Your feed contains non-unique items. These items will be dropped."

 

For those of you experiencing the above error this quick and dirty fix should solve it.

 

In feedmachine.php around line 283:

FIND:

$cycle_length = floor(1000/sizeof($languages_used))*sizeof($languages_used);

 

REPLACE WITH

$cycle_length = floor(10000/sizeof($languages_used))*sizeof($languages_used);

 

The only change was increasing 1000 to 10000. This increases the cycle length causing more of your products processed in one cycle. The duplicate problem seemed to occur at boundary points of cycles when more than one cycle was necessary.

 

Good luck!


plasma.jpg

Share this post


Link to post
Share on other sites

Hi'

 

What a great attribution :)

 

I have one problem though; According to Google ( https://support.google.com/merchants/answer/1347943 ) the feed for Apparel now has to include one line (item) for each size or color of an item:

 

You are required to submit one item per variant combination. For example, if a t-shirt is offered in 4 different colors and each color is available in 5 different sizes, you must submit a total of 20 items.

 

The ‘Item group ID’ attribute is different from the ‘ID’ attribute. An ‘Item group ID’ attribute will have common values for a group of variants whereas the ‘ID’ attribute should have unique values across a group of variants and for all other items, as well.

 

Has anyone found a solution for this?

 

I am currently using this feedmachine configuration: http://addons.oscommerce.com/info/7130

 

But this just lists the sizes as comma-separated "1y, 2y, 3y, 4y" in a size column on the spreadsheet (it should have been made as 4 lines in the spreadsheet as 4 induvidual products)

 

Kind regards,

Mikael

Share this post


Link to post
Share on other sites

Please,

 

Anyone can add the attribute "availability" to this addon?

 

The Google merchant now need this and will cancel all your products from they listing if that's no available.

 

Hope get good news here.

Share this post


Link to post
Share on other sites

Is there a way too use $exclude, too exclude an individual category from going too Google category tree function?

 

function FM_RS_google_categories_us_en($product) {

$output_field_category = ($product['parent_id'] > 0) ? $product['parent_id'] : $product['categories_id'];

return (($output_field_category == 6) ? 'Arts & Entertainment > Musical Instrument Accessories > String Instrument Accessories':

Share this post


Link to post
Share on other sites

Hello,

I search this function too !

 

how to exclude categories?

How not to release products that are not in stock?

 

Thank for your help

Edited by julienanglet

Share this post


Link to post
Share on other sites

Hi,

 

When generating a feed i'm getting this error..

 

The field products_id specified in the google-product-search.txt feed does not exist in any of the queried tables.
     Please ensure you have entered the correct field name and that it exists in one of the tables queried in $master_query (see code)

 

Greetings, Anne

Share this post


Link to post
Share on other sites

DJ Viper, this is because you are probably running php 5.5 and there are deprecated functions in there.

 

I have been working with this, but I'm still having a problem.  I don;t know if it related to this particular issue or not:

 

in feedmachine.php around line 335 you'll find this code:

$mysqli = defined('MYSQL_EXTENSION') && MYSQL_EXTENSION == 'mysqli';

  $i=0;
  $fields = array();
  while( $i < ( $mysqli ? mysqli_num_fields($master_query) : mysql_num_fields($master_query) ) ) {
    ++$i;
    $cur_field = ( $mysqli ? mysqli_fetch_field($master_query) : mysql_fetch_field($master_query) );
    $fields[] = $cur_field->name;
  }

change it to read:

$mysqli = defined('MYSQL_EXTENSION') && MYSQL_EXTENSION == 'mysqli';

  $i=0;
  $fields = array();
  $fields_cnt = mysqli_num_fields($master_query);
 
  while( $i < $fields_cnt ) {
	$fields[] = mysqli_fetch_field_direct($master_query, $i)->name;
        ++$i;
  }


This won't if you don't have the mysqli extension enabled in PHP.

 

Still have a problem where it won't list but 16 of the 10,000+ products I have, but at least it stopped that particular error.  now have to debug the rest of the system.

 

Share this post


Link to post
Share on other sites

Hello

 

I am using Feedmachine, but there seems to be a problem with the In Stock feature in the output file.

 

Even if products have "0" set in "quantity" the product is in the putput file with the value "In Stock", when it should have been "Out of Stock"

 

Anyway around this problem?

 

Best

Jens

Share this post


Link to post
Share on other sites

I am using 2.3.4 bootstrap edge. When I try generating a feed, I am receiving this message.  

 

languages array built
currencies array built
taxes array built
countries array built
categories array built

number of products: 276
number of cycles: 1
The field products_name specified in the google-product-search-feed-us-en.txt feed does not exist in any of the queried tables.
           Please ensure you have entered the correct field name and that it exists in one of the tables queried in $master_query (see code)

 

Field "products_name", is located in the products_description table.  

 

$master_query is:

 

while( true ) {
  ++$counter;
  $master_query = tep_db_query('SELECT ' . ( $count_run ? 'COUNT(*) as count' : 's.*, cd.*, c.*, ptc.*, mi.*, m.*, pd.*, p.*, IF(s.status, s.specials_new_products_price, p.products_price) as final_price' ) . '
                                FROM ' . TABLE_PRODUCTS . ' p LEFT JOIN ' . TABLE_PRODUCTS_DESCRIPTION . ' pd ON p.products_id = pd.products_id
                                         LEFT JOIN ' . TABLE_MANUFACTURERS . ' m ON p.manufacturers_id = m.manufacturers_id
                                   LEFT JOIN ' . TABLE_MANUFACTURERS_INFO . ' mi ON m.manufacturers_id = mi.manufacturers_id AND pd.language_id = mi.languages_id
                                         LEFT JOIN ' . TABLE_PRODUCTS_TO_CATEGORIES . ' ptc ON pd.products_id = ptc.products_id
                             LEFT JOIN ' . TABLE_SPECIALS . ' s ON ptc.products_id = s.products_id
                             LEFT JOIN ' . TABLE_CATEGORIES . ' c ON ptc.categories_id = c.categories_id
                             LEFT JOIN ' . TABLE_CATEGORIES_DESCRIPTION . ' cd ON c.categories_id = cd.categories_id AND pd.language_id = cd.language_id
           WHERE pd.language_id IN(' . $languages_list . ')
             AND p.products_status = 1
           ORDER BY p.products_id' . ( $count > 0 ? '
           LIMIT ' . (($counter-1)*$cycle_length) . ', ' . $cycle_length : '' ));

  if( $count_run ) {
    $master_query_row = tep_db_fetch_array($master_query);
    $count = $master_query_row['count'];
    echo "\n" . 'number of products: ' . ($count/sizeof($languages_used)) . "\n" . 'number of cycles: ' . ceil($count/$cycle_length) . "\n";
    ob_flush();
    $count_run = false;
    --$counter;
    continue;
  }

  if( $begin_output_run ) {
  //Open Files and Check configurations
  $fps = array();
  foreach( $feeds as $cur_feed_id => $cur_feed ) {
    $file = $save_path . $feeds[$cur_feed_id]['filename'];
    if( file_exists($file) ) {
      if( defined('FM_BACK_UP_OLD_FEEDS') && FM_BACK_UP_OLD_FEEDS ) {
     $old_file_last_modified = date('Y-m-d-H.i.s', filemtime($file));
     $file_info = array();
     preg_match('#^(.*?)(\..*?)?$#', $feeds[$cur_feed_id]['filename'], $file_info);
     rename($file, $save_path . $file_info[1] . '-' . $old_file_last_modified . ( isset($file_info[2]) ? $file_info[2] : '' ));
   }
   else {
     unlink($file);
   }
    }

    $fps[$cur_feed_id]['fp'] = fopen($file, 'a');
    chmod($file, 0777);
    $fps[$cur_feed_id]['file'] = $file;
  }

  $mysqli = defined('MYSQL_EXTENSION') && MYSQL_EXTENSION == 'mysqli';

  $i=0;
  $fields = array();
  while( $i < ( $mysqli ? mysqli_num_fields($master_query) : mysql_num_fields($master_query) ) ) {
    ++$i;
    $cur_field = ( $mysqli ? mysqli_fetch_field($master_query) : mysql_fetch_field($master_query) );
    $fields[] = $cur_field->name;
  }

  foreach( $feeds as $cur_feed_id => $cur_feed ) {
    $output_line = '';
    foreach( $cur_feed['fields'] as $output_field_name=>$db_field ) {
      if( $db_field['type'] == 'DB' && !in_array($db_field['output'], $fields) ) {
     echo 'The field ' . $db_field['output'] . ' specified in the ' . $cur_feed['filename'] . ' feed does not exist in any of the queried tables.
           Please ensure you have entered the correct field name and that it exists in one of the tables queried in $master_query (see code)';
     exit;
   }

 

It would seem that It should work. Any suggestions.

 

Thank you.

Share this post


Link to post
Share on other sites

Currently my titles are 120 characters in length. For Google Merchant feed, they require the length to be no longer than 70 characters. How can I change in the feedmachine to limit the title in the feed to 70 characters? 

 

Thanks for you help.

Share this post


Link to post
Share on other sites

The error I'm receiving is as follows...

catalog path: /home/elmstok/F5BEJ3D3/htdocs/

languages array built
currencies array built
taxes array built
countries array built
categories array built

number of products: 467
number of cycles: 1


Warning:  mysql_num_fields() expects parameter 1 to be resource, object given in /home/elmstok/F5BEJ3D3/htdocs/admin/feedmachine.php on line 339

The field products_id specified in the google-product-feed.txt feed does not exist in any of the queried tables.
	          Please ensure you have entered the correct field name and that it exists in one of the tables queried in $master_query (see code)

Share this post


Link to post
Share on other sites

Solved.

 

Updated code from line 337 in /catalog/admin/feedmachine.php...

  $i=0;
  $fields = array();
  while( $i < ( mysqli ? mysqli_num_fields($master_query) : mysql_num_fields($master_query) ) ) {
    ++$i;
    $cur_field = ( mysqli ? mysqli_fetch_field($master_query) : mysql_fetch_field($master_query) );
    $fields[] = $cur_field->name;
  }

Share this post


Link to post
Share on other sites

Hi Everyone

 

We're using Feedmachine but some products have colour and size options to them which we would like to include in the feed.

 

According to Google we need to have an item_group_id field as well as [colour] and  fields.

 

Doe anyone know how I can get feedmachine to look at the product attributes and display a different line for each option?

 

Many thanks

Share this post


Link to post
Share on other sites

anyone seen this error:

when i have one sinlge config.php file in fm-feed-configs, it all runs ok

when i have 2 or more, i just get a blank screen when clicking on feedmachine (i.e feedmachine_admin.php is creating a blank web page)

ideas ?

i'm running PHP 5.4

Share this post


Link to post
Share on other sites
Posted (edited)

we tried to work the last modified feedmachine to let it work with php 7 but we only get The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later and in the logs Error on sending request(GET /admin/feedmachine_auto.php?force_update=1 HTTP/2.0); uri(/admin/feedmachine_auto.php?force_update=1) content-length(0): ReceiveAckHdr: nothing to read from backend (LVE ID 1201), check http://docs.cloudlinux.com/mod_lsapi_troubleshooting.html

we already modified the hard coded pathes for ce frozen

our code is this and maybe some one can look at this By the way we have already from the hosting company extra memory but with no result

 

feedmachine.php

Edited by merah

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×