Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / Customizing the Look of Your Shop / Templates, Stylesheets, Page Layout / Losing the 'More Info' link and styling the price on the category index page

Losing the 'More Info' link and styling the price on the category index page

Locked
This thread is locked. New replies are disabled.
30 Jun 2008, 2:58 AM
#1
datatv avatar

datatv

Zen Follower

Join Date:
Jun 2008
Posts:
170
Plugin Contributions:
0

Post #1 by datatv

How can I lose the More Info link on this page from the third column of the table?

http://reggae.esolutions.net/~granolag/store/index.php?main_page=index&cPath=1

Also, where can I change the font size or just add an <h2> tag in the product_listing.php module? It's a bit confusing for a non-programmer and the price is too big.

30 Jun 2008, 4:40 AM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Post #2 by kobra

Why did you remove the body tag from your style sheet??

Try adding this back at the top

body {
	margin: 0;
	font-family: verdana, arial, helvetica, sans-serif;
	font-size: 62.5%;
	color: #000000;
	background-color: #00853f;
	}

Zen-Venom Get Bitten

30 Jun 2008, 4:55 AM
#3
datatv avatar

datatv

Zen Follower

Join Date:
Jun 2008
Posts:
170
Plugin Contributions:
0

Post #3 by datatv

Because I have that in a different .css file that is used throughout the site. Not just the store.

Plus, that doesn't come close to answering my question. I want to lose the More Info link. Not change the body tag.

30 Jun 2008, 5:03 AM
#4
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Post #4 by kobra

where can I change the font size
That answers this part of your question!

Tutorials/FAQ's link at the top of this page is a great resource for basic issues like this

https://www.zen-cart.com/tutorials/index.php?article=39

Zen-Venom Get Bitten

30 Jun 2008, 10:16 AM
#5
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Post #5 by stevesh

The more info text is defined in includes/languages/english.php.

Stuff like this is easy to find in Admin - Tools - Developers Tool Kit.

30 Jun 2008, 1:15 PM
#6
datatv avatar

datatv

Zen Follower

Join Date:
Jun 2008
Posts:
170
Plugin Contributions:
0

Post #6 by datatv

Well, I tried using the Developers' Tool Kit but it didn't really find anything. However, using english.php did by just losing the text from the MORE_INFO_TEXT area. So that worked.

But I still can't figure out how to add a style to the price itself. I figure it's in modules/product_listing.php likely in this code:

case 'PRODUCT_LIST_PRICE':
$lc_price = zen_get_products_display_price($listing->fields['products_id']) . '';
$lc_align = 'right';
$lc_text = $lc_price;

So how can I add an h2 to it? Everytime I try it screws up the script.

30 Jun 2008, 1:35 PM
#7
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Post #7 by kobra

Well, I tried using the Developers' Tool Kit but it didn't really find anything
Did you search and enter in the bottom left box - more info - catalog files in the drop and search?

Zen-Venom Get Bitten

30 Jun 2008, 3:06 PM
#8
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Post #8 by stevesh

datatv:

So how can I add an h2 to it? Everytime I try it screws up the script.

It is h2 out of the box, at least on my test installation.

Check line 62 in includes/templates/template_default/templates/tpl_product_info_display.php

(or the same file in your override folder if you've changed it already.)

30 Jun 2008, 8:15 PM
#9
datatv avatar

datatv

Zen Follower

Join Date:
Jun 2008
Posts:
170
Plugin Contributions:
0

Post #9 by datatv

Yea, I see line 62 and sure enough, there is a H2 there but it doesn't show up on my page. Look at this page:

http://reggae.esolutions.net/~granolag/store/index.php?main_page=index&cPath=1

Specifically look at this code:

<td class="productListing-data" align="right">$39.95<br /><br /><br /></td>

See? No h2 or any tag. Also, wouldn't mind getting rid of the unnecessary <br/> tags.

1 Jul 2008, 11:20 AM
#10
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Post #10 by stevesh

It is h2, though. Remove the h2 from line 62 and put the file in your override folder, and the price will be regular text.

I'd style it in the stylesheet (**#productPrices **), but that will change it on the product info page, too.

1 Jul 2008, 5:29 PM
#11
datatv avatar

datatv

Zen Follower

Join Date:
Jun 2008
Posts:
170
Plugin Contributions:
0

Post #11 by datatv

You don't understand. I want an H2 there! It's not showing up. Look at the code again. You see a H2? Nope. An H2 would bring the price's font size down to 14px which is what I want.

5 Jul 2008, 7:50 PM
#12
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Post #12 by gjh42

You are talking about two different pages, the product listing page and the product info page.

The info page has the tags indicated by stevesh and can be styled directly in the stylesheet, but the listing page has no way to individually address this element. You can add a class tag in product_listing.php as you suspected, by modifying this line

$lc_text = $lc_price;

to read

$lc_text = '<span class="listingPrice">' . $lc_price . '</span>';

and styling

.listingPrice {}

in your stylesheet.
If you have a special or discount price, there will be some other formatting inside the price text already, and the .listingPrice class may or may not interfere with this.

5 Jul 2008, 8:04 PM
#13
datatv avatar

datatv

Zen Follower

Join Date:
Jun 2008
Posts:
170
Plugin Contributions:
0

Post #13 by datatv

Yea, I think that's it. Thanks for clearing it all up.

14 Aug 2008, 3:41 PM
#14
spen avatar

spen

New Zenner

Join Date:
Jul 2008
Posts:
12
Plugin Contributions:
0

Post #14 by spen

I have tried the exact same fix as mentioned above in order to style the price as it appears on a category home page.

I edited product_listing.php and added something similar to: $lc_text = '<span class="listingPrice">' . $lc_price . '</span>';

However, this does not work and no new html can be found in the source.

I have also poked around inside the database to see if I might add the html there, but with little luck.

Any other suggestions would be greatly appreciated.

Cheers

Spen

15 Aug 2008, 5:29 AM
#15
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Post #15 by gjh42

If you actually do exactly as suggested, it will work (as long as your template doesn't have some odd change to it.) The database is not the place to be working on this.

So we need to know exactly what you did, and exactly how & where you saved it, preferably with a link to your site, in order to offer useful advice.