Forums / Templates, Stylesheets, Page Layout / Placing a DIV on product info pages

Placing a DIV on product info pages

Views: 1,642

Results 1 to 13 of 13
15 Jun 2011, 8:23 PM
#1
dml73 avatar

dml73

Zen Follower

Join Date:
Oct 2007
Posts:
414
Plugin Contributions:
0

Placing a DIV on product info pages

I want to place a short text and image in a DIV on a product info page.
I enter the html in Admin - > Catalog -> Categories/Products in the Products Description field and in the CSS file I enter the css code.

The text and image is placed perfectly fine on the product info page however the text is also shown in the short text under the product on the product listing page.

Is there a way to remove the text from the DIV on the product listing page? (only the text from the DIV, not the whole text).

15 Jun 2011, 8:27 PM
#2
stevesh avatar

stevesh

Black Belt

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

Re: Placing a DIV on product info pages

You should be able to do something like this in the stylesheet:

#productListing .yourdivclassname {display:none;}

18 Jun 2011, 3:52 AM
#3
dml73 avatar

dml73

Zen Follower

Join Date:
Oct 2007
Posts:
414
Plugin Contributions:
0

Re: Placing a DIV on product info pages

stevesh:

You should be able to do something like this in the stylesheet:

#productListing .yourdivclassname {display:none;}

I tried this but apparently it doesn't work. I still get the text from the product info page DIV on the product listing page. Any other ideas?

18 Jun 2011, 10:07 AM
#4
stevesh avatar

stevesh

Black Belt

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

Re: Placing a DIV on product info pages

Maybe if we could see the product listing page in question.

18 Jun 2011, 3:07 PM
#6
clydejones avatar

clydejones

Deceased

Join Date:
Nov 2005
Location:
Colorado Springs, CO USA
Posts:
7,017
Plugin Contributions:
12

Re: Placing a DIV on product info pages

DML73:

Yes, its here:

http://www.nordfield.com/index.php?main_page=product_info&cPath=65&products_id=182

and as you can see on the product listing page here:

http://www.nordfield.com/index.php?main_page=index&cPath=65

its the "View Datasheet Available Downloads" I want to hide.

add the following to your stylesheet.css

.ProductPagesLinksTable {
display:none;
}

NOTE: We are sorry that Clyde is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

18 Jun 2011, 3:17 PM
#7
dml73 avatar

dml73

Zen Follower

Join Date:
Oct 2007
Posts:
414
Plugin Contributions:
0

Re: Placing a DIV on product info pages

clydejones:

add the following to your stylesheet.css

.ProductPagesLinksTable {
display:none;
}

This hides the text on the product info page, I want to hide it on the product listing page (only).

18 Jun 2011, 3:52 PM
#8
clydejones avatar

clydejones

Deceased

Join Date:
Nov 2005
Location:
Colorado Springs, CO USA
Posts:
7,017
Plugin Contributions:
12

Re: Placing a DIV on product info pages

DML73:

This hides the text on the product info page, I want to hide it on the product listing page (only).

Have you found a solution? Since I don't see the indicated text on the product listing page you cited.

NOTE: We are sorry that Clyde is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

18 Jun 2011, 3:59 PM
#9
dml73 avatar

dml73

Zen Follower

Join Date:
Oct 2007
Posts:
414
Plugin Contributions:
0

Re: Placing a DIV on product info pages

clydejones:

Have you found a solution? Since I don't see the indicated text on the product listing page you cited.

No, the text is still there. If you look at the product listing page, the description for the 4 first products still starts with "View Datasheet Available Downloads". Thats the text I want to hide.

18 Jun 2011, 6:07 PM
#10
clydejones avatar

clydejones

Deceased

Join Date:
Nov 2005
Location:
Colorado Springs, CO USA
Posts:
7,017
Plugin Contributions:
12

Re: Placing a DIV on product info pages

DML73:

No, the text is still there. If you look at the product listing page, the description for the 4 first products still starts with "View Datasheet Available Downloads". Thats the text I want to hide.

I don't know how you've structured your product descriptions, but apparently this text is the first 1 or 2 lines of the description. (correct me if I;m wrong)

if that is the case then just surround that text in a <div class="dontDisplay"> </div>

Then you should be able to follow stevesh's suggestion

#productListing .dontDisplay {display:none;}

NOTE: We are sorry that Clyde is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

18 Jun 2011, 9:31 PM
#11
dml73 avatar

dml73

Zen Follower

Join Date:
Oct 2007
Posts:
414
Plugin Contributions:
0

Re: Placing a DIV on product info pages

You are right, this is the html I have in the start of my product description:

<div class="ProductPagesLinksTable"> <table> <tr> <td><a href="downloads/wzr-hp-ag300h_DS.pdf">View Datasheet</a> <img src="images/pdf.jpg" width="16" height="16" alt="PDF" /></td> </tr> <tr> <td><a href="index.php?main_page=page&id=17">Available Downloads</a> <img src="images/dow.gif" width="13" height="13" alt="download" /></td> </tr> </table> </div>

and this is what I put in the css:

#productListing .ProductPagesLinksTable {display:none;}

but still the text shows on the product listing page. Am I doing something wrong?

18 Jun 2011, 9:58 PM
#12
clydejones avatar

clydejones

Deceased

Join Date:
Nov 2005
Location:
Colorado Springs, CO USA
Posts:
7,017
Plugin Contributions:
12

Re: Placing a DIV on product info pages

DML73:

You are right, this is the html I have in the start of my product description:

<div class="ProductPagesLinksTable"> <table> <tr> <td><a href="downloads/wzr-hp-ag300h_DS.pdf">View Datasheet</a> <img src="images/pdf.jpg" width="16" height="16" alt="PDF" /></td> </tr> <tr> <td><a href="index.php?main_page=page&id=17">Available Downloads</a> <img src="images/dow.gif" width="13" height="13" alt="download" /></td> </tr> </table> </div>

and this is what I put in the css:

#productListing .ProductPagesLinksTable {display:none;}

but still the text shows on the product listing page. Am I doing something wrong?

I think the problem is that the product listing page strips out any formating you may have introduced in the product description before truncating the text.

In other words the <div>, <table>, <tr> and <td> tags are ignored and only the text is displayed.

thats why this ( #productListing .ProductPagesLinksTable {display:none;} ) is not working.

You might consider moving that section to the bottom of the product description. That will insure that the text will not be displayed on the product listing page.

You'd have to figure out how to make sure it still displays as required on the product info page.

NOTE: We are sorry that Clyde is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

18 Jun 2011, 10:17 PM
#13
dml73 avatar

dml73

Zen Follower

Join Date:
Oct 2007
Posts:
414
Plugin Contributions:
0

Re: Placing a DIV on product info pages

You are right. Thanks for the tip. I should have thought about moving the text to the bottom earlier. Such an easy solution :bigups: I positioned the text with css so the text stays in the same place on the product page. Thanks a lot.