• Anyone know how? I have copied my template files to the other location so i can Customise them but not sure how to have an image

    Cheers

Viewing 1 replies (of 1 total)
  • You need to edit the template file, like body.php.

    Like go to ….templates/invoice/simple/minimal/body.php and you need to change the HTML inside the file to display your image. Like add the below,

    ….


    <td>
    <?php

    $product_id = $item->get_product_id();

    if ( has_post_thumbnail( $product_id ) ) {
    $attachment_ids[0] = get_post_thumbnail_id( $product_id );
    $attachment = wp_get_attachment_image_src($attachment_ids[0], ‘thumbnail’ );

    }

    ?>
    ” />
    </td>
    ..
    ..
    ..

Viewing 1 replies (of 1 total)
  • The topic ‘Product image in simple template’ is closed to new replies.