Welcome to Vortx Community Forum, where you can ask questions and receive answers from the staff at Vortx and other members of the community.

If you had a user account on our previous forums website, you will need to register a new account here.

Learn more about...

AspDotNetStorefront
DotFeed

Java conflict with XML Package - product.TabbedUI.xml.config


We use the XML Package product.TabbedUI.xml.config for several products that have different pricing and weights. I keep getting a Java error:

'Unable to get property 'fing' of undefined or null reference

The drop down changes fine but the price does not load and only the default will get added to the cart despite what Option/Variant is chosen on the product page.

Error lIne in XML Package:

$('#variant-info-wrap').find('.variant-info').each(function(index, element)

The whole XML Package Code block:

<!-- This is the main template for this package.  It runs once regardless of how this product is configured. -->
   <xsl:template match="/">

    <div class="product-page" itemscope="" itemtype="{$schemaProductURL}">
     <xsl:apply-templates select="/root/Products/Product[isdefault = 1]" />
    </div>
    <xsl:if test="count(/root/Products/Product) &gt; 1">
     <!--Ensure that jQuery is available-->
     <script type="text/javascript">
      if(typeof jQuery !== 'function') {
      document.write(unescape("%3Cscript src='//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js' type='text/javascript'%3E%3C/script%3E"));
      }
     </script>
     <!-- Logic to keep the variant information on page updated with the chosen variant -->
     <script type="text/javascript">
      function updateVariantInfo(variantId){
      if(!variantId > 0){
      variantId = <xsl:value-of select="$DefaultVariantID" />;
      }
      var currentVariantInfoID = 'variant-info-' + variantId;
      $('#variant-info-wrap').find('.variant-info').each(function(index, element){
      if($(element).attr('id') == currentVariantInfoID){
      $(element).show();
      }
      else{
      $(element).hide();
      }
      });
      }

      //fix an issue with firefox hanging onto the selection
      if ($('#variantSelector').val()){
      updateVariantInfo($('#variantSelector').val());
      }
     </script>
    </xsl:if>
   </xsl:template>

Now the interesting thing is if I delete this code from the Template.master the variant drop down works as it is suppossed to:

<%-- jQuery is required in versions 9.4 and higher --%>
 <script src="jscripts/jquery.min.js" type="text/javascript"></script>

Obviously, all other JS on the site breaks down so not a very good solution.

Has anyone else experienced this? Can you identify the JS conflict and help identify a solution?

Thanks in advance.

asked Sep 14, 2015 in MultiStore by tuffy (290 points)

1 Answer

0 votes
Do you have a page that is currently having this JavaScript issue that we could take a look at?  It's pretty tough without the whole page's context.  I poked around the site a little and didn't see any.
answered Sep 14, 2015 by Vortx ScottS (13,500 points)
I'm currently running the upgrade on my localhost. I haven't wanted to push this to production until I get the kinks worked out. I can copy code for the pages in question if that will help.
...