Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2010
    Posts
    2,159
    Plugin Contributions
    17

    Default shopping cart in stock

    simply trying to add in stock to the shopping cart page

    replace *** (out of stock) with (in stock) when product is available

    client request, did this before but having a brain fart.

  2. #2
    Join Date
    Feb 2010
    Posts
    2,159
    Plugin Contributions
    17

    Default Re: shopping cart in stock

    figured it out

  3. #3
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: shopping cart in stock

    Mind posting what you found for others that might find this thread later
    Zen-Venom Get Bitten

  4. #4
    Join Date
    Feb 2010
    Posts
    2,159
    Plugin Contributions
    17

    Default Re: shopping cart in stock

    sure

    first open /includes/templates/YOUR_TEMPLATE_NAME/templates/tpl_shopping_cart_default.php

    add:
    PHP Code:
    <th scope="col" id="scAvailabilityHeading"><?php echo TABLE_HEADING_AVAILABILITY?></th>
    after:
    PHP Code:
    <th scope="col" id="scUpdateQuantity">&nbsp;</th
    then add:
    PHP Code:
    <td class="scAvailability">
    <?php
      
    if ($product['flagStockCheck'] == '') {
        echo 
    '<span class="alertGo bold">' TEXT_PRODUCTS_QUANTITY '</span>';
      } else {
        echo 
    '<span class="alert bold">' $product['flagStockCheck'] . '</span>';
      }
    ?>
    </td>
    after:
    PHP Code:
           <td class="cartQuantityUpdate">
    <?php
      
    if ($product['buttonUpdate'] == '') {
        echo 
    '' ;
      } else {
        echo 
    $product['buttonUpdate'];
      }
    ?>
           </td>
    then create a file called
    /includes/languages/english/extra_definitions/YOUR_TEMPLATE_NAME/shopping_cart_extras.php

    add
    <?php

    define('TEXT_PRODUCTS_QUANTITY', 'In Stock');

    ?>

    end result should add a column that shows *** or In Stock

    you can change *** to Out of Stock in ADMIN > CONFIGURATION > STOCK

    further customization can be done, see example below
    Attachment 12320
    Last edited by rbarbour; 7 Apr 2013 at 03:15 PM.

  5. #5
    Join Date
    Nov 2007
    Location
    Sunny Coast, Australia
    Posts
    3,378
    Plugin Contributions
    9

    Default Re: shopping cart in stock

    Nice one rbarbour! Will come in handy one day...

    Frank

 

 

Similar Threads

  1. Out Of Stock Warning Disappeared From Shopping Cart
    By pinksparklegirl in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 7 Aug 2011, 01:20 PM
  2. Replies: 5
    Last Post: 3 Aug 2011, 08:15 AM
  3. Stock in shopping cart question
    By deadhippo in forum General Questions
    Replies: 7
    Last Post: 19 Dec 2009, 01:15 AM
  4. Moving shopping cart box and removing stock qty
    By Electrobumps in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 6 Feb 2009, 05:21 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