Reading path: Ecommerce & Shopify Testing
To test a Shopify variant link, open the exact campaign URL in a fresh mobile session. Verify that it selects the advertised size or color and shows the matching price, image, and availability. Add the item and check the cart line. Repeat with a sold-out variant and after switching options.
A valid product URL can still select the wrong variant.
Check sold-out behavior against the variant inventory policy.
Save the cart line as evidence of the selected item.
Start with the exact link customers receive
Your email promotes a blue jacket in size medium. The link opens the right product, but the storefront lands on black in size small. That page can pass a link check and still ship the wrong item if the cart repeats the default selection.
Shopify documents product links that use the variant ID in a query parameter, such as /products/trail-jacket?variant=123456789. Use the actual URL copied from the ad preview or test email, including campaign parameters. If the link redirects, record the final URL and confirm that the intended selection survives the redirect.
Use a fixture with at least two variants you can tell apart at a glance. Give them distinct images and SKU values, and use different prices if your store supports that for the product. Record the expected variant ID before opening the page.
Check the product page, then check the cart
Run the same matrix on the live theme before rollout or on the theme preview if it includes the same product data. Start with an empty test cart. If the theme uses a sticky add-to-cart bar or quick-add drawer, run those paths separately because each can submit a different selection.
Where the theme uses Shopify’s Ajax Cart API, the add request can help confirm which variant ID was submitted. Compare that evidence with the cart line the customer actually sees. A matching button label alone cannot establish what was added.
Sources: Shopify developer docs on product variants · Shopify Help Center on selling out-of-stock products · Shopify Ajax Cart API reference
| Test case | Expected result | Evidence to keep |
|---|---|---|
| Open an in-stock variant link | Options, image, price, and cart line match the advertised variant. | Final URL, product selection, and cart line. |
| Switch from blue M to black L | Product details update and the next add sends black L. | New option state and variant ID or SKU. |
| Open a sold-out variant with overselling disabled | The intended selection is clear and the sold-out variant cannot be added. | Availability text and add-to-cart state. |
| Open a variant with overselling enabled | The configured item can be ordered and any published lead time is visible. | Variant policy, displayed message, and cart line. |
| Open a link to a retired variant | The fallback is clear and the page avoids implying that the advertised variant is available. | Final URL, actual selection, and any notice. |
Find where the selected variant changes
If the wrong item appears as soon as the page opens, compare the source link, redirect destination, and initial option selection. If the page is correct but the cart is wrong, repeat using the main product button and any sticky or quick-add control. That narrows the mismatch to a specific step your developer can reproduce.
Save the original link, the exact options chosen, the expected variant ID or SKU, and the actual cart line in the bug report. After fixing the issue, reopen the original link in a fresh session and repeat it once after changing options. Test any localized storefront URL your campaign uses, because its redirect or theme settings may differ.
You can cover most of the matrix without paying for an order. Where the team needs to confirm the checkout or order record, use its approved Shopify test-order workflow and compare the line item with the source fixture.
Common Questions
How do I link directly to a Shopify variant?
Use the product URL with ?variant= followed by the Shopify variant ID. Verify the exact link in the active theme and confirm that adding the item puts the advertised variant in the cart.
Why does a Shopify page show the right variant but add the wrong one?
The control that adds the item may be submitting a stale or default variant ID. Compare the visible selection with the add request where available and the actual cart line. Test the main button and sticky or quick-add controls separately.
Can an out-of-stock Shopify variant still be added to cart?
For tracked inventory, Shopify can allow purchases after stock reaches zero when Continue selling when out of stock is enabled. Check the specific variant, fulfillment locations, and the store’s published availability message.
Sources & Further Reading
The checklists and examples are Cohorvix’s suggested workflows. References support the specific technical guidance described above; they do not endorse Cohorvix.
- Shopify developer docs on product variants
Variant links and theme selection behavior.
- Shopify Help Center on selling out-of-stock products
Overselling settings and fulfillment locations.
- Shopify Ajax Cart API reference
Variant IDs and cart operations.
Published by Cohorvix Editorial with AI assistance. Product scope is described in Our Method. Educational guidance is not a full accessibility, security, or performance audit.
Put The Guide To Work
Choose a focused next step for your product.



