Google Merchant XML & API Integration: setup and help
Quick start
- Upload and install mprgooglemerchant, then open Google Merchant > Feeds.
- Open Settings > Configuration; check Feeds Directory permissions and copy the Access Token URLs.
- Create a feed with Feed Name, Sync Mode, Target Countries, Feed Label, Content Language, Language and File Name.
- Set Product Selection, Include Variants, Exclude products without images and Cache TTL, then save.
- For API mode, add Merchant Accounts credentials, save Canonical Merchant Base URL and preview in TEST before Activate LIVE for this shop.
- Generate XML or run a small API sync; verify product URLs, prices, identifiers, images and status messages.
- Use the verified XML URL in Merchant Center or check the API data source, then schedule Cron URL and run Integrity.
Requires PrestaShop 1.6.1 or later and PHP 7.1 or later.
Setup manual
Install and choose the sync method
Upload and install mprgooglemerchant from your Back Office module upload screen. Click Configure to open Google Merchant > Feeds. Use a catalogue subset for your first feed.
Choose XML when you want a generated file URL. Choose Products API when you want the module to submit product inputs. Both methods use the feed's language, currency, product selection and variant settings. An API feed needs a Merchant account and separate LIVE activation.
Configure access and the output directory
Open Google Merchant > Settings > Configuration.
General
- Default Cache TTL. Initial Cache TTL for new feeds, initially
3600seconds. New feeds use the saved preference; existing feeds keep their own Cache TTL. - Feeds Directory. Shows the filesystem path where generated XML files are written and whether the directory is writable; default:
_PS_MODULE_DIR_ . 'mprgooglemerchant/feeds/'.
Give the PHP process write access to the feed directory. Keep generated XML, receipts and temporary files protected. The supplied Apache .htaccess denies direct access to this directory. If your server does not process .htaccess, configure an equivalent rule. Use the authenticated feed controller URL to retrieve XML.
Access & Feed URLs
-
Access Token. Authorizes feed and cron front controllers; default:
generated 32-character token. -
Regenerate Token. Creates a new access token and invalidates existing feed and cron URLs; default:
manual action. -
Cron URL. Shows the token-protected cron endpoint to run from your scheduler; default:
https://your-shop.example/module/mprgooglemerchant/cron?token=TOKEN. -
Feed URL Pattern. Shows the token-protected feed endpoint pattern to submit to Merchant Center; default:
https://your-shop.example/module/mprgooglemerchant/feed?id={ID}&token=TOKEN. -
Canonical Merchant Base URL. Default: empty. Enter your live storefront base URL, including any shop subdirectory. Product and image URLs use this base.
-
Merchant API mode. Default:
test. TEST performs local previews and keeps XML exports available. LIVE permits Google writes only when the other identity checks pass. -
LIVE activation. Save the canonical URL first. A super administrator must click Activate LIVE for this shop in the intended shop context. Activation binds that shop and installation to the saved identity. An existing mismatching binding is not replaced.
-
Effective Google write status. Read this status before a real API run. After activation, the mode selector can pause and resume writes on the same installation.
The internal sync_lock_ttl_seconds preference defaults to 600. It is not a normal field on this screen. A second run for an already locked feed returns a locked status rather than starting duplicate work.
Add a Merchant account
Open Google Merchant > Merchant Accounts and add an account.
- Account Name. Internal label for a Merchant Center account; default:
"". - Merchant Center ID. Your Google Merchant Center account ID; default:
"". - Service account JSON path. Enter the service account JSON file path. Default: empty. Store the file outside the public web root and allow the PHP process to read it.
- Active. Enables the Merchant account for API feed use; default:
1.
API requests need PHP cURL and OpenSSL, a readable service account JSON file and access to the Merchant Center account. The client reads service account fields including client_email, private_key and token_uri. Use your actual credentials file. Do not paste a private key into templates or a public folder.
Create and target a feed
Open Google Merchant > Feeds and add or edit a feed.
- Feed Name. Internal name shown in the feed list; default:
"". - Merchant Account. Assigns the feed to a Merchant account for API sync, overlap checks, and deduplication; default:
0. - Sync Mode. Chooses XML file output or Merchant Products API sync; default:
file_only. - Target Countries. Sets one or more two-letter Merchant target country codes, such as
FRorAE,AU,GB,US; default:FR. - Feed Label. Sets the Merchant feed label, using uppercase letters, numbers, or dashes; default:
FR. - Content Language. Sets the two-letter Merchant content language; default:
fr. - Merchant API Data Source Name. Stores the Merchant API data source resource name after API setup; default:
"". - Priority. Sets feed priority for deduplication, where higher numbers claim products first; default:
0. - Language. Chooses the PrestaShop language used for product names, descriptions, features, and attributes; default:
current Back Office language. - Currency. Chooses the feed currency or uses the shop default; default:
0. - File Name. Sets the generated XML file name without
.xml; default:"". - Active. Enables the feed for generation and cron/API processing; default:
1. - Include Variants. Exports product combinations as separate items; default:
0. - Auto-deduplicate. Excludes products already present in higher-priority active feeds in the same Merchant account; default:
0. - Cache TTL. Sets how long this feed's generated XML file remains valid; new feeds start with the saved Default Cache TTL (
3600seconds initially). - Product Selection. Defines which products are included in the feed; default:
all active products with visibility both or catalog. - Attribute Filters. Excludes unchecked attribute groups from
{attribute:...}tag resolution; default:all attribute groups included. - XML Header. Controls XML content written before product items; default:
standard RSS header. - XML Item Template. Controls XML generated for each product or combination; default:
standard Google Merchant item template. - XML Footer. Controls XML content written after product items; default:
standard RSS footer.
Change the initial FR country/label and fr language values to your actual destination. Language is the PrestaShop language used for catalogue text; Content Language is the Merchant content-language code. Currency = 0 uses the shop default.
Use a unique File Name without .xml. An empty Product Selection falls back to active products with both or catalog visibility. Use the selector's include/exclude conditions to narrow the feed. Attribute Filters affect attribute-tag resolution; they do not by themselves filter combination membership.
Higher numerical Priority values claim products first when Auto-deduplicate is on for feeds in the same Merchant account. Review overlap before enabling several feeds for one account.
The form also has Acknowledge XML removals. Read the generation message and review removed products before acknowledging a protected publication change. Do not change selections merely to clear a warning.
Configure Products API fields
- API batch size. Limits Product API insert/delete operations per batch; default:
25. A cron or manual sync run can process several batches within its time and batch limits. - Delete missing API products. Deletes Merchant product inputs when products leave this feed; default:
1. - Delete guard threshold (%). Blocks API deletions when one run would delete more than this percentage of known items and more than 10 items; default:
20. - Exclude products without images. Skips products whose resolved
{image_link}is empty; default:1. - Export loyalty member prices. Adds Merchant API
loyaltyProgramsentries when mapped customer group prices are lower than the regular price; default:0. - Loyalty program label. Merchant Center loyalty program label used for API member prices; default:
"". - Loyalty group tier map. JSON object mapping PrestaShop customer group IDs to Merchant Center tier labels; default:
"". - Merchant title template. API-only title template; default:
"". - Merchant description template. API-only description template; default:
"". - Merchant product type template. API-only product type template; default:
"". - Google product category. API default for
googleProductCategory, overridden by product-levelgoogle_product_category; default:"". - Custom label 0. API default for
customLabel0, overridden by product-levelcustom_label_0; default:"". - Custom label 1. API default for
customLabel1, overridden by product-levelcustom_label_1; default:"". - Custom label 2. API default for
customLabel2, overridden by product-levelcustom_label_2; default:"". - Custom label 3. API default for
customLabel3, overridden by product-levelcustom_label_3; default:"". - Custom label 4. API default for
customLabel4, overridden by product-levelcustom_label_4; default:"".
Merchant API Data Source Name stores the resource binding. Use Rebind data source only when you intend to change that binding and have reviewed the effect on existing submitted items. It defaults off.
Delete guard threshold (%) blocks a deletion batch when more than 10 known items would be deleted and the deletion percentage exceeds the threshold. The default is 20; 0 disables this percentage guard. Inserts and updates may continue while deletions remain blocked. Review selection changes and the status message before authorizing pending deletions.
For member prices, enable Export loyalty member prices, enter Loyalty program label, then map customer group IDs to Merchant tier labels in Loyalty group tier map, for example {"4":"trade","5":"vip"}. The adjacent Customer groups guidance lists the shop's groups. Only qualifying lower group prices produce loyalty entries.
Shipping
Select Shipping carriers only if you want physical shipping entries. The default is empty, which omits these entries. The module chooses the cheapest available selected carrier for one physical item in each target country. Select active carriers with native price or weight ranges.
Minimum handling days, Maximum handling days, Minimum transit days and Maximum transit days accept optional whole days. Empty means not sent; zero means the same day. Pricing and tax hooks are used only when the feed shop is the current request shop. Other shop contexts use native price, reduction and tax tables.
Stored compatibility and runtime options
fetch_hour = 2 and fetch_timezone = Europe/Paris are legacy stored fields, not scheduling controls in the current form. Run the cron endpoint from your scheduler instead.
The module also has internal preferences for orderable out-of-stock availability (in_stock by default, or backorder), backorder lead time (21 days), generated-text labeling (off), default brand (empty), API renewal (7 days), cron time budget (105 seconds), and image type (empty for original). These are not additional fields on the Configuration screen. Shop image-provenance requirements can withhold products whose original image lacks the required source metadata. Check diagnostics if a product with an image is still withheld.
Create custom fields and assign values
Open Google Merchant > Custom Fields > Groups to define tags. Create a field before using its tag in an XML or API text template.
- Tag Name. Creates the tag name used in templates, sanitized to lowercase letters, numbers, and underscores; default:
"". - Display Label. Sets the Back Office label for the custom field; default:
"". - Field Type. Chooses
text,textarea,select, ornumber; default:text. - Default Value. Supplies a value when no product-specific value exists; default:
"". - Options. Stores one option per line for select fields; default:
"". - Active. Makes the custom tag available to templates and value assignment; default:
1.
Tag names are sanitized to lowercase letters, numbers and underscores. Position is managed by stored ordering rather than a separate Position field in this form.
Open Custom Fields > Values to assign a value to selected products:
- Group Name. Optional Back Office label for a mass assignment operation; default:
"". - Custom Field. Selects which custom tag receives a value; default:
"". - Value. Sets the value assigned to selected products; default:
"". - Target Products. Selects products that receive the custom value; default:
empty selection.
For example, define merchant_title, merchant_description, merchant_product_type, google_product_category or custom_label_0, then assign values before referencing the tags. Default field values fill missing product-specific values.
Edit templates
Keep the initial header and footer for the first XML test. Edit XML Item Template with available tags, then regenerate and inspect the XML. The initial item template includes:
<item>
<g:id>{id}</g:id>
<g:title>{title}</g:title>
<g:description>{description_short}</g:description>
<g:link>{link}</g:link>
<g:image_link>{image_link}</g:image_link>
<g:additional_image_link>{additional_image_links}</g:additional_image_link>
<g:price>{price} {currency}</g:price>
<g:sale_price>{sale_price} {currency}</g:sale_price>
<g:availability>{availability}</g:availability>
<g:brand>{brand}</g:brand>
<g:gtin>{ean13}</g:gtin>
<g:mpn>{mpn}</g:mpn>
<g:condition>{condition}</g:condition>
<g:product_type>{categories}</g:product_type>
<g:item_group_id>{item_group_id}</g:item_group_id>
</item>
You can use custom fields and named features or attributes, for example {merchant_title}, {attribute:size}, {attribute:color}, {feature:material}, {gtin} and {custom_label_0}. Attribute and feature names must match your catalogue. Invalid EAN/UPC GTIN lengths or checksums resolve to an empty identifier.
API text templates use the same catalogue tags, for example:
Merchant title template: {name} {attribute:size} {feature:style_de_grille}
Merchant description template: {merchant_description}
Merchant product type template: Sanitaire > Receveurs de douche > {feature:serie}
With Include Variants enabled, combination items use IDs such as 125-842 and share {item_group_id}. Check each variant's price, identifiers, image and link.
Schedule generation and verify a feed
Copy the actual Cron URL and Feed URL Pattern from Configuration. Replace {ID} with the feed ID. Examples:
wget -q -O - "https://your-shop.example/module/mprgooglemerchant/cron?token=YOUR_ACCESS_TOKEN"
wget -q -O - "https://your-shop.example/module/mprgooglemerchant/cron?token=YOUR_ACCESS_TOKEN&id=3&force=1"
wget -q -O - "https://your-shop.example/module/mprgooglemerchant/cron?token=YOUR_ACCESS_TOKEN&api_limit=25&api_max_batches=3&api_max_seconds=90"
https://your-shop.example/module/mprgooglemerchant/feed?id=3&token=YOUR_ACCESS_TOKEN
https://your-shop.example/module/mprgooglemerchant/feed?file=google-fr&token=YOUR_ACCESS_TOKEN
https://your-shop.example/module/mprgooglemerchant/feed?id=3&token=YOUR_ACCESS_TOKEN&generate=1
Run the feed action manually first. For XML, open the authenticated URL and inspect product count, language, currency, images and identifiers. The controller sends XML and X-Robots-Tag: noindex, nofollow, noarchive. Submit the verified URL to your Merchant account. Product update/delete hooks invalidate the cache; they do not immediately regenerate the XML themselves.
For API, inspect the local TEST result, then complete LIVE activation and run a small real sync. Check API Status, the last-sync message and the Merchant account's diagnostics. Google acceptance is separate from a successful submission. The form exposes XML file and API modes; legacy api_fetch and both values are normalized to API in the form.
Troubleshoot and uninstall
Open Google Merchant > Settings > Integrity for tables, hooks, output-directory, token, feed, overlap and account checks. For a 403 response, check the token and replace copied URLs after Regenerate Token. For a missing item, check active state, visibility, selection, image resolution, image provenance and deduplication. For locked runs, check the active job before starting another. For blocked API writes, read Effective Google write status and the feed message.
Back up feed definitions, custom fields, account records and generated files before uninstalling. Remove scheduler entries and stop using submitted feed URLs. Uninstall removes module tasks, menus, schema and configuration. It does not perform a blanket Google product deletion. Remove or replace the Google data source separately if that is your intention. Keep service account file cleanup under your own control.
Compatibility
Requires PrestaShop 1.6.1 or later and PHP 7.1 or later.
Questions
No questions about this module yet
Ask anything about installation, compatibility or setup. Answers appear here.
Known Issues
14
Security hardening
Scheduled sync overruns or stalls
Offers removed after an incomplete sync
Feed landing page currency changes the cart
Valid feed images rejected
Feed requests trigger unnecessary repairs
Settings and activation refused on PrestaShop 9
Additional product photos missing from feeds
Later feeds missed by scheduled sync
Missing storage after an upgrade
Incorrect Google product categories
Development copy changes live offers
Feed generation on PrestaShop 9
Scheduled feed regeneration unavailable
Feature Requests
13
Implemented
Direct product synchronization with Merchant Products API
Google Merchant XML feeds
Merchant Products API synchronisation
Feed-specific product content
Feed overlap reporting
Deletion safeguard
Loyalty member price export
Explicit live activation
Carrier shipping prices in feeds
Backorder availability dates
Fallback product brand
Configurable offer refresh
Reusable content in Merchant descriptions
Changelog
v1.4.62026-05-27
- AddedAdd Merchant Products API sync
- AddedImprove feed quality — strip empty tags, fix availability, add identifier_exists
- Addedcomplete FR/DE/ES/IT/PL translations
- FixedHarden Google Merchant API feed readiness
- FixedHarden Merchant Products API sync
- FixedImprove Merchant feed image quality
- FixedAdd standard infrastructure checks, tag quality/monitoring checks
Older releases
v1.2.02026-04-20
- AddedEnhance feeds list — country flags, sync mode pills, dedup toggle
- Addedadmin menu management via MenuInstaller for streamlined module setup
- AddedLicense management tab with key management and renewal options
- Addedself-healing integrity checks for automatic diagnostics and repair
- Addedcomplete FR/DE/ES/IT/PL translations
- Improvedsettings form rebuilt with modern configuration pattern
- Fixedadmin list filters — sorting, searching, and filtering now work correctly on all columns
v1.1.02025-11-25
- Addedfull compatibility with PrestaShop 9.x and Hummingbird theme
- Addedcustom attribute mapping — map PrestaShop features to Google Shopping attributes
- Improveddynamic placeholder system: {brand}, {mpn}, {gtin}, {colour} now auto-populated
- Fixedfeed not including out-of-stock products when 'allow order when out of stock' was enabled
- Optimized XML generation for catalogues exceeding 10,000 products using streaming writer
v1.0.02025-03-06
- Initialrelease: generates a Google Shopping XML feed compatible with Google Merchant Center
- InitialConfigurable fields: title template, description source, condition, availability, and shipping
- InitialCustom label support (custom_label_0 through custom_label_4) for campaign segmentation
- InitialScheduled automatic feed refresh via cron with configurable interval
Demo
Test the full module before you buy
Buy a licence later and keep your settings.
- Your 30-day demo Test it on your own shop for 30 days from the first install.
- Ready demo shop Explore a ready demo shop in your browser.
- No registration No account, email or store domain needed.
By downloading, you accept the demo terms and privacy policy.
By opening this demo you accept the demo terms and the privacy policy.