Forums / Setting Up Categories, Products, Attributes / Need space between rows in Category page

Need space between rows in Category page

Views: 6,883

Results 1 to 15 of 15
16 Sep 2006, 9:40 PM
#1
jund avatar

jund

Zen Follower

Join Date:
Sep 2006
Location:
Ruckersville, VA, USA
Posts:
276
Plugin Contributions:
0

Need space between rows in Category page

Using version 1.3.5 there is no space between rows on my Category pages. The image's bottom on the row above it touch the image's top on the row beneath it for the first 9 rows. If my explanation is confusing, it looks like a vertically stacked column of 10 thumbnails in the Product column...

However, the "All Products" pages has a really sweet arrangement of a row of space, a hoizontal bar, and row of space, and then the product is listed.

I would like my Category page to look the same as the Product page.

Can anyone please help me?

Respectfully submitted,

John Underwood

16 Sep 2006, 9:47 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Need space between rows in Category page

What is your URL?
What template are you using?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

16 Sep 2006, 9:55 PM
#3
jund avatar

jund

Zen Follower

Join Date:
Sep 2006
Location:
Ruckersville, VA, USA
Posts:
276
Plugin Contributions:
0

Re: Need space between rows in Category page

DrByte:

What is your URL?
What template are you using?

Dr. Byte...

Man you are fast!

The site is currently under password protection, so the URL would not help you... However I could temporarily lift it, and we could work it out... just do NOT want to waste your time.

The template is the default template - the new one that comes with the latest version - Green one (smile).

Respectfully,

John Underwood

16 Sep 2006, 10:03 PM
#4
jund avatar

jund

Zen Follower

Join Date:
Sep 2006
Location:
Ruckersville, VA, USA
Posts:
276
Plugin Contributions:
0

Re: Need space between rows in Category page

Just screen captured the failing page, made it into a jpg so you could see the failure and here is the link to it:
http://www.imagesbydavido.com/drbyte.htm

Thank you for your help

John Underwood

17 Sep 2006, 12:36 AM
#5
jund avatar

jund

Zen Follower

Join Date:
Sep 2006
Location:
Ruckersville, VA, USA
Posts:
276
Plugin Contributions:
0

Re: Need space between rows in Category page

DrByte:

What is your URL?
What template are you using?

Dr. Byte
Hacking is not my normal way of doing business - especially since many folks have gone to much time and trouble like yourself in solving issues for others.

My store is in a folder named "store."
I did though "hack" a temporary fix - I modified line 19 of store>includes>templates>template_default>common/tpl_tabular_display.php.
Line 19 includes the attributes for the table and I changed the cell padding from "0" to "2"

I sincerely hope this little hack offends no one - and I thank you for stopping by my post to assist me.

John Underwood

17 Sep 2006, 2:56 AM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Need space between rows in Category page

such a hack is acceptable; although I would point out a tip which will help you down the road:

You should put your hacked/modified file into your personal template folder, not template_default.
ie:

  • you have "classic" and "template_default"
  • create your own, say "john"
  • copy the file from template_default/common/tpl_tabular_display.php INTO john/common/tpl_tabular_display.php

Keeping the same folder structure as template_default, but saving your changed versions in your personal folder is what is referred to here as "overrides". This will keep all your customizations central, and will make upgrading easier in the future, as well as easier to back out of something if it goes wrong.

Here's more information on the overrides system and templating concepts within Zen Cart:
http://www.zen-cart.com/wiki/index.php/Customisation_-_Templates
http://www.zen-cart.com/wiki/index.php/Customisation_-_Templates_-_Create (for making your own template)
... and many more links from those articles, etc...

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

17 Sep 2006, 3:30 AM
#7
seethrou avatar

seethrou

Totally Zenned

Join Date:
May 2004
Location:
Hong Kong
Posts:
1,156
Plugin Contributions:
0

Re: Need space between rows in Category page

@ jund

I think if you are refering to the page of Product Listing, please refer to the topic below for more infos.
Product Listed to close together

Mind you the above infos are for the template which based on template_default, but the concepts are the same.

.

A New Starter again

18 Sep 2006, 3:14 AM
#8
jund avatar

jund

Zen Follower

Join Date:
Sep 2006
Location:
Ruckersville, VA, USA
Posts:
276
Plugin Contributions:
0

Re: Need space between rows in Category page

This is a reply to all of you... and to each of you who were so kind...

Your support and encouragement are outstanding. This is one of the few forums where I have asked questions and received real support without a bunch of flames from idiots and wanna be web folks...
My warmest thanks and I sincerely appreciate the time and patience each of you has.
I created my own template folder, and went thru the steps very carefully and met with success. The advice regarding the templates is clean and clear, with only one thing missing - do not forget to reset your columns (smile).

Again, thank you all... and thanks again for stopping on my side of the ditch and pulling me out.

Respectfully,

John Underwood

18 Sep 2006, 4:01 AM
#9
seethrou avatar

seethrou

Totally Zenned

Join Date:
May 2004
Location:
Hong Kong
Posts:
1,156
Plugin Contributions:
0

Re: Need space between rows in Category page

Glad to hear it could be help. :smile:

.

A New Starter again

26 Jan 2007, 5:11 PM
#10
memorylast avatar

memorylast

New Zenner

Join Date:
Jan 2007
Posts:
3
Plugin Contributions:
0

Re: Need space between rows in Category page

I am new to the forum.

I want add some space between rows. products are too close together. how can I add spaces between rows. I tried almost all the methods posted in the forum. but not successful... =:( can anyone point out an easy way.

link
http://memorylast.com/cart/index.php?main_page=index&cPath=87

thanks
tricia

26 Jan 2007, 8:06 PM
#11
jund avatar

jund

Zen Follower

Join Date:
Sep 2006
Location:
Ruckersville, VA, USA
Posts:
276
Plugin Contributions:
0

Re: Need space between rows in Category page

Tricia,

You cannot use the previous method suggested by me. However, you have built your website in a way that makes it easy to fix - at least on the home page.

The smart and people at ZEND CART have added a clear element between the rows: <br class="clearBoth" />

All you have to do is go to where the code is created by php for your home page - and add this little statement <br class="clearBoth" /> for each "Spacer" beneath each row.

How do you know where these rows and spacers belong? When php generates a page, it is sometimes difficult to find out exactly where to place things. An easy solution to finding the place is to use your browser, open the home page (for example) and then select "View" and "Source." This should open the browser page (the home page in your case) in NOTEPAD as a plain text file.

Simply save this file as a html file to your desktop or some folder. Name it (save as) home.html (so you do not screw up your home page).

Next open it in your web editing tool. Your tool should one that displays line numbers.

Your home page has the spacer <br class="clearBoth" /> located on line 131 or thereabouts. Now that you have located it, just find it on your website, and add another one just below it. Each one provides an additional space.

You have a really nice looking web site - you go girl!

Respectfully,

John Underwood

26 Jan 2007, 8:50 PM
#12
jettrue avatar

jettrue

Totally Zenned

Join Date:
Jan 2005
Location:
USA, St. Louis
Posts:
3,651
Plugin Contributions:
5

Re: Need space between rows in Category page

jund:

Tricia,

You cannot use the previous method suggested by me. However, you have built your website in a way that makes it easy to fix - at least on the home page.

The smart and people at ZEND CART have added a clear element between the rows: <br class="clearBoth" />

All you have to do is go to where the code is created by php for your home page - and add this little statement <br class="clearBoth" /> for each "Spacer" beneath each row.

How do you know where these rows and spacers belong? When php generates a page, it is sometimes difficult to find out exactly where to place things. An easy solution to finding the place is to use your browser, open the home page (for example) and then select "View" and "Source." This should open the browser page (the home page in your case) in NOTEPAD as a plain text file.

Simply save this file as a html file to your desktop or some folder. Name it (save as) home.html (so you do not screw up your home page).

Next open it in your web editing tool. Your tool should one that displays line numbers.

Your home page has the spacer <br class="clearBoth" /> located on line 131 or thereabouts. Now that you have located it, just find it on your website, and add another one just below it. Each one provides an additional space.

You have a really nice looking web site - you go girl!

Respectfully,

John Underwood

Errr... Not to sure about what you've just described, but the easy way to do what she is asking is to add some padding to the itemTitle. TO do this, open up:

includes/templates/YOUR_TEMPLATE/css/stylesheet.css and change:

.itemTitle {
font-weight: lighter;
}

to

.itemTitle {
font-weight: lighter;
padding:5px 0 20px 0;
}
3 Aug 2008, 12:43 AM
#13
temiamosu avatar

temiamosu

New Zenner

Join Date:
Aug 2008
Posts:
1
Plugin Contributions:
0

Re: Need space between rows in Category page

to add space between categories-products list, locate the file below:
templates/template_default/sideboxes/tpl_categories.php

locate '<br/>' on line 57, then add an extra <br/>(means down an extra line). So your final result would look like this '<br/><br/>'

hope this helps.. you can add to any line where you see '<br/>' for other categories. cheers

30 May 2009, 12:36 AM
#14
damn_kitten avatar

damn_kitten

New Zenner

Join Date:
May 2009
Posts:
8
Plugin Contributions:
0

Re: Need space between rows in Category page

temiamosu:

to add space between categories-products list, locate the file below:
templates/template_default/sideboxes/tpl_categories.php

locate '<br/>' on line 57, then add an extra <br/>(means down an extra line). So your final result would look like this '<br/><br/>'

hope this helps.. you can add to any line where you see '<br/>' for other categories. cheers

:bigups:
THANK YOU! This is just what I needed to separate all the products in my category listing!

16 Jan 2010, 11:39 PM
#15
webbouk avatar

webbouk

New Zenner

Join Date:
Dec 2009
Posts:
33
Plugin Contributions:
0

Re: Need space between rows in Category page

Here's a nice little change rather than adding an additional break

Rather than.....

Originally Posted by temiamosu
to add space between categories-products list, locate the file below:
templates/template_default/sideboxes/tpl_categories.php

locate '<br/>' on line 57, then add an extra <br/>(means down an extra line). So your final result would look like this '<br/><br/>'

hope this helps.. you can add to any line where you see '<br/>' for other categories. cheers

Instead, replace '<br/>' on line 57, with '<hr id="catBoxDivider" />'

Then find:
if (SHOW_CATEGORIES_SEPARATOR_LINK == '1') {
$content .= '<hr id="catBoxDivider" />' . "\n";

and change to:

if (SHOW_CATEGORIES_SEPARATOR_LINK == '1') {
  $content .= ' ' . "\n";

This will space the categories out slightly and add a dividing line between then to make them stand out a bit more :smile: