Results 1 to 10 of 10
  1. #1
    Join Date
    May 2008
    Posts
    188
    Plugin Contributions
    0

    Default I would like to show a product as being out of stock - not as simple as you think !

    Hoping this title might bring in a few more readers than the last effort !

    What I wish to do is to show a message under the product name saying that the product is temporarily out of stock.

    This would be independent to zen carts "out of the box" options. In Zen cart admin you can either a) set the product out of stock image to replace the add to cart box or b) leave the cart option open and then when the customer adds to cart the cart displays a message that the item is currently out of stock etc.

    What I really badly at this stage ! need to do is to display that a product is out of stock yet still allow the item to be added to the cart and checkout etc. Our customers are feeding back to us that they find it very irritating to only be told after adding to the cart that the product is not immediately available.

    The best example of this is any product listing at www.play.com where in both the main listings and in the product listing itself there is a message displayed saying "In Stock" or "Temporarily out of stock" depending on the stock levels.

    I have looked at the traffic light stock indicator contribution and this essentially does something similar in that it checks the stock levels on each product and then displays a coloured icon to match.

    I have already posted this but I think most people dismiss it as a another newb who has not read the instructions type post so if anyone has any ideas at all would be very grateful !!!!

  2. #2
    Join Date
    Oct 2006
    Posts
    5,477
    Plugin Contributions
    11

    Default Re: I would like to show a product as being out of stock - not as simple as you think

    I believe that Zen DOES allow you to display the product out of stock, while still allow it to be added to cart and check out

    Look some where in admin->configuration->stock (or something like that), and you will see that option.
    I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

  3. #3
    Join Date
    May 2008
    Posts
    188
    Plugin Contributions
    0

    Default Re: I would like to show a product as being out of stock - not as simple as you think

    That option is to set

    Show sold out image instead of add to cart -->0 ( ie off )

    and then

    Allow Checkout ----> True


    But this is exactly what I described in option B - the customer only finds out a product is out of stock when they add it to the cart. You can set

    Show sold out image instead of add to cart -->1 ( ie ON )

    but this then stops the add to cart function.


    Unless I have missed something ????????????

  4. #4
    Join Date
    Aug 2008
    Posts
    14
    Plugin Contributions
    0

    Default Re: I would like to show a product as being out of stock - not as simple as you think

    This is the exact same problem I am facing.

    If i display product qty on the page, then I get people either thinking that the -7 is just a dash in front of the number and that I have 7 on hand, or I have people that actually email to ask, "what does the -7 mean?"

    If I don't display the number available at all then I get tons of emails asking "is xyz in stock?"

    I want people to be able to order products even when I am out of stock, but there has got to be a way to display a "Out of stock, back order ok" message either on the product listings page and/or the product description. Not after they add it to the shopping cart.

  5. #5
    Join Date
    Oct 2008
    Posts
    27
    Plugin Contributions
    0

    Default Re: I would like to show a product as being out of stock - not as simple as you think

    You should do as i did.

    In words:

    If q.ty > 0 ====> Print: AVAILABLE
    If q.ty = 0 ====> Print: NOT AVAILABLE - ON ORDER (and u let it order ---> Backorder)
    If Q.ty<0 ====> Print: Not available

    the code

    <?php
    if (zen_get_products_stock((int)$_GET['products_id']) >0) {
    $zc_stock_level_image = '<span class="Disponibile">' . DISPONIBILE . '</span>';
    }

    elseif (zen_get_products_stock((int)$_GET['products_id']) <0) {
    $zc_stock_level_image = '<span class="Arrivo">' . ESAURITO . '</span>';
    }

    else {
    $zc_stock_level_image = '<span class="Esaurito">' . IN_ARRIVO . '</span>';
    }
    echo '<b class="Stock">Stock Level: </b>' . $zc_stock_level_image;
    ?>

  6. #6
    Join Date
    Jul 2006
    Posts
    135
    Plugin Contributions
    0

    Default Re: I would like to show a product as being out of stock - not as simple as you think

    Which file are you referencing?

    Thanks.

  7. #7
    Join Date
    May 2008
    Posts
    188
    Plugin Contributions
    0

    Default Re: I would like to show a product as being out of stock - not as simple as you think

    Quote Originally Posted by AlohaRover View Post
    This is the exact same problem I am facing.

    If i display product qty on the page, then I get people either thinking that the -7 is just a dash in front of the number and that I have 7 on hand, or I have people that actually email to ask, "what does the -7 mean?"

    If I don't display the number available at all then I get tons of emails asking "is xyz in stock?"

    I want people to be able to order products even when I am out of stock, but there has got to be a way to display a "Out of stock, back order ok" message either on the product listings page and/or the product description. Not after they add it to the shopping cart.
    We are also coming from the point of view that we dont want the customers to know exactly how many of each item is in stock. If you have 1 or 2 of each item then you look like a smaller amature site. So the simple in stock or temp out of stock message is what we need.

  8. #8
    Join Date
    May 2008
    Posts
    188
    Plugin Contributions
    0

    Default Re: I would like to show a product as being out of stock - not as simple as you think

    Quote Originally Posted by jeanjean88 View Post
    You should do as i did.

    In words:

    If q.ty > 0 ====> Print: AVAILABLE
    If q.ty = 0 ====> Print: NOT AVAILABLE - ON ORDER (and u let it order ---> Backorder)
    If Q.ty<0 ====> Print: Not available

    the code


    This code ...... looks like a different language ( not just PHP )

    <?php
    if (zen_get_products_stock((int)$_GET['products_id']) >0) {
    $zc_stock_level_image = '<span class="Disponibile">' . DISPONIBILE . '</span>';
    }

    elseif (zen_get_products_stock((int)$_GET['products_id']) <0) {
    $zc_stock_level_image = '<span class="Arrivo">' . ESAURITO . '</span>';
    }

    else {
    $zc_stock_level_image = '<span class="Esaurito">' . IN_ARRIVO . '</span>';
    }
    echo '<b class="Stock">Stock Level: </b>' . $zc_stock_level_image;
    ?>

    Are these referncing a graphic file or a defined text ?? not 100% up on the PHP

    Thanks for the help

  9. #9
    Join Date
    May 2008
    Posts
    188
    Plugin Contributions
    0

    Default Re: I would like to show a product as being out of stock - not as simple as you think

    BIG BIG Thanks to JeanJean88

    Using the code provided and modified slightly I inserted this into my tpl_product_info_display.php file just after the product price block.

    Code:
     <!--eof Product Price block -->
    
    <?php
    if (zen_get_products_stock((int)$_GET['products_id']) >0) {
    $zc_stock_level_image = '<span style="color: #000000; font-size: 12px;">' . In_Stock . '</span>';
    }
    
    elseif (zen_get_products_stock((int)$_GET['products_id']) <0) {
    $zc_stock_level_image = '<span style="color: #FF0000; font-size: 12px;">' . Temporarily_Out_Of_Stock . '</span>';
    }
    
    else {
    $zc_stock_level_image = '<span   style="color: #FF0000; font-size: 12px;">' . Temporarily_Out_Of_Stock . '</span>';
    }
    echo '<b class="Stock">Stock Level: </b>' . $zc_stock_level_image;
    ?>  
    
    
    <!--bof free ship icon  -->
    You also need to insert into includes/languages/english/YOURTEMPLATE/product_info.php

    Code:
     define('In_Stock', 'In Stock');
    define('Temporarily_Out_Of_Stock', 'Temporarily Out Of Stock - Will Be Dispatched As Soon As Stock Arrives');
    Note these are the filenames and descriptions I happened to use - edit them to your own desires.

    I used inline definitions of the span styles - the first one for being in stock shows in black - the last two for the out of stocks is in red.

    I was not sure why JeanJean88 had the 3 variables - ie >0 , 0 and <0 as I am not familiar with his native language. I have left them in. Currently the <0 and 0 are pointing to the same temporarily out of stock message as all we want is a simple in stock or not in stock decision.

    but this could be changed for example to allow for greater than 0 to be in stock - ( knowing you have an inbound delivery of 10 untis ..... ) -1 to -10 to show up as "stock will be shipped early next week" and below -10 to simply be "out of stock - will be shipped as soon as stock arrives"

    Bulk of the credit on this to JeanJean88 though - that put me on the right track.

  10. #10
    Join Date
    May 2008
    Posts
    188
    Plugin Contributions
    0

    Default Re: I would like to show a product as being out of stock - not as simple as you think


 

 

Similar Threads

  1. Replies: 2
    Last Post: 25 Apr 2011, 08:46 AM
  2. Can I show an item as being out of stock yet still allow add to cart?
    By PatF in forum Templates, Stylesheets, Page Layout
    Replies: 10
    Last Post: 18 Jan 2010, 11:23 PM
  3. Show Product out of stock in checkout - not only in shopping cart.
    By Gomlers in forum Managing Customers and Orders
    Replies: 5
    Last Post: 13 Jul 2009, 03:01 PM
  4. New product not to show out of stock products
    By gardengate in forum Basic Configuration
    Replies: 0
    Last Post: 11 Sep 2006, 02:53 PM
  5. Something I think alot of people would like...
    By dogmatic69 in forum General Questions
    Replies: 0
    Last Post: 12 Jun 2006, 08:00 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