simplebear Posted February 25, 2007 Posted February 25, 2007 I am new to editing in C-panel and OSC. I would like to know how to add text to my front page. I tried going to laquages/english/index.php but couldn't figure out where to put the text????? Can someone help me out here? i have no knowledge of PHP and would like to learn how to do this on my own without having to pay someone. Is this the right file? /home/simplebe/public_html/includes/languages/english/index.php... <?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 (c) 2003 osCommerce Released under the GNU General Public License */ 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'); } ?>
psynaptic Posted February 25, 2007 Posted February 25, 2007 I am new to editing in C-panel and OSC. I would like to know how to add text to my front page. I tried going to laquages/english/index.php but couldn't figure out where to put the text????? Can someone help me out here? i have no knowledge of PHP and would like to learn how to do this on my own without having to pay someone. Is this the right file? /home/simplebe/public_html/includes/languages/english/index.php... /home/simplebe/public_html/includes/languages/english.php search for TEXT_MAIN My Profile | Contribs I like most: 'On The Fly' Auto Thumbnailer, Active Countries, Header Tags Controller, Ultimate SEO URLs, UK Based osC, UK Postcode Validation, Open Featured Sets, UK Postcode Based Carrier Shipping
lstra Posted February 25, 2007 Posted February 25, 2007 Add the following line of code below */ define('TEXT_MAIN', ' ' ); Then to add your text put it in between the ' ' For example, define('TEXT_MAIN', 'YOUR TEXT HERE' ); This would produce YOUR TEXT HERE on home page. Regards, Luke P.S If you use an apostrophe remember to put a \ before it . (this doesnt include apostrophes in code already!!! Be careful not to delete any quote marks.
simplebear Posted February 25, 2007 Author Posted February 25, 2007 Thank you for the responses. This did not work. I put the word "Testing" in between the apostrophese and it didn't show up on the page.... I am still wondering if I am in the right file here.
simplebear Posted February 25, 2007 Author Posted February 25, 2007 still need some advice on editing the front page
knifeman Posted February 26, 2007 Posted February 26, 2007 still need some advice on editing the front page How to edit store front page Dig deep in catalog/includes/languages/english/index.php. and edit the text there using a text editor (do not use file manager). Backup files BEFORE making changes................... Your file is missing some lines. Here is the first part of mine: <?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 (c) 2003 osCommerce Released under the GNU General Public License */ define('TEXT_MAIN', 'My Text'); define('TABLE_HEADING_NEW_PRODUCTS', 'Featured Products For %s'); define('TABLE_HEADING_UPCOMING_PRODUCTS', 'Upcoming Products'); define('TABLE_HEADING_DATE_EXPECTED', 'Date Expected'); define('TABLE_HEADING_FEATURED_PRODUCTS', 'Featured Products');
simplebear Posted February 26, 2007 Author Posted February 26, 2007 there is not an "includes" option under catalog.... the only way to edit the files is through the file manager under "Tools" or through the C-panel
Guest Posted February 26, 2007 Posted February 26, 2007 there is not an "includes" option under catalog.... the only way to edit the files is through the file manager under "Tools" or through the C-panel You shouldn't have to dig that deep. It's in your yoursite.com/admin . You'll see it there if you look. (that's if you want to just change the basic text)
simplebear Posted February 26, 2007 Author Posted February 26, 2007 <_< yeah now thats what i call explaining where the file is
Ausgirl Posted February 26, 2007 Posted February 26, 2007 You can do this by either: 1): Your Admin under TOOLS then click DEFINE LANGUAGES then on the right is a list of files. Click index.php there you will see this in the top of the file: <?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', 'YOUR TEXT GOES HERE!'); define('TABLE_HEADING_NEW_PRODUCTS', 'Featured Products For %s'); define('TABLE_HEADING_UPCOMING_PRODUCTS', 'Upcoming Products'); define('TABLE_HEADING_DATE_EXPECTED', 'Date Expected'); or 2): In your Admin under TOOLS click FILE MANAGER Scroll down til you come to the INCLUDES FOLDER click the yellow folder then click the LANGUAGE folder then click the ENGLISH folder, scroll down to the index.php click it, the click edit. 3): You can use your cPanel and follow the same path as step 2): You are missing this line: define('TEXT_MAIN', 'My Text'); You need to add it before this line: define('TABLE_HEADING_NEW_PRODUCTS', 'Featured Products For %s'); You need to add it to your index.php following one of the paths mentioned. They all lead to the same file. Dont think it can be explained any simpler than that, and take note of what the others have explained. Make sure your text goes inbetween the ' ' as mentioned. You'll work it out. :)
simplebear Posted February 26, 2007 Author Posted February 26, 2007 I have done all the above procedures and the text is not showing up on the front page.......
Guest Posted February 26, 2007 Posted February 26, 2007 Hi Amy. I am also new to oscommerce, and have been posting some request for help in this same forum. I have looked through your posts and also at the comments. what you are asking to do is very simple and the methods listed by those who have been kind enough to reply should all do what you are asking. I have two points to make about your responses. Firstly this is a free forum where people offer help on a voluntary basis. You are using free software to try and make money, so it is unreasonable to expect a decent level of supprt, and any that you do receive, you should be grateful for. Your replies have been less than grateful and this is probably why you have not got the replies you hope for. Secondly, you say you are inexperienced and would rather not pay someone to help you set this up. Open source software is by nature under constant development by a community who give their time without reward in order to help the greater good. expecting to be guided through this as a novice is asking abit much. in order to develop php web applications a small amount of knowledge of web site structure and php is pretty much essential. If you dont have this, and more to the point, don't seem to want to learn without being lead by the hand, maybe one of the commercial ecommerce products available would be more suitable. They are available for a modest fee in some cases and would include all the support you could desire.
clive Posted February 26, 2007 Posted February 26, 2007 Hi Amy I have many oscommerce sites and have found the best way to add content to the front page is to dump the php for html. You can achieve this by removing from your index.php file around line 370 <td class="main"><?php echo TEXT_MAIN; ?></td> and replace it with <td class="main"><?php include ('MAIN.HTML'); ?></td>. Create a html file called MAIN.HTML and you can easily add and arrange your front page. Look here to see results: www.replacementprinterinkcartridges.co.uk/catalog regards
simplebear Posted February 26, 2007 Author Posted February 26, 2007 @agentblu..... I have not said anything out of the way I was merely stating that these methods did not work :huh: @clive..... ty for suggesting the html conversion. I am not quite sure how to go about that. but i will try it and get back to you :thumbsup:
Ausgirl Posted February 27, 2007 Posted February 27, 2007 Hello Amy, Well said Thom. These methods do work. If you just follow the instructions, if it is not working, then you are the one doing something wrong. You could try using a polite "Thanks for your help but...." Manners cost you nothing. You could also try posting a link to your site so someone can help you find where the problem is. You had one line of code missing, maybe you have something else missing? I myself have no knowledge of php, but thanks to the people here in the forums they have helped me modify my site and got me out of trouble many times. In return, I try to pass on what I have learnt, when I can. Pay it forward if you like. It is only fair. People are more than willing to take the time to help you, but you cannot expect it to happen over night, you must remember people in the forum aren't all on your time zone, so a response may not always come so quickly. People here in the forum have no time for people whom forget their manners.
MSP Posted February 27, 2007 Posted February 27, 2007 are you using an ftp program to upload these changes?
mselle Posted February 27, 2007 Posted February 27, 2007 <_< I am paying for my oscommerce and havent had much luck with getting any help let alone free knowledge. Hi Amy. I am also new to oscommerce, and have been posting some request for help in this same forum. I have looked through your posts and also at the comments. what you are asking to do is very simple and the methods listed by those who have been kind enough to reply should all do what you are asking. I have two points to make about your responses. Firstly this is a free forum where people offer help on a voluntary basis. You are using free software to try and make money, so it is unreasonable to expect a decent level of supprt, and any that you do receive, you should be grateful for. Your replies have been less than grateful and this is probably why you have not got the replies you hope for. Secondly, you say you are inexperienced and would rather not pay someone to help you set this up. Open source software is by nature under constant development by a community who give their time without reward in order to help the greater good. expecting to be guided through this as a novice is asking abit much. in order to develop php web applications a small amount of knowledge of web site structure and php is pretty much essential. If you dont have this, and more to the point, don't seem to want to learn without being lead by the hand, maybe one of the commercial ecommerce products available would be more suitable. They are available for a modest fee in some cases and would include all the support you could desire.
jonquil Posted February 27, 2007 Posted February 27, 2007 Hi Elle, I know it can be frustrating. If there were only a mind-meld technique that would give us all we need to know ASAP, we wouldn't be here. Among a myriad things you will learn with osC, sometimes a visual helps. This link shows you the structure of osC and how each file is dependent on so many others. http://oscdox.com/crossx/nav.html?_functions/index.html You'll dabble in mSQL, phpMyAdmin, your cPanel, and FTP <-- This will save you countless hours of starting from scratch. Many files, some of the same name, can mistakenly be uploaded to, or edited in, the wrong directory and everything crashes (temporarily). One deleted apostrophe (single quote) and the sun just won't shine. We have ALL done it. One thing I have learned is to go slowly and methodically. Making the time to learn that the Greek really does make sense at the end of the day will serve you well :) I PMd you because maybe you'd rather work outside the forum to get your feet nice and wet. Let's see if we can get you past the first hurdle :) jon It's all just ones and zeros....
BJH Posted February 27, 2007 Posted February 27, 2007 Hi Amy I have many oscommerce sites and have found the best way to add content to the front page is to dump the php for html. You can achieve this by removing from your index.php file around line 370 <td class="main"><?php echo TEXT_MAIN; ?></td> and replace it with <td class="main"><?php include ('MAIN.HTML'); ?></td>. Create a html file called MAIN.HTML and you can easily add and arrange your front page. Look here to see results: www.replacementprinterinkcartridges.co.uk/catalog regards This is a really good tip, it works brilliantly and is so easy using HTML Regards
magis16 Posted March 26, 2007 Posted March 26, 2007 Awesome. By the third or fourth post in, I had it sorted. I am VERY NEW at this, and I truly appreciate the help offered here. Now, on to some more pressing matters like getting better resolution pics from that crumy digital camera I'm using. :lol: Cheers!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.