문제

I'm trying to make my product image format a certain way using CSS, but I'm not sure where to add the following code to the tep_image function call:

class="single-product"

I want the generated image to have the extra class attribute included as part of its HTML.

I'm hoping I don't have to add an if statement to the constructor class.

도움이 되었습니까?

해결책

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

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

Any extra attributes you need to add to the image function will be after setting the image dimensions, so place the CSS as the fifth parameter.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top