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

Add sidebar to product pages

 
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)
 
Thread Tools Search this Thread
  #11  
Old 03-15-2015, 09:43 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

Quote:
Originally Posted by alarmsellout
Yes, I did change the core file... I just re-built the store and it took effect. However, it didn't do quite what I was hopping for so I changed it back. Why shouldn't the core file be changed? Upgrade problems later or...?
The whole point of XC5 is easy upgrades. Well there are many good things about it, but mainly it is ease of upgrade and easy module installation. But this is completely defeated if you modify core files.

No core files, not skins, not CSS, not php code should ever be changed. The database should never be directly altered either.

All of your changes should be accomplished by the addition of your own custom module. XC5 has a brilliant system for overwriting code and skins with modules. That is what makes it truly special.
__________________
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
  #12  
Old 03-15-2015, 10:12 AM
 
alarmsellout alarmsellout is offline
 

Member
  
Join Date: May 2009
Posts: 21
 

Default Re: Add sidebar to product pages

Understood... So basically any changes that are made need to be done by making a module or changing the custom css file... Is that right?
Reply With Quote
  #13  
Old 03-15-2015, 05:09 PM
  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

Quote:
Originally Posted by alarmsellout
Understood... So basically any changes that are made need to be done by making a module or changing the custom css file... Is that right?
Yes, you confine all your changes to your module. Your module can be a skin, and it can have template files of it's own. Your module can do anything! And you can add your own CSS files too.
__________________
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
  #14  
Old 06-07-2015, 02:00 AM
 
Rainer Rainer is offline
 

Newbie
  
Join Date: May 2015
Posts: 3
 

Default Re: Add sidebar to product pages

Hello,

First, thanks for all the tips and advice. I've followed these steps to remove the sidebar from the homepage while leaving it on my catalogue pages.

I have a further query: I have created some static pages and I would like to block the sidebar from displaying on them. I should just be able to add those pages to the list of other blocked pages but I don't know what to call them.

The url is https://mydomain.com/design.html

Adding 'design' to the blocked pages doesn't work. How do I know what to call the page in order to hide the sidebar? Or is there another way to achieve the same result?

Thanks for your help!!

Cheers,

Rainer.
__________________
xcart 5.2.4
Reply With Quote
  #15  
Old 06-07-2015, 01:07 PM
 
Rainer Rainer is offline
 

Newbie
  
Join Date: May 2015
Posts: 3
 

Default Re: Add sidebar to product pages

Hello,

(apologies if I'm duplicating a post. I posted earlier but it seems to have disappeared. I'm a new x-carter so I generally don't know what I'm doing ).

Thanks for your advice! I have followed these steps to remove the sidebar from my homepage.

I would like to hide the sidebar from static pages added via the Simple CMS module but I don't know what name to add to the "getSidebarFirstHiddenTargets()" list. Is there any way to do this?

Thanks for your help!!

Cheers,

Rainer.
__________________
xcart 5.2.4
Reply With Quote
  #16  
Old 06-08-2015, 03:30 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

Try:
$hiddenTargets[] = 'page';
__________________
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

The following user thanks totaltec for this useful post:
tony_sologubov (06-15-2015)
  #17  
Old 06-09-2015, 03:11 AM
 
Rainer Rainer is offline
 

Newbie
  
Join Date: May 2015
Posts: 3
 

Default Re: Add sidebar to product pages

Thanks Mike! Your a champion! 'page' did the trick
__________________
xcart 5.2.4
Reply With Quote

The following user thanks Rainer for this useful post:
tony_sologubov (06-15-2015)
  #18  
Old 07-05-2015, 11:38 AM
  ARW VISIONS's Avatar 
ARW VISIONS ARW VISIONS is offline
 

X-Man
  
Join Date: Jan 2007
Location: Pensacola, FL
Posts: 2,536
 

Default Re: Add sidebar to product pages

how do you do this in 5.2?

tries extending XLite/Core/layout.php

Broke the whole thing now stuck in redeploy, and why do I need to redeploy again????
__________________
xcart 5.1.2
Reply With Quote
  #19  
Old 07-08-2015, 03:56 AM
 
Phil Richman Phil Richman is offline
 

Advanced Member
  
Join Date: May 2012
Posts: 94
 

Default Re: Add sidebar to product pages

Quote:
Originally Posted by ARW VISIONS
how do you do this in 5.2?

tries extending XLite/Core/layout.php

Broke the whole thing now stuck in redeploy, and why do I need to redeploy again????
In 5.2 it is still XLite/Core/Layout.php that you extend.

You need to do this

PHP Code:
namespace XLite\Module\YourDeveloperID\YourModuleID\Core;
 
abstract class 
Layout extends \XLite\Core\Layout implements \XLite\Base\IDecorator

 
protected function 
getSidebarFirstHiddenTargets()
{
return array(
'cart',
'checkout',
'checkoutPayment',
'checkoutSuccess',
);
}


Obviously YourDeveloperID\YourModuleID are replaced with your developer id and module id. Let me know if this helps. I did notice that you typed Layout.php as layout.php. make sure your file is capitalized correctly.
__________________
Ver 5.2.6
Reply With Quote

The following 2 users thank Phil Richman for this useful post:
qualiteam (07-10-2015), totaltec (07-08-2015)
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 05:26 AM.

   

 
X-Cart forums © 2001-2020