Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Increase brand image on product pages (Shop By Brand module)

 
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)
 
Thread Tools Search this Thread
  #1  
Old 03-04-2017, 09:27 AM
 
benlind benlind is offline
 

Member
  
Join Date: Feb 2016
Posts: 24
 

Default Increase brand image on product pages (Shop By Brand module)

I am using the Shop By Brand module. I would like to increase the size brand logo on individual product pages without losing quality. I uploaded a very large version of the logo for the brand, but it is being resized to 100px wide before being displayed on the page. I want it to be at least 160px.

How can I get a larger, high-quality version of the brand image on product pages?
__________________
X-Cart version 5.2
Reply With Quote
  #2  
Old 03-04-2017, 09:39 AM
 
benlind benlind is offline
 

Member
  
Join Date: Feb 2016
Posts: 24
 

Default Re: Increase brand image on product pages (Shop By Brand module)

I solved this problem by overriding the module's View/Product/Details/Brand.php file's getLogoWidth() and getLogoHeight() methods.

This is the file I created at classes/XLite/Module/<dev_id>/<module_id>/Module/QSL/ShopByBrand/View/Product/Details/Brand.php:

PHP Code:
<?php
// vim: set ts=4 sw=4 sts=4 et:

namespace XLite\Module\<dev_id>\<module_id>\Module\QSL\ShopByBrand\View\Product\Details;

class 
Brand extends XLite\Module\QSL\ShopByBrand\View\Product\Details\Brand implements \XLite\Base\IDecorator
{
    
/**
     * Get the width of the product's brand logo.
     *
     * @return integer
     */
    
public function getLogoWidth()
    {
        return 
200;
    }

    
/**
     * Get the width of the product's brand logo.
     *
     * @return integer
     */
    
public function getLogoHeight()
    {
        return 
150;
    }
}

I then redeployed the store, and the brand images were now bigger on individual product pages.
__________________
X-Cart version 5.2
Reply With Quote

The following user thanks benlind for this useful post:
qualiteam (03-09-2017)
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 03:14 AM.

   

 
X-Cart forums © 2001-2020