
This project is not covered by Drupal’s security advisory policy.
This module tries to fill in a gap currently found (at least by me right now) of providing a proper feed following Google Products Feed Specification.
This module is based mainly on Views and Views data export to build the feed, which gives a lot of flexibilty. Of course Ubercart is a dependency as well.
Support for this module - please read
This is not an out of the box module, and although it provides a very good "default" views for you to start with, your feed will likely need adjustments that depends on how you have configured your product (fields, images, description, taxonomies, etc.). The main idea of using views was to allow a flexible, and somehow well known way of making the feed. Also, there are specific things for each country, so that's probably another reason for you to need to do certain modifications.
I can't and won't provide support for general requests, i.e. things like: "How do I add xxx to the views?", or "How I can configure xxxx?". Those kind of things are general support questions outside of this module and should be placed in the proper channels. Bear in mind, that everything can be added, if not by views itself or by theming techniques, by using other modules like Ubercart views, or even by coding it yourself on a helper module.
I will only provide support for bugs ans fixes related to the files and elements provided by this module. There were things that were needed that I didn't find a way of setting them up so and they are included as extensions to views. If something else like this is found and you want to suggest something to be included, please do add it on an issue with its patch for review.
How to use this module
- Download and install as usual.
- Enable the module
- Go to admin/store/settings/uc_views_gpfeed and configure defaults and taxonomies mapping.
- Go to admin/build/views/tools and look for the "uc_views_gpfeed" view, edit it and adjust as necessary. Description and images are likely the first fields that you will need to adjust. Read below into some details and insights of this module.
- Visit /uc_views_gpfeed to check for the feed output.
Google taxonomy list
This module includes Google's taxonomy list for the United Kingdom and that's the one which is imported when the module is first installed. This list may become out of date or you may need a specific list for your country (US, Italy, etc.). There's an option on the module's settings page for you to upload any new Google's taxonomy file.
What this module includes
- Style plugin for google products feed for Views data export
- This includes template files that you can override on your theme for further customization.
- Main store name and description can be edited in the views style options, as well as in the template files.
- New handler for CCK's multiple fields: Because CCK field formatter adds HTML to the multiple fields and I had no alternative way to change this, this module overwrites the default CCK multiple field handler by providing a new one with one extra configuration entry to provide a separator. This is used if you have a multiple cck field that you need to add to the field.
- Google taxonomy mapping feature: This module requires that you assign some kind of mapping between your own product taxonomies and google products taxonomies. This is a require step that you will need to do for the main category of the product and a recommended one for the extra categories.
- Extra fields for views: There's a "Google products feed" group with three fields that you can add: Google product category, Product type and Availability. The first two use the mapping configurations you set up and the last one is just the stock availability required by google (only 'in stock' and 'out of stock' is supported).
- Default view: It includes a default views for you to start named after this module. This was based on UK specifications and includes all of the required fields. Price includes GBP as the currency as well as VAT.
Note for large sites
Views data export allows batch processing. This is one of the main features of that module and a good one because large amount of products can easily eat up your server resources (max execution time and/or memory limits).
The default views has the batch mode disabled. This is mainly so you can provide the feed URL directly to google, and google won't process the feed properly if it's batched.
There may be different ways of caching the feed, however, I do recommend to use Drush for this as this is another nice feature of Views data export.
Read instructions there, but basically, assuming you know about drush, you would have to first enable the batch mode on the view and then run:
drush --uri=http://yourstore.example.com/ views-data-export uc_views_gpfeed views_data_export_1 google_products_feed.xml
(There might be some errors about permissions on a tmp dir which you can ignore, but you have to check the feed is generated properly)
The --uri argument is important, because your views will likely have absoulte paths that needs this argument for them to be rendered properly.
You can then run this command periodically on any means you have (cron for linux servers) to re-generate this file on a regular basis and have google pull this file instead of the feed URL.
Google apparently added a limit in the amount of items on the feed (500 from my tests) so that's something you will have to contact google about if you have more than that.
Sponsored by
Infomagnet Ltd | Bespoke websites built to your design using Drupal
Project information
1 site reports using this module
- Created by hanoii on , updated
This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.