Jump to content

Why classic default theme breaks everytime I edit theme.css


Recommended Posts

Hi,

I want to change the background color of the main wrapper section.

No need to go through the hassle of creating a child theme, just for this.

So i just targeted #wrapper within theme.css.

Located in  :

/website/theme/classic/assets/css/theme.css

But each time, i change the background color value (from #F6F6F6 to #FFFFFF), the website is broken and appears as if no css stylesheet is loaded.

I tried emptying the cache, nothing happens.

How can I restore the default theme and what causes this behaviour ?

 

Thanks

  • Thanks 1
Link to comment
Share on other sites

50 minutes ago, endriu107 said:

Editing theme.css is not good idea, all changes you should add to custom.css file.

Yes, i didn't know that

What should I do now, to restore classic theme to its default functionning state ?

Thanks for the reply.

Link to comment
Share on other sites

rather than work with default theme, I highly recommend buying a high quality theme, they have all the tools, mega menu, select header/product/home page formats, colors, you name it.  I recommend leo themes, they are very future rich and they keep them up to date, 68usd...great investment 

Link to comment
Share on other sites

Il y a 3 heures, PrestaHeroes USA a dit :

I recommend leo themes

Hi,

Never use a Leo Themes, critical security flaws, not to mention the dubious performance of multiple modules developed in an anarchic way without any coherence, not to mention a different UX per module forcing perpetual gymnastics to try to understand how to use such or such module.

As explained before, you should always make your theme customizations, whatever it is, in a file named custom.css in the same directory where the theme.css file is located.

This theme.css file is created using a script from several SCSS files defined in the theme's _dev directory. If your theme comes with this directory, you can make changes in these SCSS files and then compile them to get the new theme.css file.

But for simple adaptation, it's better to use the custom.css file.

And let's also remind that any modification on the TPL files of a theme should preferably be done on a child theme in order to update the main theme without breaking everything.

Everything is explained in the official PrestaShop documentation

https://devdocs.prestashop-project.org/8/themes/

 

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

Yep, I ended up 'resetting' the default theme and then i created a child theme based off the default "classic" theme.

Now I apply edits to the custom.css stylesheet of the child-theme and I use a Elementor-like page builder, it works like a charm (on the surface anyway).

Have you ever used those ? Would you recommend them ?

I'm talking about : PrettyBlocks, Creative Elements for example.

 

Thanks again for your answers

 

  • Like 1
Link to comment
Share on other sites

Hi,

Personally, I am not a fan of this type of tool.

It seems to me more interesting to invest in a clean and coherent design than to let the possibility to do anything, anyhow on a site.

After, PrettyBlocks is developed by a friend, the project is very recent, but in open source, it finds its public and proposes a rather interesting vision.

For Creative Elements, I can only recommend my database cleaning module, because it tends to fill the database with data that is outdated, but that it does not propose to clean. It's a reference in the WordPress world and it's only an adaptation for PrestaShop except that it still has a lot of inconsistencies especially in terms of performance, but it allows you to work on specific page designs that can be useful.

Link to comment
Share on other sites

il y a 37 minutes, PrestaHeroes USA a dit :

I can tell you this, I've done 100's of upgrades, most using Leo themes, your remark is from what experience?  What does/cannot be hacked?  Really bordes on slander for that company that has been providing very good themes for PS for many years.  

I'm just giving my opinion and pointing out some flaws that have been officially highlighted.

Then, maybe you like the headache of trying to understand why each module in these themes have a different interface, why the mega menu management is so incomprehensible, why the caching systems proposed by PrestaShop are not implemented on half of the modules and I don't even talk about the fact that when you install some modules, they don't work since these themes often have fun not integrating the use of PrestaShop native HOOK.

Personally, I've been preaching for years for simple themes, not module factories.

It is true that their themes are very beautiful, but for me it stops there.

il y a 41 minutes, PrestaHeroes USA a dit :

But for community advice on how to build a successful ecommerce business installing a high quality theme with tools is good advice.

Design is one thing but it is not what will really sell in the end.

There are thousands of online shopping sites that have very questionable designs, Amazon being the first and yet they sell.

But it's true that a clean design is better than something that flashes in all directions like some sites did a few years ago.

  • Like 1
Link to comment
Share on other sites

5 hours ago, Mediacom87 said:

I'm just giving my opinion and pointing out some flaws that have been officially highlighted.

Then, maybe you like the headache of trying to understand why each module in these themes have a different interface, why the mega menu management is so incomprehensible, why the caching systems proposed by PrestaShop are not implemented on half of the modules and I don't even talk about the fact that when you install some modules, they don't work since these themes often have fun not integrating the use of PrestaShop native HOOK.

Personally, I've been preaching for years for simple themes, not module factories.

It is true that their themes are very beautiful, but for me it stops there.

Design is one thing but it is not what will really sell in the end.

There are thousands of online shopping sites that have very questionable designs, Amazon being the first and yet they sell.

But it's true that a clean design is better than something that flashes in all directions like some sites did a few years ago.

I think because they came from joomlart, and I loved joomla back in the day,  and they brought 'stuff' with them...I been bit loyal...

for me I  just want to inform newbies, that default theme has 'barely' any tools....where a high quality theme generally has most of everything you will ever need.

but I also find here anyway people playing with design, logos etc before they build catalog/shipping/payments etc...

Link to comment
Share on other sites

11 hours ago, PrestaHeroes USA said:

But for community advice on how to build a successful ecommerce business installing a high quality theme with tools is good advice.

I would love to find out what do you understand with a high quality theme?

  • Confused 1
Link to comment
Share on other sites

27 minutes ago, Nickz said:

I would love to find out what do you understand with a high quality theme?

you would?  you don't understand what a high quality theme is, are you questioning what I think is high quality theme?  most often we don't know what you are saying...  please explain what you don't understand and I'll try to explain  it to you.  also do you own an agency? run a team? done literally 100's of upgrades (none with default), well  I have for over 10 years...but I am not here to pass an interview with anyone and especially you.

I'm here to offer my best advice from experience....stop trolling me with stupid insipid questions.

Link to comment
Share on other sites

Relax guys,

Thank you all for your time and advices and as The Cranberries would say : 🎶 No need to argue 😉

 

@PrestaHeroes USA It seems you've been having good experience using leo themes for a long while and that's great.

I had a look at their website and themes, they certainly look good.

I think @Mediacom87 's comments were targetted more on the technical aspect

Sometimes to make things look good, you may need to do dirty things under the hood.

I'm usually more inclined to go for a less is more philosophy.

I like keeping things simple and not having a website cluttered with modules, sliding elements, moving and flashing animations etc...

As was said before, high traffic ecommerce websites (amazon, aliexpress, ebay ..) don't necessarily look good but they get the job done.

The goal is to keep it simple, loads fast and easy to use.

Google doesn't care what your shop looks like 😜.

Of course, if it looks good, that's a plus. But that's not the main goal.

 

But of course priorities may vary.
We can share our experiences and advice, the goal is for everyone to be happy with what they have

 

Thanks again to everyone who helped.

  • Like 1
Link to comment
Share on other sites

for me this was best answer from above but missed in all the chatter.

when you want to modify class/default theme or 'any' them.  Use a child theme, this way if you upgrade you won't lose changes.  PrestaShop introduced themplate inheritance in 1.7, was a game changer for developers.

learn here how to manage your theme the correct way

https://devdocs.prestashop-project.org/8/themes/reference/template-inheritance/parent-child-feature/

When I post, I should leave out brand name...someone some where will hate that brand loool.  Point being modern themes, and we just installed one of the new leo's that had built in page builders....didn't have to buy a 250.00 module to do that...for default theme to be feature rich you will end up buying a lot of modules.  

On 5/22/2023 at 10:39 AM, USB83 said:

Hi,

I want to change the background color of the main wrapper section.

No need to go through the hassle of creating a child theme, just for this.

So i just targeted #wrapper within theme.css.

Located in  :

/website/theme/classic/assets/css/theme.css

But each time, i change the background color value (from #F6F6F6 to #FFFFFF), the website is broken and appears as if no css stylesheet is loaded.

I tried emptying the cache, nothing happens.

How can I restore the default theme and what causes this behaviour ?

 

Thanks

 

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...