Ad

Editing SEO Metadata In Virtocommerce

- 1 answer

i'm trying to use SEO for Store and set page titles for store pages like customer profile, sign in, cart, .... but last SEO entry in store SEO's applies to all pages (except category, product), for example i have 3 SEO entry , addresses applies to all pages, even home!

Ad

Answer

It is possible to set SEO title and description for shopping cart, personal cabinet and similar pages by checking the Liquid-template name on the theme layout before using Liquid-variables page_title and page_description. Like so:

...
{% if template == 'cart' %}
  {% assign page_title = 'cart.general.title' | t %}
  {% assign page_description = 'cart.general.title' | t | append: ' - ' | append: shop.name %}
{% endif %}
...
<title>... {{ page_title }} ...</title>
<meta name="description" content="{{ page_description | escape }}" />
Ad
source: stackoverflow.com
Ad