Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 37
  1. #11
    Join Date
    Nov 2006
    Posts
    512
    Plugin Contributions
    0

    Default Re: Sold New Products display Sold Out instead of price on index and products_new pag

    I changed the code but my site went away again. maybe throw in a ! somewhere?

    also I just popped your code in on line 154 under the call tag is the placement wrong or is my statement conflicting the above code?

    PHP Code:
    ////
    // Display Price Retail
    // Specials and Tax Included
      
    function zen_get_products_display_price($products_id) {
        global 
    $db$currencies;

        
    $free_tag "";
        
    $call_tag "";
        
    //test
          
      
    $products_quantity zen_get_products_display_price($products_id); 
    if (
    $products_quantity <= 0) {        
            
    $return_button zen_image_button(BUTTON_IMAGE_SOLD_OUTBUTTON_SOLD_OUT_ALT); 
            return 
    $return_button 
          


    // 0 = normal shopping
    // 1 = Login to shop
    // 2 = Can browse but no prices
        // verify display of prices 

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

    Default Re: Sold New Products display Sold Out instead of price on index and products_new pag

    Missing semi-colon at the end of the line ...
    Code:
            return $return_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!

  3. #13
    Join Date
    Nov 2006
    Posts
    512
    Plugin Contributions
    0

    Default Re: Sold New Products display Sold Out instead of price on index and products_new pag

    Still no site with above code with added ;

    I moved the } down (see below) but that didn't work either.

    PHP Code:
    ///
    // Display Price Retail
    // Specials and Tax Included
      
    function zen_get_products_display_price($products_id) {
        global 
    $db$currencies;

        
    $free_tag "";
        
    $call_tag "";
        
    //test
          
      
    $products_quantity zen_get_products_display_price($products_id); 
    if (
    $products_quantity <= 0) {        
            
    $return_button zen_image_button(BUTTON_IMAGE_SOLD_OUTBUTTON_SOLD_OUT_ALT); 
            return 
    $return_button
           
          
    // 0 = normal shopping
    // 1 = Login to shop
    // 2 = Can browse but no prices
        // verify display of prices
          
    switch (true) {
            case (
    CUSTOMERS_APPROVAL == '1' and $_SESSION['customer_id'] == ''):
            
    // customer must be logged in to browse
            
    return '';
            break;
            case (
    CUSTOMERS_APPROVAL == '2' and $_SESSION['customer_id'] == ''):
            
    // customer may browse but no prices
            
    return TEXT_LOGIN_FOR_PRICE_PRICE;
            break;
            case (
    CUSTOMERS_APPROVAL == '3' and TEXT_LOGIN_FOR_PRICE_PRICE_SHOWROOM != ''):
            
    // customer may browse but no prices
            
    return TEXT_LOGIN_FOR_PRICE_PRICE_SHOWROOM;
            break;
            case ((
    CUSTOMERS_APPROVAL_AUTHORIZATION != '0' and CUSTOMERS_APPROVAL_AUTHORIZATION != '3') and $_SESSION['customer_id'] == ''):
            
    // customer must be logged in to browse
            
    return TEXT_AUTHORIZATION_PENDING_PRICE;
            break;
            case ((
    CUSTOMERS_APPROVAL_AUTHORIZATION != '0' and CUSTOMERS_APPROVAL_AUTHORIZATION != '3') and $_SESSION['customers_authorization'] > '0'):
            
    // customer must be logged in to browse
            
    return TEXT_AUTHORIZATION_PENDING_PRICE;
            break;
            default:
            
    // proceed normally
            
    break;
          }
          
              }

    // show case only 

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

    Default Re: Sold New Products display Sold Out instead of price on index and products_new pag

    Just use this code to display the SOLD OUT image instead of the Price ...
    PHP Code:
    // return sold out vs price
      
    $products_quantity zen_get_products_stock($products_id);
      if (
    $products_quantity <= 0) {
        
    $return_button zen_image_button(BUTTON_IMAGE_SOLD_OUTBUTTON_SOLD_OUT_ALT);
        return 
    $return_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. #15
    Join Date
    Nov 2006
    Posts
    512
    Plugin Contributions
    0

    Default Re: Sold New Products display Sold Out instead of price on index and products_new pag

    That one does the trick! everything looks good so far, I will do some more testing to see if there are any issues and report back if need be.

    Meanwhile, I think I owe you a cup of coffee!

    Thanks Linda!

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

    Default Re: Sold New Products display Sold Out instead of price on index and products_new pag

    You are most welcome ...

    I gave you 1 typo and then I appeared to have befuddled you on the other things needed ...

    It was easier to just sit down, clean it up, test it ... and make sure the price vanished everywhere when the products_quantity <= 0 ...

    Thanks for the support!
    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!

  7. #17
    Join Date
    Feb 2009
    Posts
    2
    Plugin Contributions
    0

    Default Re: Sold New Products display Sold Out instead of price on index and products_new pag

    Hi, I want to do the same thing only use the small image instead, I tried the code:

    // return sold out vs price
    $products_quantity = zen_get_products_stock($products_id);
    if ($products_quantity <= 0) {
    $return_button = zen_image_button(BUTTON_IMAGE_SOLD_OUT_SM, BUTTON_SOLD_OUT_ALT);
    return $return_button;
    }

    but that just gave me the alt tag and no image.
    (without the _SM the large image shows fine)

    Thanks for your help

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

    Default Re: Sold New Products display Sold Out instead of price on index and products_new pag

    The constant for the small sold out is:
    BUTTON_IMAGE_SOLD_OUT_SMALL

    And its ALT tag constant is:
    BUTTON_SOLD_OUT_SMALL_ALT
    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!

  9. #19
    Join Date
    Feb 2009
    Posts
    2
    Plugin Contributions
    0

    Default Re: Sold New Products display Sold Out instead of price on index and products_new pag

    Thank you so much Linda,
    that worked

    Anita

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

    Default Re: Sold New Products display Sold Out instead of price on index and products_new pag

    Thanks for the update that the problem was just a typo ...
    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!

 

 
Page 2 of 4 FirstFirst 1234 LastLast

Similar Threads

  1. Replies: 2
    Last Post: 7 Jul 2016, 06:34 AM
  2. Gap in product listing between price and 'sold out' button (new thread)
    By Thannaree in forum Templates, Stylesheets, Page Layout
    Replies: 13
    Last Post: 6 Sep 2012, 11:41 AM
  3. Replies: 7
    Last Post: 28 Mar 2011, 04:08 AM
  4. New Products still showing Sold Out and Disabled Items
    By shawnchr in forum Setting Up Categories, Products, Attributes
    Replies: 6
    Last Post: 1 Nov 2010, 12:57 AM
  5. 'Sold out' button instead of price on main page
    By wendon in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 14 Jan 2010, 10:53 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