cancel
Showing results for 
Search instead for 
Did you mean: 

how to link in product text to other product?

how to link in product text to other product?

Hi,

 

in magento 1 I used this as Link in the Backend Text Editor: 

{{store url="catalog/product/view" id="7884"}} to get

http://mydomain/shop1/producturl or

http://mydomain/shop2/producturl in case in which shop I am currently.

 

Now this dont work with M2 and SKU... whats the way to go?

 

Thanks, Bernd

7 REPLIES 7

Re: how to link in product text to other product?

Hi @master452a3b58 

Just tried and it is workign fine.

<a href='{{store url="catalog/product/view" id="57"}}'>TEST</a>


Make sure that your target product is assigned to website.

I hope it will help you!

Re: how to link in product text to other product?

Thanks for the fast answer... but I dont really understand...

In M2 I no more have a id, only a SKU...!? or is id now = sku?

Re: how to link in product text to other product?

Hi @master452a3b58 

In M2 as well products id are exist. (Entity Id are the products id)

Screenshot attached for your reference.

pasted_image.png

I hope it will help you!

Re: how to link in product text to other product?

Thank you, my failure.

 

But its still not working.

 

When I put this in the backend product description editor link field:

{{store url="catalog/product/view" id="57"}}

and save it, when I look at the frontend I get:

https://domain/magento/%22catalog/product/view%22/id/%26quot%3B2%26quot%3B/

and when I open the link field in the backend again I see this link:

https://domain/magento/admin_l0xz3j/cms/wysiwyg/directive/___directive/e3tzdG9yZSB1cmw9ImNhdGFsb2cvcHJvZHVjdC92aWV3IiBpZD0iMiJ9fQ%2C%2C/key/01218fbb982a432aea7e31d1a4e5a0e8720d2f1194b810d2bac7c6af3455d872

 

But... I cant use the ids, because I cant change them and they are others like in the old shop, is there a way to link to the sku? Or find/search product by the sku?

Re: how to link in product text to other product?

1. General link type problem:

When I disable the editor, I can see the correct link, only in the Editor link window a wrong Link is displayed... not nice but ok... link is saved correctly.

 

But the problem ist still there, that it don´t work and I get this postet, wrong frontend link output.

 

Can you help me please? New installed 2.3.4 Community Edition without any extensions etc.

 

--- 

 

2. Link to sku?

Is it possible to link to a product by his sku and not the id? Or at least a search Link? But also with this store type so that I have 1 link but if I am in store1 it links there and if I am in store 2 it links there.

Re: how to link in product text to other product?

1: I see the problem:

Correct href Tag ist <a href="abc"> and this is what I used but this wont work, it must be <a href='abc'>. Also not nice (why is this?)... but so it works!

 

2: still open question: How can I link to a product with sku and not id? with same cross-store linktype

Re: how to link in product text to other product?

1 is still not solved:

When saving with the ' quotes it worked, but next time I open the product there are the " quotes instead and when I save again (only editing a other place in the product text) the link is destroyed and does no more work. This is really bad.

 

Please help.