X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (X-Cart 5) (https://forum.x-cart.com/forumdisplay.php?f=56)
-   -   What is the best way to overwrite a skin? (https://forum.x-cart.com/showthread.php?t=70317)

juancho 10-23-2014 05:50 AM

What is the best way to overwrite a skin?
 
Hi

what is the best way to overwrite a skin that is not the default skin? For instance, how can I overwrite a css file of a skin (a theme from xcart team) from my personal skin?

Is there any priority in the order the skins are executed ? I would say alphabetically...

Thanks

qualiteam 10-24-2014 12:49 AM

Re: What is the best way to overwrite a skin?
 
Yes, you can overwrite files from other skins:
http://kb.x-cart.com/display/XDD/Substitutional+skins

The priority is likely depends on the order in which the skins are registered. So, if you make your new module depend on the module adding the original custom skin, you should be able to hack on top of the original custom skin files.

tony_sologubov 10-24-2014 12:56 AM

Re: What is the best way to overwrite a skin?
 
There is also this guide available:
http://kb.x-cart.com/display/XDD/Basic+guide+to+theme+creation

juancho 10-24-2014 10:24 AM

Re: What is the best way to overwrite a skin?
 
Hi, thanks for the answers

still I am struggling to give priority to my css. For instace, I have SportSkin skin and I have created a new skin (MyOwnSkin). I have placed a css file here following the links you provided but still the SportSkin has the priority. The css of MyOwnSking only works when I delete the one in SportSkin. It is not clear to me how the skins are registered, in what order. How can I give priority to MyOwnSkin?

Thanks

tony_sologubov 10-28-2014 02:13 AM

Re: What is the best way to overwrite a skin?
 
Hi juancho!

1) While specifying CSS files, you need to make your AView class to have LC_Dependencies() on SportSkin module:
http://kb.x-cart.com/display/XDD/Making+one+module+depend+on+another#Makingonemodul edependonanother-Understandingtheproblem

This way you will make sure that your CSS classes are declared after SportSkin ones.

2) I feel you need to make your custom module depend on the SportSkin module. You can do it according to:
http://kb.x-cart.com/display/XDD/Making+one+module+depend+on+another#Makingonemodul edependonanother-What...toworkproperly

It's optional though.


All times are GMT -8. The time now is 07:06 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.