• Priority: 0
  • Status: Closed
  • Theme: Alysum
  • Assigned To: Marek
  • Private: No
  • Open Date: 22.02.19, 15:11
  • Opened by: Krzysztof
  • Closed by: Marek
  • Closed on: 30.03.19, 19:45
  • Reason: Closed
  • Comment: Glad to help!

Ticket #13801 - Canonical url problem

Hi,

when I work on your alysum theme, there isn’t canonical url in the code. When I switch to default prestashop theme, it shows canonical and alternate urls. Why?

Comments

Marek 22 Feb 2019, 15:13

Please take a screenshot of canonical link in default theme, because I can’t find it there http://presta175.x10host.com/prestashop175/en/

Krzysztof 22 Feb 2019, 15:16

Yes, there is

Krzysztof 22 Feb 2019, 15:28

Ok, i found and repair your bug in theme. You must add some code to /_partials/head.tpl

  {if $page.canonical}
    <link rel="canonical" href="{$page.canonical}">
  {/if}
  {block name='head_hreflang'}
      {foreach from=$urls.alternative_langs item=pageUrl key=code}
            <link rel="alternate" href="{$pageUrl}" hreflang="{$code}">
      {/foreach}
  {/block}
Marek 22 Feb 2019, 15:38

Here is fixed file.
Upload it to the folder /themes/alysum/templates/_partials/