Announcement

Collapse
No announcement yet.

Displaying stock for options.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Displaying stock for options.

    Hope I can explain my question well so here goes!

    I figured out how to add the options to the product as well as add individual stock amounts for each of the options. What I cannot figure out is how to get the stock for each option to show up on the product page like in this KB.

    https://support.3dcart.com/Knowledge...vanced-options

    Unfortunately, I do not have the specified line of code on my product template page listing_1.html. My template only has this:

    <td><!--START: product_availability-->
    <table border="0" cellpadding="0" cellspacing="0">
    <tr>
    <td class="price-info"><strong>[product_Header-availability]</strong></td>
    <td><img src="assets/templates/common/images/spacer.gif" border="0" alt="" width="10" height="1"></td>
    <td class="item"><div id="availability">[availability]</div></td>
    </tr>
    </table>
    <!--END: product_availability--></td>

    I tried adding the line
    HTML Code:
    <span style="display: inline;" id="product_inventory">[stock]</span>
    in manually, but it will not work like their KB example and it just ends up listing 2 stock numbers on all products (not just the ones with options). It has the option stock amount then right beneath it it shows the combined stock for all the options like this:

    8
    Availability: 42 in Stock


    And for products without options it does:

    42
    Availability: 42 in Stock


    The cart does give an error message if the customer tries to order too many pieces of an option, but they have no idea what the actual stock is. Then when they close the error message box, the stock message on the page changes from the combined stock amount to "Out of Stock". So if they order too many of an option, the cart makes it appear that the item is no longer available at all.......

    Other things I have tried to work around this:

    I tried adding [stock] to the dropdown menu but it just displays the total amount of all the options combined. I cannot figure out how to get it to display the stock for just that option.

    Is there a way for me to add the stock for each option within the dropdown menu or get it to show up in the right spot and only on the pages that have options with stock assigned like in the KB? Instead of [stock] is there something else we can use like [options_stock]?
    Last edited by Danab; 07-08-2012, 12:21 PM. Reason: added line of code

  • #2
    Think I figured it out.

    Since my template did not match the KB example, I changed it to:

    HTML Code:
                   <td class="price-info"><strong>[product_Header-availability]</strong></td>
                      <td><img src="assets/templates/common/images/spacer.gif" border="0" alt="" width="10" height="1"></td>
                      <td class="item"><div id="product_inventory">[stock] In Stock</span></td>
    That seems to have fixed the problem and now the individual options stock is showing up correctly. I'll have to test it and make sure everything runs smoothly though. Hooray!

    Comment


    • #3
      individual stock for advanced options

      For those of you who found this thread looking for individual qoh numbers for your advanced options (which 3dcart does not fully support unless the customer clicks on each option - then the [stock] field will show that particular number) I have the solution for you without all sorts of fancy API connections and ajax code.

      Through necessity and a bit of digging, Each individual option can now be indicated as in stock/out of stock/(your custom message here) adjacent to each option if you wish, or you can display the exact qoh if you prefer. The options are endless, and the sky is the limit.

      for an example, please visit
      http://www.bestcostumesite.com/Wonde...ume_p_133.html

      Please keep in mind that the site is currently still under development (i am the only one working on it currently) but you can see that each size has an individual stock indicator that shows either out of stock/in stock/ or low stock if there is a current qoh of less than three.

      for installation and pricing (includes installation) please pm me. I can have the code installed within 24 hours.
      Last edited by jleclair; 07-24-2012, 03:16 PM.

      Comment

      Working...
      X