Hooks and my changes

Hi,



Can anyone explain to me how the hooks work and how to use the folder my changes? Where to put what kind of file / folder.



I’ve looked through the forum but see several answers but I can’t get it to work.



I want to make some basic changes in css and some tpl files.

But where do I place them in my changes and can I use the same names for the files of have to give them an different name?



:confused:

Hello JDP2012,



Thank you for your message.



If you want to change some default CSS classes in CS-Cart or add some new ones with using the My changes add-on and hooks, I suggest that you should follow instructions in the Changing the style of elements in the storefront article of our Knowledge base:



http://kb.cs-cart.co…ment-font-color



In order to modify template (.tpl) files with using hooks, I suggest that you should read the appropriate article of our CS-Cart Developer Documentation:



http://docs.cs-cart…ddon-connection



In this article you will find out how to create a hook, in which directory this file should be created and how it should be called. I just want to clarify paragraph one in this article where it is said 'in the addon directory'. In your case it will be the skins/[CUSTOMER_ACTIVE_SKIN]/customer/addons/my_changes directory of your CS-Cart installation instead of just the addon directory where [CUSTOMER_ACTIVE_SKIN] is an active skin of your storefront.



You can also find more examples on how to use the My changes add-on in some other articles of our Knowledge base:



http://kb.cs-cart.co…ch&q=my_changes



I hope this information will help you.



Thank you.





Pavel Zyukin

CS-Cart Support team

Attached is a PDF that I did for another guy. I hope it is clear enough and helps you.



Thanks,



Brandon

hooks.pdf

Hi, thank you both. Will going to read it tomorrow and trying to change the menu.



Thank you for your input and quick response. :)

Hello JDP2012,



You are welcome.





Pavel Zyukin

CS-Cart Support team

Hi I just playes arround with it.



I could make 2 new css styles.

my_styles.css

my_dropwdown.css



I have a new question that's regarding to other browser support like IE, Safari, etc…

Do you have to create an seperate css file for this?

Hello JDP2012,



Thank you for the reply.



If you want to create separate CSS classes for different browsers, it is not necessary to create separate CSS files in this case. But it will be much easier to work with these classes and include them in the HTML code if you create these classes in separate CSS files.



Thank you.





Pavel Zyukin

CS-Cart Support team

So you only have to create extra HTML code if you create new classes?

If that's the fact then it will be ok. I'm still working on it to understand cs cart to create an better template for myself.



Regarding the CSS I get now.

my_changes/css/my_styles.css



If you want to change or move some code in an tpl file.

You have to create the same folder also?



For example:

my_changes/hooks/blocks/product_templates/default_template.override.tpl

Hello JDP2012,



Thank you for the reply.



If you create a separate CSS file for some particular browser, it is better to call it something like my_styles_ie.css (suppose you create this file for Internet Explorer). After this you should include the following HTML code into the necessary template file:


```php


```

where [b]path_to_the_css_file[/b] is the path to your CSS file. For example, you can check the [b]styles.tpl [/b]file located in the [b]skins/[CUSTOMER_ACTIVE_SKIN]/customer/common_templates[/b] directory of your CS-Cart installation and have a look how our default [b]styles_ie.css[/b] file is included there ([b][CUSTOMER_ACTIVE_SKIN][/b] is an active skin of your storefront).

As regards modifying template files with using hooks, you should better use instructions in the [url="http://docs.cs-cart.com/addon-connection"]Addon Connection by Means of Hooks[/url] article provided by me earlier. Unfortunately, the way you described in your message will not work for you.

If you experience difficulties with modifying template files with using hooks, you can always contact us via [url="https://www.cs-cart.com/helpdesk"]Customer Help Desk[/url] and our technical support engineers will assist you in this matter if you have support credits or an active support period.

Thank you.

---
Pavel Zyukin
CS-Cart Support team

Hi, ok. Will take a look at it.



Now I have a problem and don't know what happend.

My add to cart button on the product details page isn't working anymore.



I have no idea what happend.



Please help me.