Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2007
    Posts
    30
    Plugin Contributions
    0

    Default 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.

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default 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"

  3. #3
    Join Date
    Nov 2007
    Posts
    30
    Plugin Contributions
    0

    Default 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?

  4. #4
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default 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


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

  5. #5
    Join Date
    Nov 2007
    Posts
    30
    Plugin Contributions
    0

    Default 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.

    Code:
      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).

 

 

Similar Threads

  1. v138a Don't display the increment of price in each attribute
    By minotaurus in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 17 Mar 2013, 02:41 PM
  2. price by attribute but don't display the price
    By cssteacy in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 11 Mar 2011, 10:51 PM
  3. Replies: 55
    Last Post: 31 Oct 2010, 04:09 PM
  4. Need attribute price to display total price not incremental price
    By Rickk123 in forum Setting Up Categories, Products, Attributes
    Replies: 7
    Last Post: 2 Sep 2010, 06:26 PM
  5. Replies: 7
    Last Post: 7 May 2007, 03:50 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg