Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Looking for opinions......


Motorbikeman

Recommended Posts

On the simplest way to edit the text on the front page of the store. I've had a look at a couple of PHP editiors (Crimson Net, PHP Editor etc) but either I'm doing something wrong or they don't really seem any easier than simply editing the text in something like notepad. I guess what I'm wondering is, is there any such thing as a wysiwyg editor for php, or maybe some way of doing it in for example Frontpage and then converting to php.

Link to comment
Share on other sites

you dont need a php editor to edit the front page text. you can do it in notepad if you want. just download the correct file, make a copy of it to have in case you mess something up, then open it in notepad, change the text to what you want, save it and re-upload it.

What? Yeah, I can do that.

Link to comment
Share on other sites

That is correct. The easiest way I do it is to use Cyberduck (i'm on Max OSX so it might not be available for you) and after i've uploaded a file once, I can then make further changes (I use dreamweaver 90% of the time and other random text programs 10%) and then simply double click cyberduck and it will upload that file again for you, then refresh the browser and you can see the changes.

Link to comment
Share on other sites

For WYSISYG, check out http://www.oscommerce.com/community/contributions,4563

 

Basically the text that you see is mostly in HTML, so this should help out for adding things like product descriptions. It's not going to help with editing the front page, since that's defined in /includes/languages/english/index.php in TEXT_MAIN so you will need a HTML creator (I use Dreamweaver) so do that work for you (at least that's how I've always done it)

Link to comment
Share on other sites

I did a bit of experimenting with Frontpage and had some limited success as can be seen here http://motorbikeman.freepgs.com/catalog

 

However, if I now try and re-edit it, I keep getting the following error

 

 

Parse error: parse error, unexpected T_STRING in /fpgs/fpgshttpd/motorbikeman/catalog/includes/languages/english/index.php on line 61

Any ideas as to what that actually means and how to fix it?

Link to comment
Share on other sites

What are you using to upload the files?

 

As long as you have define('TEXT_MAIN', 'XXXXXXX[Your HTML & Text]XXXXXX');

I'm using FP to generate the code which I'm then copying and pasting into the php file using the Freepgs ftp tool.

 

Here's the coding that's generating the error, I must be missing something obvious as it looks right to me.

 

<?php

/*

$Id: index.php,v 1.1 2003/06/11 17:38:00 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

define('TEXT_MAIN', 'This is <b>NOT A LIVE</b> default setup of the osCommerce project, products shown are for demonstrational purposes, <b>any products purchased will not be delivered nor will the customer be billed</b>. Any information seen on these products is to be treated as fictional.<br>

<p>This is another experiment to see if I can edit this page in Frontpage.</p>

<div align="center">

<table border="1" id="table1" style="border-width: 0px">

<tr>

<td style="border-style: none; border-width: medium" align="center">

<img border="0"

src="http://www.crystalmaster.co.uk/images/023-03-003.jpg"

width="100" height="96"></td>

<td style="border-style: none; border-width: medium" align="center">

<img border="0"

src="http://www.crystalmaster.co.uk/images/026-01-006.jpg"

width="100" height="133"></td>

</tr>

<tr>

<td style="border-style: none; border-width: medium" align="center">

<img border="0"

src="http://www.crystalmaster.co.uk/images/030-05.jpg" width="100"

height="88"></td>

<td style="border-style: none; border-width: medium" align="center">

<img border="0"

src="http://www.crystalmaster.co.uk/images/BASKET-05-007.jpg"

width="200" height="150"></td>

</tr>

<tr>

<td style="border-style: none; border-width: medium" align="center"> </td>

<td style="border-style: none; border-width: medium" align="center"> </td>

</tr>

<tr>

<td style="border-style: none; border-width: medium" align="center">

This is to see if using a table in FP works</td>

<td style="border-style: none; border-width: medium" align="center"> </td>

</tr>

<tr>

<td style="border-style: none; border-width: medium" align="center"> </td>

<td style="border-style: none; border-width: medium" align="center"> </td>

</tr>

<tr>

<td style="border-style: none; border-width: medium" align="center"> </td>

<td style="border-style: none; border-width: medium" align="center">

I really hope it does, that would make life soooooo much easier</td>

</tr>

<tr>

<td style="border-style: none; border-width: medium" align="center"> </td>

<td style="border-style: none; border-width: medium" align="center">

</td>

</tr>

<tr>

<td style="border-style: none; border-width: medium" align="center">

It does work!!!! It's ALIVE!!!! </td>

<td style="border-style: none; border-width: medium" align="center">

MWUHAHAHAHAHA!!!!</td>

</tr>

</table>

</div>

<br>If you wish to download the solution powering this shop, or if you wish to contribute to the osCommerce project, please visit the <a href="http://www.oscommerce.com" target="_blank"><u>support site of osCommerce</u></a>. This shop is running on osCommerce version <font color="#f0000"><b>' . PROJECT_VERSION . '</b></font>.');

define('TABLE_HEADING_NEW_PRODUCTS', 'New Products For %s');

define('TABLE_HEADING_UPCOMING_PRODUCTS', 'Upcoming Products');

define('TABLE_HEADING_DATE_EXPECTED', 'Date Expected');

 

if ( ($category_depth == 'products') || (isset($HTTP_GET_VARS['manufacturers_id'])) ) {

define('HEADING_TITLE', 'Let\'s See What We Have Here');

define('TABLE_HEADING_IMAGE', '');

define('TABLE_HEADING_MODEL', 'Model');

define('TABLE_HEADING_PRODUCTS', 'Product Name');

define('TABLE_HEADING_MANUFACTURER', 'Manufacturer');

define('TABLE_HEADING_QUANTITY', 'Quantity');

define('TABLE_HEADING_PRICE', 'Price');

define('TABLE_HEADING_WEIGHT', 'Weight');

define('TABLE_HEADING_BUY_NOW', 'Buy Now');

define('TEXT_NO_PRODUCTS', 'There are no products to list in this category.');

define('TEXT_NO_PRODUCTS2', 'There is no product available from this manufacturer.');

define('TEXT_NUMBER_OF_PRODUCTS', 'Number of Products: ');

define('TEXT_SHOW', '<b>Show:</b>');

define('TEXT_BUY', 'Buy 1 \'');

define('TEXT_NOW', '\' now');

define('TEXT_ALL_CATEGORIES', 'All Categories');

define('TEXT_ALL_MANUFACTURERS', 'All Manufacturers');

} elseif ($category_depth == 'top') {

define('HEADING_TITLE', 'What\'s New Here?');

} elseif ($category_depth == 'nested') {

define('HEADING_TITLE', 'Categories');

}

?>

I realise there may be other ways that are 'better' than this to do what I want, but I need to set this up eventually for someone who has only just about grasped the use of FP and the thought of php just sends her into a panic attack :D

Link to comment
Share on other sites

Are you using an FTP Program to upload the file? I've read that using some of the online upload tools can make problems with the file and not make it work.

 

Everything looks fine from what I can see

I've just saved and uploaded the file with Filezilla and got exactly the same error message.

Link to comment
Share on other sites

I found out where the error was (w00t) (w00t)

 

Using FP to edit the page in a wysiwyg way seems to work with out any problems. I then cut and paste the code into PHP Editor to debug it. Turns out the error was an extra aphostrophe where I'd used it's instead of it is.

 

At least this now means I can lay things out relatively easy and then debug the script as well so not a bad result in the end :D

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...