Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

help please


joekilo

Recommended Posts

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

Link to comment
Share on other sites

probably an extra ) in line 29... or you have missed a semi-colon in a previous line.... no code to look at so.... :shock:

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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."

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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:

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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."

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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."

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...