Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / How do I remove the product listing from a page?

How do I remove the product listing from a page?

Locked

Views: 1,636

Results 1 to 11 of 11
This thread is locked. New replies are disabled.
13 Jan 2009, 4:10 PM
#1
sartor avatar

sartor

New Zenner

Join Date:
Dec 2008
Posts:
56
Plugin Contributions:
0

How do I remove the product listing from a page?

hey all. You can check out the page here:

http://www.shoppingitonline.com/index.php?main_page=index&manufacturers_id=2

Now, at the bottom of that page we have the full product listing view. We want to get rid of that. We just want to have the drop downs on the site. How would I go about changing that?

Also, would it be possible to add a description, price, and add to cart button on our drop down menu for each product? or would that require way too much coding?

Thanks!

13 Jan 2009, 4:51 PM
#2
sartor avatar

sartor

New Zenner

Join Date:
Dec 2008
Posts:
56
Plugin Contributions:
0

Re: How do I remove the product listing from a page?

I only want it removed from the pages with the drop down menus though.. is this even possible?

13 Jan 2009, 4:59 PM
#3
fairestcape avatar

fairestcape

Totally Zenned

Join Date:
Mar 2008
Location:
Cape Town & London (depends on the season)
Posts:
2,957
Plugin Contributions:
0

Re: How do I remove the product listing from a page?

You could create a page-specific stylesheet for that page (see the README file inside the css folder of your template.)

... and put this declaration into it at the bottom of the stylesheet.

#catTable, #productListing {
 display:none;
}

(You may try adding this to your **stylesheet.css **first, and see if it affects other pages. If it does affect other pages, then try the page-specific CSS route.)

13 Jan 2009, 5:07 PM
#4
fairestcape avatar

fairestcape

Totally Zenned

Join Date:
Mar 2008
Location:
Cape Town & London (depends on the season)
Posts:
2,957
Plugin Contributions:
0

Re: How do I remove the product listing from a page?

In fact, I just tried this...

You should be able to achieve it just by adding:

#productListing {
 display:none;
}

to the main stylesheet.css

13 Jan 2009, 5:20 PM
#5
sartor avatar

sartor

New Zenner

Join Date:
Dec 2008
Posts:
56
Plugin Contributions:
0

Re: How do I remove the product listing from a page?

fairestcape:

In fact, I just tried this...

You should be able to achieve it just by adding:

#productListing {
display:none;
}

> 
> to the main stylesheet.css

This will probably effect the entire site will it not?  I just want it hidden on the pages with drop down menus.

Thank you though, this is a start!
13 Jan 2009, 5:25 PM
#6
fairestcape avatar

fairestcape

Totally Zenned

Join Date:
Mar 2008
Location:
Cape Town & London (depends on the season)
Posts:
2,957
Plugin Contributions:
0

Re: How do I remove the product listing from a page?

sartor:

This will probably effect the entire site will it not?

I think that #productListing applies only to that page set. It should not affect the entire site.

Easiest way is to try it and see... you can always delete it from the CSS.

To see where #productListing appears in the code, use:

ADMIN>>>TOOLS>>>DEVELOPER TOOL KIT and in the bottom input field type:

#productListing

Then choose to search for it in CATALOG.

This will produce a set of results showing what core files the string appears in.

You could then keep this in the one file that you want display:none to influence, and in all other files, change the style ID to something like:

#productListingTwo

Then just edit existing declarations in the css to re-define #productListing
to
#productListingTwo


Then there is always the page-specific CSS route ...

13 Jan 2009, 5:30 PM
#7
fairestcape avatar

fairestcape

Totally Zenned

Join Date:
Mar 2008
Location:
Cape Town & London (depends on the season)
Posts:
2,957
Plugin Contributions:
0

Re: How do I remove the product listing from a page?

OK... I think I understand your issue...

You may have product listing pages where there are no dropdowns...

Hmmmm... You may have to look at a coded conditional...

13 Jan 2009, 5:31 PM
#8
sartor avatar

sartor

New Zenner

Join Date:
Dec 2008
Posts:
56
Plugin Contributions:
0

Re: How do I remove the product listing from a page?

fairestcape:

I think that #productListing applies only to that page set. It should not affect the entire site.

Easiest way is to try it and see... you can always delete it from the CSS.

To see where #productListing appears in the code, use:

ADMIN>>>TOOLS>>>DEVELOPER TOOL KIT and in the bottom input field type:

#productListing

Then choose to search for it in CATALOG.

This will produce a set of results showing what core files the string appears in.

You could then keep this in the one file that you want display:none to influence, and in all other files, change the style ID to something like:

#productListingTwo

Then just edit existing declarations in the css to re-define #productListing
to
#productListingTwo


Then there is always the page-specific CSS route ...

#productListing is the generic product listing id.

I tried putting

#productListing {
display:none;
}

in stylesheet.css and it didn't do anything, and I used firebug to check the id's of that div on all the other pages. They all use productlisting as their id. I believe that #productListing appears on all pages with product listings, so it would probably take some customization to eliminate it on certain pages.

The pages with drop down menus load an html file (that contains the code for it) and then it loads up the productlisting div.

13 Jan 2009, 8:41 PM
#9
sartor avatar

sartor

New Zenner

Join Date:
Dec 2008
Posts:
56
Plugin Contributions:
0

Re: How do I remove the product listing from a page?

AH! I figured it out. It was a matter of putting the CSS in my custom made HTML file.

Thanks m8, help much appreciated!

13 Jan 2009, 9:12 PM
#10
gjh42 avatar

gjh42

Black Belt

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

Re: How do I remove the product listing from a page?

Since it appears you are wanting this function on manufacturer pages, your best bet is to use per-page stylesheets for each manufacturer. Per /includes/templates/template_default/css/CSS_read_me.txt:

m_??.css // changes to a manufacturer's listing page

For Corel (manufacturer id 5), make a file named m_5.css with content:

#productListing {display: none;}

and save in your template's /css/ folder.
Simple and effective.

14 Jan 2009, 10:24 AM
#11
fairestcape avatar

fairestcape

Totally Zenned

Join Date:
Mar 2008
Location:
Cape Town & London (depends on the season)
Posts:
2,957
Plugin Contributions:
0

Re: How do I remove the product listing from a page?

sartor:

AH! I figured it out. It was a matter of putting the CSS in my custom made HTML file.

Thanks m8, help much appreciated!

Glad you got it sorted.

By the way... I really like those clever dropdowns! Howabout creating a module for the rest of us ! :clap: