| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Remove or update Jquery | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
Remove or update Jquery
In the common/js folder is jquery.min.js v 1.11.0.
I am implementing some jquery that requires 1.11.2 and there is a conflict. Is there a way to remove the older version or update it?
__________________
X-cart v 5.2 |
|||||||
#2
|
|||||||||
|
|||||||||
Re: Remove or update Jquery
replace the call for jQuery in skin/your_skin/customer/service_js.tpl with the one you want - probably best to just insert jQuery from Google
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
#3
|
|||||||
|
|||||||
Re: Remove or update Jquery
When I add a call for the correct jquery in my module (which loads fine), the old version still loads in there.
__________________
X-cart v 5.2 |
|||||||
#4
|
|||||||||
|
|||||||||
Re: Remove or update Jquery
See my post above - the keyword is "replace"
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
#5
|
|||||||
|
|||||||
Re: Remove or update Jquery
Oh, well how do I do that?
__________________
X-cart v 5.2 |
|||||||
#6
|
|||||||||
|
|||||||||
Re: Remove or update Jquery
Oh sorry this is for XC5 - I didn't see it. What I said is for XC4.
For XC5 you will need to do the replacement in your module - basically read the js files, loops through them, unset the old and set the new jQuery file. If you just replace the files next update may restore it
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
#7
|
|||||||
|
|||||||
Re: Remove or update Jquery
Ok. Is this what I would do?
<?php namespace XLite\Module\MyID\MyModule\View; abstract class AView extends \XLite\View\AView implements \XLite\Base\IDecorator { protected function getCommonFiles() { $list = parent::getCommonFiles(); $key = array_search('js/jquery.min.js', $list); if($key) { unset($list[$key]); } } }
__________________
X-cart v 5.2 |
|||||||
#8
|
|||||||||
|
|||||||||
Re: Remove or update Jquery
I would use getJSFiles but yes something like that and add the new jquery after removing the stock one
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
|
|||
X-Cart forums © 2001-2020
|