Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Can somebody help with this code


Guest

Recommended Posts

I have been trying and trying, but no result. I am very new to PHP, so I dont really know what I am doing. I added a new info box for the the visa and mastercard logo. It is required that I put the link of mastercard and visa's url, which are visa = www.visa.no and mastercard = www.mastercard.com .

 

Can anybody help me and see what's wrong with this code. And to please help me to add the mastercard's logopic and url to the code. (I get a Parse error: parse error in /home/shop/public_html/includes/boxes/cc.php on line 16)

 

 

<?php
?>
<!-- information //-->
? ? ? ? ?<tr>
? ? ? ? ? ?<td>
<?php
?$info_box_contents = array();
?$info_box_contents[] = array('align' => 'left',
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 'text' ?=> 'Vi aksepterer:'
? ? ? ? ? ? ? ? ? ? ? ? ? ? ?);
?new infoBoxHeading($info_box_contents, false, false);

?$info_box_contents = array();
?$info_box_contents[] = array('align' => 'center',
?'text' => $categories_string);
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 'text' ?=> '<a href="http://www.visa.no"' target="_blank"> . tep_image(DIR_WS_IMAGES . 'Visa_60x38pix_8914a.jpg') '</a><br>'
?new infoBox($info_box_contents);
?>
? ? ? ? ? ?</td>
? ? ? ? ?</tr>
<!-- information_eof //-->

 

Please help! And thanks in advance!!!!

Link to comment
Share on other sites

I have been trying and trying, but no result. I am very new to PHP, so I dont really know what I am doing. I added a new info box for the the visa and mastercard logo. It is required that I put the link of mastercard and visa's url, which are visa = www.visa.no and mastercard = www.mastercard.com .

 

Can anybody help me and see what's wrong with this code. And to please help me to add the mastercard's logopic and url to the code.

 

<?php
?>
<!-- information //-->
         <tr>
           <td>
<?php
 $info_box_contents = array();
 $info_box_contents[] = array('align' => 'left',
                              'text'  => 'Vi aksepterer:'
                             );
 new infoBoxHeading($info_box_contents, false, false);

 $info_box_contents = array();
 $info_box_contents[] = array('align' => 'center',
 'text' => $categories_string);
                              'text'  => '<a href="http://www.visa.no"' target="_blank"> . tep_image(DIR_WS_IMAGES . 'Visa_60x38pix_8914a.jpg') '</a><br>'
 new infoBox($info_box_contents);
?>
           </td>
         </tr>
<!-- information_eof //-->

 

Please help! And thanks in advance!!!!

'text'  => '<a href="http://www.visa.no"' target="_blank"> . tep_image(DIR_WS_IMAGES . 'Visa_60x38pix_8914a.jpg') '</a><br>'

 

should read

 

'text'  => '<a href="http://www.visa.no" target="_blank">' . tep_image(DIR_WS_IMAGES . 'Visa_60x38pix_8914a.jpg') . '</a><br>');

 

 

(you missed a ' at the blank"> and point between jpg) </a> and the closing of the array: );

 

 

Think thats it

 

Mattice

 

EDIT: you also had a ' after the visa.no" which shouldn't be there.

"Politics is the art of preventing people from taking part in affairs which properly concern them"

Link to comment
Share on other sites

<!-- information //-->
        <tr>
          <td>
<?php
$info_box_contents = array();
$info_box_contents[] = array('align' => 'left',
                             'text'  => 'Vi aksepterer:'
                            );
new infoBoxHeading($info_box_contents, false, false);

$info_box_contents = array();
$info_box_contents[] = array('align' => 'center',
                             'text'  => '<a href="http://www.visa.no" target="_blank">' . tep_image(DIR_WS_IMAGES . 'Visa_60x38pix_8914a.jpg') . '</a>');
new infoBox($info_box_contents);
?>
          </td>
        </tr>
<!-- information_eof //-->

 

Looks better. Untested, so it still might not work.

Link to comment
Share on other sites

Thanks guys!! It works.

 

And now, the second question.

 

What's the code to use for adding the mastercad logo in the same box (just next to the visa logo): <br>

file name: euro_mastercard_logo.gif <br>

url: www.mastercard.com<br>

 

I hope you can help me with this one too.

 

Thanks in advance

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...