Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Defining A Class For tep_image Output


cameronbailey

Recommended Posts

  • 3 weeks later...

Here's what I've found out so far.

 

The tep_image function is located in \includes\functions\html_output.php .

 

function tep_image($src, $alt = '', $width = '', $height = '', $parameters = '')

 

The function has a field called "parameters". When I set text as a parameter, it shows up fine in my code. When I try writing class='whatever', there is an error and I get a blank page (Also tried with double quotes, and without any quotes. It seems that the word class is the problem).

Link to comment
Share on other sites

Got it!

 

The parameters must be enclosed in single quotes.

 

tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'class="single-product"')

 

Hopefully this helps someone else out!

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...