1
votes

I am trying to use a custom field's value in seo url template in shopware but it does not seem to work.

The guide here does the exact same thing what I do:

https://docs.shopware.com/en/shopware-5-en/settings/seo

SEO URLs item template:

deal/{if $sArticle.custom_url}{$sArticle.custom_url}{else}{$sArticle.supplier|replace:'.':'' }-{$sArticle.name|replace:'.':'' }{/if}

Is there something wrong with this part?

{if $sArticle.custom_url}{$sArticle.custom_url}{/if}
1
Can you describe more detailed? Have you set up it there: docs.shopware.com/en/shopware-5-en/settings/… ? Have you cleaned cache after that?Alexey Palamar
I already found the cause, I will not post the answer with details.David

1 Answers

0
votes

Here is what happened: I created a new custom field, added it as a variable in seo router settings, put a value in item's overview, then cleaned all the caches, but it was not going there.

As I understood the reason is that only attr1-attr19 are available to the router. When I tried with the attr1 it worked.