Don't Display Price

Locked

Views: 947

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
10 Jan 2008, 7:00 AM
#1
juicevb10 avatar

juicevb10

New Zenner

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

Don't Display Price

My client has an unusual request. They don't want the price shown on any listings of the items because they want them to be bought in quantities and feel the individual list prices are intimidatingly high or something. Regardless, I am simply looking for a way to keep the price from displaying on all the listings and product info pages.

I'm looking for the files that I'll have to modify to accomplish this. I'm not quite familiar with how Zen Cart works in regard to outputting catalog data, but I'm pretty sure I should be able to keep it from showing certain data.

Zen Cart version 1.3.8

Thanks.

10 Jan 2008, 7:17 AM
#2
kobra avatar

kobra

Black Belt

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

Re: Don't Display Price

Check code in tpl_modules_products_all_listing.php for the if/else for price and you can adjust this and add to all files that do not already have it that have "price" in them. To find these tpl files use admin > tools > developers toolkit > search for "price" in all catalog files.

tpl_modules_products_all_listing.php is adjustable via admin > config > all listing > Display Product Price > set to "0"

Zen-Venom Get Bitten

12 Jan 2008, 7:14 AM
#3
juicevb10 avatar

juicevb10

New Zenner

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

Re: Don't Display Price

OK, thanks a lot!

I think I can find most of the price listings and just delete them from those files in my template directories (since I'll have the backup in the default directories if I ever want to use modified price display code).

I also want to hide the price on the sidebox shopping cart, but instead show the total quantity of items. I've figured out that it's here includes/templates/pb1/sideboxes/tpl_shopping_cart.php line 45 or so that shows the cartbox price. What can I change here to show quantity instead of total price?

12 Jan 2008, 7:35 AM
#4
kobra avatar

kobra

Black Belt

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

Re: Don't Display Price

tpl's deal more with display versus DB calls & calculation take a look at includes/modules/sideboxes/shopping_cart.php and te code below counts the cart items but then only determines if >0 have to change code to save count as interger with some definition then use that in the tpl

$_SESSION['cart']->count_contents() > 0)

Zen-Venom Get Bitten

12 Jan 2008, 7:36 AM
#5
juicevb10 avatar

juicevb10

New Zenner

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

Re: Don't Display Price

I tried this at line 45, which I'm somehow sure is crappy hacked code. Man, I really need to learn php and how this store is put together, but it's a long process trying to piece it together. I don't know if I need to define this variable I made up $cart_qty somewhere.

  if ($_SESSION['cart']->count_contents() > 0) {
    $cart_qty = $_SESSION['cart']->count_contents();
    $content .= '<hr />';
    $content .= '<div class="cartBoxTotal">Number of items = ' . $cart_qty . '</div>';
    $content .= '<br class="clearBoth" />';
  }

What I really want to do is not just show the total number of items, but the items from certain categories. For instance on cacaocouture.com I'd want to show the total number of truffles added to the cart so far (since we'll be selling specific box sizes for those). We'll probably also want to show the total number of items in the cart too, which would include the other items like pre-packed boxes, holiday boxes, and event favors.

Actually I could use this code to notify people when they've full filled one of the preset box sizes, or need to add more to do so...too.

Anyway, for now I just want to be able to show the total items, and maybe the total items from certain categories (if I can figure that out relatively quickly).