osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 
 

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


Go Back   osCommerce and osCMax shopping cart software forums > osCMax v2.0 Forums > osCMax v2 Customization/Mods

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Reply

 

LinkBack Thread Tools
  #1  
Old 04-17-2007, 10:44 AM
Member
 
Join Date: Mar 2007
Posts: 31
Thanks: 1
Thanked 0 Times in 0 Posts
Rep Power: 0
Luggruff is on a distinguished road
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!)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Advertisement
  #2  
Old 04-19-2007, 01:38 PM
jpf's Avatar
jpf jpf is offline
Moderator

 
Join Date: Sep 2003
Location: Manitoba, Canada
Posts: 1,684
Thanks: 2
Thanked 94 Times in 80 Posts
Rep Power: 12
jpf is a glorious beacon of lightjpf is a glorious beacon of lightjpf is a glorious beacon of lightjpf is a glorious beacon of lightjpf is a glorious beacon of lightjpf is a glorious beacon of light
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!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
The Following User Says Thank You to jpf For This Useful Post:
Luggruff (04-19-2007)
  #3  
Old 04-19-2007, 11:45 PM
Member
 
Join Date: Mar 2007
Posts: 31
Thanks: 1
Thanked 0 Times in 0 Posts
Rep Power: 0
Luggruff is on a distinguished road
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!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4  
Old 04-23-2007, 09:46 AM
Member
 
Join Date: Mar 2007
Posts: 31
Thanks: 1
Thanked 0 Times in 0 Posts
Rep Power: 0
Luggruff is on a distinguished road
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!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Advertisement
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

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


All times are GMT -8. The time now is 02:28 PM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
http://www.oscmax.com/forums/
Copyright 2008 osCMax