osCmax v2.5 User Manual
Results 1 to 4 of 4

Adding a class to productlisting images??! [PHP newbie!]

This is a discussion on Adding a class to productlisting images??! [PHP newbie!] within the osCmax v2 Customization/Mods forums, part of the osCmax v2.0 Forums category; PHP Code:   '    <td class="productListing-data" align="center"><a href="'  .  tep_href_link ( FILENAME_PRODUCT_INFO ,  'products_id='  .  $products [ $i ][ 'id' ]) .  '">'  .  tep_image ...

      
  1. #1
    Member
    Join Date
    Mar 2007
    Posts
    31
    Rep Power
    0


    Default Adding a class to productlisting images??! [PHP newbie!]

    PHP Code:
     '    <td class="productListing-data" align="center"><a href="' tep_href_link(FILENAME_PRODUCT_INFO'products_id=' $products[$i]['id']) . '">' tep_image(DIR_WS_IMAGES $products[$i]['image'], $products[$i]['name'], SMALL_IMAGE_WIDTHSMALL_IMAGE_HEIGHT) . '</a></td>' 
    How can I add a class to the image? (for border and other image styling!)

  2. #2
    jpf
    jpf is offline
    osCMax Testing Team
    jpf's Avatar
    Join Date
    Sep 2003
    Location
    Manitoba, Canada
    Posts
    2,699
    Rep Power
    22


    Default Re: Adding a class to productlisting images??! [PHP newbie!]

    Quote Originally Posted by Luggruff View Post
    PHP Code:
     '    <td class="productListing-data" align="center"><a href="' tep_href_link(FILENAME_PRODUCT_INFO'products_id=' $products[$i]['id']) . '">' tep_image(DIR_WS_IMAGES $products[$i]['image'], $products[$i]['name'], SMALL_IMAGE_WIDTHSMALL_IMAGE_HEIGHT) . '</a></td>' 
    How can I add a class to the image? (for border and other image styling!)
    Try in your CSS
    PHP Code:
    A.productListing-data {
      
    your CSS item here....

    Or try:
    PHP Code:
     '    <td class="productListing-data" align="center"><a class="productListing-imagelink" href="' tep_href_link(FILENAME_PRODUCT_INFO'products_id=' $products[$i]['id']) . '">' tep_image(DIR_WS_IMAGES $products[$i]['image'], $products[$i]['name'], SMALL_IMAGE_WIDTHSMALL_IMAGE_HEIGHT) . '</a></td>' 
    and in your CSS
    PHP Code:
    A.productListing-imagelink {
      
    your CSS item here....

    Good Luck!

  3. #3
    Member
    Join Date
    Mar 2007
    Posts
    31
    Rep Power
    0


    Default Re: Adding a class to productlisting images??! [PHP newbie!]

    Quote Originally Posted by jpf View Post
    Try in your CSS
    PHP Code:
    A.productListing-data {
      
    your CSS item here....

    Or try:
    PHP Code:
     '    <td class="productListing-data" align="center"><a class="productListing-imagelink" href="' tep_href_link(FILENAME_PRODUCT_INFO'products_id=' $products[$i]['id']) . '">' tep_image(DIR_WS_IMAGES $products[$i]['image'], $products[$i]['name'], SMALL_IMAGE_WIDTHSMALL_IMAGE_HEIGHT) . '</a></td>' 
    and in your CSS
    PHP Code:
    A.productListing-imagelink {
      
    your CSS item here....

    Good Luck!
    Wow haha, now I feel pretty stupid! ;D
    Never thought about adding the class before href="" ..was too busy thinking that the linktag contained php XD
    Thank you for the clarity!

  4. #4
    Member
    Join Date
    Mar 2007
    Posts
    31
    Rep Power
    0


    Default Re: Adding a class to productlisting images??! [PHP newbie!]

    Another question that might be better: Is there a way to enter this for ALL images that uses the SMALL_IMAGE (whatever) setting??
    So that ALL the images that uses the SMALL_IIMAGE_WIDTH/HEIGHT will get those bordersettings? It works to set a width and height for a group of pics, so why not border?
    That should be added i think, a field where you can enter a either RGB or # for color, and border width (and if you want top, bottom, right and left) border.. DIRECTLY into the CMS!

Similar Threads

  1. productlisting/productinformation???
    By Luggruff in forum osCmax v2 Customization/Mods
    Replies: 0
    Last Post: 04-10-2007, 10:03 AM
  2. Problem with adding/ using images!
    By jsp_1983 in forum osCmax v2 Customization/Mods
    Replies: 10
    Last Post: 12-20-2005, 01:04 PM
  3. Changing default TAX class when adding new products
    By fuzzyphil in forum osCMax v1.7 General Mods Discussion
    Replies: 0
    Last Post: 07-28-2005, 10:42 PM
  4. layout in productlisting?
    By amilo in forum osCmax v1.7 Discussion
    Replies: 3
    Last Post: 05-17-2004, 01:05 PM
  5. Adding other images to a product??????
    By pmike25 in forum osCMax v1.7 General Mods Discussion
    Replies: 0
    Last Post: 02-13-2004, 11:50 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •