Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Help Needed in Changing Column Width's


Eaviator

Recommended Posts

Greetings gang,

 

I've spent the entire weekend going over dozens of posts and trying to figure out how to control the width of the columns on my site using what should be an easy process? Or so I thought. I'm running osC Ver2.3.1 with two Add-Ons, Quantity Price Breaks and Header Tags SEO.

 

I tried using the advice from one post and changed my catalog/includes/classes/osc_template.php file. Here's the code I used...

 

      class oscTemplate {
   var $_title;
   var $_blocks = array();
   var $_grid_container_width = 24;
   var $_grid_content_width = 14;
   var $_grid_columnLeft_width = 6;
   var $_grid_columnRight = 4;

 

Than I modified the catalog/includes/template_top.php file

 

     if (!$oscTemplate->hasBlocks('boxes_column_left')) {
   $oscTemplate->setGridContentWidth($oscTemplate->getGridContentWidth() + $oscTemplate->getGridColumnWidth());
 }

 if (!$oscTemplate->hasBlocks('boxes_column_right')) {
   $oscTemplate->setGridContentWidth($oscTemplate->getGridContentWidth() + $oscTemplate->getGridColumnWidth());
 }

 

And then I made the last change to the catalog/includes/template_bottom.php file adding this:

 

<div id="columnLeft" class="grid_<?php echo $oscTemplate->getGridColumnWidth(); ?> pull_<?php echo $oscTemplate->getGridContentWidth(); ?>">

<div id="columnRight" class="grid_<?php echo $oscTemplate->getGridColumnWidth(); ?>">

 

What have I done wrong here, the boxes are strewn all over the place. At this point I've finally quit because I can't get it to work right.

 

Can anyone out there help me with this? I'd sure appreciate it...BIGTIME. Many thanks in advance, I appreciate it.

 

Cheers,

DougB

Link to comment
Share on other sites

Greetings gang,

 

I've spent the entire weekend going over dozens of posts and trying to figure out how to control the width of the columns on my site using what should be an easy process? Or so I thought. I'm running osC Ver2.3.1 with two Add-Ons, Quantity Price Breaks and Header Tags SEO.

 

 

What have I done wrong here, the boxes are strewn all over the place. At this point I've finally quit because I can't get it to work right.

 

Can anyone out there help me with this? I'd sure appreciate it...BIGTIME. Many thanks in advance, I appreciate it.

 

Cheers,

DougB

 

Hello Doug,

 

I think I can help. I did something like you needed on your site, exept it was with making the content box less wide so that I could fit 2% padding on the left and right side (4% total) of the content box. I took 4% away from the width and added it as 2% padding (on each side = 4%). I think you are looking for the answer in the wrong place. You seem very close to giving up and what I'm going to tell you insn't the easy way, but it is free. I use a fluid 960 grid system. I'm guessing that you use the non-fluid 960 grid system. I think I can help you if you are using the same grid system I am using. Here is a link that tells you how to get it: http://forums.oscomm...29#entry1560629 Also, why do you need to make the columns wider and how can I find your website?

 

What I'm thinking is that you should be able to take away some width from something and add it as width to the columns.

- Luc

My Installed Contributions:

1. Ultimate SEO URLs V 2-2.2d-X

2. Quantity Box on Product Info Page

3. httpbl4osc Version 1.1.0

4. QTpro for osc 2.3

5. Header Tags SEO V 3.0 (For 2.3)

6. DHTML State Selection for 2.3.1

And Good To Know:

I use a 960gs fluid style sheet.

I do have a honey pot on my website.

Store Version: 2.3

 

“Pain is temporary. Quitting lasts forever."

- Lance Armstrong

Link to comment
Share on other sites

Hey Luc,

 

Thanks for chiming in here, it's much appreciated. It's not that I want to get away from the 960 grid system, the system itself is fine. It's just learning how to control it properly. The method of trying changes to the mentioned includes/classes/osc_template.php, includes/template_top.php, includes/template_bottom.php seemed a more likely way to go as I have no idea where to find the appropriate links inside oscommerce for changing div#columnLeft class="grid_7 push_24.container" to another grid setting or how to link the required changes to the appropriate divisions internally.

 

For instance when I tried changing the values of class="grid_4 pull_16.container_24" to 270px from the default 150px in the 960gs.css file or changed class="grid_16 push_4.container_24" default's 630px to 660px everything went to hell in a hurry. I guess I need to learn how to properly link these files to the 960gs.css in order to control the width's by properly using the current grid system, I see no problem using the fixed width layout at all of 960px.

 

I understand the system is based on using 24 files of 30px each with a 10px gutter between each of the columns, it's just how and where to control each of the divisons (for instance how would I change div#columnLeft from div# id="columnLeft" class="grid_4 pull_16"(150px)to div id="columnLeft" class="grid_7 pull_16"(270px)instead, or changing div id="body Content" class="grid_16 push_4" to something with a 660px width. I'm trying to increase the left column to 270px wide, with no right column being used at all and changing the center content to 660px allowing for the 10px gutter's...Does any of this make sense to you? Sure hope I'm explaining it correctly...

 

Sorry this site is not online anywhere's yet as I'm trying to get it running locally before uploading it without headaches...sigh.

 

Thanks for helping...if possible that is...

 

Cheers,

Doug

Link to comment
Share on other sites

From your various posts about this issue I got the impression that you want to use BOTH columns having the left one wider that the right.

 

In case you want just one column things are much more easy. You need to set one and only width to the columns, a common setting for both, that will get applied to the only column in use automatically

 

Go on as follows

1) Change the column width to the grid number you like (as posted here) and one more time here:

   var $_grid_container_width = 24;
   var $_grid_content_width = 16;
   var $_grid_column_width = 4;

 

You can change this numbers to anything you want, just take care that (column_width x2) + content_width = 24 always

 

2) Move all your boxes to left or right

 

You are one !

Link to comment
Share on other sites

George,

 

I could kiss your feet, it worked perfectly. Many thanks my friend, indeed. You've saved what little hair I have left at this point, my wife will really appreciate that.

 

Also, if I'm not mistaken, you're the fellow that's written the MTS system of templating oscommerce. Is there anywhere's you can suggest for me to learn more about the linkages within osCommerce and the 960gs.css files, like where they associate with the different divisions so that I can learn this one inside and out and maybe the next time (trust me there will be a next time, I don't give up that easy) I can help someone else out, instead of continuously bugging everyone like I've done this time? I mean that's what it's all about right, you get help on the forums, you return that help once you get confident enough yourself...

 

Thanks again...

 

Cheers,

DougB

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...