This function is only available when the products have variants such as color, size, (depends on product type) on Shopify admin first.
Update history state for product deep-linking Shopify. It’s possible to create a deep-link directly to a specific variant by adding a query string to a product page URL. You can achieve this by appending the ?variant= query parameter to the URL of the product, along with the ID of the variant.
Please follow the instruction below:
- Step 1: From Theme custom > Theme settings > Product Page.
- Step 2: Scroll down to Product feature > Enable History Page.
This is the result: