Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

issues with displaying buttons (using 'vanilla' design)


Gazza2000

Recommended Posts

Posted

hi all, got a technial question, hopefully it'll be a quick and easy one!

 

anyway, ive got an issue with buttons, the files that are stored in ../languages/english/images/buttons, these images are not displayed

 

 

these are examples of two types of strings that are responsable for displaying the buttons ('submit' and 'button' variants):

 

tep_image_submit('/images/button_login.gif', IMAGE_BUTTON_LOGIN)

tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE)

 

however i cant understand and fix why those images are not displayed

 

 

i have managed to fix the "tep_image_button" and make it appear correctly by changing it to this:

 

tep_image(DIR_WS_IMAGES . 'button_continue.gif', IMAGE_BUTTON_CONTINUE)

 

however what i NEED now is a way to fix the 'tep_image_submit' buttons, ive tried using the above structure and the closest ive got to achieving what i want is making the image appear but it loses its functionality when it is clicked which is no good!

 

any help would be greatly appreciated, thanks alot -Gaz

Posted

The code for the tep_image_submit() function is in includes/functions/html_output.php:

 

////
// The HTML form submit button wrapper function
// Outputs a button in the selected language
 function tep_image_submit($image, $alt = '', $parameters = '') {
global $language;

$image_submit = '<input type="image" src="' . tep_output_string(DIR_WS_LANGUAGES . $language . '/images/buttons/' . $image) . '" border="0" alt="' . tep_output_string($alt) . '"';

if (tep_not_null($alt)) $image_submit .= ' title=" ' . tep_output_string($alt) . ' "';

if (tep_not_null($parameters)) $image_submit .= ' ' . $parameters;

$image_submit .= '>';

return $image_submit;
 }

 

So, it will create the image submit as:

 

DIR_WS_LANGUAGES . $language . '/images/buttons/' . $image

 

You need to double check that this path will resolve to the correct location of button_continue.gif. Since your call is to:

 

tep_image_submit('/images/button_login.gif', IMAGE_BUTTON_LOGIN)

 

 

Your path will be resolving to:

 

languages/english/images/buttons/images/button_login.gif

 

 

See the problem?

Contributions

 

Discount Coupon Codes

Donations

Archived

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

×
×
  • Create New...