BrandManagement
https://github.com/magesuite/brand-management
This is a powerful module created in order to add and manage product brands.
Â
Installation
This module is a part of MageSuite metapackage.
composer require "creativestyle/magesuite-brand-management" ^1.0.0
Â
User guide
This document covers developer documentation, for the user guide refer to: 2.7. Brands
Admin settings
Catalog > Brands
Grid with all added brands:
Catalog > Brands -> Crete New Brand
Add a new brand
Brand details
Enabled | When enabled brand will be visible on frontend. | default value: Yes |
Brand Name | Â | required |
Brand Icon | Allowed file types: png, gif, jpg, jpeg, svg. Max file size 1MB. | optional |
Brand Additional Icon | Â | optional |
URL Key | Â | required |
Is featured | When enabled brand will be visible in brand carousel. | default value: Yes |
Show In Brand Carousel | When enabled brand will be visible in brand carousel. | default value: Yes |
Short Description | Â | optional |
Full Description | Â | optional |
Layout Update XML | Â | Â |
Brand group identifier | An additional brand’s identifier to be used by developers to add e.g. CSS classes |  |
Â
Below brand options, there are settings that help customize the brand page: Search Engine Optimization (Meta title, Meta description, and Meta Robots for brand page).
Â
Backend
TODO BE part is needed.
Blocks in Admin Panel
There are buttons configuration for Back, Delete, Save button
There is also Grid configuration for all columns
Controllers in Admin Panel
There are actions for: new, edit, delete and save Brand, for displaying grid of Brands
And also for upload Brand icon and additional icon
Â
vendor/creativestyle/magesuite-brand-management/Controller/Adminhtml/Brand/Upload.php:29
public function execute()
{
try {
$result = $this->uploadProcessor->create()->processUpload();
} catch (\Exception $e)
.....
}
Â
magesuite-brand-management/Model/Brands/Processor/Upload.php:60
public function processUpload($imageData = null)
{
if($imageData) {
$fileAttributes = $this->prepareUploadBase64Encoded($imageData);
} else {
$fileAttributes = $this->prepareUploadImage();
}
try {
.....
$result = $this->uploader->save($destinationFolder, $fileAttributes['name']);
.....
}
.....
}
Observer
There is observer add_brand_group_identifier_to_body
which listens to event controller_front_send_response_before
Â
vendor/creativestyle/magesuite-brand-management/etc/frontend/events.xml:2
add can add brand group identifier to body tag to class param, for example my_brand
<body data-container="body" id="html-body" class="brands-index-index my_brand page-layout-2columns-left sale-bar">
Frontend
The brand overview page is placed under /brands
url (brands-index-all
layout). It consists of linked brand icons and an alphabetical list with links to specific brand subpages.
Â
The specific brand page (brands-index-index
layout) consists of a grid with all products assigned to this brand.
Additionally, the Content Constructor Brand Carousel module is available for all CMS pages and other ContentConstructor areas.
Â
Styling
The specific brand page uses a separate entry: theme-creativeshop/src/entries/magesuite-brand-management.ts
in order to include its styles. Standard category page styles are applied to specific brand pages and standard rules for CC components styling apply to the brand carousel.
Â