How to change jQuery version in magento 1.9.3.4 - magento

I am new in magento and cms in general so my question is what are the steps to accomplish this task ? i have found solutions for newer version. Extension that i downloaded require jQuery > 1.8 and i found out that my actual version is 1.7.2.
Any help is appreciated.

First on your page press CTRL + U (if chrome), than CTRL + F. type jquery, find line where ..scrip... src="...jquery.1.7.2...> (you need jquery file, not jQuery plugin or smth.) this step for find name of jquery file, becouse it can be jQuery.min.1.7.2.js jQuery.1.7.2.js and etc...)
Copy file name
Open any IDE or smth. For load magento project files if you haven't it. Use function like Find in folder, and look for copied name. It should be in theme layouts folder or base layouts folder.
Download right jQuery version and put it where is old one.
Comment that line where xml loads old jQuery, and load new one in local.xml.
(or just replace in that xml, but it is bad practice, better make changes in local.xml)

Related

Joomla cannot unset mod_languages/css/template.css

Joomla 3.x
The following code is not working
unset($doc->_styleSheets[JURI::root(true).'/media/mod_languages/css/template.css']);
thank you
The code is correct and I tested it, it's working fine.
Possibly you are running it in a plugin event after the head is rendered, or you have cached the page and the code is not really running.
In either case, try to put it at the component level, clear cache, and it should work
Update
to identify the component: turn SEF off, and look at the URL it shows as option=com_componentname;
to identify the module, simply rename the modules folder, and update the site; if it works, it's a module.
For plugins, rename the plugins/system and plugins/content first, then drill down until you spot it.
Alternatively, but much slower, you can turn modules and plugins on and off from the backend, until you find the culprit.
A variation which I've used with success in the past:
unset($doc->_styleSheets[$this->baseurl.'/media/mod_languages/css/template.css']);
Update
Here's an alternate method using a module override which should work for you.
if it doesn't already exist, create a new directory titled html in your template's folder, ie: /templates/your-template/html/
inside this, create an new mod_languages folder, ie /templates/your-template/html/mod_languages/
copy the file from joomla-site-root/modules/mod_languages/tmp/default.php to the folder above, ie /templates/your-template/html/mod_languages/default.php
open this file with a text editor and around line 12 look for the line where JHtml is loading the mod_languages CSS, and comment it out.
// JHtml::_('stylesheet', 'mod_languages/template.css', array(), true);
That's it, hopefully, this will do the trick for you.
Overriding Joomla core output using this method is safe and you won't loose your work with future Joomla updates.
More info about Joomla overrides:
https://docs.joomla.org/How_to_override_the_output_from_the_Joomla!_core
Good luck!

Aurelia: Using KendoUI Core

I downloaded kendoui core from Telerik's website. Folder has a js directory with separate files for each widget. I want to integrate kendoui with systemJS in my Aurelia app(built on top of skeleton-navigation). I was able to do this with JQueryUI as follows:
--Created a "jquery-ui#1.11.4" folder containing the jqueryUI JavaScript lib in github folder in jspm_packages folder
--Created a file called "jquery-ui#1.11.4.js" that exports the lib above like so:
module.exports = require("github:github/jquery-ui#1.11.4/jquery-ui.js")
--Defined jqueryui in my config file: "jquery-ui": "github:github/jquery-ui#1.11.4"
Now, if I want to use any widget, like the datepicker, i do this:
import { datepicker } from 'jquery-ui';
How do I do this for kendoUI? I read somewhere that the "kendo.core.js" file contains all widgets but it seems too lightweight and using it alone didnt work. It also has a complementary .map file. What is it for?
UPDATE: As suggested in the answer below, I decided to include kendoUI and jQuery with the script tag in my index page. Also instead of importing the whole kendoUI library (kendo.ui.core.min.js->670KB) I just included the files needed for kendoUI's date picker that I needed (kendo.core, kendo.popup, kendo.calendar and kendo.datepicker->99.1KB). Incase anyone wants to use this approach, Remember that jQuery will have to be imported in index.html too and before any kendo files. Also, kendo.core should be imported before the others and datepicker after everything else(I.e. last)
The solution you are using for adding jQuery UI is not one that will scale. You should never write anything to the jspm_packages folder, as that folder is jspm's to use as it wishes. Also, you can simply install jQueryUI using JSPM (jspm install jquery-ui).
Your first option is to install KendoUI Core using jspm with jspm install kendo-ui.
If you'd prefer to go it alone, you should probably just load the kendo files using a <script> element. There's nothing wrong with doing this. These files are made to be used as global variables loaded using script tags, so don't fight it.
Again, there's nothing wrong with using script elements to load legacy (read non-modular) js files.

How to use hooks in CS-Cart for overriding footer.tpl file

I am new to cs-cart and
I am trying to use hooks in cs-cart. I had gone through some cs-cart website but not getting proper answer. Suppose if i want to override footer.tpl file with new content then how can i do it using hooks. Just tell me the steps what code to write in index.tpl file and where to keep new footer.tpl file.
I'd suggest you to check this brief guide: http://docs.cs-cart.com/hooks.
Assuming you're on a version 4.x.x:
You don't need to edit anything in index.tpl, just take note of the name of the hook you want to use (I suppose you want to use this one {hook name="index:footer"})
Write your new template and give it the name footer.[override/pre/post].tpl
Save this new .tpl file in themes/[your_theme_name]/templates/addons/my_changes/hooks/index (maybe you need to create such directories in your folders tree)
Make sure you have the "my changes" addon installed and active. You can check it through your admin area of the store.
And that's it, it should work.
Notes:
I've seen no standard "footer.tpl" file in version 4.x.x., so the above instructions work, but they only append content at the end of the page. Customization of such page area can be done via the layout and theme editor on the admin area of the store.
The naming algorithm mentioned on the documentation of cs-cart is for
version 3.x.x. Since version 4.x.x. the folders names have varied.
You should replace skins/[skin name]/[admin|customer] for
design/themes/[your_theme_name]/templates

JOOMLA, Best way to make alternate layouts for articles?

I can't find a answer for this, I want to know what is the best way to have an alternative layouts for articles in Joomla.
If I understand you correctly you are looking for a way to create additional Alternative Layouts for articles. Under parameter tab "Article Options":
If that is the case, its very close to the other provided answers here. Its just that you got to rename the copied default.php file to something else. If you rename it to custom.php it will end up with the text "custom" like the image above.
Here goes my shot for a step by step:
Find the default layout file(s). You could use the ones provided by the com_content component. They can be found at components/com_content/views/article/tmpl. Copy both default.php and default_links.php.
Now you need to rename and copy the file(s) into a template. The target template can be any of the installed templates. Using beez_20 the new path for the copied file(s) should be templates/beez_20/html/com_content/article/custom.php and templates/beez_20/html/com_content/article/custom_links.php.
Goto to edit article using the backend. Expand the Article Options tab and find Alternative Layout. Select your new layout.
Your template might already provide a article override. If so, you might want to use the files of that template instead (instead of the ones in step 1). So if you are using beez_20, you could copy templates/beez_20/html/com_content/article/default.php and templates/beez_20/html/com_content/article/default_links.php.
Helpful links:
Using Joomla’s Template and Layout Override
Layout overrides in Joomla 1.6
The best way to do this would either to install another content component - such as k2 which is highly customizable. Or any other content component on JED.
Alternatively you could create a template override on the existing Joomla Template. This is preferable to editing the files directly in com_content component as the template overrides will never be overwritten whereas the core files will be in any Joomla Updates. I should add, hopefully unnecessarily that this requires Joomla 1.5, 1.6, 1.7, 2.5 or 3.0 (although this is still in beta as of present). So make sure you're not using 1.0.
To create an alternative layout for the built in articles component the best way to do it is probably to create a template over-ride.
See this article on docs.joomla.org on "How to override the output from the Joomla! core"
Creating an alternative for an article layout is pretty straight forward. You can achieve this by using the core layout override with your published template(s).
First you want to get/copy the core article layout file:
components/com_content/views/article/tmpl/default.php
Then place it into your published template:
templates/YOURTEMPLATE/html/com_content/article/default.php
If the template you are using doesn't have the html folder, then you will have to create that folder and each folder to make that path correct.
Once you have this in place, all you need to do is make changes to that default.php file you have just place in the template and that is it!

Installation problem: couldn't find XML in the pack

I'm a beginner in Joomla CMS, and maybe the answer is obvious.
I've downloaded the lastest released version of sIFR 2.0.7. When I try to install the plugin on my Joomla site through the wizard, it tells me that the package doesn't contain an XML install file. I've opened the .zip archive and I couldn't find it either, as the installer wizard told me.
Maybe I'm missing something, but how can I install the package ? Is there any requirement ?
Regards,
Yoann
P.S: sorry if my english is bad, I'm french :)
You can not download sIFR-2.0.7.zip and expect it to load like a Joomla plug-in. You must get sIFR from here Joomla sIFR. This will load without any problems, since it is designed to be a Joomla 1.5+ addon. The name of the file you get is bot_sifr_v2.0.7_J15.zip.
In order to get everything running, you will respond according to this message:
Loads sIFR inside joomla, place the following code at the bottom of your template (just before </body></html>) to make it work:
<script type="text/javascript">
if(typeof sIFR == "function"){
sIFR.replaceElement(".contentheading, .componentheading", named(
{sFlashSrc: "plugins/system/bot_sifr/tradegothic.swf", sColor: "#c64934", sWmode: "transparent"}
));
}
</script>

Resources