Results 1 to 6 of 6
  1. #1
    Join Date
    Jan 2006
    Location
    Downunder - QLD - Gold Coast
    Posts
    964
    Plugin Contributions
    0

    Default Approval Status=3 but can't see 'Out of Stock' icon help please !!

    v 1.38a

    I have set the shop as 'Customer must be Authorized to shop = 3 (Customer May Browse and May see Prices but Must be Authorized to Buy) .
    If you log in, you can see the 'out of stock' icon, but if you don't log in you can't. I can see the prices fine but not the 'out of stock ' icon.

    Can some please help to get this icon to show up regardless what settings I select 0-3 in Admin> Customer Details >Customer May Browse and May see Prices but Must be Authorized to Buy

    Please

    Thank you
    Downunder QLD

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

    Default Re: Approval Status=3 but can't see 'Out of Stock' icon help please !!

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

    The sold out is tested after the approval tests ...

    The approval returns you to where it was called from and never checks the sold out status ... so, you never see it ...

    You could add an extra button check:
    Code:
    // bof: extra check sold out
        $sold_out_button = '';
        $button_check = $db->Execute("select product_is_call, products_quantity from " . TABLE_PRODUCTS . " where products_id = '" . (int)$product_id . "'");
    
        if ($button_check->fields['products_quantity'] <= 0 and SHOW_PRODUCTS_SOLD_OUT_IMAGE == '1') {
          if ($_GET['main_page'] == zen_get_info_page($product_id)) {
            $sold_out_button = '<br />' . zen_image_button(BUTTON_IMAGE_SOLD_OUT, BUTTON_SOLD_OUT_ALT);
          } else {
            $sold_out_button = '<br />' . zen_image_button(BUTTON_IMAGE_SOLD_OUT_SMALL, BUTTON_SOLD_OUT_SMALL_ALT);
          }
        }
    // eof: extra check sold out
    Above the code:
    Code:
          switch (true) {
            case (CUSTOMERS_APPROVAL == '1' and $_SESSION['customer_id'] == ''):
    Then, add the variable created:
    $sold_out_button

    to the return lines of the cases as needed ...
    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!]
    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
    Jan 2006
    Location
    Downunder - QLD - Gold Coast
    Posts
    964
    Plugin Contributions
    0

    Default Re: Approval Status=3 but can't see 'Out of Stock' icon help please !!

    Gosh, are you trying to make me a coder or something? :-)

    Thank you for helping me here for the code, I did find the file in store/includes/functions/ and did find the exact location which is after the line 2115. And thannnnn, I did find the switches as there were 4 of them. To make sure I got it right, I have added in each case :-( like so but I still can not see it.

    Have I done it correctly?


    switch (true) {

    case (CUSTOMERS_APPROVAL == '1' and $_SESSION['customer_id'] == ''):

    // customer must be logged in to browse

    $login_for_price = '<a href="' . zen_href_link(FILENAME_LOGIN, '', 'SSL') . '">' . TEXT_LOGIN_FOR_PRICE_BUTTON_REPLACE . '</a>';

    return $login_for_price;
    return $sold_out_button ;
    break;

    case (CUSTOMERS_APPROVAL == '2' and $_SESSION['customer_id'] == ''):

    if (TEXT_LOGIN_FOR_PRICE_PRICE == '') {

    // show room only

    return TEXT_LOGIN_FOR_PRICE_BUTTON_REPLACE;

    } else {
    Downunder QLD

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

    Default Re: Approval Status=3 but can't see 'Out of Stock' icon help please !!

    Close ... but put them together:
    Code:
    return $login_for_price . $sold_out_button;
    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!]
    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!

  5. #5
    Join Date
    Jan 2006
    Location
    Downunder - QLD - Gold Coast
    Posts
    964
    Plugin Contributions
    0

    Default Re: Approval Status=3 but can't see 'Out of Stock' icon help please !!

    Thank you so much. You are the Queen!
    Downunder QLD

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

    Default Re: Approval Status=3 but can't see 'Out of Stock' icon help please !!

    You are most welcome ... thanks for the update that this is now working for you to show the Sold Out and the Login for Price ...
    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!]
    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!

 

 

Similar Threads

  1. Can see images after url change -please help
    By tundria in forum General Questions
    Replies: 1
    Last Post: 29 Nov 2012, 03:14 AM
  2. Replies: 4
    Last Post: 14 Aug 2012, 04:00 PM
  3. Can't get rid of "Out of Stock" icon on product listings
    By a7t in forum Setting Up Categories, Products, Attributes
    Replies: 6
    Last Post: 12 Mar 2010, 05:21 PM
  4. Please help me understand Stock Levels, Out of Stock, etc
    By ungarod in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 22 Feb 2008, 08:20 PM
  5. No images or Out of Stock icon
    By JDR in forum Setting Up Categories, Products, Attributes
    Replies: 8
    Last Post: 15 Nov 2006, 12:21 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