Announcement

Collapse
No announcement yet.

Online Stock Control on extended info pages

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

    Online Stock Control on extended info pages

    Hi all

    Is the online stock control supposed to work on extended info pages? I am currently using v10.03 special build (tried in v10.02 as well)

    I have setup the extended info page with the add to cart and same outer layout as section.
    I am testing using both stock number and display instock, it works fine on the section pages, but when I put the real time stock variable into the extended info page it doesn't.
    I have removed the blockif statement ==section around the javascript and uploaded which appears to display the correct stock on extended info pages but does create errors at upload.

    I see that the javascript uses SectionID as a variable in the javascript and that is what the error is.

    I did call support today who said this method would work, but it causes errors...

    Does anybody know if there is a workaround or do I wait for Monday to call support again?

    #2
    Hi

    I have the stock levels showing on the extended info pages.

    The way I did it was to add the variable
    Code:
    <actinic:variable name="JavascriptSectionStockQuery" selectable="false" />
    to my extended info page lay out.

    Elliott
    Elliott - Weybridge Lights

    www.weybridgelights.co.uk

    Comment


      #3
      As Elliot says, it should work. Only the PageType variable is quirky on Extended Info pages. You'd expect it to contain "Section" but in fact it is null. Other product related variables should be fine.
      Norman - www.drillpine.biz
      Edinburgh, U K / Bitez, Turkey

      Comment


        #4
        thanks guys

        I do have the javascript code in the head (in the standard javascript header functions layout), although I see this blockif at the bottom, this is the entire code from the standard javascript header functions layout

        Code:
           <script language="javascript" type="text/javascript" src="actiniccore.js<actinic:block if="%3cactinic%3avariable%20name%3d%22ECDayno%22%20%2f%3e%20%21%3d%20%22%22" >?DAYNO=<actinic:variable name="ECDayno" /></actinic:block>"></script>
           <script language="javascript" type="text/javascript" src="actinicextras.js<actinic:block if="%3cactinic%3avariable%20name%3d%22ECDayno%22%20%2f%3e%20%21%3d%20%22%22" >?DAYNO=<actinic:variable name="ECDayno" /></actinic:block>"></script>
           <actinic:block if="%3cactinic%3avariable%20name%3d%22RecentlyViewedListIsEnabled%22%20%2f%3e%20%3d%3d%20TRUE" >
        			<actinic:variable name="RecentProductsConfiguration" />
        	      <script language="javascript" type="text/javascript" src="recentproductssupport.js"></script>
           </actinic:block>
        
        	<actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%21%3d%20%22Contact%20Us%22" >
              <actinic:variable value="Script for Blocking Unregistered Customers" name="UnregCustomerMessage" if="%3cactinic%3avariable%20name%3d%22UnregCustomersAreNotAllowed%22%20%2f%3e%20%3d%3d%20FALSE" selectable="false" />
           </actinic:block>
        
           <!-- Placeholder of cookie checking javascript code. Do not remove it! -->
           <Actinic:COOKIECHECK />
        
           <script language="javascript" type="text/javascript">
              <!-- 
              saveReferrer();
              // -->
           </script>
        
        	<actinic:block if="%28%28%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%27PSP%20Bounce%20Page%27%29%20AND%20%28%3cactinic%3avariable%20name%3d%22IsPSPTestMode%22%20%2f%3e%20%3d%3d%20false%29%29%20OR%0d%28%28%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%27SSL%20Bounce%20Page%27%29%20AND%20%28%3cactinic%3avariable%20name%3d%22IsSharedSSLForTestOnly%22%20%2f%3e%20%20%3d%3d%20false%29%29" >
        		<script language="JavaScript" type="text/javascript">
        		<!--
        		function onLoad()
        		{
        		document.formOCC.submit();
        		}
        		// -->
        		</script>
        	</actinic:block>
        	
        	<actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%22Checkout%20Page%200%22%20%7c%7c%20%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%22Add%20To%20Cart%20Confirmation%22" >
        		<actinic:variable name="Javascript Country State Maps" selectable="false" />	
        	</actinic:block>
        	
        	<actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%22Section%22" >
        <actinic:variable name="JavascriptSectionStockQuery" selectable="false" />
        </actinic:block>
        <actinic:variable value="Google Analytics Tracking Code Split SSL" name="GoogleAnalyticsMarkup" selectable="false" />

        more specifically this bit

        Code:
        	<actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%22Section%22" >
        <actinic:variable name="JavascriptSectionStockQuery" selectable="false" />
        </actinic:block>
        Actinic support recommended removing the blockif if I wanted to use the stock feature in extended info, which like I say does work with either actual stock level or just instock, but gives errors that then disappear, with this code (blockif removed)

        Code:
        <actinic:variable name="JavascriptSectionStockQuery" selectable="false" />
        This is the contents of the blockif
        Code:
        <actinic:variable name="PageType" /> == "Section"

        Even stranger is I have 441 html pages html pages and only get 29 coding errors which after clicking OK, then disappear.

        The upload stops here
        Click image for larger version

Name:	Screen shot 2011-03-20 at 19.17.25.png
Views:	1
Size:	29.1 KB
ID:	543087

        Then I click ok and see this message
        Click image for larger version

Name:	Screen shot 2011-03-20 at 19.17.33.png
Views:	1
Size:	16.1 KB
ID:	543088

        which then disappears.

        If I put the blockif statement back in the javascript function then no error at upload, but the stock doesn't work on extended info pages.


        I don't know why there needs to be a Pagetype == section here, can I not remove it or add to?


        This is my javascript section stock query layout
        Code:
        	<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" > 
        		<script language="javascript" type="text/javascript">
        		function displayStock()
        			{
        			var sProdRefs = ""; 
        			var sStockList = ""; 
        			<actinic:block if="%3cactinic%3avariable%20name%3d%22IsPreviewMode%22%20%2f%3e" >
        				sProdRefs = "<actinic:variable name="RTSProductsInThisSection" selectable="false" />";
        				sStockList = "<actinic:variable name="RTSStocksInThisSection" selectable="false" />";
        			</actinic:block>
        			<actinic:block if="%3cactinic%3avariable%20name%3d%22IsHostMode%22%20%2f%3e">
        				getSectionStock('<actinic:variable name="StockScriptCGIURL" selectable="false" />', '<actinic:variable name="SectionID" selectable="false" />', sProdRefs, sStockList, '<actinic:variable name="ShopID" selectable="false" />');	
        			</actinic:block>
        			<actinic:block if="%21%3cactinic%3avariable%20name%3d%22IsHostMode%22%20%2f%3e" >
        				getSectionStock('<actinic:variable name="StockScriptCGIURL" selectable="false" />', '<actinic:variable name="SectionID" selectable="false" />', sProdRefs, sStockList, '');	
        			</actinic:block>
        			}
        		
        		AttachEvent(window, "load", displayStock);
        		</script>
        	</actinic:block>

        Comment


          #5
          O.K. I think I've worked out what's happening and how to fix it.

          You've modified a layout that's used on every type of page. By taking out the blockif the stock code will be included on every type of page. So the 29 errors are from the non-Section pages (Brochure, Search, Cart, etc) where Section related variables are invalid.

          To fix this:-

          1) Restore layout Standard Javascript Header Functions to its factory default. This will prevent the errors you're seeing but will not include the code you need on your Extended Info pages (due to that PageType =="Section").

          2) In your Extended Info layout(s), just above the </head> tag, put the line:
          Code:
          <actinic:variable name="JavascriptSectionStockQuery" selectable="false" />
          Which will provide the stock functionality to your Extended Info pages. There's no need for a blockif as Extended Info pages only occur within Sections.
          Norman - www.drillpine.biz
          Edinburgh, U K / Bitez, Turkey

          Comment


            #6
            Thanks for the assistance, that didn't work as it should have Norman, but I think I have figured it out with your guidance. I think the reason why it didn't work is I am using the same layout as the sections as the extended info pages (so they look the same) which required the javascriptfunctions

            I was using the full javascript variable on the extended info page like this

            Code:
            <actinic:variable name="JavaScriptFunctions" />
            which includes this code

            Code:
               <script language="javascript" type="text/javascript" src="actiniccore.js<actinic:block if="%3cactinic%3avariable%20name%3d%22ECDayno%22%20%2f%3e%20%21%3d%20%22%22" >?DAYNO=<actinic:variable name="ECDayno" /></actinic:block>"></script>
               <script language="javascript" type="text/javascript" src="actinicextras.js<actinic:block if="%3cactinic%3avariable%20name%3d%22ECDayno%22%20%2f%3e%20%21%3d%20%22%22" >?DAYNO=<actinic:variable name="ECDayno" /></actinic:block>"></script>
               <actinic:block if="%3cactinic%3avariable%20name%3d%22RecentlyViewedListIsEnabled%22%20%2f%3e%20%3d%3d%20TRUE" >
            			<actinic:variable name="RecentProductsConfiguration" />
            	      <script language="javascript" type="text/javascript" src="recentproductssupport.js"></script>
               </actinic:block>
            
            	<actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%21%3d%20%22Contact%20Us%22" >
                  <actinic:variable value="Script for Blocking Unregistered Customers" name="UnregCustomerMessage" if="%3cactinic%3avariable%20name%3d%22UnregCustomersAreNotAllowed%22%20%2f%3e%20%3d%3d%20FALSE" selectable="false" />
               </actinic:block>
            
               <!-- Placeholder of cookie checking javascript code. Do not remove it! -->
               <Actinic:COOKIECHECK />
            
               <script language="javascript" type="text/javascript">
                  <!-- 
                  saveReferrer();
                  // -->
               </script>
            
            	<actinic:block if="%28%28%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%27PSP%20Bounce%20Page%27%29%20AND%20%28%3cactinic%3avariable%20name%3d%22IsPSPTestMode%22%20%2f%3e%20%3d%3d%20false%29%29%20OR%0d%28%28%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%27SSL%20Bounce%20Page%27%29%20AND%20%28%3cactinic%3avariable%20name%3d%22IsSharedSSLForTestOnly%22%20%2f%3e%20%20%3d%3d%20false%29%29" >
            		<script language="JavaScript" type="text/javascript">
            		<!--
            		function onLoad()
            		{
            		document.formOCC.submit();
            		}
            		// -->
            		</script>
            	</actinic:block>
            	
            	<actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%22Checkout%20Page%200%22%20%7c%7c%20%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%22Add%20To%20Cart%20Confirmation%22" >
            		<actinic:variable name="Javascript Country State Maps" selectable="false" />	
            	</actinic:block>
            	
            	<actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%22Section%22" >
            <actinic:variable name="JavascriptSectionStockQuery" selectable="false" />
            </actinic:block>
            <actinic:variable value="Google Analytics Tracking Code Split SSL" name="GoogleAnalyticsMarkup" selectable="false" />

            This didn't work even with the blockif variable removed from here

            Code:
            <actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%22Section%22" >
            <actinic:variable name="JavascriptSectionStockQuery" selectable="false" />
            </actinic:block>

            So I moved this code out of the javascriptfunctions variable and used it separately in the head on both sections and extended pages which would appear to work fine (section pages I still use the blockif) although I am still testing this to make sure it works correctly at the moment.

            So looking at it you were correct Norman (as usual) but maybe actinic should split the javascriptfunctions to allow others easier use of stock control on extended info pages that use the javascript functions?

            Infact would it not be a good idea, to have a choice of using the section design on extended info pages, instead of treating it just like a popup or just name and info etc..
            That way you could use extended info pages as a true SPP, would that make sense?

            Comment


              #7
              If using a common overall layout, you could also try using the Condition:

              (PageType == "Section") OR (PageType == '')

              As the first bit detects the Section pages and the second the Extended Info ones. I'm assuming that PageType has a valid value for everything but the Extended Info pages.
              Norman - www.drillpine.biz
              Edinburgh, U K / Bitez, Turkey

              Comment


                #8
                Thanks, I will give that a try, it does seem to be working ok at the moment.

                Comment

                Working...
                X