• Resolved sandeep22

    (@sandeep22)


    Hi

    I am Trying to show product image(thumbnail)
    In PDF invoice slips I am stuck in since 5 days
    Plzzzz Help me for this

    I have tried
    <?php echo $product && $product->get_image() ? $product->get_image( array( 50, 50 ) ) : ”; ?>

    But doesnt show image (Image not found or type unknown)

    Thank you …

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Ewout

    (@pomegranate)

    Depends on your server settings. Assuming you have loaded the $product object here (which is not evident from your code), the get_image() method will return an image URL. Not all servers allow downloading data via URLs (even if the URL points to the same server), so this may prevent the image from loading. It is therefor best to convert the URL to a path.

    For worry-free thumbnail support we have the Premium Templates extension!

    Kind regards,
    Ewout

    Thread Starter sandeep22

    (@sandeep22)

    Yes , Ewout…

    I have tried using url but they don’t allow it
    You are right

    How to convert URL to path and get image can you elobrate with syntex ??

    Thank you

    Plugin Contributor Ewout

    (@pomegranate)

    You can trim the URL at wp-content and then replace with the WP_CONTENT_DIR constant.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Product Image In PDF INVOICE’ is closed to new replies.