Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Removing Box Format


ZeroAquaduct

Recommended Posts

I read Mattice's post here,

 

http://www.oscommerce.com/forums/viewtopic.php?t=23308

 

but I'm still having trouble taking the content away from the box format. I'm trying to do this for the "notifications" and the "tell a friend" boxes (I would like to put these as text links in the product description).

 

I'm running the Loaded 5 snapshot.

 

For the "notifications" box, I have:

 

<!-- notifications //--> 

         <tr> 

           <td> 

<?php 

 $info_box_contents = array(); 

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

                              'text'  => BOX_HEADING_NOTIFICATIONS); 

 new infoBoxHeading($info_box_contents, false, false, tep_href_link(FILENAME_PRODUCT_NOTIFICATIONS, '', 'NONSSL')); 



 $check_query = tep_db_query("select count(*) as count from " . TABLE_PRODUCTS_NOTIFICATIONS . " where products_id = '" . $HTTP_GET_VARS['products_id'] . "' and customers_id = '" . $customer_id . "'"); 

 $check = tep_db_fetch_array($check_query); 



 $info_box_contents = array(); 

 if ($check['count'] > 0) { 

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

                                'text'  => '<table border="0" cellspacing="0" cellpadding="2"><tr><td class="infoBoxContents"><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=notify_remove', 'NONSSL') . '">' . tep_image(DIR_WS_IMAGES . 'box_products_notifications_remove.gif', IMAGE_BUTTON_REMOVE_NOTIFICATIONS) . '</a></td><td class="infoBoxContents"><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=notify_remove', 'NONSSL') . '">' . sprintf(BOX_NOTIFICATIONS_NOTIFY_REMOVE, tep_get_products_name($HTTP_GET_VARS['products_id'])) .'</a></td></tr></table>'); 

 } else { 

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

                                'text'  => '<table border="0" cellspacing="0" cellpadding="2"><tr><td class="infoBoxContents"><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=notify', 'NONSSL') . '">' . tep_image(DIR_WS_IMAGES . 'box_products_notifications.gif', IMAGE_BUTTON_NOTIFICATIONS) . '</a></td><td class="infoBoxContents"><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=notify', 'NONSSL') . '">' . sprintf(BOX_NOTIFICATIONS_NOTIFY, tep_get_products_name($HTTP_GET_VARS['products_id'])) .'</a></td></tr></table>'); 

 } 

 new infoBox($info_box_contents); 

?> 

           </td> 

         </tr> 

<!-- notifications_eof //-->

 

And for the "tell a friend" box, I have:

 

<!-- tell_a_friend //--> 

         <tr> 

           <td> 

<?php 

 $info_box_contents = array(); 

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

                              'text'  => BOX_HEADING_TELL_A_FRIEND 

                             ); 

 new infoBoxHeading($info_box_contents, false, false); 



 $hide = tep_draw_hidden_field('products_id', $HTTP_GET_VARS['products_id']); 

 $hide .= tep_hide_session_id(); 



 $info_box_contents = array(); 

 $info_box_contents[] = array('form'  => '<form name="tell_a_friend" method="get" action="' . tep_href_link(FILENAME_TELL_A_FRIEND, '', 'NONSSL', false) . '">', 

                              'align' => 'left', 

                              'text'  => '<div align="center">' . tep_draw_input_field('send_to', '', 'size="10"') . ' ' . tep_image_submit('button_tell_a_friend.gif', BOX_HEADING_TELL_A_FRIEND) . $hide . '</div><br>' . BOX_TELL_A_FRIEND_TEXT 

                             ); 

 new infoBox($info_box_contents); 

?> 

           </td> 

         </tr> 

<!-- tell_a_friend_eof //-->

 

How would I take the content and get rid of the box format? I tried to do this myself, but I keep getting an error that says something like "expecting ; in line xxx" and other stuff like that.

Link to comment
Share on other sites

  • 3 months later...

Greetings All,

 

I also would like to do the same thing.

I would like to remove the infoboxes on the right and incorporate them into the product_info.php page.

 

I tried this code but it wouldn't displayon more than one product page

(That is it did only on one page only out of all of the test products).

 

             <tr>

             <td><?php $info_box_contents = array();

 $info_box_contents[] = array('form' => tep_draw_form('tell_a_friend', tep_href_link(FILENAME_TELL_A_FRIEND, '', 'NONSSL', false), 'get'),

                              'align' => 'center',

                              'text' => tep_draw_input_field('to_email_address', '', 'size="10"') . ' ' . tep_image_submit('button_tell_a_friend.gif', BOX_HEADING_TELL_A_FRIEND) . tep_draw_hidden_field('products_id', $HTTP_GET_VARS['products_id']) . tep_hide_session_id() . '<br>' . BOX_TELL_A_FRIEND_TEXT);



 new infoBox($info_box_contents); ?></td>

           </tr>

 

Obviously I would want it to be displayed on every product page listing.

 

Any help would be greatly helpful.

 

BTW, I did get the search box moved to the header sucessfully as Mattice suggested in this post...

http://www.oscommerce.com/forums/viewtopic.php?t=23308

 

TIA,

Steve

Link to comment
Share on other sites

Greetings All,

 

I also would like to do the same thing.

I would like to remove the infoboxes on the right and incorporate them into the product_info.php page.

 

I tried this code but it wouldn't displayon more than one product page

(That is it did only on one page only out of all of the test products).

 

             <tr>

             <td><?php $info_box_contents = array();

 $info_box_contents[] = array('form' => tep_draw_form('tell_a_friend', tep_href_link(FILENAME_TELL_A_FRIEND, '', 'NONSSL', false), 'get'),

                              'align' => 'center',

                              'text' => tep_draw_input_field('to_email_address', '', 'size="10"') . ' ' . tep_image_submit('button_tell_a_friend.gif', BOX_HEADING_TELL_A_FRIEND) . tep_draw_hidden_field('products_id', $HTTP_GET_VARS['products_id']) . tep_hide_session_id() . '<br>' . BOX_TELL_A_FRIEND_TEXT);



 new infoBox($info_box_contents); ?></td>

           </tr>

 

Obviously I would want it to be displayed on every product page listing.

 

Any help would be greatly helpful.

 

BTW, I did get the search box moved to the header sucessfully as Mattice suggested in this post...

http://www.oscommerce.com/forums/viewtopic.php?t=23308

 

TIA,

Steve

Link to comment
Share on other sites

I Don't know why it posted twice :?: ,but still looking for an answer.

 

I've seen it done on several shops and really makes your pages look seamless.

 

Still searching,

TIA,

Steve

Link to comment
Share on other sites

  • 6 months later...

It might be an idea to use the box files from BTS for these infoboxes and merge them with the BTS infobox template file. That way you won't have to install the BTS, but you will have more flexible (easyer to edit) infoboxes.

 

Just an idea, not sure if it would really help you.

 

Paul

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...