Announcement

Collapse
No announcement yet.

Send an email to the customer when new stock arrives.

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

    Send an email to the customer when new stock arrives.

    Since I last fiddled with the templates there have been a few changes to the way things work, and some really cool additions to SellerDeck. I'd like to ask if there any developers listening, how to do certain things.

    I've written a web app that loads a javascript widget into product pages. This widget should display only when there is no stock of the item.

    I've found the template that chooses the real time stock display mechanism, and i've added a block that displays only when the stock is zero or less (this part is very similar to how i would have done it in the old days). This works, and for simple items, with no drop-downs and such this feeds data into my web app just fine.

    The problem i'm having is that i want to integrate correctly with the real time stock system, and the drop down lists that SD provides. Can a developer help me to trigger a JS event when the following happens:

    - a combination of items that has no stock is chosen.
    - the real time stock happens and an item goes out of stock while you're looking at it (if thats how it works)

    ideally i would like a function that looks like this:

    function OutOfStock(ProductReference, ProductName, ProductImage) {
    //my things go here.
    }

    #2
    oh and fyi, this is the app, its not ready yet, but you can register for interest on the frontpage.

    http://carticus.co.uk/

    Comment


      #3
      Welcome back Gabs! It's been a while.

      Carticus sounds interesting. Be nice ot see it in action.

      Comment


        #4
        If you can get the widget working properly in your template, i'll give you 3000 free emails to send in it.



        your account is created, credits credited. welcome emails sent duncan.

        Comment


          #5
          basic integration

          So far i have basic integration working on items without dropdowns, plain stock items.

          I modified the 'Display Stock Quantities' template found in the 'Product Page Body'->'Image on Left with text...'.

          Mine looks like this:

          Code:
          <!-- The code below is automatically enabled/disabled by js depending on RTS -->
          
          
                
          <actinic:block if="%3cactinic%3avariable%20name%3d%22RealTimeStockEnabled%22%20%2f%3e%20%26%26%20%3cactinic%3avariable%20name%3d%22DisplayRealStockLevel%22%20%2f%3e" >
          	<span id="RemoveIfOutOfStock_<actinic:variable name="ProductReference" selectable="false" />" class="ActinicRTS" >
          		<span id="EnableIfStockOk_<actinic:variable name="ProductReference" selectable="false" />" class="ActinicRTS" style="visibility: hidden; display: none;">
          		<span id="StockLevel_<actinic:variable name="ProductReference" selectable="false" />" class="ActinicRTS" style="display: inline;"></span>&nbsp;in stock.
          		</span>
          	</span>
          </actinic:block>
          <actinic:block if="%3cactinic%3avariable%20name%3d%22IsStockMonitored%22%20%2f%3e">
          	<span id="EnableIfOutOfStock_<actinic:variable name="ProductReference" selectable="false" />" class="ActinicRTS" style="visibility: hidden; display: none;">
          		<strong><span class="actrequired"><br /><Actinic:Variable Name="OutOfStock"/></span></strong>
          
          <actinic:block if="%3cactinic%3avariable%20name%3d%22StockLevel%22%20%2f%3e%20%20%3c%3d%200">
          		<script src="http://carticus.co.uk/widget/external.js" type="text/javascript"></script>
                <div style="display:none;" class="carticus-widget" data-apikey="YOUR_API_KEY_HERE" data-itemcode="<actinic:variable encoding="perl" name="ProductReference" />" data-itemname="<actinic:variable name="ProductName" />" 
          data-itemimage="<actinic:variable name="CatalogURL" /><actinic:variable name="ProductImageFileName" />"></div>
          </actinic:block>			
          
          	</span>
          </actinic:block>
          ^ this works.

          Widget is here:
          http://din.io/acatalog/Rings.html

          And here:
          http://din.io/acatalog/Three-Diamond...q__.html#SID=1

          This api key goes to oblivion, your emails (if testing) will not be emailed, and will be ignored.

          Comment


            #6
            for those interested in the output, here is what it comes out like in the page:

            Code:
            <script src="http://carticus.co.uk/widget/external.js" type="text/javascript"></script>
            <div 
            style="display:none;" 
            class="carticus-widget" 
            data-apikey="YOUR_API_KEY" 
            data-itemcode="123-abc-jvc-bbq-/" 
            data-itemname="Three Diamond Ring"  
            data-itemimage="http://din.io/acatalog/s-Diamond-Ring.jpg"
            ></div>
            I have added some line breaks for readability.

            for the template nuts, its possible to theme the widget by adding a class like this:

            Code:
            class="carticus-widget my-theme"
            Examples: http://carticus.co.uk/widget/testing/test1.html (view the source to see the css)

            Comment


              #7
              I suppose I also need to display when the shop owner unchecks 'Can be ordered online' too.

              Comment


                #8
                devs: is this function from actinicextras.js called whenever items are not available?

                Code:
                function DisableAddToCart(sAttrName)
                	{

                Comment


                  #9
                  still struggling, after many hours of trying to understand, and i'm normally good at this sort of thing

                  on this page.
                  http://din.io/acatalog/Solitaire-Diamond-Ring-3.html

                  i have put the Yellow Gold/Size 'I' (first options in each choice) out of stock.

                  SD lets me choose them, and then lets me add to cart, THEN tells me i cant have them. is this the desired behaviour? at this point does it not know already about the stock situation and disable the buy button? Can I create this behaviour somehow?

                  Comment


                    #10
                    or is it possbily
                    Code:
                    function updateStockDisplay(mapStockByRef, bUpdateSelection)

                    Comment


                      #11
                      so i guess my original question still stands,

                      when a combination of items is chosen that is not in stock, how can i trigger an event (in this case, unhide a div).

                      Comment


                        #12
                        sad times.

                        where are all the tech people?

                        Comment


                          #13
                          i know it's naughty but i want to bump this. I really need help with it and nobody has come forth with a good suggestion thus far

                          Norman? You still around feller?

                          Comment


                            #14
                            Can't help you with but I love your new website - if you don't get a response, it might be worth sending an email support ticket in.

                            Cheers,
                            Jan Strassen, Mole End Software - Plugins and Reports for Actinic V4 to V11, Sellerdeck V11 to V2018, Sellerdeck Cloud
                            Visit our facebook page for the latest news and special offers from Mole End

                            Top Quality Integrated label paper for Actinic and Sellerdeck
                            A4 Paper with one or two peel off labels, free reports available for our customers
                            Product Mash for Sellerdeck
                            Link to Google Shopping and other channels, increase sales traffic, prices from £29.95
                            Multichannel order processing
                            Process Actinic, Sellerdeck, Amazon, Ebay, Playtrade orders with a single program, low cost lite version now available from £19.95

                            Comment


                              #15
                              I'm still around but haven't had to fiddle with what you need to do so had nothing to report. The dynamic stock involves five bloody thousand lines of JavaScript (and a few thousand lines of Perl) and is very hard to follow. Function updateStockDisplay (in actinicextras.js) seems to be the main code called on page load so that may be a good place to start the hunt.

                              Instead of writing all those thousands of lines, if only SD had dumped the .CAT files (hideous hack for not having any form of on on-line product database - have a look at a .cat file and see what it actually is - no wonder there are scalability problems if you try to put everything into one Section) and gone to a PHP based back-end with some sort of real database containing the stuff needed to run the live parts of the site. It's not 1996 any-more and Perl isn't the only bit of server-side scripting universally available.
                              Norman - www.drillpine.biz
                              Edinburgh, U K / Bitez, Turkey

                              Comment

                              Working...
                              X