This is a Google Merchant extension for Spree Commerce, an open source e-commerce platform built with Ruby on Rails. Adds the ability to provide products listings to Google Merchant Center for Spree Commerce.
-
Add this extension to your Gemfile with this line:
gem 'spree_google_merchant_feed', git: 'https://github.com/umeshravani/spree_google_merchant'
-
Install the migrations:
bundle exec rails g spree_google_merchant_feed:install -
Run the migrations:
bundle exec rails db:migrate -
Restart your server
If your server was running, restart it so that it can find the assets properly.
bundle exec gem bump -p -t
bundle exec gem releaseFor more options please see gem-release README
If you'd like to contribute, please take a look at the instructions for installing dependencies and crafting a good pull request.
To use your Google Merchant endpoint as a data source in Google Merchant Center:
-
Deploy your endpoint
Ensure your authentication and data endpoints are publicly accessible and return the required data format (e.g., XML, CSV, or JSON).
For this extension, your endpoint will typically be:
https://yoursite.com/google_merchant/products.xml -
Copy your endpoint URL
This is the URL that Google Merchant Center will fetch data from. -
Add as a data feed in Google Merchant Center
- Go to Google Merchant Center.
- In the header, click Settings & tools.
- Select Data sources.
- Click Add product source.
- Choose Add products from a file.
- Enter your endpoint URL (e.g.,
https://yoursite.com/google_merchant/products.xml) as the feed source. - Set fetch frequency and credentials if authentication is required.
-
Test and verify
After saving, Google will attempt to fetch your data. Check for errors and ensure your feed is processed correctly.