If you are updating to 0.2.4 from an earlier version, please be aware that the
category ids have changed.
There is a shell script
which might help you to map the old category ids to the new ones.
Fortunately Google has added static category ids which makes it easier for
future updates.
Magento Module GoogleShoppingAPI
This module is based on the official Magento GoogleShopping module and enhances
the original module features with APIv2 support (APIv1 support removed),
OAuth2 support and several additional features from the original
EnhancedGoogleShopping module.
If the original Magento GoogleShopping module is installed, data will be migrated.
The observer (auto sync after saving product changes) is disabled in the current
version, but will be re-enabled soon.
The observer was re-enabled with version 0.1.0 . To prevent problems when users
are editing products which have no access to GoogleShopping through OAuth2, products
are only updated on GoogleShopping if a valid access token for the store exists.
To authenticate and get an access token go to Magento Admin -> Catalog -> Google
Content APIv2 and select the store view in which you want to authenticate.
After selecting a store view without valid access token you will be automatically
redirected to OAuth2 authentication.
Features
update item expiration date on sync
option to renew not listed items on sync
option to remove disabled items on sync
convert html entities in description to UTF-8 chars
strip tags from description
make sales price available in countries outside the US
possibility to define a separate google shopping image with base image fallback
option to add Google Analytics source to product link (utm_source=GoogleShopping)
option to add custom parameters to product link
adds Austria as target country
ability to set Google product category in Magento product details
ability to use OAuth2 service account
Automated daily sync to Google Content
Option to enable by StoreView
At the moment the products are synced every day at 02:30 (cron)
Needs improvement in future versions (e.g. batch processing, option to set sync period)
Installation
Install using composer
As the Google ApiClient must be installed in addition, it is recommended to
install using composer.
Create or adapt the composer.json file in your Magento root directory with the
following content:
Install Google Content API to [MAGENTO_ROOT]/vendor/google/apiclient/
You should have at least the autoload.php file and the src folder in [MAGENTO_ROOT]/vendor/google/apiclient/
After installation
Clean the Magento Cache and log out of the backend
Configuration
As the module has to use Google OAuth2, credentials for Google
Content API are required. Those can be generated in the
http://console.developers.google.com/
You can choose between using a Client ID for web application or using a service account.
If the Client ID for web application is used a manual user interaction is needed to provide
access to Google Content API. In this case automated processes like cron jobs are not available.
Using a service account is recommended and needed if you want to use automated processes.
Using Service account
Create a project in Google developers console
Login to Google developers console or create an account
Create a Project
Name: Magento-GoogleShoppingApi
Project-ID: use the generated id or something like magento-gshopping-841
After the project is created go to "APIs & auth" -> "APIs"
Search for "Content API for Shopping" and enable it
Next go to "APIs & auth" -> "Credentials" and click "Create new Client ID"
Select "Service account"
Select "P12 Key" as key type
Click on "Create Client ID"
Save the P12 file and write down the private key's password
Allow the service account to access your merchant center account
Login to Google Merchant center
Go to Settings -> Users
Click on "+User"
Enter the email address of your service account as "User email address" (*****@developer.gserviceaccount.com)
Select "Standard access" as access level
Using Client ID for web application
Create a project in Google developers console
Login to Google developers console or create an account
Create a Project
Name: Magento-GoogleShoppingApi
Project-ID: use the generated id or something like magento-gshopping-841
After the project is created go to "APIs & auth" -> "APIs"
Search for "Content API for Shopping" and enable it
Next go to "APIs & auth" -> "Credentials" and click "Create new Client ID"
Select "Web application"
Fill out the fields "Email address" and "Product name"
save
In the next step the shop backend data has to be enterend
Use service account: Use Client ID for web application or Service account (as mentioned above)
Google Developer Project Client ID: The Client ID generated above
Google Developer Project Client Secret: The Client Secret generated above (Client ID for web application only)
Google Developer Project E-Mail: The E-Mail address from your credentials
Google Developer Project Private Key file: upload the P12 file here (Service account only)
Google Developer Project Private Key password: The private key's password (Service account only)
Target Country: The country for which you want to upload your products
Update Google Shopping Item when Product is Updated
Not implemented (observer disabled in current version, will be readded)
Renew not listed items
When syncing a product which is not listed on GoogleShopping, it will be added
Remove disabled items
Removes items which are disabled or out of stock from GoogleShopping
Product configuration
In Product edit view you will find a new tab "GoogleShopping".
Here you can set the GoogleShopping Category.
The language of the category is taken from the configured store language.
The taxonomy files for de_DE and en_US are shipped with the module package.
Further taxonomy files should be added to /var/bluevisiontec/googleshoppingapi/data .
请发表评论