How to put external links to collection images?

Hi guys,

I am using the Brooklyn theme and I struggle with this issue.

For some products my shop doesn’t have, I want the image of the product in a collection to redirect towards an external website that has it instead of the classic product page : kind of affiliation model (as in the photo below)

Do you know how to do it?

The products I want to redirect will never be available on the shops, there is no problem to put a permanent link on the photo.

Thank you!

Hi @guilhem !

This is indeed doable however it will require code customization, and most importantly more information on how these products are identified on the other website, do they have the same handle or should it be done manually for each product?

Let us know if you’re interested in getting this done and we’ll sort this out for you.

Cheers!

1 Like

Hi JHKC,

Thank you for your answer, appreciate it!

I am comfortable with code modifications as long as the shop can still run :slightly_smiling_face:

Concerning the products, they would have a different handle for each one and there would be +100 products on the shop.

Is it still doable?

Thanks,

Absolutely, I would recommend you install a Metafield App, then for each of these products add the URL you should point to.
Inside the collection-grid item, add an unless statement that checks if the External URL metafield is empty or not, if it’s not empty then the link should not be internal but the one in the metafield.

Thank you @JHKCreate , I did not know Apps could do the trick.

Do you have one in mind?

MetaField Guru is quite cool and free, so that could be a good starting point.

Cheers!

1 Like

Hi @JHKCreate ,

Thank you again for your answers, do you know where I can find someone to write the piece of code to do so?

I am not so familiar with coding…

Hi @guilhem !

We can assist on that should you require help. Shoot us an email to the address below with the number of products you have along with the links and we will let you know how long it needs & how much it would cost.

Cheers!

Hello @JHKCreate ,

Did you have any news on the subject?

Did you receive my e-mail?

I have installed the Metafields app, what is missing now is the code to implement it.

Do you have any clue on how to do it?

Thank you,