Page 6 of 7 FirstFirst ... 4567 LastLast
Results 51 to 60 of 70
  1. #51
    Join Date
    Jun 2013
    Location
    Perth Western Australia
    Posts
    20
    Plugin Contributions
    0

    Default Re: Show "in stock" instead of showing units in stock

    Hi gjh42,

    Thank you for your reply, I have checked both TEXT_PRODUCT_QUANTITY values in the PHP files mentioned and they are identical?

    Thanks again.
    Steve

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

    Default Re: Show "in stock" instead of showing units in stock

    Then something is very peculiar... let's see your site and see if that gives any clues. Also, exactly what is the code you have in the vicinity of that constant name, in various files? (Give a couple lines before & after for context.)

  3. #53
    Join Date
    Feb 2010
    Posts
    71
    Plugin Contributions
    0

    Default Re: Show "in stock" instead of showing units in stock

    Quote Originally Posted by DrByte View Post
    Use this instead:
    PHP Code:
    <?php echo (($flag_show_product_info_quantity == 1) ? '<li>' . ($products_quantity TEXT_PRODUCT_IN_STOCK TEXT_PRODUCT_NOT_IN_STOCK) . '</li>' '') . "\n"?>

    Then use a variation on clydejones earlier post, like this:

    includes -> languages -> english -> product_info.php

    find this line of code
    PHP Code:
    define('TEXT_PRODUCT_QUANTITY'' Units in Stock'); 
    and add these below it:
    PHP Code:
    define('TEXT_PRODUCT_IN_STOCK''In Stock');
    define('TEXT_PRODUCT_NOT_IN_STOCK''Out of Stock'); 
    DrByte many thanks for this. It workd perfectly for me. If I wanted to modify this to show the the number of units in stock when the item is in stock and display Out of Stock when not in stock what would I need to do to the above code?

    Many thank in advance for your help.

  4. #54
    Join Date
    Jan 2013
    Posts
    811
    Plugin Contributions
    0

    Default Re: Show "in stock" instead of showing units in stock

    Heres how i added an image: Copied image from source paseted it in product info.php

  5. #55
    Join Date
    Feb 2010
    Posts
    71
    Plugin Contributions
    0

    Default Re: Show "in stock" instead of showing units in stock

    I managed to work it out. This works fine. Now shows number of items in stock (if items in stock) and displays On order, contact us for ETA (if out of stock).

    includes -> templates -> tpl_product_info_display.php

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

    includes -> languages -> english -> product_info.php

    found this line of code
    define('TEXT_PRODUCT_QUANTITY', ' Units in Stock');

    and added this line below it:

    PHP Code:
     define('TEXT_PRODUCT_NOT_IN_STOCK'' On order, contact us for ETA'); 
    Last edited by Liamv; 31 Oct 2013 at 10:59 PM.

  6. #56
    Join Date
    Feb 2010
    Posts
    71
    Plugin Contributions
    0

    Default Re: Show "in stock" instead of showing units in stock

    Now I would like to modify this so that I can have a different message from "On order, contact us for ETA" for products supplied by different manufacturers.

    Anyone got any clues how I might achieve this?

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

    Default Re: Show "in stock" instead of showing units in stock

    Would all products of any one manufacturer have the same message? Or is it more complicated than that? How many different messages would you want?

  8. #58
    Join Date
    Jan 2014
    Location
    Philadelphia, PA
    Posts
    9
    Plugin Contributions
    0

    Default Re: Show "in stock" instead of showing units in stock

    Gjh42, I am having the same issues that Tinderbox was having in August 2013 and I am using the same template (yorkshire clean) that they were using. Basically, I am entering in the code to the two files as previously suggested but nothing appears to happen. No errors, no changes, etc... I am assuming this has something to do with the template but am not sure how to fix it. The site is: www.dancingferret.com/isotank/

    Here is some of the code from the tpl_product_info_display.php file.

    Code:
    <!--eof Add to Cart Box-->
    </div>
    </div>
    <br class="clearBoth" /> 
    <hr id="product-divider" />
    
    
    <!--bof Product details list  -->
    <?php if ( (($flag_show_product_info_model == 1 and $products_model != '') or ($flag_show_product_info_weight == 1 and $products_weight !=0) or ($flag_show_product_info_quantity == 1) or ($flag_show_product_info_manufacturer == 1 and !empty($manufacturers_name))) ) { ?>
    <ul id="productDetailsList" class="floatingBox back">
      <?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_weight == 1 and $products_weight !=0) ? '<li>' . TEXT_PRODUCT_WEIGHT .  $products_weight . TEXT_PRODUCT_WEIGHT_UNIT . '</li>'  : '') . "\n"; ?>
      <?php echo (($flag_show_product_info_quantity == 1) ? '<li>' . $products_quantity . TEXT_PRODUCT_QUANTITY . '</li>'  : '') . "\n"; ?>
      <?php echo (($flag_show_product_info_manufacturer == 1 and !empty($manufacturers_name)) ? '<li>' . TEXT_PRODUCT_MANUFACTURER . $manufacturers_name . '</li>' : '') . "\n"; ?>
    </ul>
    <br class="clearBoth" />
    <?php
      }
    ?>
    <!--eof Product details list -->

    Any thoughts?

    -Joe

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

    Default Re: Show "in stock" instead of showing units in stock

    Which copy of the file are you editing? (file/folder path) Are you sure the edited copy is actually saved on the server?
    This is the original code:
    PHP Code:
      <?php echo (($flag_show_product_info_quantity == 1) ? '<li>' $products_quantity TEXT_PRODUCT_QUANTITY '</li>'  '') . "\n"?>
    What custom code are you using? Post your code with a few lines before and after for context.

  10. #60
    Join Date
    Jan 2014
    Location
    Philadelphia, PA
    Posts
    9
    Plugin Contributions
    0

    Default Re: Show "in stock" instead of showing units in stock

    Hi, the file/folder path is
    /includes/templates/yorkshire_clean/templates/tpl_product_info_display.php

    Here is the section of code as it appears in the above file:

    PHP Code:
    <?php if ( (($flag_show_product_info_model == and $products_model != '') or ($flag_show_product_info_weight == and $products_weight !=0) or ($flag_show_product_info_quantity == 1) or ($flag_show_product_info_manufacturer == and !empty($manufacturers_name))) ) { ?>
    <ul id="productDetailsList" class="floatingBox back">
      <?php echo (($flag_show_product_info_model == and $products_model !='') ? '<li>' TEXT_PRODUCT_MODEL $products_model '</li>' '') . "\n"?>
      <?php echo (($flag_show_product_info_weight == and $products_weight !=0) ? '<li>' TEXT_PRODUCT_WEIGHT .  $products_weight TEXT_PRODUCT_WEIGHT_UNIT '</li>'  '') . "\n"?>
      <?php echo (($flag_show_product_info_quantity == 1) ? '<li>' $products_quantity TEXT_PRODUCT_QUANTITY '</li>'  '') . "\n"?>
      <?php echo (($flag_show_product_info_manufacturer == and !empty($manufacturers_name)) ? '<li>' TEXT_PRODUCT_MANUFACTURER $manufacturers_name '</li>' '') . "\n"?>

 

 
Page 6 of 7 FirstFirst ... 4567 LastLast

Similar Threads

  1. To show "In stock" but not number of units?
    By Marre in forum Basic Configuration
    Replies: 6
    Last Post: 2 May 2011, 11:03 PM
  2. Show "Units In Stock" for certain product only.
    By laydiefa in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 26 Nov 2008, 08:08 PM
  3. Scaling image instead of "units in stock?"
    By JHouse in forum General Questions
    Replies: 1
    Last Post: 12 May 2008, 06:48 PM
  4. How to NOT show "xxx units in stock"?
    By terrykiwi in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 27 Apr 2008, 07:51 PM
  5. Display "Product is in Stock" instead of units?
    By Corys8646 in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 8 Jul 2006, 01:20 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