Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Change Info Box layout


Recommended Posts

Hi everyone,

 

I would like to be able to edit the layout code of the info boxes. Specifically, I want to modify the Specials, Search and What's New boxes. I see where I can change the titles of these boxes, but not actually say, change the width of the search box and modify the search button OR align the product image right and edit what text the What's New and Specials boxes display. Can anyone point me in the right direction? I have viewed the specific box pages in the includes folder but haven't had any luck.

 

I've searched around to see if someone already asked this, but I'm not having much luck. If I missed it then I'm sorry for the redundancy.

Link to comment
Share on other sites

the code to build the boxes is usually in catalog/includes/languages/english/boxes.php the style sheet carries the style for the boxes and the languages/english.php file will define the titles for the boxes

 

You can also use images for the headers of the boxes instead of text.

 

Knowledge Base Info Boxes

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

the code to build the boxes is usually in catalog/includes/languages/english/boxes.php the style sheet carries the style for the boxes and the languages/english.php file will define the titles for the boxes

 

You can also use images for the headers of the boxes instead of text.

 

Knowledge Base Info Boxes

 

 

Thanks! Once I realized it, it was totally staring me in the face.

 

Any idea what the variable I need to pull in would be called if I wanted to add a product description to my Specials box? Just shooting in the dark now.

Link to comment
Share on other sites

  • 1 year later...

Hi, Just having a go with switching these infoboxs on and off in admin.

 

I have used this for my affiliates box:-

 

<?php
/*
 $Id: affiliate.php,v 2.00 2003/10/12

 OSC-Affiliate

 Contribution based on:

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2002 - 2003 osCommerce

 Released under the GNU General Public License
*/
?>		  
<tr>
		<td>
<?php
if(SHOW_AFFILIATE == 'on') {
		 $show_affiliate= on;

 $info_box_contents = array();
 $info_box_contents[] = array('align' => 'left',
						   'text'  => BOX_HEADING_AFFILIATE
						  );
 new infoBoxHeading($info_box_contents, false, false);

 if (tep_session_is_registered('affiliate_id')) {
$info_box_contents = array();

$info_box_contents[] = array('align' => 'left',
							 'text'  => '<b><a href="' . tep_href_link(FILENAME_AFFILIATE_SUMMARY, '', 'SSL') . '">' . BOX_AFFILIATE_SUMMARY . '</a></b><br>' .
										'  <a href="' . tep_href_link(FILENAME_AFFILIATE_ACCOUNT, '', 'SSL') . '">' . BOX_AFFILIATE_ACCOUNT . '</a><br>' .
										'  <a href="' . tep_href_link(FILENAME_AFFILIATE_PASSWORD, '', 'SSL') . '">' . BOX_AFFILIATE_PASSWORD . '</a><br>' .
										'  <a href="' . tep_href_link(FILENAME_AFFILIATE_NEWSLETTER, '', 'SSL') . '">' . BOX_AFFILIATE_NEWSLETTER . '</a><br>' .
										'  <a href="' . tep_href_link(FILENAME_AFFILIATE_NEWS, '', 'SSL') . '">' . BOX_AFFILIATE_NEWS . '</a><br>' .
										'<b><a href="' . tep_href_link(FILENAME_AFFILIATE_BANNERS, '', 'SSL') . '">' . BOX_AFFILIATE_BANNERS . '</a></b><br>' .
										'  <a href="' . tep_href_link(FILENAME_AFFILIATE_BANNERS_BANNERS, '', 'SSL') . '">' . BOX_AFFILIATE_BANNERS_BANNERS . '</a><br>' .
										'  <a href="' . tep_href_link(FILENAME_AFFILIATE_BANNERS_BUILD, '', 'SSL') . '">' . BOX_AFFILIATE_BANNERS_BUILD . '</a><br>' .
'  <a href="' . tep_href_link(FILENAME_AFFILIATE_BANNERS_BUILD_CAT, '', 'SSL') . '">' . BOX_AFFILIATE_BANNERS_BUILD_CAT . '</a><br>' .
'  <a href="' . tep_href_link(FILENAME_AFFILIATE_BANNERS_CATEGORY, '', 'SSL') . '">' . BOX_AFFILIATE_BANNERS_CATEGORY . '</a><br>' .
										'  <a href="' . tep_href_link(FILENAME_AFFILIATE_BANNERS_PRODUCT, '', 'SSL') . '">' . BOX_AFFILIATE_BANNERS_PRODUCT . '</a><br>' .
										'  <a href="' . tep_href_link(FILENAME_AFFILIATE_BANNERS_TEXT, '', 'SSL') . '">' . BOX_AFFILIATE_BANNERS_TEXT . '</a><br>' .
										'<b><a href="' . tep_href_link(FILENAME_AFFILIATE_REPORTS, '', 'SSL') . '">' . BOX_AFFILIATE_REPORTS . '</a></b><br>' .
										  '  <a href="' . tep_href_link(FILENAME_AFFILIATE_CLICKS, '', 'SSL'). '">' . BOX_AFFILIATE_CLICKRATE . '</a><br>' .
										'  <a href="' . tep_href_link(FILENAME_AFFILIATE_SALES, '', 'SSL'). '">' . BOX_AFFILIATE_SALES . '</a><br>' .
										'  <a href="' . tep_href_link(FILENAME_AFFILIATE_PAYMENT, '', 'SSL'). '">' . BOX_AFFILIATE_PAYMENT . '</a><br>' .
										'<a href="' . tep_href_link(FILENAME_AFFILIATE_CONTACT, '', 'SSL') . '">' . BOX_AFFILIATE_CONTACT . '</a><br>' .
										'<a href="' . tep_href_link(FILENAME_AFFILIATE_FAQ, '', 'SSL') . '">' . BOX_AFFILIATE_FAQ . '</a><br>' .
										'<a href="' . tep_href_link(FILENAME_AFFILIATE_LOGOUT). '">' . BOX_AFFILIATE_LOGOUT . '</a>');

new infoBox($info_box_contents);
 } else {
$info_box_contents = array();
$info_box_contents[] = array('align' => 'left',
							 'text'  => '<a href="' . tep_href_link(FILENAME_AFFILIATE, '', 'SSL') . '">' . BOX_AFFILIATE_LOGIN . '</a><br>'.
						  '<a href="' . tep_href_link(FILENAME_AFFILIATE_INFO, '', 'NONSSL'). '">' . BOX_AFFILIATE_INFO . '</a><br>' .
										'<a href="' . tep_href_link(FILENAME_AFFILIATE_FAQ, '', 'NONSSL') . '">' . BOX_AFFILIATE_FAQ . '</a>' 

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

with this at the start:-

if(SHOW_AFFILIATE == 'on') {
		 $show_affiliate= on;

and

 }

before the end

?>[code]

 

and entered into the database configuration table the corrosponding details so you can select on and off using radio buttons and it works with respect to making the infobox active/ inactive.

 

but I have just realised that if I know the pages to log in directly I can access the pages anyway, can I apply the same code as a switch at the start and end of all the files in this case the affilaite contribution to switch the files on or off or is there a better way or anything I should be aware of first before applying to the main affilate files?

 

I guess I am only to swtich off those in the catalog as only me will be in admin anyway?

 

Thanks

 

Johnny

Getting better with mods but no programmer am I.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...