davit_sargsyandavit_sargsyan MemberComments: 71 Received thanks: 0 Member since: June 2018

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}

2 Answers

  • NextMikeNextMike MemberComments: 2777 Received thanks: 441 Member since: December 2014

    To be sure use the standard attr1 - attr19 fields. Like that: {$sArticle.attr4}

    Quote
    Accepted Answer
  • NextMikeNextMike MemberComments: 2777 Received thanks: 441 edited September 16 Member since: December 2014

    I believe the fields are not available to the router. Just use the attr1-19. Yes, you can use all smarty commands.

    Quote
    Accepted Answer
  • Accepted Answers

Answers

Sign In or Register to comment.