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 / Remove "Price" Hyperlink in product listing

Remove "Price" Hyperlink in product listing

Started by sethf on 8 Nov 2011, 3:19 PM · Views: 526

Results 1 to 8 of 8
8 Nov 2011, 3:19 PM
#1
sethf avatar

sethf

Zen Follower

Join Date:
Sep 2011
Posts:
228
Plugin Contributions:
0

Post #1 by sethf

Hi

I have established that Alpha Product Filter clashes with the headings on top of the product listing page, namely "Item name" and "Price"(To see what I mean, go here: pcselect.co.za/index.php?main_page=index&cPath=176_179&sort=20a&filter_id=&alpha_filter_id=2 )

..so what I want to do is remove the hyperlink to "Price" and "Item name" so that my customers can just use the Alpha Product Filter. (I don't want to remove the actual headings, just the hyperlinks.)

Thanks for your help! :smile:
S

8 Nov 2011, 3:35 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Post #2 by ajeh

In the Configuration ... Product Listing ... you can set to 0, for OFF, the setting on:

Display Product Price/Add to Cart
Do you want to display the Product Price/Add to Cart

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

8 Nov 2011, 3:49 PM
#3
sethf avatar

sethf

Zen Follower

Join Date:
Sep 2011
Posts:
228
Plugin Contributions:
0

Post #3 by sethf

Ajeh:

In the Configuration ... Product Listing ... you can set to 0, for OFF, the setting on:

Thanks, but perhaps you didn't understand my question.

I don't want to remove the Price column... I simple want to remove the hyperlink on the Price heading, so that is does not allow a user to click it to arrange the price in ascending or descending order.

I still want the heading there - I just don't want to ability to be able to click this heading, ie, I don't want it hyperlinked.

Is there any other info you need?

Thanks for your help :smile:
S

8 Nov 2011, 4:00 PM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Post #4 by ajeh

Edit the file:
/includes/modules/product_listing.php

and change the line:

  if ( ($column_list[$col] != 'PRODUCT_LIST_IMAGE') ) {

to read:

  if ( ($column_list[$col] != 'PRODUCT_LIST_IMAGE') && ($column_list[$col] != 'PRODUCT_LIST_PRICE') ) {

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

8 Nov 2011, 4:09 PM
#5
sethf avatar

sethf

Zen Follower

Join Date:
Sep 2011
Posts:
228
Plugin Contributions:
0

Post #5 by sethf

Ajeh:

Edit the file:
/includes/modules/product_listing.php

and change the line:

if ( ($column_list[$col] != 'PRODUCT_LIST_IMAGE') ) {

> 
> to read:
> ```
  if ( ($column_list[$col] != 'PRODUCT_LIST_IMAGE') && ($column_list[$col] != 'PRODUCT_LIST_PRICE') ) {

That works perfectly, thanks you! :smile:

One last thing, how can I achieve the same outcome with "Item name" (which is right next to "Price" on the the left).

Thanks again for your help.
S

8 Nov 2011, 4:14 PM
#6
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Post #6 by ajeh

If you look at the code change to turn off the link on the Price, you will see it is checking for what the column title is and if it is one of the two titles, it does not add the link ...

So, if you want another one to not build the link, then you need to find the constant that is used for it and add it to the IF in the same manner so that it is not turned into a link ...

NOTE: you should be using your templates and overrides on this file for your changes ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

8 Nov 2011, 6:16 PM
#7
sethf avatar

sethf

Zen Follower

Join Date:
Sep 2011
Posts:
228
Plugin Contributions:
0

Post #7 by sethf

Ajeh:

If you look at the code change to turn off the link on the Price, you will see it is checking for what the column title is and if it is one of the two titles, it does not add the link ...

So, if you want another one to not build the link, then you need to find the constant that is used for it and add it to the IF in the same manner so that it is not turned into a link ...

NOTE: you should be using your templates and overrides on this file for your changes ...

Thanks! :smile:

This worked great:

  if ( ($column_list[$col] != 'PRODUCT_LIST_IMAGE') && ($column_list[$col] != 'PRODUCT_LIST_PRICE') && ($column_list[$col] != 'PRODUCT_LIST_NAME') ) {

Thanks again for your help.
S

8 Nov 2011, 11:15 PM
#8
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Post #8 by ajeh

Good job ... you are most welcome ... and thanks for posting the solution that worked for you ... :smile:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!