Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • René 327 posts 852 karma points
    Feb 02, 2014 @ 00:15
    René
    0

    Teacommerce - Bootstrap.js - Contour

    Hi 

    Umbraco v6.1.6 (Assembly version: 1.0.5021.24867)

    Tea Commerce 2.2.3
    I´m trying to get it to work, but i ran into problems about the javascripts files. 
    I have teacommerce and Contour installed. 
    I have these js scripts
    <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script> 
    
    <script src="js/bootstrap.min.js" type="text/javascript"></script>
    
    <script src="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.22/jquery-ui.js"></script>  
        <script src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.10.0/jquery.validate.min.js" type="text/javascript"></script>    
        <script src="http://ajax.aspnetcdn.com/ajax/mvc/3.0/jquery.validate.unobtrusive.min.js" type="text/javascript"></script> 
    
        <script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery.form/3.32/jquery.form.min.js"></script>
        <script type="text/javascript" src="/scripts/tea-commerce.min.js"></script>
        <script type="text/javascript" src="/scripts/ecommerce.js"></script>
        <script type="text/javascript" src="/scripts/default.js"></script>
    
    I cant get it to work as i expected, the bootstrap.js and the jquery.ui.js for the contour form mess up. 
    Either i can get it to work where the bootstrap.js works, (There is a slider and popupboks) these works when i place the order, like this.  
    <script src="js/bootstrap.min.js" type="text/javascript"></script>
    <script src="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.22/jquery-ui.js"></script>
    

    But then i cant get teacommerce to work with the ajax update and gets this error from the Console

    1. Uncaught TypeError: Cannot call method 'setDefaults' of undefined contourform.js:5
    1. Uncaught TypeError: Cannot call method 'setDefaults' of undefined contourform.js:5
    body.scrollTop is deprecated in strict mode. Please use 'documentElement.scrollTop' if in strict mode and 'body.scrollTop' only if in quirks mode. jquery.prettyPhoto.js:699
    body.scrollLeft is deprecated in strict mode. Please use 'documentElement.scrollLeft' if in strict mode and 'body.scrollLeft' only if in quirks mode. jquery.prettyPhoto.js:699
    1. Uncaught ReferenceError: _ is not defined custom.js:337
    event.returnValue is deprecated. Please use the standard event.preventDefault() instead. jquery.min.js:14
    1. XHR finished loading: "https://gw030.lphbs.com/0/lpg/msg".

    IF i place the js scripts in this order. 

    <script src="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.22/jquery-ui.js"></script>  
    <script src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.10.0/jquery.validate.min.js" type="text/javascript"></script>    
    <script src="http://ajax.aspnetcdn.com/ajax/mvc/3.0/jquery.validate.unobtrusive.min.js" type="text/javascript"></script> 
    
    <script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery.form/3.32/jquery.form.min.js"></script>
    <script type="text/javascript" src="/scripts/tea-commerce.min.js"></script>
    <script type="text/javascript" src="/scripts/ecommerce.js"></script>
    <script type="text/javascript" src="/scripts/default.js"></script>
    
    <script src="js/bootstrap.min.js" type="text/javascript"></script>
    

    Ii get this from the Console in Chrome

    XHR finished loading: "http://domain.dk/base/TC/FormPost.aspx". jquery.js:8475
    XHR finished loading: "http://domain.dk/base/TC/FormPost.aspx". jquery.js:8475
    XHR finished loading: "http://domain.dk/base/TC/FormPost.aspx". 

    This is as it should be, except now it add to items to the basket every time.

    This is a confusing (Maybe) description for my problem. 

    I have tryed almoast every combination of the order of the scripts.

    If it´s not clear what the problem is i can try to explain more. 

    René

  • René 327 posts 852 karma points
    Feb 03, 2014 @ 13:10
    René
    0

    Hi 

    I forgot that the solution is based on the teacommerce demo. 

    René

  • Anders Burla 2560 posts 8256 karma points
    Feb 04, 2014 @ 16:24
    Anders Burla
    0

    Hi Rene

    That sounds like a bit of a weird case. So if you have a vanilla Umbraco/Tea Commerce then your javascript works? If you have not tested that - try and do that first. We have sites that have Contour and Tea Commerce without any problems. So it should be able to get it working.

    Kind regards
    Anders

Please Sign in or register to post replies

Write your reply to:

Draft