Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Button Issue?


McBonio

Recommended Posts

Hi

 

I have been working on my 3rd oscommerce theme for a clients site, its a bit more unusual than my normal type.

 

My issue is on the main page the " IMAGE_BUTTON_DETAILS" and "IMAGE_BUTTON_" graphics will not show and for the life of me I cant find where to fix this!

 

I "think" every other aspect of the store works ok across the browsers and in multiple resolutions. (if anyone sees anything else I would be extremely grateful :) )

 

link: http://tropicaweb.co.uk/osc/index.php

 

Thanks in advance :)

Link to comment
Share on other sites

My issue is on the main page the " IMAGE_BUTTON_DETAILS" and "IMAGE_BUTTON_" graphics will not show and for the life of me I cant find where to fix this!

 

 

I think u misplaced the button images.......

 

it should be under "catalog/includes/languages/english/images" plz just check once again

Link to comment
Share on other sites

Thanks dickysolo, I checked the directory and the buttons are in place.

 

I checked english.php and the "IMAGE_BUTTON_DETAILS" and "IMAGE_BUTTON_BY_NOW" and they were not defined, so I added a few lines and defined them both, so as you can see the buttons now have the correct text, but still no images.

 

I checked filenames and my stylesheets but still cant find them?

 

Thanks

Link to comment
Share on other sites

Thanks dickysolo, I checked the directory and the buttons are in place.

 

I checked english.php and the "IMAGE_BUTTON_DETAILS" and "IMAGE_BUTTON_BY_NOW" and they were not defined, so I added a few lines and defined them both, so as you can see the buttons now have the correct text, but still no images.

 

I checked filenames and my stylesheets but still cant find them?

 

Thanks

 

Do one thing... Check in the "catalog/includes/modules/new_products.php" see if u include the image path. Or can you post the new_products.php code??

Link to comment
Share on other sites

<?php
/*
 $Id: new_products.php 1806 2008-01-11 22:48:15Z hpdl $

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

 Copyright (c) 2008 osCommerce

 Released under the GNU General Public License
*/
?>
<!-- new_products //-->
<?php
 $info_box_contents = array();
 $info_box_contents[] = array('text' => sprintf(TABLE_HEADING_NEW_PRODUCTS, strftime('%B')));

 new contentBoxHeading($info_box_contents);

 if ( (!isset($new_products_category_id)) || ($new_products_category_id == '0') ) {
$new_products_query = tep_db_query("select p.products_id, p.products_image, p.products_tax_class_id, pd.products_name, pd.products_description, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by p.products_date_added 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, pd.products_name, pd.products_description, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c where p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '" . (int)$new_products_category_id . "' and p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS);
 }

 $row = 0;
 $col = 0;
 $info_box_contents = array();



 while ($new_products = tep_db_fetch_array($new_products_query)) {
 ?>

 <?  $info_box_contents[$row][$col] = array('align' => 'left',
									   'params' => 'class="smallText" width="33%" valign="top"',
									   'text' => '<table border="0" width="100%" cellspacing="0" style="border: 1px solid #e91c85;margin-top:5px;margin-bottom:5px;">
													 <tr>
												<td align="center" class="smallText" width="120" valign="middle">



									   <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $new_products['products_image'], $new_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>

									   </td>
										  <td align="left" class="smallText" width="400" valign="top">

									   <span class="pc_pname"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . $new_products['products_name'] . '</a></span>
									   <br />
									   <br />

									   <span class="pc_description">' . substr($new_products['products_description'],0, 200) .'<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">[...]</a></span>
									   </td>
									   </tr>
									   <tr>
									   	<td align="center" class="smallText" width="120" valign="middle">
										<span class="pc_price">' . $currencies->display_price($new_products['products_price'], tep_get_tax_rate($new_products['products_tax_class_id'])) .'</span>
									   <br /><br />
										</td>

										<td align="left" class="smallText" valign="top" style="border-top:1px dashed #999999;">'. tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product')).'
																<table width="120"  border="0" cellspacing="0" cellpadding="0">
																  <tr>	
																	<td style="padding-top:1px; padding-right:1px;" ><a href="'.tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']).'">'.tep_image_button('button_details.gif', IMAGE_BUTTON_DETAILS).'</a></td><td style="padding-top:1px;">'.tep_draw_hidden_field('products_id', $new_products['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_BY_NOW).'</td>
																  </tr>
																</table></form>
										</td>
									   </tr>
									   </table>

									   ');
?>

<?
$col ++;
if ($col > 0) {
  $col = 0;
  $row ++;
}
 }

 new contentBox($info_box_contents);
?>
<!-- new_products_eof //-->

 

I have tried a few different paths but it doesnt seem to work?

Link to comment
Share on other sites

Please try this:

tep_image_button(DIR_WS_IMAGES . 'button_details.gif', IMAGE_BUTTON_DETAILS)

 

If the problem persists, open /includes/functions/html_output.php in a text editor and verify "tep_image_button" function. The problem comes probably from this function (I suppose that it has been modified).

Open source n'est pas un échange à sens unique ... La plupart du temps un simple merci ou quelques mots d'encouragement suffisent...

Link to comment
Share on other sites

Take a peek at the HTML source.

 

<div class="cssButton" style="width: 154px;"> IMAGE_BUTTON_DETAILS </div>

The template is coded to use css buttons not images:

 

.cssButton {
 background: #000000;
 color: #ffffff;
 width: 100px;
 height: 20px;
 vertical-align: top;
 font-weight: normal;
 font-family: Tahoma, Verdana, Arial, sans-serif;
 font-size: 12px;
 cursor: pointer;
 text-align: center;
 text-decoration: none;
 border: 1px;
 border-style: solid;
 border-color: #282828;
 border-spacing: 1px;
}

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

probably defined in his html_output.php/tep_image_button or tep_image function with an error, something like

'CONSTANT'

instead of

.CONSTANT.

 

(je parie 1 twix que j'ai raison)

Open source n'est pas un échange à sens unique ... La plupart du temps un simple merci ou quelques mots d'encouragement suffisent...

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...