Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Hiding manufacturers_name in product_listing.php

Hiding manufacturers_name in product_listing.php

Locked

Views: 933

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
20 Feb 2007, 6:54 AM
#1
kgmmusic avatar

kgmmusic

New Zenner

Join Date:
Nov 2005
Posts:
76
Plugin Contributions:
0

Hiding manufacturers_name in product_listing.php

I need to hide the manufacturers_name when a user is logged-in. I have found the code that controls this in: /includes/modules/product_listing.php - but I am not fluent enough in PHP to know how to hide the manufacturers_name when a user is logged-in. I used the code below to hide info in the template pages but it will not work on this modules page. Any and all help is much appreciated!

<?php if ($_SESSION['customer_id']) { // display this link for logged in user echo ''; } else { //display something else for user not logged in echo $listing->fields['manufacturers_name']; } ?>
20 Feb 2007, 7:48 AM
#2
kobra avatar

kobra

Black Belt

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

Re: Hiding manufacturers_name in product_listing.php

To turn it off completely
admin > config > Product Listing > Display Product Manufacturer Name > set to "0"

20 Feb 2007, 7:12 PM
#3
kgmmusic avatar

kgmmusic

New Zenner

Join Date:
Nov 2005
Posts:
76
Plugin Contributions:
0

Re: Hiding manufacturers_name in product_listing.php

Thanks for the reply Kobra!

I only want to "hide" it when a user is logged in. It should be displayed until then. Is there any PHP code than can do this?

20 Feb 2007, 7:18 PM
#4
kobra avatar

kobra

Black Belt

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

Re: Hiding manufacturers_name in product_listing.php

Yes, but not as a download - you will have to check all the productlisting files and then hijack(copy) a session check for logged in from another file and apply it to just the function that displays the mfg name. and a good place to look to insert this might be the check for the admin switch of to display or not to display