Zen Cart Logo
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 / How to get rid of / hide the price on the main page only?

How to get rid of / hide the price on the main page only?

Locked

Started by jaggers on 16 Nov 2007, 8:00 AM · Views: 1,591

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
16 Nov 2007, 8:00 AM
#1
jaggers avatar

jaggers

New Zenner

Join Date:
Oct 2007
Location:
DFW, TX
Posts:
20
Plugin Contributions:
0

Post #1 by jaggers

Just want to get rid of/delete/hide the prices on the main page only.

I have tried turning off "display product price" by setting them to 0 in each of these CONFIG menus: - Product Listing

  • New Listing
  • Featured Listing
  • Index Listing

And yet, the price is still showing up! Anyone know how to fix/change this?

Current Project: http://kpdclothing.com

18 Nov 2007, 2:28 AM
#2
ajeh avatar

ajeh

Oba-san

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

Post #2 by ajeh

Currently it appears you have to create an account to see your site ...

Is this how you mean to run it or are you testing things?

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!

21 Nov 2007, 3:41 AM
#3
jaggers avatar

jaggers

New Zenner

Join Date:
Oct 2007
Location:
DFW, TX
Posts:
20
Plugin Contributions:
0

Post #3 by jaggers

I think you can access the page without logging in now.

Does anyone have any ideas on how to turn prices off?

Current Project: http://kpdclothing.com

23 Nov 2007, 2:00 AM
#4
jaggers avatar

jaggers

New Zenner

Join Date:
Oct 2007
Location:
DFW, TX
Posts:
20
Plugin Contributions:
0

Post #4 by jaggers

I hate to up this thread again since no one has responded, but I seriously have no idea how to get rid of the prices on the main page exclusively.

Any help would be much appreciated!

Current Project: http://kpdclothing.com

23 Nov 2007, 2:30 AM
#5
ajeh avatar

ajeh

Oba-san

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

Post #5 by ajeh

This appears to be the display of the New Products Centerbox on your main page ...

This can be customized by copying the module:
/includes/modules/new_products.php

to your templates and overrides directory:
/includes/modules/your_template_dir/new_products.php

then customizing the file to not display the price ...

You will see the price is in there as:

  while (!$new_products->EOF) {
    $products_price = zen_get_products_display_price($new_products->fields['products_id']);
    if (!isset($productsInCategory[$new_products->fields['products_id']])) $productsInCategory[$new_products->fields['products_id']] = zen_get_generated_category_path_rev($new_products->fields['master_categories_id']);

    $list_box_contents[$row][$col] = array('params' => 'class="centerBoxContentsNew centeredContent back"' . ' ' . 'style="width:' . $col_width . '%;"',
    'text' => (($new_products->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) ? '' : '<a href="' . zen_href_link(zen_get_info_page($new_products->fields['products_id']), 'cPath=' . $productsInCategory[$new_products->fields['products_id']] . '&products_id=' . $new_products->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $new_products->fields['products_image'], $new_products->fields['products_name'], IMAGE_PRODUCT_NEW_WIDTH, IMAGE_PRODUCT_NEW_HEIGHT) . '</a><br />') . '<a href="' . zen_href_link(zen_get_info_page($new_products->fields['products_id']), 'cPath=' . $productsInCategory[$new_products->fields['products_id']] . '&products_id=' . $new_products->fields['products_id']) . '">' . $new_products->fields['products_name'] . '</a><br />' . $products_price);

    $col ++;
    if ($col > (SHOW_PRODUCT_INFO_COLUMNS_NEW_PRODUCTS - 1)) {
      $col = 0;
      $row ++;
    }
    $new_products->MoveNextRandom();
  }

1 don't run the query on the price ... it is a waste of time if you are not going to display it ...

2 don't use the <br /> and the display of the $products_price and you should not see it ...

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!

23 Nov 2007, 2:33 AM
#6
ajeh avatar

ajeh

Oba-san

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

Post #6 by ajeh

NOTE: I did not go through your whole site so if you want the Centerbox for New Products to actually display prices elsewhere you would want to customize this a bit further and could do so with the variable:
$this_is_home_page

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!