Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

The Feedmachine Solution


lech

Recommended Posts

been working on a new site on osc 2.3.1, and tried to install the feedmachine to the admin, but i am getting an error Fatal error: Call to a member function read() on a non-object in ../../feedmachine_loader.php on line 55.

 

it has worked fine on other sites running osc 2.2

php version 5.2.14

Phoenix support now at https://phoenixcart.org/forum/
App created for phoenix
TinyMCE editor for admin

 

Link to comment
Share on other sites

  • 4 weeks later...

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.

Link to comment
Share on other sites

  • 2 weeks later...

Hi,

 

I have a problem running this contri,

 

Warning: require(includes/configure.php) [function.require]: failed to open stream: No such file or directory in /home/auto/public_html/****shop***/***_admin_***/includes/application_top.php on line 32

Warning: require(includes/configure.php) [function.require]: failed to open stream: No such file or directory in /home/auto/public_html/****shop***/***_admin_***/includes/application_top.php on line 32

Fatal error: require() [function.require]: Failed opening required 'includes/configure.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/auto/public_html/****shop***/***_admin_***/includes/application_top.php on line 32

 

Can someone help me out?

 

Regards,

 

jasper

Link to comment
Share on other sites

The above problem is solved bij putting the admin inside the catalog folder again.

 

But now the next problem.

 

when clicking generate... button

the following message whas givven when running

 

cycle: 21

products array built
products attributes array built
feed generation in process...

Warning:  implode() [function.implode]: Invalid arguments passed in /home/auto/public_html/webshop/admin/feedmachine.php on line 71

Warning:  implode() [function.implode]: Invalid arguments passed in /home/auto/public_html/webshop/admin/feedmachine.php on line 71

Warning:  implode() [function.implode]: Invalid arguments passed in /home/auto/public_html/webshop/admin/feedmachine.php on line 71

Warning:  implode() [function.implode]: Invalid arguments passed in /home/auto/public_html/webshop/admin/feedmachine.php on line 71

 

Line 71 is about the catagories

 

Can some one help me out with this problem?

 

Regards,

 

Jasper

Link to comment
Share on other sites

How can I get this to work with SPPC.

 

I want 1 feed with wholesale prices and 1 feed with Retail prices.

 

Not every product had a wholesales price and comes not up on the wholesale side of the site

 

I have tried this

 

Change the master query to:

 

$master_query = tep_db_query('SELECT ' . ( $count_run ? 'COUNT(*) as count' : 's.*, cd.*, c.*, ptc.*, mi.*, m.*, pd.*, p.*,pg.*, 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
														  LEFT JOIN ' . TABLE_PRODUCTS_GROUPS . ' pg ON ptc.products_id = pg.products_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 : '' ));

 

 

Made a function in the feed configuration

 

function FM_ID($product) {

return $product['customers_group_id'] > 0;

}

function FM_UF_ac_round_price($product) {

return number_format($product['customers_group_price'], 2, '.', '');

}

 

these functions are used only in the wholesale feed.

 

The wholesale feed is ok, it shows the wholesale price

the retail feed however. It only shows the products that have a retail and wholesale price. It does however shows the retail price

 

So it does not show the products that only have a retail price. So that product_id does not exist in the table TABLE_PRODUCTS_GROUPS, so thats the problem

 

So it only show the prices if the product_id exist in TABLE_PRODUCTS_GROUPS and with the function above i get the wholesale price. This function is not used in the retail feed and yet it show only those products.

 

How can I fixed this

Link to comment
Share on other sites

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.

 

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.

Link to comment
Share on other sites

Hi Lech,

 

I just started at a company where they uses OScommerce for the online shopping. and they asked me to use the feed machine. I followed the readme file that was provided from feedmachine v5.03. but to the point where i go to the feedmachine_admin.php to generate the feed it display an error like this:

 

Warning: main(includes/configure.php) [function.main]: failed to open stream: No such file or directory in /clientdata/www/au/e/*****/includes/application_top.php on line 40

 

Fatal error: main() [function.require]: Failed opening required 'includes/configure.php' (include_path='.:/clientdata/php/php4/lib/php:/clientdata/php/lib') in /clientdata/www/au/e/*********/includes/application_top.php on line 40

 

now, from what i know, the code should find the configure.php in its directory not looking for includes folder.

I've tried to hard code some of the path, but there are just too many error comes up afterward.

 

any solutions that can fix this problems easily? or do i have to modify the configure.php?

 

Thanks for your help,

 

Erick

Link to comment
Share on other sites

  • 3 weeks later...

Hi,

 

I have a problem running this contri,

 

Warning: require(includes/configure.php) [function.require]: failed to open stream: No such file or directory in /home/auto/public_html/****shop***/***_admin_***/includes/application_top.php on line 32

Warning: require(includes/configure.php) [function.require]: failed to open stream: No such file or directory in /home/auto/public_html/****shop***/***_admin_***/includes/application_top.php on line 32

Fatal error: require() [function.require]: Failed opening required 'includes/configure.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/auto/public_html/****shop***/***_admin_***/includes/application_top.php on line 32

 

Can someone help me out?

 

Regards,

 

jasper

 

i'm running into the same problem. The admin folder should be in the catalog folder? there's nog catalog folder here. Is it necessary to move the entire shop into an folder named catalog?

Link to comment
Share on other sites

  • 2 weeks later...

Hi all,

 

I've set up a cron job to run feedmachine_auto.php once a night at 11:30pm, and I know the cron is working because I also set it to email me upon completion, and the e-mails are coming through. The problem is that feedmachine_auto.php isn't updating or uploading any feeds. This is the result I get, it's the same whether the cron job runs it or I run it manually from the shell:

 

-----------------------
Feedmachine Report
-----------------------

start time: 2011-06-28 09:53:52 EDT
end time: 2011-06-28 09:53:52 EDT
runtime: 0.024120807647705


GLOBAL UPDATE TRIGGERS
----------------------
(no global update triggers)

NOTICES
-------
(no notices)

                       F   E   E   D   S

Google Product Search
------------
update status: feed not updated(0)
upload trigger status: feed upload not triggered(0)
upload status: feed was not uploaded(0)

(etc. all other feed results are the same, not updated and not uploaded)

 

Any idea what's going wrong? I made sure that the appropriate folders have execute and write permissions where applicable, so I don't think that's it. I even tried commenting out the part in feedmachine_auto.php that refuses to update the feeds if there's a catalog update in progress, etc.:

 

//check to see if the catalog is currently being updated
/*$last_updated_date = max(array($global_current_info['products_last_updated']['value'], $global_current_info['specials_last_updated']['value'], $global_current_info['categories_last_updated']['value']));
if( $last_updated_date > (time()-FM_AUTO_GRACE_PERIOD_MINUTES*60) && $last_updated_date < (time()+FM_AUTO_GRACE_PERIOD_MINUTES*60) && !$force_update ) {
 echo 'Catalog is currently being updated: not generating or sending feeds.';
tep_exit();*/
} 

Still no go. I can still manually update/upload the feeds in the Feedmachine admin section of my site, just not with feedmachine_auto.php. Thoughts?

Link to comment
Share on other sites

Update: For no reason that I can figure out, now when I manually run feedmachine_auto.php from the shell it works, and regenerates and uploads my feeds. Shrug? Maybe I wasn't actually disabling the part that refuses to update if it was already updated recently? Anyway, now I'll see if the cron job will run it as well...

Link to comment
Share on other sites

  • 3 weeks later...

I've been using Feedmachine for years, but haven't kept up to date with it, instead I've been hacking things around myself, but now Google (God bless'em) have thrown another curveball and now require colour and size variants to be uploaded as individual products to their merchant center. Has Feedmachine been developed further and does it allow for this information to be pulled automatically? Any ideas how to modify it to do so if it hasn't?

Link to comment
Share on other sites

So, after about a week I finally got my site up and running with OsCommerce and Feedmachine (for Google Products) and I LOVE IT! However, I logged into Google Merchange site and I got the notice below.

 

http://base-forum-announcements.blogspot.com/2011/07/weve-made-changes-to-google-product.html

 

We've made changes to the Google Product Search Feed Specification and Policies. These changes will be enforced stringently beginning Sept. 22, 2011.

 

What I gathered from this, is that most of my work over the last week may be wasted... What changes will I need to make to the config file (and possibly OSCommerce) to comply with the new requirements of having the Google Product Category and Availability added to the feed?

 

I typically program in .NET and not in PHP, so any advice and directions would be great.

Link to comment
Share on other sites

  • 4 weeks later...

I noticed the same problem as above.

 

[Availability] is required and i dont know how to add to the feed.

 

Also i have a problem but cant find out but the google feed is no approved for product ads by google.

 

Can someone help?

 

Jasper

Link to comment
Share on other sites

Hi,

 

Does anyone know of any oscommerce expert who may be able to help in updating our feeds to be compliant with the new google shopping requirements for September 22 2011?

 

From what I can see, the minimum change is to add an 'availability' field, but there may be more.

 

Lech set up feedmachine and autofeedmachine for us and has done tweaks as required, however, I've been unable to get hold of him in the last few months.

 

Any assistance or advice would be appreciated.

Thanks

Tara

Link to comment
Share on other sites

  • 4 weeks later...

solippy, jps001, Intense-Dakota and others. There is no need to hire anyone to do such a small change. You just need to edit 2 files and that's it.

 

In order to make it visual I created a github repository with the 5.03 version of the Feedermachine (hope Lech has nothing against it) and then added the availability attribute. Here it is:

 

https://github.com/t...862c60651b521bb

 

All changes are tested and are working great.

Link to comment
Share on other sites

Hello,

 

First of all, thanks for the nice solution for the google-feed [Availability]-tag. It works nice.

I would like to ask now for help to create a function for the new google-feed [Google product category]-tag.

As I have products which should have diferent [Google product category]-tags, I can't use just the same 'VALUE' for all products.

I need a function which links my OS-Commerce shop categories (and/or) parent-categories/root-categories to different Google categories.

Something like this:

case root-category-ID=1

Google product category=A

case root-category-ID=2

Google product category=B

case parent-category-ID=30

Google product category=C

case category-ID=25

Google product category=D

etc.

 

I'm not a php code specialist and don't know how to define this function for the google-feed, please help.

 

Thanks in advance

raiwa

Link to comment
Share on other sites

Hello,

 

First of all, thanks for the nice solution for the google-feed [Availability]-tag. It works nice.

I would like to ask now for help to create a function for the new google-feed [Google product category]-tag.

As I have products which should have diferent [Google product category]-tags, I can't use just the same 'VALUE' for all products.

I need a function which links my OS-Commerce shop categories (and/or) parent-categories/root-categories to different Google categories.

Something like this:

case root-category-ID=1

Google product category=A

case root-category-ID=2

Google product category=B

case parent-category-ID=30

Google product category=C

case category-ID=25

Google product category=D

etc.

 

I'm not a php code specialist and don't know how to define this function for the google-feed, please help.

 

Thanks in advance

raiwa

 

No answer for one week, so I decided to find a solution by myself.

 

This meant a lot of "try and error", "try and error", "try and error", "try and error", "try and error", "try and error", "try and error", "try and error", "try and error", "try and error", "try and error", but I also learned something!

 

The result is here:

 

http://addons.oscommerce.com/info/7130

 

including Tims [Availability] tag solution posted above.

 

Maybe its not a very elegant solution, but it works.

 

regards

raiwa

Link to comment
Share on other sites

raiwa,

 

Thank you for this update.

 

I just installed feedmachine and this the new google products feed. It seems to be missing a function. Did you miss one file to upload as part of the package?

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

number of products: 62979
number of cycles: 63

feed configurations checked... output begun.

cycle: 1

products array built
products attributes array built
feed generation in process...


[b]Warning[/b]:  call_user_func_array() [[url="http://www.some_domain.com/testing/admin/function.call-user-func-array"]function.call-user-func-array[/url]]: First argument is expected to be a valid callback, 'FM_RS_shipping_weight_and_kg' was given in [b]feedmachine.php[/b] on line [b]510[/b]

Edited by jcall
Link to comment
Share on other sites

raiwa,

 

Thank you for this update.

 

I just installed feedmachine and this the new google products feed. It seems to be missing a function. Did you miss one file to upload as part of the package?

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

number of products: 62979
number of cycles: 63

feed configurations checked... output begun.

cycle: 1

products array built
products attributes array built
feed generation in process...


[b]Warning[/b]:  call_user_func_array() [[url="http://www.some_domain.com/testing/admin/function.call-user-func-array"]function.call-user-func-array[/url]]: First argument is expected to be a valid callback, 'FM_RS_shipping_weight_and_kg' was given in [b]feedmachine.php[/b] on line [b]510[/b]

 

 

Hello,

 

you are right, I added this function which adds a unit to the products weight in the file: feedmachine_loadingbay.php.

As I did this a few months ago and this has nothing to do with this update, I forgot about. Sorry!

The complete package is uploaded to the contribution now:

 

http://addons.oscommerce.com/info/7130

 

and information about this function added to the instructions file.

Hope it will do the job now.

 

Thanks for the feedback

 

raiwa

Link to comment
Share on other sites

Will this work with the newer 2.3.1 or only the older 2.2?

 

Cheers

 

 

Hello,

 

I'm using this contribution with OSC2.2rc2a., but in any case this is a configuration file, not the feedmachine contribution. So if the feedmachine contribution works with OSC 2.3.x, the configuration file will too. (At least I think so)

I think that the feedmachine contribution will need a modification in the file: catalog/admin/includes/boxes/feedmachine.php to work with OSC 2.3.x

 

regards

raiwa

Link to comment
Share on other sites

 

 

Hello,

 

you are right, I added this function which adds a unit to the products weight in the file: feedmachine_loadingbay.php.

As I did this a few months ago and this has nothing to do with this update, I forgot about. Sorry!

The complete package is uploaded to the contribution now:

 

http://addons.oscommerce.com/info/7130

 

and information about this function added to the instructions file.

Hope it will do the job now.

 

Thanks for the feedback

 

raiwa

 

 

PS: I forgot to mention that I changed the name of the function from:

"FM_RS_shipping_weight_and_kg"

 

to: "FM_RS_shipping_weight_and_unit"

 

So you have to use the new configuration file (google-product-search-us-en.php)

 

or to change the name in the old one.

 

regards

raiwa

Link to comment
Share on other sites

Hi Guys

 

I have had one error message and that's for the Brand - how can I add this to the feed (and have it linked to the manufacturer)

 

Many Thanks

 

Hello,

 

Sorry again, I didn't include the brand tag as I only sell own artisan products.

It was already included in the old google feed configuration.

 

Here the code:

								   'brand'			=>   array('output' => 'manufacturers_name',
																 'type' => 'DB',
																 'options' => array('STRIP_HTML', 'HTML_ENTITIES', 'STRIP_CRLF')
																),

 

It should pe pasted anywhere in the tag array of the configuration file, for example below:

 

								   'price'			=>   array('output' => 'FINAL_PRICE',
																 'type' => 'KEYWORD'
																),

 

regards

raiwa

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...