dekop Posted January 16, 2013 Posted January 16, 2013 hello i want to add some text to my index.php so that if you enter the website you will se a picture of a comming soon product and below that i want to insert some text but i have try'd a couple of solutions but the wouldn't work can someon please help me
♥14steve14 Posted January 16, 2013 Posted January 16, 2013 Open your includes/language/english/index.php and add define('TEXT_FRONT_PAGE', 'Enter your text here'); Next open your index.php file and find <tr> <td class="main"><?php echo TEXT_MAIN; ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> Alter it to <tr> <td class="main"><?php echo TEXT_FRONT_PAGE; ?></td> <tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td class="main"><?php echo TEXT_MAIN; ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> You can move the <tr> <td class="main"><?php echo TEXT_FRONT_PAGE; ?></td> <tr> to wherevever you want the text to appear as long as it is within the table. REMEMBER BACKUP, BACKUP AND BACKUP
dekop Posted January 16, 2013 Author Posted January 16, 2013 in my index.php i cant find Next open your index.php file and find <tr> <td class="main"><?php echo TEXT_MAIN; ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> if i just ctrl + h to search for a word and i use separator i cant even vind it
multimixer Posted January 16, 2013 Posted January 16, 2013 @@dekop What @@14steve14 posted refer to the old osCommerce version. Since you probably use version 2.3.x, the section look like this <h1><?php echo HEADING_TITLE; ?></h1> <div class="contentContainer"> <div class="contentText"> <?php echo tep_customer_greeting(); ?> </div> <?php if (tep_not_null(TEXT_MAIN)) { ?> <div class="contentText"> <?php echo TEXT_MAIN; ?> </div> <?php } include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); include(DIR_WS_MODULES . FILENAME_UPCOMING_PRODUCTS); ?> </div> What you can do is - Go to file catalog/includes/languages/english/index.php and add anything you want to TEXT_MAIN - Define a new constant, e.g. MY_FRONTPAGE_TEXT and add it to catalog/index.php in the same way as TEXT_MAIN is getting added - Take a look at the add ons for a addon called "modular frontpage" My community profile | Template system for osCommerce - New: Responsive | Feedback channel
♥14steve14 Posted January 16, 2013 Posted January 16, 2013 My mistake took the code from the wrong files version. Sorry REMEMBER BACKUP, BACKUP AND BACKUP
dekop Posted January 16, 2013 Author Posted January 16, 2013 i use version 2.3.3 so if i want to do it i need to instert define('TEXT_FRONT_PAGE', 'Enter your text here'); to my language/DUTCH/index.php and then i need to make a new table? in the catalog/index.php with the <div class="contentText"> <?php echo TEXT_FRONT_PAGE; ?> </div> or dont i need to create a table at all
multimixer Posted January 16, 2013 Posted January 16, 2013 Yes, you can do as you describe it, or use the existing TEXT_MAIN and add your text to there, as you like My community profile | Template system for osCommerce - New: Responsive | Feedback channel
dekop Posted January 16, 2013 Author Posted January 16, 2013 well thanks you for your help it really did now if u dont mind i have one last question.....
multimixer Posted January 16, 2013 Posted January 16, 2013 @@dekop Go ahead then - even it won't be the last for sure :) My community profile | Template system for osCommerce - New: Responsive | Feedback channel
dekop Posted January 16, 2013 Author Posted January 16, 2013 becuase in the index there is an image and now the text is beeing put above the image do i need to alter the place were i called it to adjust that?
multimixer Posted January 16, 2013 Posted January 16, 2013 @@dekop Can you say your url? There is no image by default in osCommerce. Do you have a template? My community profile | Template system for osCommerce - New: Responsive | Feedback channel
multimixer Posted January 16, 2013 Posted January 16, 2013 Please post the section of your catalog/index.php file that start after } else { // default page Do not post the complete file and if possible use code tags, that is the <> symbol in the tools line while typing the post My community profile | Template system for osCommerce - New: Responsive | Feedback channel
dekop Posted January 16, 2013 Author Posted January 16, 2013 it is already below the } else { // default page line <?php } else { // default page ?> <h1><?php echo HEADING_TITLE; ?></h1> <div class="contentContainer"> <div class="contentText"> <?php echo tep_customer_greeting(); ?> </div> <div class="contentText"> <?php echo TEXT_FRONT_PAGE; ?> </div> // the text_front_page is the line i added for the tekst i can also to be sure just add the line all the way at the bottom of the page but i dont know if it will help
multimixer Posted January 16, 2013 Posted January 16, 2013 You need to post a bit more of the file, need to see where the image comes from. Post from where you started till the end of the file My community profile | Template system for osCommerce - New: Responsive | Feedback channel
dekop Posted January 16, 2013 Author Posted January 16, 2013 well those codes were from the catalog/index.php and the image is in the catalog/include/language/Dutch/index.php but this is the code were the image is at define('TEXT_MAIN', '<h2><IMG SRC="images/sabertooth2.jpg" WIDTH="630" HEIGHT="400" ALT="razer sabertooth controler coming soon">'); and the line i just added + the code i just showed you is in the catalog index.php
multimixer Posted January 16, 2013 Posted January 16, 2013 Ah, ok, though there is some slider or something. Things are easy, just place the new <div class="contentText"> <?php echo TEXT_FRONT_PAGE; ?> </div> after the existing <div class="contentText"> <?php echo TEXT_MAIN; ?> </div> My community profile | Template system for osCommerce - New: Responsive | Feedback channel
dekop Posted January 16, 2013 Author Posted January 16, 2013 thank you i couldnt have done it without your help thank you @@multimixer
Recommended Posts
Archived
This topic is now archived and is closed to further replies.