Skip to content

Commit

Permalink
Merge pull request #2 from FloKnapp/master
Browse files Browse the repository at this point in the history
Add compatibility for shopware 6.4 and above
  • Loading branch information
peterjaap committed Jul 16, 2021
2 parents 6f51f8d + 8bb3961 commit 242c669
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,15 @@
"role": "Manufacturer"
}
],
"version": "1.0.0",
"version": "2.0.0",
"autoload": {
"psr-4": {
"ElgentosSeoCanonicalUrl\\": "src/"
}
},
"require": {
"shopware/core": "^6.4"
},
"extra": {
"shopware-plugin-class": "ElgentosSeoCanonicalUrl\\ElgentosSeoCanonicalUrl",
"plugin-icon": "src/Resources/public/administration/images/plugin.png",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% sw_extends '@Storefront/storefront/page/product-detail/meta.html.twig' %}

{% block layout_head_canonical %}
{% if page.product.parentId and shopware.config.ElgentosSeoCanonicalUrl.config.active %}
{% if page.product.parentId and config('ElgentosSeoCanonicalUrl.config.active') %}
<link rel="canonical" href="{{ seoUrl('frontend.detail.page', { productId: page.product.parentId }) }}" />
{% else %}
<link rel="canonical" href="{{ seoUrl('frontend.detail.page', { productId: page.product.id }) }}" />
Expand Down

0 comments on commit 242c669

Please sign in to comment.