Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

What is the best way to overwrite a skin?

 
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)
 
Thread Tools Search this Thread
  #1  
Old 10-23-2014, 05:50 AM
 
juancho juancho is offline
 

Advanced Member
  
Join Date: Mar 2014
Posts: 47
 

Default 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
__________________
X-Cart Business 5.0.12
Reply With Quote
  #2  
Old 10-24-2014, 12:49 AM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default 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.
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions
Reply With Quote

The following user thanks qualiteam for this useful post:
juancho (10-24-2014)
  #3  
Old 10-24-2014, 12:56 AM
  tony_sologubov's Avatar 
tony_sologubov tony_sologubov is offline
 

X-Cart team
  
Join Date: Jan 2009
Posts: 2,431
 

Default 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
__________________
Found a bug in X-Cart? Post it to our bug tracker!
Know how to make X-Cart better? Suggest an idea!
Reply With Quote

The following user thanks tony_sologubov for this useful post:
juancho (10-24-2014)
  #4  
Old 10-24-2014, 10:24 AM
 
juancho juancho is offline
 

Advanced Member
  
Join Date: Mar 2014
Posts: 47
 

Default 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
__________________
X-Cart Business 5.0.12
Reply With Quote
  #5  
Old 10-28-2014, 02:13 AM
  tony_sologubov's Avatar 
tony_sologubov tony_sologubov is offline
 

X-Cart team
  
Join Date: Jan 2009
Posts: 2,431
 

Default 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.
__________________
Found a bug in X-Cart? Post it to our bug tracker!
Know how to make X-Cart better? Suggest an idea!
Reply With Quote

The following user thanks tony_sologubov for this useful post:
juancho (10-30-2014)
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 03:23 AM.

   

 
X-Cart forums © 2001-2020