osCmax v2.5 User Manual
Results 1 to 6 of 6

Must register to view prices.

This is a discussion on Must register to view prices. within the osCmax v2 Customization/Mods forums, part of the osCmax v2.0 Forums category; I would like to hide prices unless users have accounts. I am currently using a clean install with "Easy call ...

      
  1. #1
    New Member
    Join Date
    Oct 2004
    Posts
    18
    Rep Power
    0


    Default Must register to view prices.

    I would like to hide prices unless users have accounts.

    I am currently using a clean install with "Easy call for price 1.0 "http://www.oscdox.com/index.php?name...tit&lid=43

    I found a link from an old posting (http://www.oscdox.com/PNphpBB2-viewt...ight-hide.html)

    The mod looked like a simple one, but upon opening the oscmax files, it was way beyond my understanding.

    Any and all help would be much appreciated.

  2. #2
    Member
    Join Date
    Jul 2005
    Posts
    32
    Rep Power
    0


    Default RE: Must register to view prices.

    At the very end of catalog/includes/classes/currencies.php:

    FIND THIS CODE:


    Code:
    function display_price($products_price, $products_tax, $quantity = 1) {
          return $this->format(tep_add_tax($products_price, $products_tax) * $quantity);
        }
      }
    AND REPLACE WITH THIS CODE:

    Code:
       function display_price($products_price, $products_tax, $quantity = 1) {
     if (!tep_session_is_registered('customer_id')) {
         return "Login For Price";
       } else {      
         return $this->format(tep_add_tax($products_price, $products_tax) * $quantity);
         }
       }
     }

  3. #3
    Member Cisco's Avatar
    Join Date
    Feb 2003
    Posts
    89
    Rep Power
    0


    Default RE: Must register to view prices.

    Simple Call For Price and Description Font Settings:

    \catalog\includes\classes\currencies.php:
    Line 77:
    function display_price($products_price, $products_tax, $quantity = 1) {
    return "Please call<br>for Price";
    }
    }


    \templates\fallback\content\products_info.tpl.php:
    Line 66 and 67
    <td class="pageHeading" valign="top"><font face="Arial" size="4"><i> <?php echo $products_name; ?></td>
    <td class="pageHeading" align="right" valign="top"><font face="Arial" size="2"><i><?php echo $products_price; ?></i></font></td>

    Be sure if you do not want to show any price during checkout do not enter a price in the admin catalog products description or it will show up in the shopping cart.

  4. #4
    New Member
    Join Date
    Oct 2004
    Posts
    18
    Rep Power
    0


    Default RE: Must register to view prices.

    Very nice, thank you. I think this is the first time anyone has replied to one of my questions.

    Works great, and looks like it should be easy to plug into other areas too, like the "Buy now" button.
    If they dont have an account they can not purchase.

    Thanks again.

  5. #5
    New Member
    Join Date
    Jan 2005
    Posts
    18
    Rep Power
    0


    Default RE: Must register to view prices.

    You don't have to change the buy now button, in admin/configuration, just set the purchase without account to FALSE. customers must login before they can proceed.

  6. #6
    New Member
    Join Date
    Sep 2006
    Location
    London, England
    Posts
    8
    Rep Power
    0


    Default RE: Must register to view prices.

    Hi Have been using the suggeted hacks to manage price visibility and all goo except, even with 'Purchase Without Account' set to false the user can simple sellect the 'Buy Now!' button and although the item does not show a price the Total does? Any thoughts. Tried the hide from group mothod but got errors on checkout and I don't want to hide the products just the prices for none account users as all my accounts are on a wholesale basis.

    Cheers Guys great work

Similar Threads

  1. register globals mod
    By vshaykev in forum osCmax v2 Installation issues
    Replies: 20
    Last Post: 10-02-2007, 10:03 AM
  2. Sessions,Register Globals OFF, PHP 5 My SQL 5
    By davorian in forum osCommerce 2.2 Installation Help
    Replies: 2
    Last Post: 04-28-2006, 05:10 AM
  3. Bug when register before checkout
    By Alex2911 in forum osCmax v1.7 Discussion
    Replies: 2
    Last Post: 10-11-2003, 05:44 PM
  4. Register Globals
    By 4bgjnsn in forum osCmax v1.7 Discussion
    Replies: 2
    Last Post: 09-25-2003, 01:20 PM
  5. PayPal IPN and No Register moduless
    By martyrmantra in forum osCommerce 2.2 Modification Help
    Replies: 0
    Last Post: 05-04-2003, 03:14 AM

Bookmarks

Posting Permissions

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