Linking products with different SKUs

Hi all,

I am using the prestige theme and I have products that are the same but have different SKUs. I want to display the different colour swatches on the PDP and allow the customer to click on it and navigate to the product. I don’t want to show all of the images on one PDP as this causes too much scrolling. Am I able to link the products somehow?

thanks,

Hi @BMos

Yes, you can this using metafield. Create a product or variant level metafield based on your requirement.

Enter product url in the variant, put the below validation code to check for empty metafield and create link tag which will have href value assigned to it.

{% if product.metafields.skuurl != blank %}

print product sku

{% endif %}

Hope this will help…

Hi @gr_trading

Thank you for your response.

When would I put the code that you supplied?

thanks

Hi,

You theme might have file named main-product.liquid or product-template.liquid

Of your products have variants then file name could be different.

That can only tell by checking the theme code.

Hope this will solve your issue.

Let me know if you willing to hire would love to fix it for you at very nominal charge.