awillard Posted April 21, 2004 Posted April 21, 2004 I have been trying to change the text: "This is a default setup of the osCommerce project, products shown are for demonstrational purposes, any products purchased will not be delivered nor will the customer be billed. Any information seen on these products is to be treated as fictional." by going to catalog/includes/languages/english/index.php and editing with text of my own, but I keep getting a parse error. What am I doing wrong? Also, how can I change the text in the other languages? Any suggestions? Thanks.
TerryK Posted April 21, 2004 Posted April 21, 2004 I usually get that error when I forget to escape single quotes. For example, text like "Let's see what we have here" should be entered as "Let\'s see what we have here." HTH, Terry Terry Kluytmans Contribs Installed: Purchase Without Account (PWA); Big Images, Product Availability, Description in Product Listing, Graphical Infobox, Header Tags Controller, Login Box, Option Type Feature, plus many layout changes & other mods of my own, like: Add order total to checkout_shipment Add order total to checkout_payment Add radio buttons at checkout_shipping (for backorder options, etc.) Duplicate Table Rate Shipping Module Better Product Review Flow * If at first you don't succeed, find out if there's a prize for the loser. *
awillard Posted April 21, 2004 Author Posted April 21, 2004 Ok, I tried that and am still getting this error: Parse error: parse error in /home/awillard/public_html/oscommerce-2.2ms2/catalog/includes/languages/english/index.php on line 13 Any ideas?
TerryK Posted April 21, 2004 Posted April 21, 2004 Can you post the applicable code from your languages/english/index.php file? Maybe start at line 1 and go through to about line 30? Terry Terry Kluytmans Contribs Installed: Purchase Without Account (PWA); Big Images, Product Availability, Description in Product Listing, Graphical Infobox, Header Tags Controller, Login Box, Option Type Feature, plus many layout changes & other mods of my own, like: Add order total to checkout_shipment Add order total to checkout_payment Add radio buttons at checkout_shipping (for backorder options, etc.) Duplicate Table Rate Shipping Module Better Product Review Flow * If at first you don't succeed, find out if there's a prize for the loser. *
awillard Posted April 21, 2004 Author Posted April 21, 2004 Here is what I'm starting out with: <?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 a 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><br><table border="0" width="100%" cellspacing="5" cellpadding="2"><tr><td class="main" valign="top">' . tep_image(DIR_WS_IMAGES . 'default/1.gif') . '</td><td class="main" valign="top"><b>Error Messages</b><br><br>If there are any error or warning messages shown above, please correct them first before proceeding.<br><br>Error messages are displayed at the very top of the page with a complete <span class="messageStackError">background</span> color.<br><br>Several checks are performed to ensure a healthy setup of your online store - these checks can be disabled by editing the appropriate parameters at the bottom of the includes/application_top.php file.</td></tr><td class="main" valign="top">' . tep_image(DIR_WS_IMAGES . 'default/2.gif') . '</td><td class="main" valign="top"><b>Editing Page Texts</b><br><br>The text shown here can be modified in the following file, on each language basis:<br><br><nobr class="messageStackSuccess">[path to catalog]/includes/languages/' . $language . '/' . FILENAME_DEFAULT . '</nobr><br><br>That file can be edited manually, or via the Administration Tool with the <nobr class="messageStackSuccess">Languages->' . ucfirst($language) . '->Define</nobr> or <nobr class="messageStackSuccess">Tools->File Manager</nobr> modules.<br><br>The text is set in the following manner:<br><br><nobr>define(\'TEXT_MAIN\', \'<span class="messageStackSuccess">This is a default setup of the osCommerce project...</span>\');</nobr><br><br>The text highlighted in green may be modified - it is important to keep the define() of the TEXT_MAIN keyword. To remove the text for TEXT_MAIN completely, the following example is used where only two single quote characters exist:<br><br><nobr>define(\'TEXT_MAIN\', \'\');</nobr><br><br>More information concerning the PHP define() function can be read <a href="http://www.php.net/define" target="_blank"><u>here</u></a>.</td></tr><tr><td class="main" valign="top">' . tep_ When I try to change the beginning text: "define('TEXT_MAIN', 'This is a 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." with my own text, or even delete it I get that error.
awillard Posted April 21, 2004 Author Posted April 21, 2004 Here is what my site looks like after I edit the text: http://www.ashleystreasurechest.net/oscomm...2.2ms2/catalog/ That happens when I make Any changes to the original text. Does anyone know what is causing this problem? Thanks.
241 Posted April 21, 2004 Posted April 21, 2004 There is a known issue with the online file manager removing \ backslashes from the code, so it is better to use an ftp program such as ws_ftp to download the file and edit offline then upload using the ftp this avoids the missing \ and helps stop the parse errors 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! Is your Osc dated try Phoenix raising oscommerce from the ashes.
awillard Posted April 23, 2004 Author Posted April 23, 2004 Thanks 241! I used an ftp editor and finally got it right. :D
Recommended Posts
Archived
This topic is now archived and is closed to further replies.