All Collections
Visual Shopping
Product Page Galleries
PPG: how can I support products with multiple language URLs?
PPG: how can I support products with multiple language URLs?
James Riley avatar
Written by James Riley
Updated over a week ago

If your store is set up to support multiple languages, you may find that matching Product Page Gallery (PPG) items fail to load when you switch languages. This will happen if changing language results in a change to the URL, with each language having its own URL, for example:

https://example.com/t-shirt
https://example.com/de/t-shirt

This fails because PPG uses the 'Canonical URL' of the page to match the product page with your Product Tags on Sauce. As such, by default, you will need to select one or the other. But you have the following options to support this case:

If you are not using Shopify

You will need to use the Multi Store Galleries, which will allow you to have a Sauce account for each of the languages. With a Sauce account per language, you'll also have more control over each Sauce feed for each language - allowing you to be selective with embed settings and items chosen.

If you are using Shopify

You have the option to use the Shopify Product handle as a method to match with your Sauce Product Tags. Given that Products on Shopify have the same handle irrespective of the language, this approach will allow your matching Sauce items to show on both. To achieve this, simply update your PPG embed code to include the data-handle HTML attribute, with the value being the Shopify Product Handle, which we can generate with your Shopify Theme Liquid support, specifically the product.handle variable.

Thus you'll want to add the attribute as follows:

data-handle="{{ product.handle }}"

with a complete example of the PPG code looking as follows:

<div class='snpt-wdgt--ppg'> 
<script src='https://snapppt.com/widgets/ppg/EXAMPLE-ID' data-handle="{{ product.handle }}" class='snapppt-widget'>
</script>
</div>

Note that you will want to ensure the src attribute here matches that for your own account (replacing the EXAMPLE-ID above).

Need further help? Hit us up via the in-app messenger πŸ‘

Did this answer your question?