joekilo Posted June 17, 2003 Posted June 17, 2003 help please .....can someone show me the correct coding for informaion .php from includes/boxes.....i created a php file so i could add to info box...i tried to do this by adding with the other links in that file and now i get this parse error Parse error: parse error, unexpected ')' in /home/wa604sb/public_html/cart/includes/boxes/information.php on line 29 what did i do wrong ? jk
Guest Posted June 17, 2003 Posted June 17, 2003 probably an extra ) in line 29... or you have missed a semi-colon in a previous line.... no code to look at so.... :shock:
joekilo Posted June 17, 2003 Author Posted June 17, 2003 all thats on line 9 is ); im sure that was already there though? is it the position of it on the line???? jk
Guest Posted June 17, 2003 Posted June 17, 2003 ummmm line 29... but I take 9 as a typo... you should not have just ); on a line... I would say it belongs to the previous line... if you find ); already there at the end of line 28 try deleting the extra on line 29
Guest Posted June 17, 2003 Posted June 17, 2003 oh... and look at a snippet of the code from there and a few lines surrounding it would be most helpful! :shock:
TB Posted June 17, 2003 Posted June 17, 2003 no code to look at so.... :shock: Concur... very difficult with no code posted... I could use my crystal ball, but my comptuer is plugged into the socket... so I wouldn't be able to answer you if I fired it up anyway since my computer would be off... Hey! I know an easy solution... post your information.php code. "The price of success is perseverance. The price of failure comes much cheaper."
joekilo Posted June 17, 2003 Author Posted June 17, 2003 sorry... of course this is the last few lines i tried to add aother file after contact section but had to delete due to this error now the error has stayed? 'text' => '<a href="' . tep_href_link(FILENAME_SHIPPING, '', 'NONSSL') . '">' . BOX_INFORMATION_SHIPPING . '</a><br>' . '<a href="' . tep_href_link(FILENAME_PRIVACY, '', 'NONSSL') . '">' . BOX_INFORMATION_PRIVACY . '</a><br>' . '<a href="' . tep_href_link(FILENAME_CONDITIONS, '', 'NONSSL') . '">' . BOX_INFORMATION_CONDITIONS . '</a><br>' . '<a href="' . tep_href_link(FILENAME_CONTACT_US, '', 'NONSSL') . '">' . BOX_INFORMATION_CONTACT . '</a>' ); jk
Guest Posted June 17, 2003 Posted June 17, 2003 Not quite enough.... need to see to see the whole code block.....what is before 'text'..? ... should be a ( Post a few more lines from above including what you just posted... and use the 'code' but in the formatting menu :shock:
joekilo Posted June 17, 2003 Author Posted June 17, 2003 ok sorry here is whole doc <?php /* $Id: information.php,v 1.5 2002/01/11 22:04:06 dgw_ Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2001 osCommerce Released under the GNU General Public License */ ?> <!-- information //--> <tr> <td> <?php $info_box_contents = array(); $info_box_contents[] = array('align' => 'left', 'text' => BOX_HEADING_INFORMATION ); new infoBoxHeading($info_box_contents, false, false); $info_box_contents = array(); $info_box_contents[] = array('align' => 'left', 'text' => '<a href="' . tep_href_link(FILENAME_SHIPPING, '', 'NONSSL') . '">' . BOX_INFORMATION_SHIPPING . '</a><br>' . '<a href="' . tep_href_link(FILENAME_PRIVACY, '', 'NONSSL') . '">' . BOX_INFORMATION_PRIVACY . '</a><br>' . '<a href="' . tep_href_link(FILENAME_CONDITIONS, '', 'NONSSL') . '">' . BOX_INFORMATION_CONDITIONS . '</a><br>' . '<a href="' . tep_href_link(FILENAME_CONTACT_US, '', 'NONSSL') . '">' . BOX_INFORMATION_CONTACT . '</a>' ); new infoBox($info_box_contents); ?> </td> </tr> <!-- information_eof //--> havent used code button before so hope this comes out good jk
TB Posted June 17, 2003 Posted June 17, 2003 In addition to there being no errors... there's no additional code in there from the standard version. What is the code/link you're trying to add? "The price of success is perseverance. The price of failure comes much cheaper."
joekilo Posted June 17, 2003 Author Posted June 17, 2003 i found the error it was caused in the about_us file i had uploaded missed out the _ i dont know why it was conecting the error still to the info file thanks for your help ....so that i dont make the same mistake twice can you tell me can i now imput my conection to about_us file in the info file we just checked? cheers jk
TB Posted June 17, 2003 Posted June 17, 2003 Top add the About Us option you need to change your code like the example below. $info_box_contents[] = array('text' => '<a href="' . tep_href_link(FILENAME_ABOUT_US) . '">' . BOX_INFORMATION_ABOUT . '</a><br>' . '<a href="' . tep_href_link(FILENAME_CONDITIONS) . '">' . BOX_INFORMATION_CONDITIONS . '</a><br>' . '<a href="' . tep_href_link(FILENAME_SHIPPING) . '">' . BOX_INFORMATION_SHIPPING . '</a><br>' . '<a href="' . tep_href_link(FILENAME_PRIVACY) . '">' . BOX_INFORMATION_PRIVACY . '</a><br>' . '<a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a>'); You also need to define the FILENAME_ABOUT_US in your catalog/includes/filenames.php file (or application_top.php for older versions). define('FILENAME_ABOUT_US', 'about_us.php'); You also need to define BOX_INFORMATION_ABOUT in your catalog/includes/languages/english.php. This code will create a link with "About Your Store Name" define('BOX_INFORMATION_ABOUT', 'About '. STORE_NAME .''); This code will create a link with "About Us" define('BOX_INFORMATION_ABOUT', 'About Us'); HTH, Tony "The price of success is perseverance. The price of failure comes much cheaper."
joekilo Posted June 17, 2003 Author Posted June 17, 2003 thanks for your response, almost there i hope...? i followed instructions exactly...but in my info box it the title has come up BOX_INFORMATION_ABOUT_US as on my information file ive put code here can you see anything wrong...ive done the other stuff in application tp etc '<a href="' . tep_href_link(FILENAME_ABOUT_US, '', 'NONSSL') . '">' . BOX_INFORMATION_ABOUT_US . '</a><br>' . '<a href="' . tep_href_link(FILENAME_SHIPPING, '', 'NONSSL') . '">' . BOX_INFORMATION_SHIPPING . '</a><br>' . '<a href="' . tep_href_link(FILENAME_PRIVACY, '', 'NONSSL') . '">' . BOX_INFORMATION_PRIVACY . '</a><br>' . '<a href="' . tep_href_link(FILENAME_CONDITIONS, '', 'NONSSL') . '">' . BOX_INFORMATION_CONDITIONS . '</a><br>' . '<a href="' . tep_href_link(FILENAME_CONTACT_US, '', 'NONSSL') . '">' . BOX_INFORMATION_CONTACT . '</a>' sorry about this? jk
joekilo Posted June 17, 2003 Author Posted June 17, 2003 ignore that ive juyst got to bottom of that...the only problem now is it doesnt link to the about us details ? jk
Recommended Posts
Archived
This topic is now archived and is closed to further replies.