View Single Post
  #5  
Old 03-08-2015, 05:33 AM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Re: Add sidebar to product pages

Your version of the file should go in the same place that it did in the default structure.

So if the original file is XLite\View\Controller and you want to decorate this class, and your module is in classes\XLite\DevID\ModuleName

Then your file would go in classes\XLite\DevID\ModuleName\View\Controller.php and it would contain the following:
Code:
<?php namespace XLite\DevID\ModuleName\View; /** * Controller main widget */ class Controller extends \XLite\View\Controller implements \XLite\Base\IDecorator { /** * Define the pages where first sidebar will be hidden. * By default we hide it on: * product page, * cart page, * checkout page * checkout success (invoice) page * payment page * * @return array */ protected static function getSidebarFirstHiddenTargets() { return array( 'cart', /*'product', Commented out to allow sidebar on product page */ 'checkout', 'checkoutPayment', 'checkoutSuccess', ); } }
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote