Page 4 of 7 FirstFirst ... 23456 ... LastLast
Results 31 to 40 of 70
  1. #31
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

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

    @version $Id: tpl_product_info_display.php 5369 2006-12-23 10:55:52Z drbyte $
    The latest revision of this file was in 2006, and it reportedly worked perfectly on someone's site in 2008.

  2. #32
    Join Date
    May 2009
    Posts
    413
    Plugin Contributions
    0

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

    Quote Originally Posted by DrByte View Post
    So, what exactly is the change you were expecting? What's it showing now?
    Also, are your FTP uploads actually completing properly when trying to upload your edits?
    I forgot to add the rather crucial detail that I'm using the Tabbed Products Pro Module. I just viewed the page with Java script disabled, and guess what... it worked Sorry for wasting your time.

    I'll contact the TPP author about trying to implement this mod.

    Thanks.

  3. #33
    Join Date
    Feb 2008
    Location
    Philadelphia
    Posts
    279
    Plugin Contributions
    3

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

    This worked perfectly for me on 1.3.8.a.

    Any clues on the limited stock code? That would be great if possible.

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

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

    There is another thread where people have worked out the code for red/yellow/green light markers on products, using tests for stock level.

  5. #35
    Join Date
    Jul 2010
    Posts
    49
    Plugin Contributions
    0

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

    This seems like a very straight forward mod, but every time I try it it breaks my site.

    In my includes/templates/mytemplate/tpl_product_info_display.php I have changed the line:
    <?php echo (($flag_show_product_info_quantity == 1) ? '<li>' . $products_quantity . TEXT_PRODUCT_QUANTITY . '</li>' : '') . "\n"; ?>
    to
    <?php echo (($flag_show_product_info_quantity == 1) ? '<li>' . ($products_quantity > 0 ? TEXT_PRODUCT_IN_STOCK : TEXT_PRODUCT_NOT_IN_STOCK) . '</li>' : '') . "\n"; ?>

    and in my includes/languages/english/mytemplate/product_info.php file under the line:
    define('TEXT_PRODUCT_QUANTITY', ' Units in Stock');
    I have added
    define('TEXT_PRODUCT_IN_STOCK', 'In Stock');
    define('TEXT_PRODUCT_NOT_IN_STOCK', 'Out of Stock');

    Now when I view a product all I see is the header, and column 1 (on the left). It seems to have broken the main column, column 2 (on the right) and the footer.

    I am running zencart 1.39d, with simple SEO URLs, Imagehandler and Zen Light Box.

    I really want this mod, and it seems so basic to apply, it's very frustrating. Any help would be greatly appreciated!

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

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

    Is this the first mod you have tried to do? How are you making the edits? What you posted looks right, but what really matters is what the file on your server looks like. Can we see your site to look at the error directly?

  7. #37
    Join Date
    Nov 2005
    Location
    Colorado Springs, CO USA
    Posts
    7,033
    Plugin Contributions
    31

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

    Quote Originally Posted by Nintendoparts View Post
    This seems like a very straight forward mod, but every time I try it it breaks my site.

    In my includes/templates/mytemplate/tpl_product_info_display.php I have changed the line:
    <?php echo (($flag_show_product_info_quantity == 1) ? '<li>' . $products_quantity . TEXT_PRODUCT_QUANTITY . '</li>' : '') . "\n"; ?>
    to
    <?php echo (($flag_show_product_info_quantity == 1) ? '<li>' . ($products_quantity > 0 ? TEXT_PRODUCT_IN_STOCK : TEXT_PRODUCT_NOT_IN_STOCK) . '</li>' : '') . "\n"; ?>

    I am running zencart 1.39d, with simple SEO URLs, Imagehandler and Zen Light Box.

    I really want this mod, and it seems so basic to apply, it's very frustrating. Any help would be greatly appreciated!
    I think you have a misplaced )

    Try this and see if it helps:

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

  8. #38
    Join Date
    Jul 2010
    Posts
    49
    Plugin Contributions
    0

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

    Thanks for the speedy replies!

    Quote Originally Posted by gjh42 View Post
    Is this the first mod you have tried to do? How are you making the edits? What you posted looks right, but what really matters is what the file on your server looks like. Can we see your site to look at the error directly?
    I installed simple SEO URL's myself which was considerably more involved than this mod to install and I have done all the customizations to my site myself. I've been using notepad++ and filezilla to ftp the edited files. My site isn't functional yet so I'll upload the edited tpl_product_info_display.php and product_info.php and you can see the error for yourself. My site is Nintendoparts.com.au.
    ,
    Quote Originally Posted by clydejones View Post
    I think you have a misplaced )

    Try this and see if it helps:

    PHP Code:
    <?php echo (($flag_show_product_info_quantity == 1) ? '<li>' . ($products_quantity 0) ? TEXT_PRODUCT_IN_STOCK TEXT_PRODUCT_NOT_IN_STOCK '</li>' '') . "\n"?>
    I directly copied and pasted this line, same thing.... header, and column 1, but no main column, no column2 and no footer on product pages.

    Thanks for the help.

  9. #39
    Join Date
    Nov 2005
    Location
    Colorado Springs, CO USA
    Posts
    7,033
    Plugin Contributions
    31

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

    Quote Originally Posted by Nintendoparts View Post
    Thanks for the speedy replies!



    I installed simple SEO URL's myself which was considerably more involved than this mod to install and I have done all the customizations to my site myself. I've been using notepad++ and filezilla to ftp the edited files. My site isn't functional yet so I'll upload the edited tpl_product_info_display.php and product_info.php and you can see the error for yourself. My site is Nintendoparts.com.au.
    ,


    I directly copied and pasted this line, same thing.... header, and column 1, but no main column, no column2 and no footer on product pages.

    Thanks for the help.
    check your cache folder and see what your MyDEBUG log files are telling you.

  10. #40
    Join Date
    Jul 2010
    Posts
    49
    Plugin Contributions
    0

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

    Quote Originally Posted by clydejones View Post
    check your cache folder and see what your MyDEBUG log files are telling you.
    I checked the latest MyDEBUG file. It says:

    [24-Jul-2010 04:05:31] PHP Parse error: syntax error, unexpected T_REQUIRE in /public_html/includes/templates/mytemplate/templates/tpl_product_info_display.php on line 1

    I had a look at line 1 in the edited tpl_product_info_display.php it has a " <?php " (without the quotes) just like the original tpl_product_info_display.php file. I haven't made any changes near line 1, the code I've been replacing is located on line 241. Any ideas?

    Thanks again for all your help with this.

 

 
Page 4 of 7 FirstFirst ... 23456 ... 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