Zen Cart Logo
Forums / General Questions / Removing product name from the index listing?

Removing product name from the index listing?

Locked

Views: 2,095

Results 1 to 15 of 15
This thread is locked. New replies are disabled.
27 Nov 2007, 11:28 PM
#1
credible avatar

credible

New Zenner

Join Date:
Nov 2007
Posts:
17
Plugin Contributions:
0

Removing product name from the index listing?

Hi, guys!

How do you remove the product name from the index listing? My wish is to have a clickable product image only. Anyone? :D

27 Nov 2007, 11:53 PM
#2
jaycode avatar

jaycode

Zen Follower

Join Date:
Jun 2007
Location:
Australia - Melbourne
Posts:
306
Plugin Contributions:
1

Re: Removing product name from the index listing?

Admin - Configuration - Product Listing - Display Product Name

For all products:

Admin - Configuration - All Listing - Display Product Name

Good Luck

28 Nov 2007, 2:16 AM
#3
credible avatar

credible

New Zenner

Join Date:
Nov 2007
Posts:
17
Plugin Contributions:
0

Re: Removing product name from the index listing?

jaycode:

Admin - Configuration - Product Listing - Display Product Name

For all products:

Admin - Configuration - All Listing - Display Product Name

Good Luck
Thanks, but that didn't work. The products I want to be fronted with a product image only is in the "featured products" category, so I figured I had to change the
Admin - Configuration - Featured Listing - Display Product Name instad, but it didn't work nevertheless :\

Any other suggestions?

28 Nov 2007, 12:42 PM
#4
jaycode avatar

jaycode

Zen Follower

Join Date:
Jun 2007
Location:
Australia - Melbourne
Posts:
306
Plugin Contributions:
1

Re: Removing product name from the index listing?

credible:

Thanks, but that didn't work. The products I want to be fronted with a product image only is in the "featured products" category

Then it will take a bit long:

  1. create a new folder includes/modules/YOUR_TEMPLATE
  2. copy includes/modules/featured_products.php to that folder.
  3. in the new featured_products.php, find:
    'text' => (($featured_products->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) ? '' : '<a href="' . zen_href_link(zen_get_info_page($featured_products->fields['products_id']), 'products_id=' . $featured_products->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $featured_products->fields['products_image'], $featured_products->fields['products_name'], IMAGE_FEATURED_PRODUCTS_LISTING_WIDTH, IMAGE_FEATURED_PRODUCTS_LISTING_HEIGHT) . '</a><br />') . '<a href="' . zen_href_link(zen_get_info_page($featured_products->fields['products_id']), 'products_id=' . $featured_products->fields['products_id']) . '">' . $featured_products->fields['products_name'] . '</a><br />' . $products_price);

and replace it with:

    'text' => (($featured_products->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) ? '' : '<a href="' . zen_href_link(zen_get_info_page($featured_products->fields['products_id']), 'products_id=' . $featured_products->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $featured_products->fields['products_image'], $featured_products->fields['products_name'], IMAGE_FEATURED_PRODUCTS_LISTING_WIDTH, IMAGE_FEATURED_PRODUCTS_LISTING_HEIGHT) . '</a><br />') . '<br />' . $products_price);

Basically I just removed the code to display the name link.

Let me know if its working (or not)

Cheers

28 Nov 2007, 3:07 PM
#5
credible avatar

credible

New Zenner

Join Date:
Nov 2007
Posts:
17
Plugin Contributions:
0

Re: Removing product name from the index listing?

Worked! Thanks, mate :)

28 Nov 2007, 3:31 PM
#6
credible avatar

credible

New Zenner

Join Date:
Nov 2007
Posts:
17
Plugin Contributions:
0

Re: Removing product name from the index listing?

Oh, by the way - could you remove the price from the index listing aswell? Would be highly appriciated :)

28 Nov 2007, 3:40 PM
#7
gjh42 avatar

gjh42

Black Belt

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

Re: Removing product name from the index listing?

Just remove the
. '<br />' . $products_price
from that line, leaving this:```php
'text' => (($featured_products->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) ? '' : '<a href="' . zen_href_link(zen_get_info_page($featured_products->fields['products_id']), 'products_id=' . $featured_products->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $featured_products->fields['products_image'], $featured_products->fields['products_name'], IMAGE_FEATURED_PRODUCTS_LISTING_WIDTH, IMAGE_FEATURED_PRODUCTS_LISTING_HEIGHT) . '</a><br />');


And by the way, the element you are working on is not the featured products listing, it is the featured products centerbox. That is why the admin setting did not work for you.
28 Nov 2007, 3:58 PM
#8
credible avatar

credible

New Zenner

Join Date:
Nov 2007
Posts:
17
Plugin Contributions:
0

Re: Removing product name from the index listing?

Hey!

That's what I thought aswell, but it gives me this syntax error:

Parse error: syntax error, unexpected ';', expecting ')' in xxx/xxx/t-########/includes/modules/featured_products.php on line 54

28 Nov 2007, 5:13 PM
#9
gjh42 avatar

gjh42

Black Belt

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

Re: Removing product name from the index listing?

Did you remove the ) after $products_price? Double check this, and add one just before the ; if it is missing.

28 Nov 2007, 5:52 PM
#10
credible avatar

credible

New Zenner

Join Date:
Nov 2007
Posts:
17
Plugin Contributions:
0

Re: Removing product name from the index listing?

http://norskwebforum.no/pastebin/9991

there's the pastebin :D

28 Nov 2007, 6:14 PM
#11
gjh42 avatar

gjh42

Black Belt

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

Re: Removing product name from the index listing?

Hmm... the parentheses on line 54 balance, but it is actually a continuation of line 53, which starts off with an array( .

Try adding another ) at the end - I don't see why it would have worked after the name removal and not after the price removal, but if that makes it work, don't ask questions ;)

28 Nov 2007, 10:01 PM
#12
jaycode avatar

jaycode

Zen Follower

Join Date:
Jun 2007
Location:
Australia - Melbourne
Posts:
306
Plugin Contributions:
1

Re: Removing product name from the index listing?

credible:

Worked! Thanks, mate :)

No probie ;)

The fix by gjh should be working too, just check on the syntax, parentheses n such...

Good luck, credible

29 Nov 2007, 2:42 PM
#13
credible avatar

credible

New Zenner

Join Date:
Nov 2007
Posts:
17
Plugin Contributions:
0

Re: Removing product name from the index listing?

It worked when I added an extra paranthese :)

Thanks again, guys ;)

29 Nov 2007, 2:47 PM
#14
kitcorsa avatar

kitcorsa

Totally Zenned

Join Date:
Feb 2007
Posts:
1,724
Plugin Contributions:
0

Re: Removing product name from the index listing?

hide with css???

display: none;

29 Nov 2007, 3:38 PM
#15
gjh42 avatar

gjh42

Black Belt

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

Re: Removing product name from the index listing?

There aren't enough tags to distinguish the parts to hide in this case. Adding the tags would be more involved than removing the unwanted code.