Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Replacing infobox headers & mainpage table header with images?


movieseller

Recommended Posts

Posted

I have been attempting to change the infobox headers with images but ran into a problem. The ones I have changed so far were done by replacing the header text with an image link under Design Controls... But have a couple of problems that need addressing:

 

Does anyone know how to change the header for the infox which reads "My Account Info." and replace with an image? This is the box that shows up on the right once a user has logged in (with account history links etc.) However, this infobox doesn't seem to be listed under Design Controls so doesn't seem to be able to be altered in the same way as the others. I'm after applying an image for the header to match the rest of the site but don't know where to look next!

 

Also, on my main page I have to Featured Products and New Products... How do you apply images to these headers, to match the infoboxes to the left and right?

 

My site is www.retrological.com if anyone would care take a look. The problem with MY ACCOUNT INFO. header will only show up once an account has been created and logged in (as that infobox only appears at this time).

 

Any help would be greatly appreciated. Thank you

Posted

Ok, I figured this much. Modifying new_products.php I now have this code:

 

<?php

$info_box_contents[] = array('text' => tep_draw_separator('/images/infobox/background.gif', '100%', '1')

);

new infoBoxHeading($info_box_contents, false, false, tep_href_link(FILENAME_PRODUCTS_NEW));

 

 

Which got rid of the text displaying "New Product For...' and replaced with just the background image of the top of the box *background.gif). Now, in the middle of this bar I want an image centralized (images/NewMain_Custom.gif) but don't know how about implimenting it into the above code. It's probably really simple for those who know how to code but I'm lost.

 

If I can get some help on this I can modify the Feature Products the same way but for now I seem to have come to a stand-still. Help would be appreciated.

Posted

Been messing around with copying and pasting from various sources and seem to have stumbled across a work around. The code I used is:

 

<IMG SRC="images/NewMain_Custom.gif" WIDTH=173 HEIGHT=20>

<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0

width="100%" style='width:100.0%;mso-cellspacing:0cm;mso-padding-alt:

0cm 0cm 0cm 0cm'>

<tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes;

height:10.5pt'>

<td style='padding:0cm 0cm 0cm 0cm;height:10.5pt'>

<p class=MsoNormal style='mso-line-height-alt:10.5pt'><span

style='color:gray'><img border=0 width=23 height=43 id="_x0000_i1128"

src="/images/infobox/corner_left.gif"><o:p></o:p></span></p>

</td>

<td width="100%" valign=top style='width:100.0%;padding:3.0pt 0cm 0cm 0cm;

height:10.5pt'

background="/images/infobox/background.gif">

<p class=MsoNormal align=center style='text-align:center'><b><span

style='font-size:9.0pt;font-family:Verdana;color:black'><img border=0

width=110 height=38 id="_x0000_i1371"

src="/images/NewMain_Custom.gif"><o:p></o:p></span></b></p>

</td>

<td nowrap style='padding:0cm 0cm 0cm 0cm;height:10.5pt'>

<p class=MsoNormal style='mso-line-height-alt:10.5pt'><span

style='color:gray'><a

href="http://www.retrological.com/products_new.php"><img border=0

width=26 height=43 id="_x0000_i1130"

src="/images/infobox/arrow_right.gif"

alt=more title=" more "></a><o:p></o:p></span></p>

</td>

</tr>

</table>

<?php

if ( (!isset($new_products_category_id)) || ($new_products_category_id == '0') ) {

$new_products_query = tep_db_query("select products_id, products_image, products_tax_class_id, products_price from " . TABLE_PRODUCTS . " where DATE_SUB(CURDATE(),INTERVAL " .NEW_PRODUCT_INTERVAL ." DAY) <= products_date_added and products_status = '1' order by rand() desc limit

" . MAX_DISPLAY_NEW_PRODUCTS);

} else {

$new_products_query = tep_db_query("select distinct p.products_id, p.products_image, p.products_tax_class_id, p.products_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c where DATE_SUB(CURDATE(),INTERVAL " .NEW_PRODUCT_INTERVAL ." DAY) <= p.products_date_added and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '" . $new_products_category_id . "' and p.products_status = '1' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS);

}

 

 

 

 

 

If there's any flaws, please point them out. Still looking for a workaround for the My Account Info. box that I cannot find the source code for...

Posted

I have been looking to do this also

Kind of a newbie but am learning and yould be glad to help out!

Posted

I have Basic Design pack installed so my boxes are defined in in my stylesheet.

I added

$info_box_contents = array();
$info_box_contents[] = array('align' => 'left',
						   'text'  => BOX_HEADING_LISTING);

 new infoBoxHeading($info_box_contents, true, true);

just below

 Released under the GNU General Public License
*/

to includes/modules/product_listing.php &new_products.php

This added corner images to my Product Llisting and New Products for 'month'

Archived

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

×
×
  • Create New...