Announcement

Collapse
No announcement yet.

SellerDeck Hosting Traffic

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

    #16
    Originally posted by NormanRouxel View Post
    All those JS files add up to a decent amount - especially if they being reloaded on every page view. And this is probably what SelleDeck has been set up to do!

    SellerDeck adds a query string (I've marked it in red below) to some JavaScript files. E.g. from your live site's home page:
    Code:
    <script language="javascript" type="text/javascript" src="acatalog/actiniccore.js?DAYNO=OFLD"></script>
    This is preventing browsers from cacheing such files.

    Since these files won't change unless you update SellerDeck to a new version, you could remove the query string stuff.

    Go to Design / Librtary / Layouts ./ JavaScript Header Functions.
    Right-click Standard Javascript Header Functions and choose Copy to make a backup.
    Then edit the original Standard Javascript Header Functions.
    Delete all:
    Code:
    <actinic:block if="%3cactinic%3avariable%20name%3d%22ECDayno%22%20%2f%3e%20%21%3d%20%22%22" >?DAYNO=<actinic:variable name="ECDayno" selectable="false" /></actinic:block>
    I have just tried to change the JavaScript Header function. I get a series of JavaScript errors once I make the change.

    the old code was:
    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>
         <script language="javascript" type="text/javascript" src="actinicsearch.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>
    and the new code is:
    Code:
    <script language="javascript" type="text/javascript" src="actiniccore.js"></script>
       <script language="javascript" type="text/javascript" src="actinicextras.js"></script>
         <script language="javascript" type="text/javascript" src="actinicsearch.js"></script>
    With the old code I get no JavaScript errors (looking in design view within Sellerdeck). When I change to the new code it says:

    Syntax error line 88
    nTrimListTo is undefined - Line 196
    nMaxRecent is undefined line 324 (2 places)

    If I revert back to the old version the errors go away.

    Any ideas on what might be happening?

    Separately based on the SellerDeck feedback on cashing is it possible someone could let me have the change I need to make to the httpaccess file. I am a little nervous on making the change unaided.

    Many thanks

    Tony
    Tony
    www.secretgardenquilting.co.uk

    Comment


      #17
      I haven't done anything in this area but shouldn't there be an 'acatalog/' in the src.

      i.e. src="acatalog/actiniccore.js" etc.

      TBH I can never remember which files sellerdeck automatically inserts the acatalog/ for. I can half remember that javascript files might be the exception.
      -----------------------------------------

      First Tackle - Fly Fishing and Game Angling

      -----------------------------------------

      Comment


        #18
        SellerDeck automatically puts in the "acatalog/" (on the Brochure Home Page only) for any files that are in the site folder. JavaScript files will work OK.
        Norman - www.drillpine.biz
        Edinburgh, U K / Bitez, Turkey

        Comment


          #19
          Thanks both. I am still at a loss to know why taking the
          Code:
          <actinic:block if="%3cactinic%3avariable%20name%3d%22ECDayno%22%20%2f%3e%20%21%3d%20%22%22" >?DAYNO=<actinic:variable name="ECDayno" selectable="false" /></actinic:block>
          seems to break the JavaScripts. If i put it back in they work fine again.
          Tony
          www.secretgardenquilting.co.uk

          Comment


            #20
            It doesn't break the JS here. No errors in the Design mode on a clean 16.0.3 demo site.

            Make sure you can see the files mentioned above in your Site folder and that they aren't empty.

            It may be worth posting the first 50 lines of Standard JavaScript Header Functions so we can see what you are using.
            Norman - www.drillpine.biz
            Edinburgh, U K / Bitez, Turkey

            Comment


              #21
              Thanks Norman.

              I should have said I am currently on 12.05. We are trying to move to 16.03 but have other troubles. I posted on the 16 site for this post as it was hosting/web traffic related. Sorry about any confusion.

              My JavaScript header file is:

              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>
                   <script language="javascript" type="text/javascript" src="actinicsearch.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 type="text/javascript" src="CustomCode1.js" ></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">
                    <!-- 
              		      <actinic:block if="%3cactinic%3avariable%20name%3d%22IsHostMode%22%20%2f%3e">var pg_sShopID = '<actinic:variable name="ShopID" />';</actinic:block>
              		var pg_sSearchScript = "<actinic:variable name="OnlineScriptURL" value="Search Script URL" />";
              		var pg_sCustomerAccountsCGIURL = '<actinic:variable name="CustomerAccountsCGIURL" />';
              		<actinic:block if="%3cactinic%3avariable%20name%3d%22SearchUseProductThumbnail%22%20%2f%3e" >		
              		var pg_nProductImageWidth = parseInt("0<actinic:variable name="SearchProductThumbWidth" />", 10);
              		var pg_nProductImageHeight = parseInt("0<actinic:variable name="SearchProductThumbHeight" />", 10);
              		</actinic:block>
              		var pg_bEnableFilterCount = parseInt("0<actinic:variable name="IsSearchFilterCountsEnabled" />", 10);
              		var pg_sDefaultSortOrder = "<actinic:variable name="SearchSortDefaultOrder" />";
              		var pg_sSortOrdersPrependedToProdRefs = "<actinic:variable name="SearchSortOrder" />";
              		var pg_sSearchValidWordCharacters = '<actinic:variable name="SearchValidWordCharacters" />';
              		<actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%27Section%27" >
              		<actinic:block if="%3cactinic%3avariable%20name%3d%22IsFilteringEnabled%22%20%2f%3e" >
              		var pg_arrayProperties = [<actinic:variable name="FilterPropertyListArray" />];			// properties	
              		var pg_arrayPriceBandValues = [<actinic:variable name="FilterPriceBandListArray" />];	// price band values
              		var pg_arrayPriceBandRange = [<actinic:variable name="FilterPriceBandRange" />];		// price band ranges
              		var pg_arrayPropertyName = [<actinic:variable name="FilterPropertyNameListArray" />];	// property names
              		var pg_arrayDefaultProperties = [<actinic:variable name="FilterPropertyDefaultListArray" />];	// default choice list
              		var pg_bHideChoiceWithZeroResults = <actinic:variable name="HideChoiceWithZeroResults" />;	// hide choice with zero results
               		var pg_arrayFilterSections = [<actinic:variable name="FilterSectionListArray" />];	// filter section list
              		var pg_bSearchBySubSection = <actinic:variable name="IsSearchBySubSectionsEnabled" />;	// search by sections
              		var pg_nCurrentFilterSectionID = <actinic:variable name="SectionID" />;  // current filter section id
              		var pg_bFilterDefaultView = <actinic:variable name="IsFilteringPageAsDefaultView" />;	// filter as default view?
              		var pg_nSearchResultsLimit = parseInt("0<actinic:variable name="SectionPaginationProductsPerPage" />", 10);
              		var pg_bShowFullPageInPagination = <actinic:variable name="SectionPaginationIncludeFullPage" />;
              		var pg_bFilteringCacheEnabled = <actinic:variable name="FilteringCacheEnabled" />;
              		var pg_nUploadReferenceNumber = <actinic:variable name="UploadReferenceNumber" />;
              		</actinic:block>
              		</actinic:block>
              <actinic:block if="%3cactinic%3avariable%20name%3d%22IsSSLUsedForEssentialPages%22%20%2f%3e">
              		if (document.location.href.match(/#logout$/))
              			{
              			SetBusinessCookies();
              			}
              		</actinic:block>
                    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" >
              		<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%20%7c%7c%20%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%22My%20Account%20Page%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" />
              		<script type="text/javascript">
              			setCookie('LAST_SECTION_URL', document.location.href);
              		</script>
              	</actinic:block>
              	
              	<actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%22Product%20Page%22" >
              		<actinic:variable name="JavascriptProductStockQuery" selectable="false" />
              		<script type="text/javascript">
              			AttachEvent(window, "load", ShowBackLink);
              		</script>
              	</actinic:block>
              	
              	<actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%22My%20Account%20Page%22%20AND%20%21%3cactinic%3avariable%20name%3d%22IsPreviewMode%22%20%2f%3e" >
              		<script type="text/javascript">
              			if (!IsLoggedIn() && GetScriptPrefix() == 'ma')
              				{
              				document.location.href = '<actinic:variable name="LoginPageURL" selectable="false" />';
              				}
              		</script>	
              	</actinic:block>
              	
              	<actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%22Product%20Page%22%20or%20%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%22Section%22" >
              		<actinic:variable name="DynamicChoicesPrices" selectable="false" />
              	</actinic:block>
              <actinic:variable value="Google Analytics Tracking Code Split SSL" name="GoogleAnalyticsMarkup" selectable="false" />
              
              <actinic:variable name="NivoSlider" value="Nivo Slider Setup" />
              
              <actinic:variable name="SingleImageLightbox" value="Single Image Lightbox Support" />
              Tony
              www.secretgardenquilting.co.uk

              Comment


                #22
                Syntax error line 88
                nTrimListTo is undefined - Line 196
                nMaxRecent is undefined line 324 (2 places)
                These errors are nothing to do with actiniccore.js, actinicextras.js or actinicsearch.js.
                These errors come from this code:
                Code:
                   <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>
                Which I note is just after the lines you've been tinkering with. Look for typo's.

                Also, Standard Javascript Header Functions in SD V12 starts with (missing in yours):
                Code:
                   <script language="javascript" type="text/javascript" src="jquery-1.11.1.min.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>
                Luckily you have some of my add-ons and they load an earlier version of jQuery if it's not found - thus partially repairing the damage.
                Norman - www.drillpine.biz
                Edinburgh, U K / Bitez, Turkey

                Comment


                  #23
                  Thank you Norman.

                  I have gone through the code and found that if I change 3 lines then the errors go away:

                  In RecentProductsConfiguration:

                  Code:
                  <script language="javascript" type="text/javascript">
                  // START Configuration variables - alter with care
                  var nMaxRecent			= 12;		// maximum number of items to remember
                  var nTrimListTo		= <actinic:variable name="RecentProductsShowCount" />;		// number of items to show
                  var nScrollBy			= <actinic:variable name="RecentProductsShowCount" />;		// number of items to scroll by
                  var bDisplayReversed	= true;		// true for last viewed displayed on left
                  var nKeepRecentHours	= 12;		// number of hours to remember recent products
                  </script>
                  If I set nTrimListTo and nScrollBy to specific values rather then actinic variables.

                  and also Inside JavascriptProductStockQuery:

                  Code:
                  var nAssocProdRefSID = 	'<actinic:block type="ComponentList" ><actinic:variable name="ComponentCount" /></actinic:block>' ? <actinic:variable name="SectionID" /> : 0;
                  If I comment this line out.

                  By doing both I get rid of the errors. I was wondering if the errors are due to data only being valid on the server but not in preview. If this was the case it is strange that everyone who removes "?DAYNO=OFLD" doesn't get the errors?

                  Any thoughts would be very much appreciated as I am at a loss as to what to do next.

                  Many thanks Tony
                  Tony
                  www.secretgardenquilting.co.uk

                  Comment


                    #24
                    Hi Again. I also noticed that the is an additional
                    ">
                    at the end of the line provided for adding jquery-1.11.1.min.js :

                    Code:
                    <script language="javascript" type="text/javascript" src="jquery-1.11.1.min.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>
                    It does not appear at the end of the other lines. I am not sure why it would be needed?
                    Tony
                    www.secretgardenquilting.co.uk

                    Comment


                      #25
                      Well spotted. I just checked on an out-of-the-box SD V12 site and it's a SellerDeck typo. Line should be:
                      Code:
                       <script language="javascript" type="text/javascript" src="jquery-1.11.1.min.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>
                      Luckily it's a benign bug and doesn't show up on the generated pages or cause a JavaScript error.

                      It's fixed in SD V14 onwards.
                      Norman - www.drillpine.biz
                      Edinburgh, U K / Bitez, Turkey

                      Comment


                        #26
                        Hi Norman Thanks for the clarification.

                        Sorry to trouble you. I was wondering whether you had any thoughts on my previous post regarding the errors and my fix (well i guess not fix!).

                        Many thanks

                        Tony
                        Tony
                        www.secretgardenquilting.co.uk

                        Comment


                          #27
                          Hi Tony. It's not usual to enable browser cacheing as standard, because it's quite site specific. What works well for one site may not do so for another. AIUI the optimal setting depends on a number of a factors, like the average size of your pages and images, and how often you refresh the content. TBH I don't know a great deal about the server side of things, so I can't tell you any more than that.
                          Bruce Townsend
                          Ecommerce Product Manager
                          Sellerdeck Ecommerce Solutions

                          Comment


                            #28
                            Hi Bruce,

                            Many thanks. For now I created a .htaccess file and put in it :

                            Code:
                            # 1 Month for most static assets
                            <filesMatch ".(jpg|jpeg|png|gif|ico)$">
                            Header set Cache-Control "max-age=2592000, public"
                            </filesMatch>
                            # One month for css and js
                            <filesMatch ".(css|js)$">
                            Header set Cache-Control "max-age=2628000, public"
                            </filesMatch>
                            Hopefully I will see a reduction.

                            Does SellerDeck Hosting support gzip compression or equivalent?

                            Tony
                            Tony
                            www.secretgardenquilting.co.uk

                            Comment


                              #29
                              Try changing:
                              Code:
                              var nTrimListTo		= <actinic:variable name="RecentProductsShowCount" />;		// number of items to show
                              var nScrollBy			= <actinic:variable name="RecentProductsShowCount" />;		// number of items to scroll by
                              To:
                              Code:
                              var nTrimListTo		= <actinic:variable name="RecentProductsShowCount" selectable="false" />;		// number of items to show
                              var nScrollBy			= <actinic:variable name="RecentProductsShowCount" selectable="false" />;		// number of items to scroll by
                              Norman - www.drillpine.biz
                              Edinburgh, U K / Bitez, Turkey

                              Comment


                                #30
                                Hi Norman. Thank you so much. That sorted 2 out of the 3 errors. The last one seems to be the code in JavaScript Product Stock Query:

                                Code:
                                	var nAssocProdRefSID = 	'<actinic:block type="ComponentList" ><actinic:variable name="ComponentCount" /></actinic:block>' ? <actinic:variable name="SectionID" /> : 0;
                                Any thoughts would be greatly appreciated.

                                Many Thanks

                                Tony
                                Tony
                                www.secretgardenquilting.co.uk

                                Comment

                                Working...
                                X