CRE Loaded Community

Banner


Board index » Web Design and Development » Development Discussions

All times are UTC - 5 hours




Post new topic Reply to topic  [ 13 posts ] 
Author Message
 Post subject: 3 Column on main, 2 on Catalog and Landing, 1 on Pages
PostPosted: Fri Jun 25, 2010 3:51 pm 
Offline
CRE Freak
User avatar

Joined: Thu Jun 17, 2010 1:42 pm
Posts: 56
Location: Canada
I am hoping somebody can help to figure this one out.

I want to show 3 columns on my index page (Left, right and center)

When you are browsing the Catalog, I only want the left column to be displayed.

I also want to create landing pages for certain products (Really hoping the SEO will allow for this. URL/product-name.html) and have the same thing, left column and main column with a custom page.

However, I have numerous pages of information on my site and want to have only the main column displayed on these pages.

Can anybody help? Need more explanation/examples?

Thanks


Top
 Profile  
 
 Post subject: Re: 3 Column on main, 2 on Catalog and Landing, 1 on Pages
PostPosted: Sat Jun 26, 2010 12:51 am 
Offline
CRE Talented

Joined: Sun Nov 29, 2009 10:57 am
Posts: 348
kraymitchell wrote:
Need more explanation/examples?


Yes

_________________
CSS Store - http://mdjl40.mdjl-demo.co.uk -Work in Progress
YMM Filter Lists - http://mdjl-demo.co.uk/6-4-1a -Pagnation/Filter Lists


Top
 Profile  
 
 Post subject: Re: 3 Column on main, 2 on Catalog and Landing, 1 on Pages
PostPosted: Sat Jun 26, 2010 11:24 am 
Offline
CRE Freak
User avatar

Joined: Thu Jun 17, 2010 1:42 pm
Posts: 56
Location: Canada
3 Column Main Page: http://www.lovemuffin.ca/
2 Column Cart Page: http://www.lovemuffin.ca/ixxocart/catal ... s-1-1.html
2 Column Landing Page: http://www.lovemuffin.ca/we-vibe-ii.html
Single Column Text Pages: http://www.lovemuffin.ca/care-and-cleaning.html

THanks.


Top
 Profile  
 
 Post subject: Re: 3 Column on main, 2 on Catalog and Landing, 1 on Pages
PostPosted: Sat Jun 26, 2010 3:37 pm 
Offline
CRE Freak
User avatar

Joined: Wed Nov 18, 2009 10:24 am
Posts: 97
I have asked the same question on this forum 2 times and the answer was always no... whatever you have chosen for the columns in Design Controls forces what all the pages have and they are all the same.

I really don't believe this to be the only answer but let's see what others have to say. I would really like to have some of my pages with only the left column and some with no columns.


Top
 Profile  
 
 Post subject: Re: 3 Column on main, 2 on Catalog and Landing, 1 on Pages
PostPosted: Sat Jun 26, 2010 3:43 pm 
Offline
CRE Freak
User avatar

Joined: Thu Jun 17, 2010 1:42 pm
Posts: 56
Location: Canada
Yeah, I don't believe that either. It's a php application, and this can be done in php, one of the previous places I worked used this technique on a custom application and after speaking with the developers, they said it can be done on pretty much any php app with some work. Somebody just doesn't want to share it sounds like.


Top
 Profile  
 
 Post subject: Re: 3 Column on main, 2 on Catalog and Landing, 1 on Pages
PostPosted: Sun Jun 27, 2010 12:55 am 
Offline
CRE Talented

Joined: Sun Nov 29, 2009 10:57 am
Posts: 348
The turning on and off of columns is quite easy using a small if statement around your columns display in main_page.tpl.

I'll leave the below example up at http://www.mdjl-demo.co.uk/demo/ for today so you can see in action.

example for a stock install:
Code:
if (! strstr($PHP_SELF,'product_info.php')) {

    if (DISPLAY_COLUMN_LEFT == 'yes' && (DOWN_FOR_MAINTENANCE =='false' || DOWN_FOR_MAINTENANCE_COLUMN_LEFT_OFF =='false'))  {
        $column_location = 'Left_';
    ?>
      <td width="<?php echo BOX_WIDTH_LEFT; ?>" valign="top" class="maincont_left_td">
        <table border="0" width="<?php echo BOX_WIDTH_LEFT; ?>" cellspacing="0" cellpadding="<?php echo CELLPADDING_LEFT; ?>" class="leftbar_tb">
        <!-- left_navigation //-->
        <?php require(DIR_WS_INCLUDES . FILENAME_COLUMN_LEFT); ?>
        <!-- left_navigation_eof //-->
      </table></td>
      <?php
      $column_location = '';
    }
}

This will not show the left column on the product info page, you can apply the same if statement to the right column to not didplay that, giving you a one column page, yet 3 column on all other pages.

adding to the if statement as so:

Code:
if ( ( ! strstr($PHP_SELF,'product_info.php')) && (( ! strstr($PHP_SELF,'index.php')) || ( !isset($_GET['cPath']) ))  ){


This will display the left column on all pages except, product_info.php - index.php when the cpath is set (so when viewing categories or sub categories,

kraymitchell wrote:
Somebody just doesn't want to share it sounds like.

Its not that at all, chances of an inexperienced coder messing things up is pretty high, leaving us who do help for free to try and sort out the mess.
As you both employ or have employed freelance help, I'm suprised they didnt/dont know how to do this :!: :wink:

_________________
CSS Store - http://mdjl40.mdjl-demo.co.uk -Work in Progress
YMM Filter Lists - http://mdjl-demo.co.uk/6-4-1a -Pagnation/Filter Lists


Last edited by TheLango on Fri Jul 09, 2010 9:55 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: 3 Column on main, 2 on Catalog and Landing, 1 on Pages
PostPosted: Sun Jun 27, 2010 3:52 am 
Offline
CRE Freak
User avatar

Joined: Wed Nov 18, 2009 10:24 am
Posts: 97
Thanks... this worked for me!


Top
 Profile  
 
 Post subject: Re: 3 Column on main, 2 on Catalog and Landing, 1 on Pages
PostPosted: Sun Jun 27, 2010 12:16 pm 
Offline
CRE Freak
User avatar

Joined: Thu Jun 17, 2010 1:42 pm
Posts: 56
Location: Canada
Thanks TheLango! Greatly appreciated. I am hoping to try this out today. I will let you know how it works out.


Top
 Profile  
 
 Post subject: Re: 3 Column on main, 2 on Catalog and Landing, 1 on Pages
PostPosted: Sun Jun 27, 2010 3:04 pm 
Offline
CRE Freak
User avatar

Joined: Thu Jun 17, 2010 1:42 pm
Posts: 56
Location: Canada
I have tried this out and it's working. however, how do I reverse it so it shows the left column on product pages and not the right column?

TheLango wrote:
As you both employ or have employed freelance help, I'm suprised they didnt/dont know how to do this :!: :wink:

That's not it at all. I have not even had him look at this yet, as I have him working on other things first. I figured I would post here and see if I got a response and if it was something I could do myself. While I cannot program myself, 5 years as an IT Manager taught me a lot about reading and modifying code, but sometimes I just can't do it myself.

I am an inexperienced coder, but an experienced modder :D The more I do, the more I learn and the more I can achieve myself. I have modified several lines of php today without issue (Well, I got it working with some trial and error by looking at how the other code was structured).


Top
 Profile  
 
 Post subject: Re: 3 Column on main, 2 on Catalog and Landing, 1 on Pages
PostPosted: Fri Jul 02, 2010 2:45 pm 
Offline
CRE Freak
User avatar

Joined: Wed Nov 18, 2009 10:24 am
Posts: 97
TheLango,

Can you take this one step further for me.

You helped me use this code so that my video only shows on the Main Page and not on the other pages by adding right above my swf file.:
Code:
if ( ( strstr($PHP_SELF,'index.php')) && ! isset($_GET['cPath']) )  {



I need to keep the functionality for my video file but also want to NOT have the 3rd column on my "pages.php" pages.

When I add the following just above the right navgation... and keep the code for the swf file:
Code:
if (! strstr($PHP_SELF,'pages.php')) {

if (DISPLAY_COLUMN_RIGHT == 'yes')  {
if (DOWN_FOR_MAINTENANCE =='false' || DOWN_

it breaks the code and gives me this error when looking at the site:

Parse error: syntax error, unexpected $end in /home/electron/public_html/templates/OS03C00308/main_page.tpl.php on line 251

If I remove the code for either function, the remaining code works just fine.

Can you suggest how I can make the video function as needed and also remove the 3rd column from the 'pages.php' pages?

Thanks Warren


Top
 Profile  
 
 Post subject: Re: 3 Column on main, 2 on Catalog and Landing, 1 on Pages
PostPosted: Fri Jul 02, 2010 2:49 pm 
Offline
CRE Talented

Joined: Sun Nov 29, 2009 10:57 am
Posts: 348
You still have my email?
if so email me your main_page.tpl.php file and I'll sort out for you.

_________________
CSS Store - http://mdjl40.mdjl-demo.co.uk -Work in Progress
YMM Filter Lists - http://mdjl-demo.co.uk/6-4-1a -Pagnation/Filter Lists


Top
 Profile  
 
 Post subject: Re: 3 Column on main, 2 on Catalog and Landing, 1 on Pages
PostPosted: Sun Jul 04, 2010 10:18 am 
Offline
CRE Talented

Joined: Sun Nov 29, 2009 10:57 am
Posts: 348
Whlst working on an improved version of the OSCommerce mod "Browse by Categories" for a client, I came up with the following which might help you folks out a bit in the future.

I had to turn off the columns, both on the index page, right on the index page when nested and none off when viewing the index products page.

http://www.mdjl-demo.co.uk/demo for example.

First:
Add the following to your template.php file found in your template folder, just before the last ?> will be ok.

Code:

  $view_left_column = 'true';
  $view_right_column = 'true';


Now open your main_page_tpl.php file found in the same folder and find around line 87:
Code:
    if (DISPLAY_COLUMN_LEFT == 'yes' && (DOWN_FOR_MAINTENANCE =='false' || DOWN_FOR_MAINTENANCE_COLUMN_LEFT_OFF =='false'))  {

Replace with:
Code:
    if ($view_left_column == 'true' && (DOWN_FOR_MAINTENANCE =='false' || DOWN_FOR_MAINTENANCE_COLUMN_LEFT_OFF =='false'))  {


Find around line 121:
Code:
    if (DISPLAY_COLUMN_RIGHT == 'yes' && (DOWN_FOR_MAINTENANCE =='false' || DOWN_FOR_MAINTENANCE_COLUMN_LEFT_OFF =='false'))  {

Replace with:
Code:
    if ($view_right_column == 'true' && (DOWN_FOR_MAINTENANCE =='false' || DOWN_FOR_MAINTENANCE_COLUMN_LEFT_OFF =='false'))  {

Save and close.

Now, for example to turn off the right and left columns on the index page, open index.php found in your root folder.
Find around line 16:
Code:
$category_depth = 'top';

add below:
Code:
$view_right_column = 'false';
$view_left_column = 'false';

To turn off the right column when viewing sub categories (Nested) find around line 32:
Code:
      $category_depth = 'nested'; // navigate through the categories

Add below:
Code:
$view_right_column = 'false';
$view_left_column = 'true';

to display both columns when on the index products page, find around line 24
Code:
    $category_depth = 'products'; // display products

Add below:
Code:
$view_right_column = 'true';
$view_left_column = 'true';

Also find around line 37
Code:
      $category_depth = 'products'; // category has no products, but display the 'no products' message

Add below:
Code:
$view_right_column = 'true';
$view_left_column = 'true';


To turn off the columns on any other page, open up the file relating to the page you want to turn the columns off on, in your root folder, again example for product info page would be product_info.php.
Find:
Code:
  $javascript = 'popup_window.js';

Add below:
Code:
$view_right_column = 'false';
$view_left_column = 'true';

and so on you can now turn off any column on any poage you like.

_________________
CSS Store - http://mdjl40.mdjl-demo.co.uk -Work in Progress
YMM Filter Lists - http://mdjl-demo.co.uk/6-4-1a -Pagnation/Filter Lists


Top
 Profile  
 
 Post subject: Re: 3 Column on main, 2 on Catalog and Landing, 1 on Pages
PostPosted: Mon Jul 12, 2010 2:50 pm 
Offline
CRE Freak
User avatar

Joined: Thu Jun 17, 2010 1:42 pm
Posts: 56
Location: Canada
Sorry for my delay is response (Trying hard to get the cart up and running properly).

Thanks for the info TheLango, my programmer used the information to setup my cart for me (I figured it would go quicker if I had him do it lol). He did appreciate your detail though.

Thanks or the assistance, Please hang around!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ] 

Board index » Web Design and Development » Development Discussions

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
It is currently Tue Feb 07, 2012 10:52 am
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

Login

Top Listing

1. Cart2Cart - Shopping...
    Category: Shopping Cart Database Conversion Scripts
    
2. Points & Rewards PLUS!...
    Category: Add-Ons
    
3. Configuration Server...
    Category: Fixes
    
4. Credit Card with CCV
    Category: Payment Modules
    
5. CC7333_ATS
    Category: Templates
    
Show more...

Follow Us on Twitter

An error occurred

Oops, an error seems to have occurred. We're sorry for any inconvenience this might have caused. If the error persists, feel free to tell us about it.

CRE Loaded Community Chat hosted by CRE Loaded.

Join now


Chat about what's on your mind. More about public chats.


© CRE Loaded is a product of Chain Reaction Ecommerce, Inc. Usage & Privacy Policy