Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Join Date
    May 2005
    Location
    Sweden
    Posts
    151
    Plugin Contributions
    0

    Default Show Quantity in Stock

    Hey all!

    I'm in need of assistance tweaking my store.

    What I'm trying to do is changing how Quantity in stock is shown. I wan't it to say how many there is available, and if out of stock it should say 2-3 days dispatch..

    My guess is that I need to insert an if in tpl_product_info_display.php and this is out of my league..

    Thanks in advance!

    BR
    Svanis

  2. #2
    Join Date
    May 2005
    Location
    Sweden
    Posts
    151
    Plugin Contributions
    0

    Default Re: Show Quantity in Stock

    Ooops.. I obviously posted in the wrong forum. Maybe this should be moved elsewhere..

  3. #3
    Join Date
    May 2006
    Posts
    14
    Plugin Contributions
    0

    Default Re: Show Quantity in Stock

    Quote Originally Posted by Svanis
    Ooops.. I obviously posted in the wrong forum. Maybe this should be moved elsewhere..
    I would like to know the answer to your question as well. I set it to not show stock quantities, and re-checked the setting, but it does so anyway.

  4. #4
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Show Quantity in Stock

    You posted in the right place - all of this can be set in Admin.

    Go to Configuration > Stock, and you can set Check stock level, Subtract stock, Allow Checkout and Show Sold Out Image in place of Add to Cart as desired. Edit "Mark product out of stock" to your desired text.

    If you want to not show stock levels, you can turn it off in Catalog > Product Types > Product - General > Edit Layout > Show Quantity in Stock > 0.

    There is a tremendous number of things you can do in Admin. You will benefit from looking at every item in every menu on the panel - even if you don't see a need for a setting now, you may remember that you saw it later when you want a function.

  5. #5
    Join Date
    May 2005
    Location
    Sweden
    Posts
    151
    Plugin Contributions
    0

    Default Re: Show Quantity in Stock

    Well.. Isn't that only showing in the actual cart? I need it to be listed in the product info page instead of saying "0 in stock"

    Thx for the reply..

  6. #6
    Join Date
    May 2005
    Location
    Sweden
    Posts
    151
    Plugin Contributions
    0

    Default Re: Show Quantity in Stock

    A clarification.. (Sorry about doubleposting, my 5 minutes of editability expired, not a bump.. )

    I wan't it to show "X in stock" but if out of stock it should say anything but "0 in stock" For example, avail. @ distr...

  7. #7
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Show Quantity in Stock

    "Mark product out of stock" is where the out of stock message goes, to show up in the product info page. You can edit it to show your desired text.

  8. #8
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Show Quantity in Stock

    Well that's annoying...
    I have had the show stock quantity function turned off, so just turned it back on to test it and find that when I make a test purchase it shows the quantity as 0 in stock, but no oos message. Sorry! The oos message does show in the cart when ordering more than are in stock, now that I think about it.

  9. #9
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Show Quantity in Stock

    Here's the setup for this function:

    In tpl_product_info_display.php, around line 99, duplicate this line

    <?php echo (($flag_show_product_info_quantity == 1) ? '<li>' . $products_quantity . TEXT_PRODUCT_QUANTITY . '</li>' : '') . "\n"; ?>

    and modify both similar to the product model line.


    <!--bof Product details list -->
    ...
    <?php echo (($flag_show_product_info_model == 1 and $products_model !='') ? '<li>' . TEXT_PRODUCT_MODEL . $products_model . '</li>' : '') . "\n"; ?>
    ...
    <?php echo (($flag_show_product_info_quantity == 1 and $products_quantity >0) ? '<li>' . $products_quantity . TEXT_PRODUCT_QUANTITY . '</li>' : '') . "\n"; ?>
    <?php echo (($flag_show_product_info_quantity == 1 and $products_quantity <=0) ? '<li>' . TEXT_MORE_INFORMATION . '</li>' : '') . "\n"; ?>
    ...
    <!--eof Product details list -->

    I haven't yet found the variable that holds the out of stock marker text, so I redefined the TEXT_MORE_INFORMATION constant (in /includes/languages/english/my_template/product_info.php) which I don't need, as a temporary measure for testing. You could also add a new define there for TEXT_PRODUCT_O_O_S or something.

    I don't plan to show quantity in stock, but may want to note that the item will be made to order if out of stock. For that, I can modify the second line to:

    <?php echo (($products_quantity <=0) ? '<li>' . TEXT_MORE_INFORMATION . '</li>' : '') . "\n"; ?>

    so the oos text will show if appropriate regardless of the flag setting.

  10. #10
    Join Date
    May 2006
    Posts
    14
    Plugin Contributions
    0

    Default Re: Show Quantity in Stock

    Quote Originally Posted by gjh42
    There is a tremendous number of things you can do in Admin. You will benefit from looking at every item in every menu on the panel - even if you don't see a need for a setting now, you may remember that you saw it later when you want a function.
    Thank you for the tips, I did find it. The problem is that there are so many settings, it is hard to remember where they are, and many times I don't see a consistent pattern on where they are, it seems counterintuitive sometimes.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Cant turn off Show Quantity in Stock
    By gunnvidr in forum General Questions
    Replies: 2
    Last Post: 10 May 2010, 11:43 AM
  2. Show stock quantity at top level
    By wyzman in forum Setting Up Categories, Products, Attributes
    Replies: 5
    Last Post: 10 Apr 2008, 05:00 PM
  3. Show Images for quantity stock
    By gibsonshop in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 2 Sep 2007, 09:31 PM

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