Wordpress plugin conflicting with my theme - need help

Discussion in 'JavaScript' started by tyankee, Jul 14, 2011.

  1. #1
    i just installed the 'creativepress' theme at my WHMCS Themes site - http://www.skinzee.com and i really like it but it just so happens that the slider images at the top of the page do not work with the main plugin i am using - wp-cart-for-digital-products. i need to use this plugin for my shopping cart products and i think some java in that plugin is conflicting with the theme java so the slider is not working.. when i deactivate the plugin, the slider works fine.. but since i like the theme and like the shopping cart plugin, can someone help me resolve the conflict so they both work together.
     
    tyankee, Jul 14, 2011 IP
  2. spletnisistemi

    spletnisistemi Peon

    Messages:
    50
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Look at firebug console. It says:
    $jx is not defined
    [Break On This Error] $jx(document).ready(function(){
     
    spletnisistemi, Jul 15, 2011 IP
  3. tyankee

    tyankee Well-Known Member

    Messages:
    1,023
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    150
    #3
    thanks but my level of java understanding is about a zero.. i know html and php but not java.. could you help me with this?

    thanks
     
    tyankee, Jul 15, 2011 IP
  4. Cash Nebula

    Cash Nebula Peon

    Messages:
    1,197
    Likes Received:
    67
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Think it's missing the line that creates the $jx alias.
    $jx = jQuery.noConflict();

    This is how the script should look:
    
    <script type="text/javascript">
    [COLOR="red"]$jx = jQuery.noConflict();[/COLOR]
    $jx(document).ready(function(){
     $jx(".mygallery").jCarouselLite({
     btnNext: ".next",
            btnPrev: ".prev",
    		easing: "backout",
    		vertical: true,
    	    speed: 1000
        });
     $jx(".mytext").jCarouselLite({
             btnNext: ".next",
            btnPrev: ".prev",
    		visible: 1,
    		easing: "backout",
    	    speed: 1000
        });	
    });
    </script>
    
    Code (markup):
     
    Cash Nebula, Jul 15, 2011 IP
  5. tyankee

    tyankee Well-Known Member

    Messages:
    1,023
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    150
    #5


    thanks for replying.. i changed the coding to the one you have but it still doesn't work.. :(
     
    tyankee, Jul 16, 2011 IP
  6. Cash Nebula

    Cash Nebula Peon

    Messages:
    1,197
    Likes Received:
    67
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Oh! Now I see the problem. There are two versions of jQuery in there, which always causes me problems. Try removing the old version.
    
    <script type="text/javascript" src="http://www.skinzee.com/wp-content/themes/creativepress/js/jquery-1.3.2.min.js"></script>
    
    Code (markup):
    I posted something earlier about it needing jCarousel. If you get posts via email, just ignore that.
    That is the right script but the theme authors have renamed it for some reason. :rolleyes:
     
    Last edited: Jul 16, 2011
    Cash Nebula, Jul 16, 2011 IP
  7. tyankee

    tyankee Well-Known Member

    Messages:
    1,023
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    150
    #7
    commented it out but still not working - check it out..
     
    tyankee, Jul 16, 2011 IP
  8. Cash Nebula

    Cash Nebula Peon

    Messages:
    1,197
    Likes Received:
    67
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Almost there :)

    The eStore plugin tells Wordpress to add jQuery to the head section, but Wordpress is adding it below the slider scripts.
    jQuery needs to be first so move these lines down until they are just above the closing head tag.
    Hopefully, Wordpress will add jQuery above them and the slider will work. If that fails, try moving them to just above the body closing tag.

    
    <script type="text/javascript" src="http://www.skinzee.com/wp-content/themes/creativepress/js/jquery.easing.1.1.js"></script>
    <script type="text/javascript" src="http://www.skinzee.com/wp-content/themes/creativepress/js/jcarousel.js"></script>
    </head>
    
    Code (markup):
     
    Cash Nebula, Jul 17, 2011 IP
  9. tyankee

    tyankee Well-Known Member

    Messages:
    1,023
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    150
    #9


    darn, i thought we had it.. i made that change and the slider works perfectly BUT now the 'lightbox' on the images is not working at all.. go to any product - e.g. - http://www.skinzee.com/whmcs/whmcs-urban-theme-web-2-0/ - and click on the image. it is supposed to bring up an enlarged image and also have the 'next' button that allows you to click through to see all the images one by one.. but when you click on the image, nothing but a 'clock' shows up..
     
    tyankee, Jul 17, 2011 IP
  10. Cash Nebula

    Cash Nebula Peon

    Messages:
    1,197
    Likes Received:
    67
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Not too sure about this one. I think the lightbox is trying to use an easing method not supported by jQuery.
    Try adding the core jQuery UI in the head section.
    
    [COLOR="red"]<?php wp_enqueue_script("jquery-ui-core"); ?>[/COLOR]
    <script type="text/javascript" src="http://www.skinzee.com/wp-content/themes/creativepress/js/jquery.easing.1.1.js"></script>
    <script type="text/javascript" src="http://www.skinzee.com/wp-content/themes/creativepress/js/jcarousel.js"></script>
    </head> 
    
    Code (markup):
     
    Cash Nebula, Jul 17, 2011 IP
  11. tyankee

    tyankee Well-Known Member

    Messages:
    1,023
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    150
    #11

    darn, that didn't work either..
     
    tyankee, Jul 17, 2011 IP
  12. Cash Nebula

    Cash Nebula Peon

    Messages:
    1,197
    Likes Received:
    67
    Best Answers:
    0
    Trophy Points:
    0
    #12
    Is it still there? I don't see the UI library.

    Try this instead! Shouldn't do this but I'm out of ideas.
     
    [COLOR="red"]<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js"></script>[/COLOR]
    <script type="text/javascript" src="http://www.skinzee.com/wp-content/themes/creativepress/js/jquery.easing.1.1.js"></script>
    <script type="text/javascript" src="http://www.skinzee.com/wp-content/themes/creativepress/js/jcarousel.js"></script>
    </head>
    
    Code (markup):
     
    Cash Nebula, Jul 18, 2011 IP
  13. tyankee

    tyankee Well-Known Member

    Messages:
    1,023
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    150
    #13

    nope didn't work either..
     
    tyankee, Jul 18, 2011 IP
  14. Cash Nebula

    Cash Nebula Peon

    Messages:
    1,197
    Likes Received:
    67
    Best Answers:
    0
    Trophy Points:
    0
    #14
    Please ignore my last post if you got it via email.
     
    Cash Nebula, Jul 18, 2011 IP
  15. tyankee

    tyankee Well-Known Member

    Messages:
    1,023
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    150
    #15
    YAY - we got it... it didn't work when i put the php coding into the 'head' section but when i moved it into the main-index-template just after the header coding, it now works for both the slider and the lightbox effect.. thanks for working this through.. you've got my support for future work when i need it.. i own over 100 websites and always need some help.. where are you located and do you have any IM's.. PM with that info please.
     
    tyankee, Jul 18, 2011 IP
  16. Cash Nebula

    Cash Nebula Peon

    Messages:
    1,197
    Likes Received:
    67
    Best Answers:
    0
    Trophy Points:
    0
    #16
    Awesome! :D

    Thanks tyankee, I'll PM you with my details.
     
    Cash Nebula, Jul 19, 2011 IP