PDA

View Full Version : Google Base New Fields



Pr0ject
08-18-2011, 08:57 AM
Anyone know if the new oscmax matches the new Google base requirements for feeds?


Google Merchant Center Announcements: We've made changes to the Google Product Search Feed Specification and Policies. These changes will be enforced stringently beginning Sept. 22, 2011. (http://base-forum-announcements.blogspot.com/2011/07/weve-made-changes-to-google-product.html)


Any comments would be appreciated!

Luxoria
08-21-2011, 09:35 AM
I took a peek into the v2.5-RC-2 fm-feed-configs/google-simple.php file and it has not been updated to reflect the newer Google feed requirements.

From what I gather it's missing availability, shipping_weight, and google_product_category. Some missing optional elements include quantity, online_only, color, and additional_image_link.



For shipping weight I added the following into the google-simple.php file...


'shipping_weight' => array('output' => 'shipping_weight',
'type' => 'FUNCTION',
'options' => array('STRIP_HTML', 'STRIP_CRLF')
),

Then add the following to the functions area...

function shipping_weight($product) {

//manually add tare weight for now (temp)
return $product['products_weight'] + 1;

}


Note: I did not take the time to pull the tare weight from the database so I just manually entered in the value of '1'.
________________________


For quantity I use...



'quantity' => array('output' => 'google_quantity',
'type' => 'FUNCTION',
'options' => array('STRIP_HTML', 'HTML_ENTITIES', 'STRIP_CRLF')
),

and...


function google_quantity($product) {

return $product['products_quantity'];

}


________________________


I also added the use of additional_image_link and MOPICS...


'additional_image_link' => array('output' => 'additional_images_link',
'type' => 'FUNCTION',
'options' => array('STRIP_HTML', 'STRIP_CRLF')
),

and...


//functions to support MO_PICS in additional_images_link function
function mopics_file_exists($file_base, $file_types = DYNAMIC_MOPICS_THUMB_IMAGE_TYPES) {
$file_types = str_replace(' ', '', $file_types);
$file_types = preg_split('/[,]/', $file_types);
foreach ($file_types as $file_type) {
if (file_exists($file_base . '.' . $file_type)) {
return $file_type; }
}
return false;
}
function mopics_match_pattern($pattern) {
if (preg_match('/{.*}/U', $pattern, $matches)) {
return $matches[0];
}
return false; }
function mopics_getmethod($pattern) {
return str_replace(array('{', '}'), '', mopics_match_pattern($pattern));
}
function mopics_get_imagebase($image, $pre_append = '') {
return $pre_append . substr($image, ((DYNAMIC_MOPICS_MAINTHUMB_IN_THUMBS_DIR == 'true') ? strlen(DYNAMIC_MOPICS_THUMBS_DIR) : 0), ((DYNAMIC_MOPICS_MAINTHUMB_IN_THUMBS_DIR == 'true') ? (strrpos($image, '.') - strlen(DYNAMIC_MOPICS_THUMBS_DIR)) : strrpos($image, '.')) );
}


function additional_images_link($product) {

$images = '';

///BEGIN MOPICS

// Set the thumbnail basename; replaces "imagebase" in the user's pattern
$image_base = mopics_get_imagebase($product['products_image'], DIR_WS_IMAGES . DYNAMIC_MOPICS_THUMBS_DIR);
// Set the large image's basename; replaces "imagebase" in the user's pattern
$image_base_lg = mopics_get_imagebase($product['products_image'], DIR_WS_IMAGES . DYNAMIC_MOPICS_BIGIMAGES_DIR);
// Get the counting method for the user's pattern (1,2,3; a,b,c; A,B,C; etc)
$i = mopics_getmethod(DYNAMIC_MOPICS_PATTERN);
// Set the search for the str_replace pattern search/replace
$search = array('imagebase', mopics_match_pattern(DYNAMIC_MOPICS_PATTERN));
// Set the initial replace for the str_replace pattern search/replace
$replace = array($image_base, $i);
// Are there any extra thumbnails for this product?

$loopcount = 0;

$first_into_flag = 0;

// Loop until all of this product's thumbnails have been found and displayed
while ($loopcount++ < 100) {
$image_ext = mopics_file_exists(str_replace($search, $replace, DYNAMIC_MOPICS_PATTERN));
if ($image_ext != '') {
// Set large image replacement for the str_replace pattern search/replace
$replace_lg = array($image_base_lg, $i);
// Only link to the popup if a larger image exists
if ($lg_image_ext = mopics_file_exists(str_replace($search, $replace_lg, DYNAMIC_MOPICS_PATTERN))) {
// Set the lar3ge image for this loop
$image_lg = str_replace($search, $replace_lg, DYNAMIC_MOPICS_PATTERN) . '.' . $lg_image_ext;

if ($first_into_flag == 0) $images = $images . tep_href_link($image_lg);
if ($first_into_flag == 1) $images = $images . ',' . tep_href_link($image_lg);

$first_into_flag = 1;

} //if if large image exists

} //end if ext
// Increase current count
$i++;
// Update the replace for the str_replace pattern search/replace for next image in the sequence
$replace = array($image_base, $i);
} //end while


///END MOPICS

return $images;
}

The MOPICS code works and outputs :
link,link,link,link ...however I have yet to verify if Google has properly read the links.


_________________


When it comes to availability....


'availability' => array('output' => 'google_availability',
'type' => 'FUNCTION',
'options' => array('STRIP_HTML', 'STRIP_CRLF')
),

and...


function google_availability($product) {

if ($product['products_quantity'] > 0) return 'in stock';

return 'out of stock';

}


__________________


All my items are online only so I just use...


'online_only' => array('output' => 'yes',
'type' => 'VALUE'
),


______________________


The tricky part is adding support for google_product_category. If the merchant feed has only products fitting in a certain category then the code is simple, like...


'google_product_category' => array('output' => 'Home & Garden > Lighting > Night Lights',
'type' => 'VALUE'
),

However, if the store stocks items spread across multiple categories it will be possibly necessary to add the google_product_category information into the database when adding the product to the database (at the new product screen in admin). This mod requires core modification.

Hope this helps... you may look at my feed file if you wish, but it's geared specifically for my store, database, and coding style. Also note, the functions really need to have generic names, ie remove 'google', then have them placed into the proper location of the file 'feedmachine_loadingbay.php' so they can be used by other feed configs such as bing and thefind.

-R

ridexbuilder
08-21-2011, 11:04 AM
Very good grounding for an updated google feed.
Thanks for sharing.

pgmarshall
08-21-2011, 11:37 AM
Can someone link this into the bugtracker to be updated?

Thanks,

ridexbuilder
08-21-2011, 11:44 AM
BTW, clever template design, Lux., I thought my eyes were going screwy for a minute. :)

Luxoria
08-21-2011, 12:49 PM
Lol, thanks. I invested great effort and time into aligning my template with my products. =)

Oh, pgm, IDK how to link this into the bug tracker, unless you mean just make a report.

pgmarshall
08-21-2011, 01:59 PM
Just report it as a bug and post the URL into the notes - so I can link back to this thread and add your excellent work to the core.

Thanks for contributing Lux.

Regards,

ridexbuilder
08-21-2011, 02:29 PM
I suggest, in the first instance, we call Luxoria's modified file google-rc2a.php and use it as a basis for the 'production' one. This way the original is untouched and, for example, the
function shipping_weight($product)
can be looked at.

goldstrikn
09-03-2011, 10:59 AM
So, will there be an updated generic file that can be used?

cujo
09-16-2011, 09:52 AM
any update on when this will be done, getting close to googles dead line.

ridexbuilder
09-16-2011, 09:55 AM
any update on when this will be done, getting close to googles dead line.
Was just thinking about this today - I'll need it for my clients' sites. Think I'll take a look just as soon as I complete the Links Manager II update that I'm working on - nearly complete.
:bandana:

Pr0ject
09-16-2011, 09:59 AM
I basically only needed to add the google product category field and almost all of my products fall under one category so I just added a line to include that in the feed thats it.

ridexbuilder
09-17-2011, 05:42 AM
Have taken some time to review all this. Google in its wisdom has decided to make the criteria different for some Countries and product types - great! :(

I invite anyone/everyone to submit updated FM config files, to see if we can cover most/all bases. Please follow the guidelines in the supplied google-simple file (the Bing feed one didn't, hence the issue with running alongside the Google one - I'll try to find time to update that one).

I propose that new feeds be named, for examples:
google-ej-uk-general
google-ej-uk-books
google-ej-us-general etc.

This extends the naming convention guideline and this way we can all benefit from others work.

I'm currently working out how to pull in the manufacturers name (a required field). By default FM-feed only reads from the product and product description database tables, which is too restrictive.

I envisage that a new field (probably in the products table) will be useful for Google Categories. Otherwise, it's likely shop owners will be forced to comply with Googles own Categories - far too draconian! Who do they think they are, Sony/Microsoft?! :eek: This will be a pain, as a patch into the already bloated categories.php will be needed. Many shops sell a variety of product types which won't necessarily be easy to find or be appropriate, using Google-defined Categories. Perhaps use an Extra Product Field (only for 'Max 2.5 users)

I originally chose the Feedmachine Solution as a manually added contribution because it looked to be adaptable. The author had invited people to add more feeds but they appear to be "thin on the ground". Might it be an idea to start a new thread with all Feed Configurations grouped together?

cujo
09-29-2011, 07:43 AM
any update on this yet recvied email from google telling me they will suspnded my items in 7 days.

In reviewing the items you are submitting through the Google Merchant
Center, we have found some issues with the information submitted. Because
of the issues listed below, all of your items for the indicated countries
are at risk of being suspended from Google Product Search. Please fix
these issues within 7 days to avoid suspension of all your items

Some or all of the items in your feed are missing unique product
identifiers, such as 'MPN', 'brand' and 'GTIN'. These values are very
important for matching users' queries to your products. It is required to
provide unique product identifiers for most product categories

pgmarshall
09-30-2011, 05:26 AM
If you are using v2.5 then upgrade the feedmachine google code - osCommerce Community Add-Ons (http://addons.oscommerce.com/info/7130) - if it works well for you then post in the bugtracker and it will get integrated to the core. Regards.

niallb
09-30-2011, 08:32 AM
One thing to bear in mind, the Google product requirements vary from USA to Europe and Asia, so unless someone can code it to allow all the options ppl still need to do a bit of tinkering around themselves

cujo
09-30-2011, 09:04 AM
ok updated like you said to do but iam still a litle confused here is one of my products detals dont know how to change id and google catgories so can someone give me a step by step on what needs to be done Thank you all so much for the help.

Id: Your_shops_shortname_578_us_enPrice: $23.90Mpn: CW32403Google product category: Google > Category > Tree3Product type: Candle HoldersCondition: newShipping weight: 5 lbAvailability: in stock

niallb
09-30-2011, 09:38 AM
ok updated like you said to do but iam still a litle confused here is one of my products detals dont know how to change id and google catgories so can someone give me a step by step on what needs to be done Thank you all so much for the help.

Id: Your_shops_shortname_578_us_enPrice: $23.90Mpn: CW32403Google product category: Google > Category > Tree3Product type: Candle HoldersCondition: newShipping weight: 5 lbAvailability: in stock

From what I can see in Google, the ID shouldnt be your shops name, it should be a different alphanumeric list that differs for each product - I have simply used 1, 2, 3 etc and Google accepted it with no errors showing. You may want to read up on it here (http://www.google.com/support/merchants/bin/answer.py?answer=188494#GB)

cujo
10-01-2011, 06:53 AM
ok i am still getting errors from Google and when i do search for one of my products i find it in the google search but the box were the picture should be has the following http://lh5.googleusercontent.com/public/bUpuCt8eNGyEboDkld-16FHqbDTubu3rtMnnU8I3-K8UxXQHVWRqH4jJ-SuTXtRMRfnLfiSPT59VUZkQgIcFqJGu3-0Jw6Cy8ncsNnSXBKkuBWYtMIGF8tq3LCHR3Lda7_bZmMYm-hC4O8xbWHWR=s90-c (http://www.google.com/url?sa=t&source=productsearch&cd=40&ved=0CIYBEPYCMAk4Hg&url=http%3A%2F%2Fwww.cujosinc.com%2Fcatalog%2Fprod uct_info.php%3Fproducts_id%3D1577%26utm_source%3Dg oogle-product-search-us-en%26utm_medium%3Dproduct_search%26utm_campaign%3D google-product-search-us-en&ei=uieHTvWwK4bn0QGDu90m&usg=AFQjCNFwM4aB1JW-SNQja-cf0OUhudLPHw&sig2=CM350KD7gYkvqzeCQ-4kMg)
aby ideas and here is what google says iam missing.

Missing recommended attribute: brand (1643 warnings)
While items missing recommended attributes will process successfully, we recommend including relevant attributes if they are available.







718
http://www.google.com/base/resource/1371408987-v2-blank.gif Missing recommended attribute: google product category (718 warnings)
While items missing recommended attributes will process successfully, we recommend including relevant attributes if they are available.







2
http://www.google.com/base/resource/1371408987-v2-blank.gif Missing recommended attribute: mpn (2 warnings)
While items missing recommended attributes will process successfully, we recommend including relevant attributes if they are available.







1
http://www.google.com/base/resource/1371408987-v2-blank.gif Missing recommended attribute: description (1 warning)
While items missing recommended attributes will process successfully, we recommend including relevant attributes if they are available.

ridexbuilder
10-01-2011, 08:58 AM
I'm looking at it now - you can't simply overwrite the files! For some crazy reason the last contribution changed one of the fields to a different name, for no apparent reason - grr. The addition of weight attribute is poorly conceived and hard-coded. In addition, it's a generic osCommerce contrib. which isn't tailored for 'Max.
To add insult, it is U.S.-centric too :( - another poor foreign policy. :p

ridexbuilder
10-01-2011, 09:59 AM
I haven't tried this but should be closer to the mark - backup before uploading.
666

cujo
10-01-2011, 11:00 PM
i copied files over when i go to admin and run feed it is just a white page never loads.

pgmarshall
10-02-2011, 12:11 AM
White page = php error. Turn on error reporting -- see wiki. Post error message here or reload your backups.

Regards,

cujo
10-02-2011, 12:16 AM
put backup files back everything back to the way it was but when i copy your files just get white page on screen.

ridexbuilder
10-02-2011, 12:58 AM
Well, Sunday morning half-asleep: uploaded the three files (having renamed the 2 original ones) and ran Feedmachine - ran fine.
However, the output is rubbish!


Your_shops_shortname_1_us_en Apple MacBook Pro 13.3 933.64 Apple MC374B/A Google > Category > Tree1 .... Laptops
More work required for something semi-decent.

ridexbuilder
10-02-2011, 01:09 AM
Here's a better version, with ID based on your store name and shipping weight unit added.
Google categories are still rubbish though.
667

cujo
10-02-2011, 11:31 AM
there must be something i doing wrong i copied your files but still get white page i renamed the files in the admin folder and copied yours i also renamed the file in the fm-feed-configs folder in the admin but when i go to run it in the admin get white page no errors in error log. i have put back the files that were working and it works so something is not right. when i add your files it does not work.

668

ridexbuilder
10-02-2011, 01:35 PM
Turn on error reporting for admin - see wiki. Also, try moving the existing fm-feed-configs files to a backup, leaving only the one above in place.
Confirm your version of 'Max - this was written on 2.5 RC1, though AFAIK there has been no update for RC2 (I haven't checked).
Note: unlikely to work for 2.0.25 but might.

cujo
10-04-2011, 07:37 AM
That did the Trcik removing the files Everything working Great Now Thank you for the Great Help

pgmarshall
10-04-2011, 10:39 AM
EJ - are you going to commit this to the core?

regards,

ridexbuilder
10-04-2011, 11:18 AM
EJ - are you going to commit this to the core?

regards,
Further work required, in particular the Google Categories - can we just map then to store Categories, for example.
Also, we need a variation on the feed for a different market, to verify the concept.
I do need to find time/energy to get it working for my clients but others may beat me to it (not you). :rolleyes:

EJ

goldstrikn
10-06-2011, 06:38 PM
Hi EJ,

I hope all is well. I tried your feed config, but it returned with some errors. The "availability" column (csv) is blank when I run the fm config through admin. So, I reverted to your original file that you post maybe about 3weeks ago. When I had your original config file my products where shown in Product Ads, but not in product search in google shopping. According to google merchant, the "availability" is missing, so I believe once this information is filled then it will show up in product search.

I'm not sure if you or anybody will have the chance to provide a config file that will work for products for the U.S.

---------------

Actually, I take some of it back. I forgot to upload the other 2 files (feedmachine_loadingbay and feedmachine.php), the availability does show as "in stock". But in the merchant center it shows the error of "availability" not shown, which is odd. Unless they require some other type of data.

ridexbuilder
10-07-2011, 02:54 PM
I've spent a few hours tonight brewing another configuration.... needs more work, to get Brand working correctly. I'm getting a resource error on the SQL statement but nearly there.
I have a feed that works for one client but Brand was set as OEM, due to no manufacturers being input.

For those with 'availability' problems edit feedmachine.php and change
in stock --> In Stock
out of stock --> Out Of Stock
That fixed a UK feed.

EJ
[Why does this feel like a blog?]

ridexbuilder
10-08-2011, 08:52 AM
Good news: Brand is now working.
Bad news: I need to package it up for 2.5, as well as 2.0.25
Worse news: no beer money to aid the cause --> :beer: (https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=7401143)

ridexbuilder
10-08-2011, 02:48 PM
Latest iteration, with 2 config files to try out.
US one has a rubbish Google Category tree. UK one has OEM entered where there is no manufacturer specified and has no shipping weight.

Backup original files in your admin directory and rename your fm-feed-configs to 'fm-feeds-inactive' (for example), prior to uploading the new ones.

671

MrE03
10-11-2011, 12:21 AM
Does this also eliminate the access entity codes such as &acirc;€™ (which originally was ') It's throwing errors because it's convering special character's into entity codes instead in Google base.

ridexbuilder
10-11-2011, 03:04 AM
Does this also eliminate the access entity codes such as &acirc;€™ (which originally was ') It's throwing errors because it's convering special character's into entity codes instead in Google base.
Eh, no! Why the heck would it? (Rhetorical.) :smash:
Try changing this in your feed config file:

'encoding' => 'false', //'utf8' or false for standard encoding:faint:

cujo
10-13-2011, 05:45 AM
What is the Differance Between this version and Number 2 the reason i ask is Number 2 is workig for me Just wondering if i need to change.


Good news: Brand is now working.
Bad news: I need to package it up for 2.5, as well as 2.0.25
Worse news: no beer money to aid the cause --> :beer: (https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=7401143)

ridexbuilder
10-13-2011, 06:04 AM
Too busy on another (major) contrib. update just now. Download and do a file compare to see the differences.

ALElder
10-14-2011, 05:44 AM
Ridexbuilder,

I am attempting to upgrade this mod for a US base store I am receiving the white screen of death :)

Store version: OSCMax 2.5 RC2

I think the error I am receiving is with the fm-feed-config files can please provide some help what do I need to correct in order to have the page load again?

Thanks,

Adam

ALElder
10-14-2011, 05:53 AM
Ok guys I missed step one :)

rename your fm-feed-configs to 'fm-feeds-inactive' (for example), prior to uploading the new ones.

If anyone is looking for the us Tree it can be found here: http://www.google.com/support/merchants/bin/answer.py?answer=160081

How would one go about sub categories?

Adam

ridexbuilder
10-14-2011, 07:08 AM
...I am receiving the white screen of death...
Wow, ALElder lives! :-D

ridexbuilder
10-14-2011, 07:12 AM
... How would one go about sub categories?


It only accepts categories from Google's product taxonomyWhich I reckon is utter draconian tosh! (To put it mildly) Google wants you to reorganise your inventory layout just to suit them. Vote with your feet!

[Though, if I get enough beer money, I might extend the product interface and add a few google_category fields to a database table. As that is unlikely (according to history with other Projects), then I guess someone else better get coding. ;)]

EJ

cujo
11-04-2011, 12:04 PM
iam trying to add more catogies got to 20 but when ever i try to add anymore i just get a white screen here is what i have so far i need 30 any Help would be wonderful


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 == 1) ? 'Google > Category > Tree1' :
(($output_field_category == 2) ? 'Google > Category > Tree2':
(($output_field_category == 3) ? 'Google > Category > Tree3':
(($output_field_category == 4) ? 'Google > Category > Tree4':
(($output_field_category == 5) ? 'Google > Category > Tree5':
(($output_field_category == 6) ? 'Google > Category > Tree6':
(($output_field_category == 7) ? 'Google > Category > Tree7':
(($output_field_category == 8) ? 'Google > Category > Tree8':
(($output_field_category == 9) ? 'Google > Category > Tree9':
(($output_field_category == 10) ? 'Google > Category > Tree10':
(($output_field_category == 11) ? 'Google > Category > Tree11':
(($output_field_category == 12) ? 'Google > Category > Tree12':
(($output_field_category == 13) ? 'Google > Category > Tree13':
(($output_field_category == 14) ? 'Google > Category > Tree14':
(($output_field_category == 15) ? 'Google > Category > Tree15':
(($output_field_category == 16) ? 'Google > Category > Tree 16':
(($output_field_category == 17) ? 'Google > Category > Tree 17':
(($output_field_category == 18) ? 'Google > Category > Tree 18':
(($output_field_category == 19) ? 'Google > Category > Tree 19':
(($output_field_category == 20) ? 'Google > Category > Tree 20':



''))))))))))))))))))));
}

cujo
11-04-2011, 03:25 PM
firgured it out forgot to add The ) at the bottom for each new line i added.


iam trying to add more catogies got to 20 but when ever i try to add anymore i just get a white screen here is what i have so far i need 30 any Help would be wonderful


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 == 1) ? 'Google > Category > Tree1' :
(($output_field_category == 2) ? 'Google > Category > Tree2':
(($output_field_category == 3) ? 'Google > Category > Tree3':
(($output_field_category == 4) ? 'Google > Category > Tree4':
(($output_field_category == 5) ? 'Google > Category > Tree5':
(($output_field_category == 6) ? 'Google > Category > Tree6':
(($output_field_category == 7) ? 'Google > Category > Tree7':
(($output_field_category == 8) ? 'Google > Category > Tree8':
(($output_field_category == 9) ? 'Google > Category > Tree9':
(($output_field_category == 10) ? 'Google > Category > Tree10':
(($output_field_category == 11) ? 'Google > Category > Tree11':
(($output_field_category == 12) ? 'Google > Category > Tree12':
(($output_field_category == 13) ? 'Google > Category > Tree13':
(($output_field_category == 14) ? 'Google > Category > Tree14':
(($output_field_category == 15) ? 'Google > Category > Tree15':
(($output_field_category == 16) ? 'Google > Category > Tree 16':
(($output_field_category == 17) ? 'Google > Category > Tree 17':
(($output_field_category == 18) ? 'Google > Category > Tree 18':
(($output_field_category == 19) ? 'Google > Category > Tree 19':
(($output_field_category == 20) ? 'Google > Category > Tree 20':



''))))))))))))))))))));
}

firgured it out forgot to add The ) at the bottom for each new line i added.

Rpent001
12-16-2011, 07:46 AM
I have added a table to the database and a Google Taxonomy dropdown based on the categories that Google will accept. I am going to upload that contribution later on today or tomorrow morning so everyone can take a look at it.

-Rick

Rpent001
12-16-2011, 09:23 AM
This is also why I added SKU and GTIN (UPC) fields to the products as well as product attributes. Google seems to be getting strict with their requirements for their feeds because they are concerned about the customer experience. Especially with things like apparel. From what I gather, you need a record for each variation of a piece of apparel. If it comes in S, M, L and in ten different colors you need to make 30 entries. All of which recommend that you add a MPN as well as a GTIN. Crazy huh?

Rpent001
12-18-2011, 05:28 AM
I have submitted these two contributions in the bug tracker to help in moving forward with this issue. It seems Google is getting a lot more strict when it comes to the quality of data in these feeds.

0001057: Google Taxonomy Category Selector - osCmax Bug Tracking System (http://bugtrack.oscmax.com/view.php?id=1057)
0001058: Product SKU and GTIN Fields - osCmax Bug Tracking System (http://bugtrack.oscmax.com/view.php?id=1058)

-Rick

llamma
12-30-2011, 10:42 AM
Rpent001 I've been checking out the files you uploaded to bugtracker. Between the two it seems there are quite a few changes. Could you do a bit of a general recap of whats changed what can be expected once updated. Perhaps a screen shot or two? Any warnings or thoughts you might have about the installation might be helpful as well. I'll be checking it out on my dev server soon.

All-
I think a couple other features might be useful as well.

I note that the output currently the "condition" is hard coded to "New" we offer "Used" and "Refurbished" items as well and Google accepts these condition values so I will be checking into adding this to the product record.

Also I find some of our items inappropriate to be sent to Google. For instance we have an item called "A dollar of something" since we do custom work its not reasonable to add each one off as an item so we agree upon a price and direct customers to purchase a certain number of "A dollar of something" to represent the cost. Sending this item to Google would cause confusion. Also there are various items that Google bans the sale of (like human body parts! yikes) and they do not want you to upload. I'd give my left pinkie toe ;) if we had a "Feeds Yes/No" type option on the product record.

billmcelligott
01-16-2012, 11:25 PM
Hi all , I need a little assistance. I have one site where this feed works and another where it does not.

site that works = http://www.lodgeroomstore.com/sales/catalog/fm-feeds/general-uk-product-search.txt

s (http://www.lodgeroomstore.com/sales/catalog/fm-feeds/general-uk-product-search.txt)ite that does not = http://www.masonicbookstore.co.uk/catalog/fm-feeds/general-uk-product-search.txt

(http://www.masonicbookstore.co.uk/catalog/fm-feeds/general-uk-product-search.txt)I cant figure why second site will not work any ideas ?

gfool
01-26-2012, 05:16 AM
Does someone have a quick function to remove all the products from hiddent categories?

I'm thinking of using something similar to the google tree but for my hidden categories making it output "POTATO" or something so google will reject. Is there a nicer way?

ridexbuilder
01-26-2012, 06:11 AM
Hi all , I need a little assistance. I have one site where this feed works and another where it does not.

site that works = http://www.lodgeroomstore.com/sales/catalog/fm-feeds/general-uk-product-search.txt

s (http://www.lodgeroomstore.com/sales/catalog/fm-feeds/general-uk-product-search.txt)ite that does not = http://www.masonicbookstore.co.uk/catalog/fm-feeds/general-uk-product-search.txt

(http://www.masonicbookstore.co.uk/catalog/fm-feeds/general-uk-product-search.txt)I cant figure why second site will not work any ideas ?

Could it be that you have a lot of crap in the product descriptions? Example:


.ReadMsgBody{ width:100%; } .ExternalClass{
or that items are lacking a description. You will need to read the error messages that Google is giving you.

Pr0ject
02-01-2012, 11:40 PM
Okay worked out great. i used the file "Feedmachine-admin-ej-25.3" replaced the files and deleted the config directory contents and uploaded the config contents from the "Feedmachine-admin-ej-25.3" file.

Anyone know how or POINT ME IN THE RIGHT DIRECTION for FREE SHIPPING?
so that I can add a modifier that will add a free shipping column to all products that have a 0 weight?

Also is anyone having luck with the auto upload?
I get the below when I try to do the ftp upload.

"
Warning: ftp_put() [function.ftp-put]: php_connect_nonb() failed: Operation now in progress (115) in /home/oshkosh/public_html/ADMIN6789123/feedmachine_auto.php on line 371

Warning: ftp_put() [function.ftp-put]: Type set to A. in /home/oshkosh/public_html/ADMIN6789123/feedmachine_auto.php on line 371

Warning: ftp_put() [function.ftp-put]: php_connect_nonb() failed: Operation now in progress (115) in /home/oshkosh/public_html/ADMIN6789123/feedmachine_auto.php on line 371

Warning: ftp_put() [function.ftp-put]: Entering Passive Mode (74,125,54,213,4,176) in /home/oshkosh/public_html/ADMIN6789123/feedmachine_auto.php on line 371

Warning: ftp_put() [function.ftp-put]: PORT command successful. in /home/oshkosh/public_html/ADMIN6789123/feedmachine_auto.php on line 371

Warning: ftp_put() [function.ftp-put]: Can't build data connection: Connection timed out. in /home/oshkosh/public_html/ADMIN6789123/feedmachine_auto.php on line 371

Warning: ftp_put() [function.ftp-put]: Entering Passive Mode (74,125,54,213,4,72) in /home/oshkosh/public_html/ADMIN6789123/feedmachine_auto.php on line 371"

niallb
02-02-2012, 02:28 PM
On my sites to show FREE SHIPPING on Google Products (Im in the UK), create a 'Shipping' column and enter 'GB::Royal Mail::0.00', or US equiv.

Pr0ject
02-02-2012, 02:33 PM
Do you have that in your config file in the code form??



On my sites to show FREE SHIPPING on Google Products (Im in the UK), create a 'Shipping' column and enter 'GB::Royal Mail::0.00', or US equiv.

niallb
02-03-2012, 08:05 AM
Do you have that in your config file in the code form??
No I add this column manually after downloading the feed onto an excel sheet

Pr0ject
02-03-2012, 08:45 AM
Here is the code I used in "google-product-search-ej-us-general.php"


" 'availability' => array('output' => 'IS_IN_STOCK',
'type' => 'KEYWORD'
),
'shipping' => array('output' => 'FM_RS_free_shipping',
'type' => 'FUNCTION'
)
),
"

and then i added the following function,

"
function FM_RS_free_shipping($product) {
$output_field_category = $product['products_weight'];
if ($output_field_category =='0.000'){
return (($output_field_category =! 0) ? 'US::ECONOMY:0.00' : '');
}
}
"

ridexbuilder
02-03-2012, 11:51 AM
So now your file should be called "google-product-search-pj-us-general.php" to reflect that Pr0ject has modified it.
I don't want the blame. ;):p

Pr0ject
03-13-2012, 06:17 PM
Okay so I just added the individual ship from the bug tracker, which is working great but now I want to include the individual shipping into the feed, anyone know how I can additional tables to the feedmachine?

Pr0ject
03-13-2012, 07:03 PM
So this is what I did, I hope this is working but I will check back
Starting with line 322
"while( true ) {
++$counter;
$master_query = tep_db_query('SELECT ' . ( $count_run ? 'COUNT(*) as count' : 's.*, cd.*, c.*, ptc.*, mi.*, m.*, pd.*, p.*, ps.products_ship_price, 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_SHIPPING . ' ps ON ps.products_id = p.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 : '' ));"
"


ps.products_ship_price,* ABOVE is CRUCIAL,
I tried using ps.*, selecting all from the products_shipping table but
I think because the column in products and column in products_shipping
are both labeled products_id it confuses and the resulting feed only has a limited number of products.
should the table column in products_shipping be renamed something else to prevent future problems?


THEN

in
google-product-search-ej-us-general.php
I changed the function that I added above
to
"
function FM_RS_free_shipping($product) {
$output_field_category = $product['products_ship_price'];
if ($output_field_category =='0'){
return (($output_field_category =! 0) ? 'US::ECONOMY:0.00' : '');
}
}
"

Pr0ject
03-20-2012, 01:12 PM
i updated the function again so that it will work with variable shipping rates besides just free shipping.

function FM_RS_free_shipping($product) {
$output_field_category = $product['products_ship_price'];
if ($output_field_category >= '0'){
return (($output_field_category =! 0) ? 'US::ECONOMY:' . $product['products_ship_price'] . '' : '');
}
}

ALElder
03-29-2012, 07:34 AM
i updated the function again so that it will work with variable shipping rates besides just free shipping.

function FM_RS_free_shipping($product) {
$output_field_category = $product['products_ship_price'];
if ($output_field_category >= '0'){
return (($output_field_category =! 0) ? 'US::ECONOMY:' . $product['products_ship_price'] . '' : '');
}
}


Job well done!!!

Any way for you to attache the updated files to this string.

Thanks,

Adam

Pr0ject
03-29-2012, 09:22 AM
I would but I have already modified the code again sorry. However, if you follow my instructions you should achieve the same result.



Job well done!!!

Any way for you to attache the updated files to this string.

Thanks,

Adam

Pr0ject
03-29-2012, 09:23 AM
I would but I have already modified the code again sorry. However, if you follow my instructions you should achieve the same result.



Job well done!!!

Any way for you to attache the updated files to this string.

Thanks,

Adam

ALElder
03-29-2012, 09:40 AM
So this is what I did, I hope this is working but I will check back
Starting with line 322
"while( true ) {
++$counter;
$master_query = tep_db_query('SELECT ' . ( $count_run ? 'COUNT(*) as count' : 's.*, cd.*, c.*, ptc.*, mi.*, m.*, pd.*, p.*, ps.products_ship_price, 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_SHIPPING . ' ps ON ps.products_id = p.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 : '' ));"
"


ps.products_ship_price,* ABOVE is CRUCIAL,
I tried using ps.*, selecting all from the products_shipping table but
I think because the column in products and column in products_shipping
are both labeled products_id it confuses and the resulting feed only has a limited number of products.
should the table column in products_shipping be renamed something else to prevent future problems?


THEN

in
google-product-search-ej-us-general.php
I changed the function that I added above
to
"
function FM_RS_free_shipping($product) {
$output_field_category = $product['products_ship_price'];
if ($output_field_category =='0'){
return (($output_field_category =! 0) ? 'US::ECONOMY:0.00' : '');
}
}
"


Just an FYI the 1st file he edit was "feedmachine.php"

ALElder
03-29-2012, 09:58 AM
Any idea how to get table rate to work?

Pr0ject
03-29-2012, 02:37 PM
What do you mean by table rate?

ALElder
03-29-2012, 03:47 PM
Table Rate takes into the account how much the item weighs, and then based on the metrics setup it will calculate shipping amounts

Pr0ject
03-29-2012, 07:52 PM
well you can call that variable into play easily products[product_weight]*rate you want to use... Do you have a table of rates? but you can also do this through google website... i think

rodsstuff
04-11-2012, 10:36 AM
How would you set this up for sub and sub,sub categories. Single categories work fine. 1 and 2 sub categories dont work.

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 == 1) ? 'Google > Category > Tree1' :
(($output_field_category == 2) ? 'Google > Category > Tree2':
(($output_field_category == 3) ? 'Google > Category > Tree3':
(($output_field_category == 4) ? 'Google > Category > Tree4':
(($output_field_category == 5) ? 'Google > Category > Tree5':
(($output_field_category == 6) ? 'Google > Category > Tree6':
(($output_field_category == 7) ? 'Google > Category > Tree7':
(($output_field_category == 8) ? 'Google > Category > Tree8':
(($output_field_category == 9) ? 'Google > Category > Tree9':
(($output_field_category == 10) ? 'Google > Category > Tree10':
(($output_field_category == 11) ? 'Google > Category > Tree11':
(($output_field_category == 12) ? 'Google > Category > Tree12':
(($output_field_category == 13) ? 'Google > Category > Tree13':
(($output_field_category == 14) ? 'Google > Category > Tree14':
(($output_field_category == 15) ? 'Google > Category > Tree15':
(($output_field_category == 10000) ? '':
(($output_field_category == 10000) ? '':
(($output_field_category == 10000) ? '':
(($output_field_category == 10000) ? '':
(($output_field_category == 10000) ? '':
''))))))))))))))))))));
}

Pr0ject
04-11-2012, 10:42 AM
all categories are assigned a field category #, so you can set it up no problem. At least that is what I think.

rodsstuff
04-11-2012, 10:48 AM
how do you find the category# for the sub category? or do you know how they are numbered. ie category #1 subcategory 1a subcategory 1b and ect.

rodsstuff
04-11-2012, 12:55 PM
Ok the feed is working and adds the google category to everything except categories that have 2 or more sub categories. If there is only one sub category it works fine. What do I need to change to make this work.
Category 6 and 8 go 2 sub categories deep

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 == 1) ? 'Vehicles & Parts > Vehicle Parts & Accessories > Motorcycle Accessories' :
(($output_field_category == 2) ? 'Apparel & Accessories > Wallets & Money Clips':
(($output_field_category == 3) ? 'Apparel & Accessories > Clothing > Activewear > Motorcycle Protective Clothing':
(($output_field_category == 4) ? 'Vehicles & Parts > Vehicle Parts & Accessories > Motorcycle Accessories > Motorcycle Bags & Panniers':
(($output_field_category == 5) ? 'Apparel & Accessories > Handbags':
(($output_field_category == 6) ? 'Apparel & Accessories > Clothing > Activewear > Motorcycle Protective Clothing > Motorcycle Suits':
(($output_field_category == 7) ? 'Apparel & Accessories > Clothing > Activewear > Motorcycle Protective Clothing':
(($output_field_category == 8) ? 'Vehicles & Parts > Vehicle Parts & Accessories > Motorcycle Accessories > Motorcycle Protective Gear > Motorcycle Helmets':
(($output_field_category == 9) ? 'Arts & Entertainment > Party & Celebration > Gift Giving > Gift Cards & Certificates':
(($output_field_category == 10) ? 'Vehicles & Parts > Vehicle Parts & Accessories > Motorcycle Accessories':
(($output_field_category == 11) ? 'Google > Category > Tree11':
(($output_field_category == 12) ? 'Google > Category > Tree12':
(($output_field_category == 13) ? 'Google > Category > Tree13':
(($output_field_category == 14) ? 'Google > Category > Tree14':
(($output_field_category == 15) ? 'Google > Category > Tree15':
(($output_field_category == 10000) ? '':
(($output_field_category == 10000) ? '':
(($output_field_category == 10000) ? '':
(($output_field_category == 10000) ? '':
(($output_field_category == 10000) ? '':
''))))))))))))))))))));
}

Pr0ject
04-11-2012, 01:29 PM
Sub categories are simply a category in oscmax to the best of my knowledge so

main > sub > sub2 > sub 3

maybe numbers

1 > 5 > 25 > 30

and so you just say 1 is blah blah
5 is blah blah
and so on so forth,

i don't see why if there are additional sub categories that it would matter.

rodsstuff
04-11-2012, 01:49 PM
It has to do with ($product['parent_id'] > 0)
As is google categories will be added to the parent and child category. If you go more than 1 child category deep it wont add to the category. My category 1 has 8 sub categories. the google category is added to all sub categories. Category 6 has 3 sub categories and each of those 3 have 2 sub sub categories. It wont add google categories to category 6 because it goes 3 deep.

Pr0ject
04-11-2012, 01:57 PM
I am confused, anyone else?

Pr0ject
04-11-2012, 02:01 PM
I still maintain that each category (whether sub or not, or if it had 20 subs or whatever) has a unique id number and based on that id # you can assign it any google category you want.

Pr0ject
04-11-2012, 02:02 PM
The quick way is to look it up int he categories table in phpmyadmin, or the id # should be listed in the url when you edit that category.

how do you find the category# for the sub category? or do you know how they are numbered. ie category #1 subcategory 1a subcategory 1b and ect.

rodsstuff
04-11-2012, 02:03 PM
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 == 1) ? 'Vehicles & Parts > Vehicle Parts & Accessories > Motorcycle Accessories' :
(($output_field_category == 2) ? 'Apparel & Accessories > Wallets (http://www.zappos.com/product/7887728/color/200) & Money Clips':
(($output_field_category == 3) ? 'Apparel & Accessories > Clothing > Activewear > Motorcycle Protective Clothing':
(($output_field_category == 4) ? 'Vehicles & Parts > Vehicle Parts & Accessories > Motorcycle Accessories > Motorcycle (http://www.cruisercustomizing.com/lower-motorcycle-chaps-victory-kawasaki-yamaha-plain/part/LMA-P-20P) Bags & Panniers':
(($output_field_category == 5) ? 'Apparel & Accessories > Handbags':
(($output_field_category == 6) ? 'Apparel & Accessories > Clothing > Activewear > Motorcycle Protective Clothing > Motorcycle Suits':
(($output_field_category == 7) ? 'Apparel & Accessories > Clothing > Activewear > Motorcycle Protective Clothing':
(($output_field_category == http://i.oscmax.co/images/smilies/icon_cool.gif ? 'Vehicles & Parts > Vehicle Parts & Accessories > Motorcycle Accessories > Motorcycle Protective Gear > Motorcycle Helmets':
(($output_field_category == 9) ? 'Arts & Entertainment > Party & Celebration > Gift Giving > Gift Cards & Certificates':
(($output_field_category == 10) ? 'Vehicles & Parts > Vehicle Parts & Accessories > Motorcycle Accessories':
(($output_field_category == 11) ? 'Google > Category > Tree11':
(($output_field_category == 12) ? 'Google > Category > Tree12':
(($output_field_category == 13) ? 'Google > Category > Tree13':
(($output_field_category == 14) ? 'Google > Category > Tree14':
(($output_field_category == 15) ? 'Google > Category > Tree15':
(($output_field_category == 10000) ? '':
(($output_field_category == 10000) ? '':
(($output_field_category == 10000) ? '':
(($output_field_category == 10000) ? '':
(($output_field_category == 10000) ? '':
''))))))))))))))))))));
}

I has to do with the code in red.

Pr0ject
04-11-2012, 02:32 PM
that line says
variable = (condition) ? value-if-true : value-if-false;
if the id is bigger than 0 than use $product['parent_id']
if false use the $product['categories_id']
every product will return a value of either one of those. and than based on that number it will align to one of the lines you have below.

rodsstuff
04-11-2012, 02:53 PM
With the line like it is it will assign the google categories to my categories that dont go more that 1 subcategory deep for all of my parent categories which is 10. The 2 categories that go 2 sub categories or more, it wont add the google categories. If I do more that 10 categories in the line of code it knocks out feedmachine and the page wont load on my site.