Thread: Login for price

Results 1 to 10 of 12

Hybrid View

  1. #1
    Join Date
    Sep 2008
    Location
    Cleethorpes
    Posts
    1,227
    Plugin Contributions
    6

    red flag Login for price

    [Note: remember to include site URL, ZC version, list of plugins, PHP version, etc ... read the Posting Tips shown above for information to include in your post here. And, remove this comment before actually posting!]

    I have a cart set up where prices can only be viewed when customers login, if logged out it is displaying Login for price.

    Login for price displays on the product listing, but it doesn't display on centerboxes for new products, featured products, specials etc. How would I apply the same function to these centerboxes. Currently I have manually applied it, but once logged in the prices display and it still says 'Login for price' underneath the price. I want Login for price to disappear from center boxes once logged in, just like it does on the product listing.
    Nick Smith - Venture Design and Print
    https://venturedesignandprint.co.uk

  2. #2
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,145
    Plugin Contributions
    11

    Default Re: Login for price

    You can determine if they are logged in using: $_SESSION['customer_id']
    If it's not defined, they're not logged in.

  3. #3
    Join Date
    Sep 2008
    Location
    Cleethorpes
    Posts
    1,227
    Plugin Contributions
    6

    Default Re: Login for price

    Ok where would I put this for the new products centerbox?
    Nick Smith - Venture Design and Print
    https://venturedesignandprint.co.uk

  4. #4
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,145
    Plugin Contributions
    11

    Default Re: Login for price

    Easiest method might be in the includes/languages/english.php. All the defines are around lines 484 -- 491.

    Code:
    if ($_SESSION['customer_id']  > 0) { 
      define('TABLE_HEADING_FEATURED_PRODUCTS','Featured Products');
      define('TABLE_HEADING_NEW_PRODUCTS', 'New Products For %s');
      define('TABLE_HEADING_UPCOMING_PRODUCTS', 'Upcoming Products');
      define('TABLE_HEADING_DATE_EXPECTED', 'Date Expected');
      define('TABLE_HEADING_SPECIALS_INDEX', 'Monthly Specials For %s');
      } else { 
      define('TABLE_HEADING_FEATURED_PRODUCTS','Log in to See Prices For Featured Products');
      define('TABLE_HEADING_NEW_PRODUCTS', 'Log in to See Prices For New Products For %s');
      define('TABLE_HEADING_UPCOMING_PRODUCTS', 'Log in to See Prices For Upcoming Products');
      define('TABLE_HEADING_DATE_EXPECTED', 'Log in to See Prices For Date Expected');
      define('TABLE_HEADING_SPECIALS_INDEX', 'Log in to See Prices For Monthly Specials For %s');
      }
    
    Adjust the text to suit your taste.

  5. #5
    Join Date
    Sep 2008
    Location
    Cleethorpes
    Posts
    1,227
    Plugin Contributions
    6

    Default Re: Login for price

    Quote Originally Posted by dbltoe View Post
    Easiest method might be in the includes/languages/english.php. All the defines are around lines 484 -- 491.

    Code:
    if ($_SESSION['customer_id']  > 0) { 
      define('TABLE_HEADING_FEATURED_PRODUCTS','Featured Products');
      define('TABLE_HEADING_NEW_PRODUCTS', 'New Products For %s');
      define('TABLE_HEADING_UPCOMING_PRODUCTS', 'Upcoming Products');
      define('TABLE_HEADING_DATE_EXPECTED', 'Date Expected');
      define('TABLE_HEADING_SPECIALS_INDEX', 'Monthly Specials For %s');
      } else { 
      define('TABLE_HEADING_FEATURED_PRODUCTS','Log in to See Prices For Featured Products');
      define('TABLE_HEADING_NEW_PRODUCTS', 'Log in to See Prices For New Products For %s');
      define('TABLE_HEADING_UPCOMING_PRODUCTS', 'Log in to See Prices For Upcoming Products');
      define('TABLE_HEADING_DATE_EXPECTED', 'Log in to See Prices For Date Expected');
      define('TABLE_HEADING_SPECIALS_INDEX', 'Log in to See Prices For Monthly Specials For %s');
      }
    
    Adjust the text to suit your taste.
    ok got you :-) thank you
    Nick Smith - Venture Design and Print
    https://venturedesignandprint.co.uk

  6. #6
    Join Date
    Sep 2008
    Location
    Cleethorpes
    Posts
    1,227
    Plugin Contributions
    6

    Default Re: Login for price

    Quote Originally Posted by Nick1973 View Post
    ok got you :-) thank you
    Ok how would I use this here:

    $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) ? '' : '<div class="productListingImageContainer"><a class="productListingImage" 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></div><br />') . '<h3 class="itemTitle"><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></h3><br />' . $products_price . '<a href="index.php?main_page=login">Login for price</a>');

    Note the bit

    <br />' . $products_price . '<a href="index.php?main_page=login">Login for price</a>');

    I tried:

    if ($_SESSION['customer_id'] > 0) {
    '<a href="index.php?main_page=login">Login for price</a>';
    } else {
    $products_price;
    }
    Nick Smith - Venture Design and Print
    https://venturedesignandprint.co.uk

 

 

Similar Threads

  1. v138a Shipping Estimater with Login-for-Price, for staff doing phone orders
    By farhansabir in forum General Questions
    Replies: 3
    Last Post: 25 Jun 2013, 07:49 PM
  2. reduce the space between image, name, brand, price & login for price.
    By carlosesierra in forum Customization from the Admin
    Replies: 1
    Last Post: 12 Oct 2009, 04:00 PM
  3. reduce the space between image, name, brand, price & login for price.
    By carlosesierra in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 8 Oct 2009, 11:54 AM
  4. Login for price
    By fvpereira in forum General Questions
    Replies: 2
    Last Post: 11 Jul 2007, 02:23 AM
  5. Login for Price for only ONE product....
    By jettrue in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 4 Jul 2007, 05:57 PM

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