Jump to content

Remove code, Overides or CSS ?


kerintis

Recommended Posts

When updating themes, tpl files may be overridden. I expect you would like to update your theme once a while, to make use of new prestashop features etc. If the element you want to remove is not causing security concerns (like if you want to remove n input field, just display:non can be easily reverted by a user, and then can add input to the field, which you might not want. In that case, you would really want to remove the field from the page), I expect display:none would be a good idea. Maybe add a myCSS.css file where you make all your changes, and include this to the global.css file, so that future theme upgrades don't disrupt your changes too much (just re-include your own css file after upgrading and you're done again)

 

 

Just my initial thoughts, though. Anyone else other ideas??

 

pascal.

Link to comment
Share on other sites

Generally theme files do not change unless you upgrade your store, so I'm not sure why you would be worried about this anyway. 

 

If you do upgrade your store, you should likely switch to the latest theme included in the latest version so you can pickup any defect fixes and enhancements, so you should expect to lose your changes.  Just document what changes you have made, and then re-apply them.

Link to comment
Share on other sites

Bellini,

 

My thoughts were instead of 'documenting' the css changes, just add them to a separate myCSS.css file and re-include this file when upgrading... (I'm extremely forgetful, so documenting is not my strongest trait... ;-)  )

Link to comment
Share on other sites

that assumes the only thing that needs to change are stylesheets, but the discussion already assumed the possibility of tpl changes

 

but really the point remains, a theme really never 'updates'.  if using the default theme, it would really only update during a store upgrade, or perhaps if you are fixing issues from the forge or posts, and at that point the changes that were made may need to be refactored anyways

 

if using a third party theme, some of them do provide updates on a routine basis.  but again, its is difficult to say what would have been changed.  so documenting the changes so they can be re-applied or refactored is the best course of action.

  • Like 1
Link to comment
Share on other sites

Generally theme files do not change unless you upgrade your store, so I'm not sure why you would be worried about this anyway. 

 

If you do upgrade your store, you should likely switch to the latest theme included in the latest version so you can pickup any defect fixes and enhancements, so you should expect to lose your changes.  Just document what changes you have made, and then re-apply them.

Well, I want to upgrade store for features and security. 

When updating themes, tpl files may be overridden. I expect you would like to update your theme once a while, to make use of new prestashop features etc. If the element you want to remove is not causing security concerns (like if you want to remove n input field, just display:non can be easily reverted by a user, and then can add input to the field, which you might not want. In that case, you would really want to remove the field from the page), I expect display:none would be a good idea. Maybe add a myCSS.css file where you make all your changes, and include this to the global.css file, so that future theme upgrades don't disrupt your changes too much (just re-include your own css file after upgrading and you're done again)

 

 

Just my initial thoughts, though. Anyone else other ideas??

 

pascal.

 

Thats what I have done so far, I have created custom.css file and linked that to header.tpl file. What I don't understand why would I want to create my myCSS.css/customs.css file and then add same code to global.css ? 

 

What I am used to Joomla gantry framework, you can create secondary template file and set your stiles there, so it over writes original style settings, if you wish to revert back, you can do that with one click. 

 

If added custom.css or custom.php/tpl , files should remain in the directory during update, or I am wrong ? 

 

Maybe there is VQmod that, where you can change things without editing core files ? 

 

Thank you for your input 

Edited by kerintis (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...