Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Inserting new classes into stylesheet...


Recommended Posts



I think I've made a right balls-up to my site and would be very grateful for anyone's professional opinion!


In my stylesheet I decided that I didn't need a load of different classes like infoBoxHeading and infoBoxNoticeContents and infoBoxNotice. I just needed all these classes to look the same, so I thought I'd neaten it up by introducing a new class called Basic, and then use Find and Replace to replace all the instances of these other classes.


It hasn't worked.


And now I'm in all kinds of trouble. I'm getting error messages like this one:


Fatal error: Cannot redeclare basic() in /home/cukooco/public_html/catalog/includes/classes/boxes.php on line 84


Is there any hope for my site? I'd be very very grateful for some advice!



Link to comment
Share on other sites

You need to revert everything back to the way it was before you did this.


As an example, line 84 of boxes.php is:


function infoBoxContents($contents) {


You changed more than stylesheet stuff when you did a global search and replace. Why not just leave well enough alone and leave the stylesheet as is? You've messed up a TON of files by doing this. :blink:

Link to comment
Share on other sites

Hi Liz,


It is not often as simple as it seems at first glance.

there is an area called classes which is where the class is defined then there is an area which is the stylesheet


if you wanted to do a search and replace you would need to search as class=infoBoxHeading

etc otherwise you will change areas that you do not want to change as explaind by zaq above.


If you want you can pm me for another long chat B) ;)

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites



What I do with my store - as I am still learning - is make a new folder/directory in your store root(mine is called test).


Make a copy your store in the new folder/directory - then you will then need to amend the following files:





to point to the test store.


Then when you are trying things out on your store - try them on the test store first. If they work repeat your amendments on the main store - if they don't work, and you think things have gone balls up, you can always copy your original store into the test folder/directory and try again.

Your online success is Paramount.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...