Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

How To Add Custom Css With My Changes Addon Rate Topic   * * * * * 3 votes

 
  • straygecko
  • Advanced Member
  • Members
  • Join Date: 01-May 13
  • 93 posts

Posted 27 January 2016 - 12:56 AM #21


But your ways are to complex. It is easier to use the CSS weight to override default CSS rules. For example. div with the id tygh_container exists on all pages

 

 

Yes you can add tygh_container to your rules or !important to override the cs-cart rule. That works but it doesn't help the problem of looking in multiple places to find the problem in the first place. Since its less I guess you can just wrap all your rules in tygh-container and never worry about whether there is a cs-cart rule that would override yours.

 

But option #2 I proposed, cloning the theme style (e.g. Greeny, Woody, etc.) is actually less complex than setting up a couple of folders, styles.post.tpl hook file and a new styles.less file as you can easily clone the theme style in the visual editor. Then put all of your styling in the custom css (you can even use less in the custom "css") either via the visual editor or by editing the file directly. You need to clone the theme style anyway or any color/font/background changes and custom css changes will be overwritten by upgrades. So what's the advantage of also creating a tpl override and another file?



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 18671 posts

Posted 27 January 2016 - 07:56 AM #22

You need to clone the theme style anyway or any color/font/background changes and custom css changes will be overwritten by upgrades. So what's the advantage of also creating a tpl override and another file?

 

Why do think so? All code in the CSS section of theme editor as well as styles in the custom addons are not overrided by the upgrade. This is the main feature of these ways of the realisation.


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • straygecko
  • Advanced Member
  • Members
  • Join Date: 01-May 13
  • 93 posts

Posted 27 January 2016 - 05:27 PM #23

Why do think so? All code in the CSS section of theme editor as well as styles in the custom addons are not overrided by the upgrade. This is the main feature of these ways of the realisation.

 

From upgrade from 4.1.5 to 4.2.1:

Attached File  csupgrade.jpg   128.71KB   3 downloads



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 18671 posts

Posted 28 January 2016 - 08:41 AM #24

From upgrade from 4.1.5 to 4.2.1:

attachicon.gifcsupgrade.jpg

 

These styles exist on all installations and you are not able to change them. But custom styles will not be affected by the upgrade at all. 


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • straygecko
  • Advanced Member
  • Members
  • Join Date: 01-May 13
  • 93 posts

Posted 28 January 2016 - 02:43 PM #25

These styles exist on all installations and you are not able to change them.


Sure you can change them. But upgrades will wipe out your changes.
 

But custom styles will not be affected by the upgrade at all.

 
That is exactly what I was saying.  So if you have created a custom style what's the point of putting styles in my_changes?  Why not just use your custom style files?



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 18671 posts

Posted 28 January 2016 - 02:48 PM #26

OK. Looks like we misunderstood each other. In my opinion, custom styles feature is useful for small changes. Buy if you want to prepare completely new look and feel based on the default theme, it is better to use the module.


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • Rafass
  • Senior Member
  • Members
  • Join Date: 16-Jan 14
  • 304 posts

Posted 07 February 2016 - 08:25 PM #27

With my previous version 4.3.3 this tutorial works perfectly

but I'm now testing with the version 4.3.5 (1 month) and it seems the structure of the folder has been changed. there is not "design" folder. now is called "themes_repository"

So, there is /themes_repository/(my_theme)/templates/addons/my_changes/hooks/index/styles.post.tpl

with this content:

{style src="addons/my_changes/styles.less"}

--

Also I've created 

/themes_repository/(my_theme)/css/addons/my_changes/styles.less

that contain my own css.

--

But for some reason is not working. any idea what I'm doing wrong?

appreciate some help.  8)



 
  • Triplets
  • Senior Member
  • Members
  • Join Date: 23-Sep 08
  • 1176 posts

Posted 07 February 2016 - 09:08 PM #28

Your in the wrong directory. Use

 

design\themes\responsive

 

The themes_repository directory is not the Live template directory. It contains the not uses templates.

 

Change the word responsive above to your 'template' name if not using the responisve theme.



 
  • Rafass
  • Senior Member
  • Members
  • Join Date: 16-Jan 14
  • 304 posts

Posted 08 February 2016 - 05:42 AM #29

Ah, yes, I was wrong. Now works perfect. Thanks Triplets!  8)



 
  • hermesdev
  • Newbie
  • Trial users
  • Join Date: 30-Jun 16
  • 1 posts

Posted 30 June 2016 - 08:40 PM #30

Hi all, sorry to bring up this post again, but have you been able to use the above methods in 4.3.8? I have 2 cs-cart stores, one has my_changes working just fine (not 4.3.8 though) and the other is a fresh install, but I cannot get my_changes to work at all. 

Any ideas?



 
  • mokeshop
  • Senior Member
  • Members
  • Join Date: 27-Jul 12
  • 994 posts

Posted 14 February 2017 - 02:23 PM #31

hello,

 

can someone check if workarround is working with 4.4.3 (trial)

 

regards



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 18671 posts

Posted 15 February 2017 - 07:01 AM #32

hello,

 

can someone check if workarround is working with 4.4.3 (trial)

 

regards

 

The solution from post #1 will work correctly on 4.3.3 trial


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 18671 posts

Posted 05 March 2018 - 06:26 AM #33

You are welcome!


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • maivanco
  • Newbie
  • Trial users
  • Join Date: 01-Feb 18
  • 1 posts

Posted 18 July 2018 - 04:11 AM #34

I think, it is a most frequently asked question. So let me answer here for everyone.

The tutorial is actual for CS-Cart and Multi-Vendor 4.x

1. Make sure that the status of the My changes add-on is Active ( Add-ons -> Manage Add-ons )
2. Create the design/themes/[your theme]/templates/addons/my_changes/hooks/index/styles.post.tpl file with the following content

{style src="addons/my_changes/styles.less"}
3. Create the design/themes/[your_theme]/css/addons/my_changes/styles.less file
4. Add your CSS rules to this file
5. Clear the cache ( Administration > Storage > Clear cache )
6. Check the result

See also:
- How To Add Custom Javascript With My Changes Addon
- How To Add A New Carrier

 

 

 

{style src="addons/my_changes/styles.less"} not working, but when I change to {style src="addons/my_changes/styles.css"}, It's work. Should I enable LESS in Theme Editor to use styles.less and I'm confusing between 2 buttons "Enable LESS" and "convert CSS" in Theme Editor, styles.pcl.css was duplicated and auto inserted every add-on so my styles were overridden too much. Can you help me solve this problem? 
Here is my site: https://www.classics...s_key=ctdvlpmnt



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 18671 posts

Posted 18 July 2018 - 01:18 PM #35

Yes, try to enable LESS again. If it does not work. please contact support team to solve the issue


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.