ladyren Posted January 3, 2005 Posted January 3, 2005 Please, please help me. My hosting company offers me no support with osCommerce... says to come here. I've had a quick look through the Knowledge Base but still am very, very lost!!! Through my control panel I installed osCommerce cart. Now I cannot see how to change the wording or look of it at all. Where do I go from here? Please help!
Jack_mcs Posted January 3, 2005 Posted January 3, 2005 Congratulations - you've made a good decision in going with OSC. :) The most important thing to remember is that it will take you some time to adjust to how editing your shop works. It will probably get very discouraging at times so just hang in there. It will become easier at some point. As for getting started, there is no one right method. You will find that many of your questions have already been answered here on the forums so learning to use the search tool is important. There is also some documentation located in the links at the top of this page. But a lot of your knowledge will come from just doing. For example, open the catalog/stylesheet.css file and find this code TD.infoBoxHeading { font-family: Verdana, Arial, sans-serif; font-size: 10px; font-weight: bold; background: #bbc3d3; color: #ffffff; } and change it to this TD.infoBoxHeading { font-family: Verdana, Arial, sans-serif; font-size: 10px; font-weight: bold; background: #ffc3d3; color: #ffffff; } Refresh your page and see what happens. Good luck with your shop. Jack Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
ladyren Posted January 3, 2005 Author Posted January 3, 2005 Discouraging!!! to say the least!!! i'm ready to shut up shop and go back to being a stay at home mum... lol the thing is... i don't even have a catalogue folder in my file manager???
Jack_mcs Posted January 3, 2005 Posted January 3, 2005 You may not have such a directory. It depends on how it was installed. When you see a reference to a file, the path is usually given. So catalog/stylesheet.css refers to your root directory - which can be anything. Sometimes you might see someone just write stylesheet.css, which would also mean the root directory. If you see includes/column_left.php, it means the column_left.php file in the includes directory, which is in the root directory. It takes some getting used to. Jack Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
ladyren Posted January 3, 2005 Author Posted January 3, 2005 YAY! I did it! I actually changed a colour!!! BUT the little bits on the side stay the original colour... why is that?
Jack_mcs Posted January 3, 2005 Posted January 3, 2005 Congratulations - again!! :) They are controlled by little images in the images/infobox/ directory. You need to edit them with an image editor to chage their color. BTW, I know it may not seem like it, but being able to make the change you already did puts you ahead of many first-timers. Jack Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
dwno Posted January 3, 2005 Posted January 3, 2005 Hi, and welcome to the forums :) The first advice I got when I were where you are now was to visit the knowledge base, just as you did. IMO, the site lacks a place for newbies to learn the essentials of what to do first, what to learn and what's most important to know in the beginning. Perhaps it's very hard to write down such a _small_ list, because I can't remember to have seen one. (note to osC veterans: there must be a good thread discussing this already, anyone know of a good one which could be linked to or pinned?) Here are some things that I found useful: -a template system contribution. This makes it very easy to change the design of your shop, simply by changing one html file. There's a contribution called STS and another one BTS, I went with STS. You can find it at http://www.oscommerce.com/community/contributions,1524, look for the v2.01 download (STS-2_01.zip) by author Brian Gallagher. -all text on osCommerce pages are stored in variables inside php-files. These files are located under /includes/languages/. If you for example wanted to change the text on the front page in english you would edit /includes/languages/english/index.php. The variables looks something like this: define('TABLE_HEADING_PRICE', 'Price'); This means that a variable called TABLE_HEADING_PRICE should have the value of Price. The variable name should not be changed, because osCommerce relies on it to display correct text, it is the value you want to change (if you want to change anything). You can also write html inside these variables, like this: define('TABLE_HEADING_PRICE', '<a href="/someurl">Price</a>'); _BUT_ you must know that when inserting certain characters, like ' (apostrophe), they have some other meaning to the php language, and must be escaped by a \ (backslash). For example: define('TABLE_HEADING_PRICE', '<a href=\'someurl\'>Buyer\'s price</a>'); If those apostrophes hadn't been escaped, you would have a syntax error. -There are many excellent contributions made, and you should definitely check out the contribution section at http://www.oscommerce.com/community/contributions/ Support on the contributions can be found in these forums at http://www.oscommerce.com/forums/index.php?showforum=7 The knowledge base is also a good place to learn (as you've already heard :) ) if you know what you need. http://www.oscommerce.info/ Hope I was to some help :)
ladyren Posted January 3, 2005 Author Posted January 3, 2005 Wow - I'm a pro... lol... I changed the tiny images so it looks normal now. Now... How do I remove the osCommerce from the top left and put my own name in there? Also, the shopping cart is for a subdomain... the 'Top' link points to my main domain... how do I get it to point to the subdomain? Thanks for being patient... I'm sure these are basic knowledge questions for you but for me they are rocket science!
Jack_mcs Posted January 3, 2005 Posted January 3, 2005 The page title? That's in includes/languages/english.php. But keep in mind what I said about using the search tool. That question gets asked almost daily so you will find lots of answers if you search for it. Most likely all of the questions you have over the next week or so will have already been answered so always try that approach first. Jack Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
ladyren Posted January 3, 2005 Author Posted January 3, 2005 ok - i did try the search first. I changed some text in the index and now get the error message Parse error: parse error, unexpected T_STRING in /my site on line 13 In the search I found that it could of been because of apostrophes like in I'm but I changed it to I am and still get the error.....?
dwno Posted January 3, 2005 Posted January 3, 2005 Can you show us the line that the error occurs on?
Jack_mcs Posted January 3, 2005 Posted January 3, 2005 Yep, that is why you are geting the error. Try posing your the code from the changed file here so osomeone can look at it. It could be caused by a number of things in the file so it would just be guessing without looking at the file. Jack Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
ladyren Posted January 3, 2005 Author Posted January 3, 2005 define('TEXT_MAIN' Hello there. I am typing! Can you see me? I feel like there is a light at the end of the tunnel!!! <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" is that enough information? i wasn't sure how much to put in and didn't want to overkill... did i mention you guys are great!?
Jack_mcs Posted January 3, 2005 Posted January 3, 2005 That's fine to explain the basic problem. All the text in the language files are entered by statements like define("TEXT_INFORMATION', "some text'); If you remove any of the formating codes, the result is the kind of message you are seeing. Notice that your code does not end in ');. Just change the text between the apostrophies (some text in the above example) and it should work. Jack Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
dwno Posted January 3, 2005 Posted January 3, 2005 define('TEXT_MAIN' Hello there. I am typing! .. Apostrophes before and after the variable value mustn't be removed, it is apostrophes _between_ the starting and ending apostrophe that must be escaped with a backslash. Also, it looks like you removed a comma separating the variable name and value. It should be like this: define('TEXT_MAIN', 'Hello there. I\'m typing! ... '; All php commands (define() in this case) must be ended by a ; (semi-colon).
ladyren Posted January 3, 2005 Author Posted January 3, 2005 I must be missing something. I cut and pasted directly from what you put down... didn't work. I guess you may have to explain it to me like i'm a 6 year old... lol <?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', 'Hello there. I\'m typing! ... '; <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_image(DIR_WS_IMAGES . 'default/3.gif') . '</td><td class="main" valign="top"><b>Securing The Administration Tool</b><br><br>It is important to secure the Administration Tool as there is currently no security implementation available.</td></tr><tr><td class="main" valign="top">' . tep_image(DIR_WS_IMAGES . 'default/4.gif') . '</td><td class="main" valign="top"><b>Online Documentation</b><br><br>Online documentation can be read at the <a href="http://wiki.oscommerce.com" target="_blank"><u>osCommerce Wiki Documentation Effort</u></a> site.<br><br>Community support is available at the <a href="http://www.oscommerce.com/forums" target="_blank"><u>osCommerce Community Support Forums</u></a> site.</td></tr></table><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'); } ?>
Jack_mcs Posted January 3, 2005 Posted January 3, 2005 If you add extra apostrophies, they have to be escaped. So change this define('TEXT_MAIN', 'Hello there. I\'m typing! ... '; to this define('TEXT_MAIN', 'Hello there. I\'m typing! ... \'; Jack Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
ladyren Posted January 3, 2005 Author Posted January 3, 2005 I have it now. Thanks muchly... I was missing the slash to escape at the end.
ladyren Posted January 3, 2005 Author Posted January 3, 2005 Again, I did check the search again for this... Along the line at the top where the link says 'Top' it points to my main domain. I need it to point to a subdomain but cannot see where to change the URL destination....?
dwno Posted January 3, 2005 Posted January 3, 2005 First of all, I forgot to end the paranthesis, so my code was wrong, it should be like this: (I hope ;) ) define('TEXT_MAIN', 'Hello there. I\'m typing! ... '); However, the problem in your example is that you copied and pasted my code in front of your already existing content. If you remove the ending apostrophe and semi-colon from my code (or escape them with backslash if you want to display them, but you don't want that) things should work fine. The command should be of the following syntax: define('CONSTANT_NAME', 'Content here, bla bla bla.'); The entire command in your case would be: define('TEXT_MAIN', 'Hello there. I\'m typing! ... <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_image(DIR_WS_IMAGES . 'default/3.gif') . '</td><td class="main" valign="top"><b>Securing The Administration Tool</b><br><br>It is important to secure the Administration Tool as there is currently no security implementation available.</td></tr><tr><td class="main" valign="top">' . tep_image(DIR_WS_IMAGES . 'default/4.gif') . '</td><td class="main" valign="top"><b>Online Documentation</b><br><br>Online documentation can be read at the <a href="http://wiki.oscommerce.com" target="_blank"><u>osCommerce Wiki Documentation Effort</u></a> site.<br><br>Community support is available at the <a href="http://www.oscommerce.com/forums" target="_blank"><u>osCommerce Community Support Forums</u></a> site.</td></tr></table><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>.'); Note that I haven't tested this, but can't see any other obvious errors, and I don't think there are any. Another thing; if you look closely on that code you can see some apostrophes followed by punctuations and some variable or constant. For example at the end: ... <b>' . PROJECT_VERSION . '</b></font>.'); You should not escape these apostrophes, because they mean something to the code. This is the way to insert variables or constants. The syntax is like this: define('TEXT_MAIN', 'Hello there. I\'m typing! The content of the constant SOME_CONSTANT is: ' . SOME_CONSTANT . '<br> This is some more text followed by variable some_variable' . $some_variable . '<br>bla bla bla.The end.'); As you may see, constants and variables are inserted by adding ' . CONSTANT . ' to the text. This ends the active quoting, adds the value of the constant, and then starts a new quoting, which in turn will be ended later in the code. This makes perfect sense to me anyway, but keep asking until you understand :)
dwno Posted January 3, 2005 Posted January 3, 2005 If you add extra apostrophies, they have to be escaped. So change thisdefine('TEXT_MAIN', 'Hello there. I\'m typing! ... '; to this define('TEXT_MAIN', 'Hello there. I\'m typing! ... \'; Jack <{POST_SNAPBACK}> No, that ending apostrophe shouldn't be escaped, it was the ending parantheses that was missing. The added apostrophe (as in I\'m) is escaped as you can see (if that was what you were mentioning).
ladyren Posted January 3, 2005 Author Posted January 3, 2005 No, sorry. I've got that bit now... am all happy... can type text in and it shows up... But now I need to change the link on the left of the page under the banner that says top. I need it to point to my subdomain and it points to my main domain... just not sure where to go in and change it.
Jack_mcs Posted January 3, 2005 Posted January 3, 2005 No, that ending apostrophe shouldn't be escaped, it was the ending parantheses that was missing. The added apostrophe (as in I\'m) is escaped as you can see (if that was what you were mentioning). <{POST_SNAPBACK}> No, I only quoted the part that was wrong. There was more text after that so the one I escaped is correct. Jack Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
dwno Posted January 3, 2005 Posted January 3, 2005 Again, I did check the search again for this... Along the line at the top where the link says 'Top' it points to my main domain. I need it to point to a subdomain but cannot see where to change the URL destination....? <{POST_SNAPBACK}> You're refering to the breadcrumbs menu, right? To the left it says Top, then comes Catalog? Is the catalog link pointing to your shop? If so, I think the easy solution would be to remove the Top link and rename the Catalog link. Don't know how to do this yet (I'm pretty new to osCommerce myself), but if that is what you're refering to I can give it a try, unless someone else already know how to do this.
Jack_mcs Posted January 3, 2005 Posted January 3, 2005 No, sorry. I've got that bit now... am all happy... can type text in and it shows up... But now I need to change the link on the left of the page under the banner that says top. I need it to point to my subdomain and it points to my main domain... just not sure where to go in and change it. <{POST_SNAPBACK}> Here's what you find when you search for "change top." Jack Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
Recommended Posts
Archived
This topic is now archived and is closed to further replies.