rapidez / amasty-shop-by-brand
Rapidez Amasty Shop By Brand
2.0.0
2024-05-28 09:05 UTC
Requires
- php: ^8.0|^8.1|^8.2
- illuminate/database: ^9.0|^10.0|^11.0
- illuminate/support: ^9.0|^10.0|^11.0
- illuminate/view: ^9.0|^10.0|^11.0
- rapidez/core: ~0.77|^1.0|^2.0
README
要求
您需要在您的 Magento 2 安装中安装并配置 Amasty Shop By Brand 模块。此模块包含 Improved Layered Navigation 模块。
安装
composer require rapidez/amasty-shop-by-brand
之后,品牌将在 /some_brand
处可用,该品牌的所有产品将显示配置的元数据和描述。如果您想在某处显示品牌图像,您可以使用 $product->amasty_brand_image
或 item.amasty_brand_image
在 Reactive Search 中。例如在产品页面上
@if($product->amasty_brand_image)
<a href="{{ $product->amasty_brand_url }}">
<img src="{{ config('rapidez.media_url').'/amasty/shopby/option_images/'.$product->amasty_brand_image }}" alt="{{ $product->manufacturer }}" class="h-10">
</a>
@endif
品牌列表小部件
如果您想使用 Amasty\ShopbyBrand\Block\Widget\BrandList
小部件,您可以在 config/rapidez.php
文件中注册它。对于包含所有品牌的品牌 CMS 页面很有用。
'widgets' => [ ... 'Amasty\ShopbyBrand\Block\Widget\BrandList' => Rapidez\AmastyShopByBrand\Widgets\BrandList::class, ],
视图
如果您需要更改视图,您可以使用以下方法发布它们
php artisan vendor:publish --provider="Rapidez\AmastyShopByBrand\AmastyShopByBrandServiceProvider" --tag=views
注意
目前只实现了品牌页面、品牌列表小部件和图像。
许可证
GNU 通用公共许可证 v3。请参阅 许可证文件 以获取更多信息。