Get UPC code from database and output to google base feed 2.3.1

thedeed's picture
Offline
Joined: 07/08/2009
Juice: 42
Get UPC code from database and output to google base feed 2.3.1

I have a question on bringing a field of data I created into my Drupal 6/ Ubercart 2 store into my Google Base datafeed that is created at this link
http://discounthuntingsupplies.net/products/google_base.xml

As of May 5th Google is requiring Isbn or Upc codes to go along with the products to process the feed correctly. I am using the Google Base Rss Feed 2.3.1
that I downloaded from
http://www.ubercart.org/contrib/11593
and it has worked great for years.

Here is what I have done. I have created the field_upc field by going to
Administer > Content Management > Content Types> Products>Manage fields>Add new field
See Image
http://discounthuntingsupplies.net/feed-images/product-add-upc-field.jpg
It is called upc_field and its type is set to text

Then I set it permissions for the field
See Image
http://discounthuntingsupplies.net/feed-images/permissions.jpg

This automatically created my database tables. I then Imported in all my 8000 Plus UPC codes into the Sql database successfully.
Now every product shows the correct UPC code on each product page through the entire store.
See Image
http://discounthuntingsupplies.net/feed-images/database-field.jpg

So everything is good to this point. The issue is that I cannot figure out the correct code to add to
the uc_google_base.module to populate the UPC codes from the database, into the datafeed.

The line of code in question is
$output .= "" . $product->field_upc . "\n";
The code for the module itself can be located at this link
http://discounthuntingsupplies.net/module.txt

Any help would be most appreciated

Google Base RSS Feed, 2.3.1 By: danbaker (40 replies) Sat, 06/20/2009 - 12:36