WEB SYSTEMS PRO
E-commerce platform
€39.80

* Net price (excluding VAT)

SKU:WSP-197-PL
License
Web Systems Pro
Version
1.24.0.1.wsp
Update
09/02/2024


Integration of plugins "Brands PRO" with the theme

Plugin is integrated with the design themes "MegaShop 2.0" and "Mastershop". There is no need to insert code from the instructions.

Thanks to basic functions, plugin works without integration. To connect additional features and output blocks, use the following constructions:

1. Output of additional description field

Insert code {$additional_description|default:''} in the brand catalog template.


2. Manual output of plugins on the site 

If website theme does not use the frontend_nav hook or you need to display brands in another location within the design theme, you can use helpers:

{shopBrandViewHelper::getBrand($brand_id)} - Get brand by ID
{shopBrandViewHelper::getProductBrand($product)} - Display product brands
{shopBrandViewHelper::getAllBrands()} - Output all brands
{shopBrandViewHelper::getAllBrandsWithImages()} - Display all brands with images
{$brand->getImageUrl('970')} - Get brand image of specified size
{shopBrandViewHelper::getGroupedBrands()} - Retrieve list of brands grouped alphabetically
{shopBrandViewHelper::showGroupedBrands()} - Display template for alphabetically grouped brand menu
{shopBrandViewHelper::getBrandMainPage($product)} - Get brand information on product card


For example, to display the brand description and additional descriptions:

{$brand_page = shopBrandViewHelper::getBrandMainPage($product)}
{$brand_page.description}
{$brand_page.additional_description}


The template file can be edited in the plugins settings.


3. Output of image-link to brand on the product card

{$product_brand = shopBrandViewHelper::getProductBrand($product)}
{if $product_brand}
 <a href="{$product_brand.frontend_url}">
  {if $product_brand.image_url}
   <img src="{$product_brand.image_url}" alt="{$product_brand.name|escape}">
  {else}
   <span>{$product_brand.name|escape}</span>
  {/if}
 </a>
{/if}

{$brand->getImageUrl('970')} - if a specific brand image size is required


4. Displaying links to all brands

{foreach shopBrandViewHelper::getAllBrands() as $brand}
    <a href="{$brand.frontend_url}">{$brand.name|escape}</a>
{/foreach}


5. Displaying description on the page listing all brands

{$description} - variable for displaying description on the brand list page