Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

wysiwyg editor for index page in 2.3.1


Guest

Recommended Posts

Hi

 

Is there an wysiwyg editor for osCommerce 2.3.1 that will allow me to edit the homepage and I also Shipping & Returns, Privacy Notice, Conditions of Use etc?

 

There is an add on for osCommerce 2.2 but that is table based not CSS based.

There are also plenty of editors that allow you to edit your products description for 2.3.1.

 

Thanks

 

Mark

Link to comment
Share on other sites

Are you looking to modify the page text or the layout of the page? The text is defined in various language files that can be edited with any text editor (never use Dreamweaver, Expression Web, or any other HTML page editor on PHP files). If the text includes HTML tags to format the display, that could be a problem if you want WYSIWYG. You could try cutting and pasting the text (including HTML markup) into a scratch .html file. Go through and unescape all escaped apostrophes (\' --> '). Use any WYSIWYG HTML editor (such as Dreamweaver, Expression Web, Nvu, etc.) to edit this file. Go through and escape all apostrophes (' --> \'). Cut and paste it back into the language file. You really should be somewhat familiar with HTML if you're going to do this; otherwise HTML editors may insert extra code such as <!doctype>, <html>, and <body> tags that you don't want. Also note that without the standard CSS files being included, you won't get quite the same final appearance.

 

What osC really needs is an "Edit" button that shows up on each page just for the administrator, and allows some sort of WYSIWYG editing of a segment of text defined in a language file (and of course, writing it back to the language file within the correct "define"). It would be a big project, but would really make osC easy to modify. Anyone up for this?

 

If you're looking to change the layout of the page, you'll need to directly edit the PHP code with a plain text (file) editor. There is no foolproof WYSIWYG editor for PHP pages.

Link to comment
Share on other sites

It is the content of the homepage that I need to be able to edit. I can do it myself easily in notepad, dreamweaver etc as I have some html experience. The solution I want is for the store owner to be able to update his home page with news updates, etc.

 

As I said earlier there is an add on for osCommerce 2.2 for editing the homepage, conditions of use etc pages but it is table based and not CSS.

 

Thanks for your reply

 

Mark

Link to comment
Share on other sites

Thinking about it some more, I have to say that it's a complete waste of time to give a layman a WYSIWYG HTML editor. At least, for all the editors I've ever seen, a layman will screw it up badly. For example, the code has an ordered list (<ol>) with 4 items in it. The store owner wants to add a 5th item. What are they going to do? Add a paragraph with a hard coded 5. in it at the end! If they can see the tags (and have the training to understand them), or the editor has a tremendous amount of smarts to restrict what they can do ("Here is a numbered list between this mark and this one. You can add, remove, move, or change a list item.") it might work. To hand a WYSIWYG editor over to an inexperienced store owner will lead to lots of problems. They will complain to you that the new 5th element doesn't quite match the look of the rest of the list, so fix it!

 

That said, if you still want to explore the possibilities, I'm sure something could be done. One thing would be to offer an editor page in the admin, where you could keep a list of all the defines for each page, and use an editor such as CKEditor to update them. If you can get at least the common CSS in effect, that would be good. To write an edited entry back into the file would be challendging, as it could have multiple lines. Any apostrophes would have to be escaped. The referenced editor for 2.2 seems to be something along these lines.

 

Another method would be a Wiki-style edit button for each separate define. For just one specific user ID (the store administrator), the regualr catalog pages would be built with each define'd text in its own id'd <span>. The page designer would put an edit button (seen only by the administrator) for that text somewhere on the page, preferably close to the text (or a toolbar could be used). When mousing over the Edit button, the corresponding text would be highlighted so the administrator knows which text they'll be editing. Click on the Edit button to pop up a CKEditor page (using the existing CSS, or refresh this page to invoke the editor). When saving, again escape apostrophes and rewrite the language file. The advantage here is that all the page's normal CSS is in effect. A nice extra would be to restrict the editor width to the final width of the element, to keep the formatting as close as possible to what they'll actually see on the page.

 

So, it could be done, with various degrees of success for someone who knows HTML and can work with a WYSIWYG editor to edit an existing page. For your Average Joe, I don't think the results will be worth the effort, unless you can find a fantastically sophisticated WYSIWYG HTML editor that won't let them mess up the page (call this "Prussian model editing").

Link to comment
Share on other sites

Thanks for the comprehensive reply, some interesting thoughts there.

 

I think for the moment I'll probably just get the owner to email me any updates and implement them myself as this would avoid him messing the page layout etc up.

 

Thanks again for your help.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...