laenen/sw6-single-page-variants-plugin
最新稳定版本:1.0.1
Composer 安装命令:
composer require laenen/sw6-single-page-variants-plugin
包简介
Single Page Variants
README 文档
README
Single Page Variants is a Shopware 6 plugin that changes how URLs for product variants work. Instead of giving each variant its own SEO URL, only the main product has one.
When a user selects a variant on the product page, the plugin loads the new product data using AJAX. This means the page doesn’t reload, and the URL stays the same.
Features
- Only the main (parent) product gets an SEO URL.
- Variants no longer have their own URLs.
- The product page updates using AJAX when switching between variants.
- Sitemap includes urls for parent pages, not for specific variant pages.
- Avoids SEO issues with multiple URLs for similar content.
How It Works
-
Variant Switcher:
The plugin changes the variant switcher (product configurator) so it uses AJAX to load the selected variant’s data without reloading the page. -
Switch Route:
The controller for theswitchroute is updated to return the full product detail HTML directly, instead of redirecting to a new variant URL. -
URL Handling:
Variant URLs are replaced with their parent product’s URL using a customSeoUrlPlaceholderHandler. -
No SEO URLs for Variants:
The plugin stops Shopware from generating any SEO URLs for variants by extending theProductPagePageSeoUrlRoute.
When to Use This
- You want simpler, cleaner product URLs.
- You don’t want each variant to have its own page.
- You want a faster, more dynamic product page experience.
Compatibility
- Shopware 6.6
- Not recommended if other plugins or custom code depend on variant-specific URLs. Your mileage may vary.
Installation
You can install the plugin through the Shopware Administration, or use the command line:
composer require laenen/sw6-single-page-variants-plugin bin/console plugin:install --activate LaenenSinglePageVariants
统计信息
- 总下载量: 1
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-05-14