Prestashop changes to theme - css

I have been tasked with making a small design change (CSS) to a Prestashop site that used an off the shelf theme.
I know that in WordPress you can make a child theme to put your design changes in which is best practice.
Is there a similar method I should be using in Prestashop? Or alternatively is there anywhere in the dashboard I can put these changes?

If you're building from a default theme, then the correct way would be to go to Themes > Add New Theme > Create New Theme > Copy default-bootstrap and create a new theme.
There are no child themes in PrestaShop (any kind of inheritance system for themes would majorly complicate an already complex system). What you have is what you work with. If you bought a third party theme, then go modify it directly (modify .tpl files, modify global.css, etc.). IF you copied default theme, then work with your copy (just don't work with default theme, it may get updated).
An event better way would be to install compass and modify .sass files (that is the most correctest :D way).

Related

What is the best way to implement a theme / template in meteor or angular-meteor

I've been having trouble implementing templates bought in themeforest in a meteor app.
I'm wondering, what would the best way to implement a template into a meteor app.
Two ways that I think of right now are:
(Tedious way)
Place javascript in Compatibility folder and try to name them in specific alphabetic order in order to get them to work properly.
Place css in client/lib folder and try to name them in specific alphabetic order in order to get them to work properly.
Place fonts and images in the public folder.
The second way (I haven't tested it yet) is to place the template files in the public folder and just link them manually (the old/non-meteor way) in the index.html file.
Now I'm not sure if these are the correct ways to do this and I would like some information regarding this issue.
Thanks!
I've done this myself with a themeforest theme.
Put the theme's css file under /client - it doesn't need to be in /public
Use the class names your theme uses in your templates. Typically a theme will have 3x what you really need so this ends up being much less work than it might seem. If your theme is built on bootstrap then it's even easier.
My theme used fontello a lot for icons, I had to recreate the folder hierarchy under client/fonts and then make sure the cross-references were correct.
Typically themeforest themes don't use js that much, I completely ignored all the js that came with my theme and created what I really needed in Meteor.

Events manager - child theme not working

I am trying to make changes to plugins/events-manager/templates/forms/event/bookings.php via my child theme. When I make changes to the file directly in the plugin, it works well, but I know the way to go is to make changes at the child theme level so this is what i have done:
I added the edited bookings.php to twentytwelve-child/plugins/events-manager/templates/forms/event/bookings.php but for some reasons the changes are not applied.
I have also tried to add the edited bookings.php to twentytwelve-child/events-manager/templates/forms/event/bookings.php but it is not working either.
I would appreciate if someone could help me figure this out (screenshots below). FYI - I am not a developer, so please try not to be too technical in your answers.
Many thanks,
Yvan
It would be nice if developers could simply override a specific file within a plugin from within their theme, but I'm pretty sure WP doesn't work that way (At least not for overriding plugins. Theme files? Yes. Plugins? No).
If the plugin developer was nice they will have given you some override capabilities like using action hooks, filters, or including their function as static within a class.
From the looks of the events-manager plugin file there are three such action hooks available:
do_action('em_events_admin_bookings_header', $EM_Event);
do_action('em_event_edit_ticket_td', $EM_Ticket);
do_action('em_events_admin_bookings_footer', $EM_Event);
You will either need to hook into these actions to make your adjustments (highly recommended), or duplicate the plugin, rename it, and edit it manually (which means you will need to duplicate these edits every time you upgrade... YUCK!)
EDIT after further researching the events-manager plugin:
While WP doesn't provide this template override functionality, it looks like the plugin does. However after some digging in the documentation I noticed that this functionality doesn't specify weather it supports child themes. Try placing the template override within twentytwelve instead of twentytwelve-child. If that works, then maybe you could move that folder back into twentytwelve-child and create a symlink within twentytwelve to the real folder in twentytwelve-child (sort of tricking the plugin). Doing it this way means you have to recreate the symlink each time you update twentytwelve, but the trade off is that you can now override templates and won't loose your changes if you update twentytwelve (just the symlink).
The problem is your file path:
plugins/events-manager/templates/forms/event/bookings.php
should be
plugins/events-manager/forms/event/bookings.php
If you have issues with EM we monitor the free forums here (I stumbled on this by coincidence) - https://wordpress.org/support/plugin/events-manager
also #StevenLeimberg, thank for chipping in! we do support child themes it was just wrong directory structure.

Wordpress theme is taking no affect?

i want to make some changes into my wordpress css file. i downloaded the style.css and other css file via ftp and made all the changes into the codes i wanted to. I uploaded the files and replace it with the other files. I waited for some time to take it affect but nothing happened, i left it and open my site the other day but the things were still same, no changes. I was using the WP Minify cache plugin. I even deleted it and re upload the css files again but still no changes. I tried out so many things but no success.
I than changed the name of the theme main directory via ftp, it help me a bit and made me happy for awhile, all the changes appeared. I again needed some changes in css files but unfortunately again suffering the same process. Please help :(
P.S. No theme is taking the effects of modifications in the css files codes. i tried different themes, but same results. Even if i delete the style.css nothing happened, but when i delete the entire directory of that theme then blank white page appear on my website.
It doesn't sound like you activated the new theme from your administration panel.
http://codex.wordpress.org/Themes#Selecting_the_Active_Theme
When using any cache plugins you should delete its cache when you do any changes to the website. Have you already done that?
Are there any other css files being loaded after style.css that may alter what you are trying to change?
It's generally not a good idea to edit the themes style.css directly b/c when you upgrade that theme you will lose all of your customizations.
Doesn't your theme have some place for custom CSS? Some themes have it in Appearance >> Theme Options, or something of that nature. What theme is it? Do you have a framework, or child themes? More info needed ... but every theme has a spot for custom css; as was mentioned, it's not best practice to make your modifications in the actual main theme stylesheet, due to updates, etc. ... and anything in the custom css section overrides the default theme stylesheet.

ASP.NET Theme'ing along with customer specific images and css

We have a ASP.NET solution using images, css and .skin files with in the App_Theme/{selected theme}. The themes today contains many, many files and images and for a customer theme we add a new folder to the App_Themes and copy all files to the new folder and make the 10-200 changes on images, skin and css's.
The issue here is that the default theme, the one we normally have when we develop, evolve's and grows making theme customer theme out of date. So when an upgrade comes we have to go through all files looking for changes and hopefully finding them all. Sometimes we miss things that are really important.
The perfect solution would be to have a base theme that contains the base css, skin and images. And when we add a new customer theme we only tell the system what has been changed, what css-selectors to override and what images to use instead of the images from the base theme. In my understanding, if using the normal ASP.NET theme functionality in App_Themes folder, you can only have ONE theme and not a BASE theme and then say a DeliveryCustomer-theme that has a different background and some other images that the solution shall use instead of the ones in the BASE-theme.
Does anyone have some guidelines to solve this in a maintainable way for the future. I seen that people override the App_Theme path to make it work with custom skins.
thanks!
Use the concept of a base theme like you described. Pull out all common CSS rules into another file, let's call it base.css.
Take base.css and all the images that are common, and put them in a folder outside of App_Themes, and just include the CSS file like you normally would any other on your master page.
<link rel="stylesheet" type="text/css" href="/styles/base.css" /> <!-- Note this isn't in app_themes -->
Then, make sure your CSS files in various themes only specify the delta for your styles.
Ok, so here is how I'v done it know.
I have created a Default theme that is the original theme with all the css-files, skin-files and images that is needed, and that is alot. This theme is in the App_Themes folder. Them I'v created a new folder called ThemeSkins next to the App_Themes folder. In this folder I have all the new skins in different folders. The folders name is the name of the new theme that one want's to have. In each of the skin folders there are css-files that contains only the selectors that I want to overload. There is also images that I want to replace.
I have created a ThemeCreator tool that does three things:
Remove all themes except the Default theme in the App_Themes folder. This is to only have one main theme to work on for the developers. There will still be work that needs to be done in the ThemeSkins, but the overall work load will be minimal.
Next the tool looks at the folders that is in ThemeSkins and creates a folder under App_Themes for each skin with its name. Then it copies the Default theme into all the new skin folders that it just created.
The last thing is that it will merge the skin specific files into the newly created skin under App_Themes and let the user know what files were added just for information. The tool adds a prefix, "z_", on all css-files so that these are loaded last of all css-files and there for will overload the default selectors.
The thing that remains is to update the skin-files, so far, no customer has needed changes in these files. But when they do, I guess I just add a skin files and have to update the default in a automatic way since the skin-markers can't be overloaded as css-selectors can.
This works really smooth and gives us a nice and lean way to work with skins on our themes.
Any one got a better idea how to get the same result? the major issue using ASP.NET themes are that you can't use a default theme and then just apply skins to it without using the shape and color attribute in the skin-files. This is not recommended as the skin files will copy out all attribute to all the places that they are needed in the markup and not just reference them as css-classes do.

Advice on SAFELY modifying / customizing Header on a Wordpress theme

I just started using Wordpress 3.0 to get a simple blog up and going. For now I am working with the default theme "Twenty Ten".
I want to make a simple change:
I'd like to modify the layout of the bloginfo( 'name' ), bloginfo( 'description' ), and php header_image() that appears at the top of the blog.
So, under Appearance, Editor, I select Header.php and I can see how this is being rendered.
It appears I can just modify this to my liking and I am good to go. (Correct?)
If so, my question is: is it considered proper practice to modify the html in header.php?
It seems to me that this is a bit dangerous, for example when it comes time to upgrade that same theme. How do I know which php files I have applied customizations to? Say I modify 6 php files, then an upgrade of the theme comes along...how does one handle re-applying these changes to the upgraded theme?
Is it a total "do over"?
Is there a better way to handle this scenario?
Maybe some themes are more powerful than others and can handle this type of customization more flexibly, and I should be searching for such a theme? Or, is there a reasonably proper and safe way to do this by directly editing the php files?
Child theme, child theme, child theme. Create a new folder in themes (name it whatever you want. Go crazy. As long as you don't name it twentyten). Create a style.css file in that directory and copy the whole style.css file from twentyten into it. Then, change the theme name in the css headers and add this line after the tags:
Template: twentyten
Then copy the header.php file over to another file in your directory, and edit to your heart's content. If twentyten ever gets updated, you'll get the benefit of those updates (unless they're in css or the header) without losing your changes.
Yes, you can edit the theme to your liking. I think it's common practice (however, I've always just created my own themes from scratch). Just give credit where it's due and don't pass it off as your own original work.
To avoid over-writing your customized theme when an upgrade comes out, you could save the customized one to a different folder in the themes directory with a different name, like Twenty Ten Customized. You can then copy or re-do the changes in the upgraded theme if you think the upgrades are worth the trouble. There's no rule that says you have to have the latest version of the theme, after all.
There might be other themes that allow a high degree of customization without editing the php, but most of the time you'd have to edit the php I'd think. (but I'm no pro theme developer.)
I would do as Benny suggested and rename the theme so that it isn't overwritten when you upgrade Wordpress.
I would not worry about updates to the actual theme because I don't think those ever really happen. The last Wordpress default theme was Kubrick and, to my knowledge, it rarely was updated and most updates were minor and went unnoticed by most users. If you go about customizing your theme, I don't think Wordpress is going to update the Twenty Ten theme to the point where you would ever wish that you hadn't edited the source because you wanted to upgrade to the new default theme.
If you don't want to actually edit any of the theme files, check out something like Thesis that allows you to customize most things from the admin.
Note: I'm not aware of a free theme that offers a lot of customization options through the admin panel, but there might be something if you check around for a while.
If I really had to stop automatic updates on my Wordpress theme, I'd do exactly what Kris + Chris Schmitz suggested (i.e. rename the theme differently). Modify header information in the style.css file in your theme's root to do this.
Personally, however, if the theme already works for me out of the box, I think I'd most probably already be fine with that. My website's running, the theme's working, and updating my theme may just break my site in ways I don't know.
I'd probably update it only for major security updates, but I'd probably be reading a changelog for that. But if I was doing that, I'd know what files exactly were modified, and I can just manually do it myself. Sounds like a lot of work, but better than my site buckling on me by some unknown cause.
If you do as Benny suggests and create a renamed copy of the default theme, you can use a free diff tool to compare the directories when an upgrade comes out. I'd use Meld ( http://meld.sourceforge.net/ ) to do a three-way directory comparison (Original theme, upgraded theme, modified copy) to determine if any changes have been made that impact the parts you changed, as well as to merge the upgrade changes into your modified files.

Resources