Page 1 of 2 12 LastLast
Results 1 to 10 of 16
  1. #1
    Join Date
    Feb 2010
    Location
    ny
    Posts
    223
    Plugin Contributions
    0

    Default log in for price

    I would like to set up LOGIN FOR PRICE, but only for 1 category (or product) is this possible?


    I have already set it up for browse only, login for pricing.

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: log in for price

    You would need to address the Price and the Add to Cart button ...

    In the functions_general.php in the function zen_get_buy_now_button ...

    You can add the code in RED:
    Code:
    // bof: Login for Price button      
    $chk_login_for_price = false;
    $chk_category_sql = "SELECT master_categories_id FROM " . TABLE_PRODUCTS . " WHERE products_id = '" . (int)$product_id . "'";
    $chk_category = $db->Execute($chk_category_sql);
    if ($_SESSION['customer_id'] ==0 && in_array((int)$chk_category->fields['master_categories_id'], array(10, 12)) ) {
      $login_for_price = '<a href="' . zen_href_link(FILENAME_LOGIN, '', 'SSL') . '">' .  TEXT_LOGIN_FOR_PRICE_BUTTON_REPLACE . '</a>';
      return $login_for_price;
    }
    // eof: Login for Price button      
    
        $button_check = $db->Execute("select product_is_call, products_quantity from " . TABLE_PRODUCTS . " where products_id = '" . (int)$product_id . "'");
    In the function file function_prices in the function zen_get_products_display_price you can add the code in RED:
    Code:
    // show case only
        if (STORE_STATUS != '0') {
          if (STORE_STATUS == '1') {
            return '';
          }
        }
    
    // bof: Login for Price     
    $chk_login_for_price = false;
    $chk_category_sql = "SELECT master_categories_id FROM " . TABLE_PRODUCTS . " WHERE products_id = '" . (int)$products_id . "'";
    $chk_category = $db->Execute($chk_category_sql);
    if ($_SESSION['customer_id'] ==0 && in_array((int)$chk_category->fields['master_categories_id'], array(10, 12)) ) {
      return TEXT_LOGIN_FOR_PRICE_BUTTON_REPLACE;
    }
    // eof: Login for Price
    Note: you will want to look at the Products in the Product Listing, Centerboxes and Product _info ... to determine how you want these to read as sometimes both will display at the same time ...
    Last edited by Ajeh; 25 Sep 2011 at 03:46 PM.
    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: v1.5.5]
    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!

  3. #3
    Join Date
    Feb 2010
    Location
    ny
    Posts
    223
    Plugin Contributions
    0

    Default Re: log in for price

    just add this code in red? Where I distinguish WHICH 1 category requires login for price

  4. #4
    Join Date
    Feb 2010
    Location
    ny
    Posts
    223
    Plugin Contributions
    0

    Default Re: log in for price

    thankyou,

    Just add this code in red?

    Where do I distinguish which 1 category requires login for price?

  5. #5
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: log in for price

    Find the Master Categories ID for the Products ...

    What is the immediate Category that the Products are in?
    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: v1.5.5]
    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!

  6. #6
    Join Date
    Feb 2010
    Location
    ny
    Posts
    223
    Plugin Contributions
    0

    Default Re: log in for price

    cat id 112

  7. #7
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: log in for price

    Then you would change:
    array(10, 12)

    to read:
    array(112)
    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: v1.5.5]
    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. #8
    Join Date
    Feb 2010
    Location
    ny
    Posts
    223
    Plugin Contributions
    0

    Default Re: log in for price

    I have made changes to 1 page only here; Still need login for all

    In the function file function_prices in the function zen_get_products_display_price you can add the code in RED:
    Code:
    ------------------------------------------------------------------------
    // show case only
    if (STORE_STATUS != '0') {
    if (STORE_STATUS == '1') {
    return '';
    }
    }

    // bof: Login for Price
    $chk_login_for_price = false;
    $chk_category_sql = "SELECT master_categories_id FROM " . TABLE_PRODUCTS . " WHERE products_id = '" . (int)$products_id . "'";
    $chk_category = $db->Execute($chk_category_sql);
    if ($_SESSION['customer_id'] ==0 && in_array((int)$chk_category->fields['master_categories_id'], array(112)) ) {
    return TEXT_LOGIN_FOR_PRICE_BUTTON_REPLACE;
    }
    // eof: Login for Price



    What else do I need? to require login for ONLY cat id 112

  9. #9
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: log in for price

    Look at post #2 for function zen_get_buy_now_button ...

    You need to add that code to and change the array to 112 ...
    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: v1.5.5]
    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!

  10. #10
    Join Date
    Feb 2010
    Location
    ny
    Posts
    223
    Plugin Contributions
    0

    Default Re: log in for price

    Still unclear did you want me to add this;
    to

    to functions_general.php in the function zen_get_buy_now_button

    ???

    if so where exactly?
    -------------------------------
    // bof: Login for Price button
    $chk_login_for_price = false;
    $chk_category_sql = "SELECT master_categories_id FROM " . TABLE_PRODUCTS . " WHERE products_id = '" . (int)$product_id . "'";
    $chk_category = $db->Execute($chk_category_sql);
    if ($_SESSION['customer_id'] ==0 && in_array((int)$chk_category->fields['master_categories_id'], array(112)) ) {
    $login_for_price = '<a href="' . zen_href_link(FILENAME_LOGIN, '', 'SSL') . '">' . TEXT_LOGIN_FOR_PRICE_BUTTON_REPLACE . '</a>';
    return $login_for_price;
    }
    // eof: Login for Price button

    $button_check = $db->Execute("select product_is_call, products_quantity from " . TABLE_PRODUCTS . " where products_id = '" . (int)$product_id . "'");

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v139f Login for Wholesale Price button Linked to Log In Page
    By missymissy in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 11 Apr 2014, 11:16 AM
  2. blank log in page for admin no log in for users
    By alfonso99 in forum Customization from the Admin
    Replies: 1
    Last Post: 30 Jul 2011, 10:34 AM
  3. Replies: 2
    Last Post: 16 Jul 2009, 02:34 PM
  4. Price Unavailable and Log in for price
    By cassiedesigns in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 4 Apr 2009, 04:30 AM
  5. Log in for Price
    By CnTGifts in forum General Questions
    Replies: 1
    Last Post: 21 Nov 2007, 04:54 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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR