Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Links in Boxes


buzltyr

Recommended Posts

If this has been discussed before I apologize. I did not find anything in search.

 

I am trying to add a link to my help desk and adding in the information box as described in the knowledge base I copied and pasted what was written there and I get the following error:

Parse error: parse error, unexpected T_VARIABLE, expecting ')' in /mounted-storage/xxx/xxx/xxx/lucky7sales/includes/boxes/information.php on line 29

 

Here is what I copied:

$info_box_contents[] = array('align' => 'left',

'text' => '<a href="http://lucky7sales.com/helpdesk/ttx.cgi?cmd=newticket&sid=&style=" target="_blank">Help Desk</a>'

);

 

just above the:

new infoBox($info_box_contents);

?>

</td>

</tr>

<!-- information_eof //-->

A search for T Variable concluded that possibly it needs ()? But where the code appears to have the () around it all. I am stumped.

Thanks in advance for any help. :blush:

Link to comment
Share on other sites

Can you paste the whole code? As far as I can see there is nothing wrong with that little bit of code.

 

 

Here is the whole /includes/boxes/information.php with the code I inserted:

<!-- information //-->

<tr>

<td>

<?php

$info_box_contents = array();

$info_box_contents[] = array('text' => BOX_HEADING_INFORMATION);

 

new infoBoxHeading($info_box_contents, false, false);

 

$info_box_contents = array();

$info_box_contents[] = array('text' => '<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_CONDITIONS) . '">' . BOX_INFORMATION_CONDITIONS . '</a><br>' .

'<a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a><br>' .

'<a href="' . tep_href_link(FILENAME_LINKS) . '">' . Links . '</a>');

Here is what I copied:

$info_box_contents[] = array('align' => 'left',

'text' => '<a href="http://lucky7sales.com/helpdesk/ttx.cgi?cmd=newticket&sid=&style=" target="_blank">Help Desk</a>'

);

 

 

 

new infoBox($info_box_contents);

?>

</td>

</tr>

<!-- information_eof //-->

 

Thank you, ma'am

Link to comment
Share on other sites

Give this a shot

<!-- information //-->
<tr>
<td>
<?php
$info_box_contents = array();
$info_box_contents[] = array('text' => BOX_HEADING_INFORMATION);

new infoBoxHeading($info_box_contents, false, false);

$info_box_contents = array();
$info_box_contents[] = array('text' => '<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_CONDITIONS) . '">' . BOX_INFORMATION_CONDITIONS . '</a><br>' .
'<a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a><br>' .
'<a href="' . tep_href_link(FILENAME_LINKS) . '">' . Links . '</a><br>' .
'<a href="http://lucky7sales.com/helpdesk/ttx.cgi?cmd=newticket&sid=&style=" target="_blank">Help Desk</a>'); 

new infoBox($info_box_contents);
?>
</td>
</tr>
<!-- information_eof //-->

 

You just had to add the link to where the other links were. Not add a brand new $info_box_contents[] line

Wendy James

 

Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.

Link to comment
Share on other sites

Give this a shot

<!-- information //-->
<tr>
<td>
<?php
$info_box_contents = array();
$info_box_contents[] = array('text' => BOX_HEADING_INFORMATION);

new infoBoxHeading($info_box_contents, false, false);

$info_box_contents = array();
$info_box_contents[] = array('text' => '<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_CONDITIONS) . '">' . BOX_INFORMATION_CONDITIONS . '</a><br>' .
'<a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a><br>' .
'<a href="' . tep_href_link(FILENAME_LINKS) . '">' . Links . '</a><br>' .
'<a href="http://lucky7sales.com/helpdesk/ttx.cgi?cmd=newticket&sid=&style=" target="_blank">Help Desk</a>'); 

new infoBox($info_box_contents);
?>
</td>
</tr>
<!-- information_eof //-->

 

You just had to add the link to where the other links were. Not add a brand new $info_box_contents[] line

 

 

Yes that did work and now that I see it I understand the reasoning. Thanks for your help you are a life saver!!! :rolleyes:

Link to comment
Share on other sites

You're welcome. I think everyone has that problem at least once. lol :)

 

What you did would have been perfect for a new box with just one link in it so you did good.

Wendy James

 

Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...