• Resolved austriker27

    (@austriker27)


    Hello,

    I created an image for the gift card and would like to add it to the email that is going out with this plugin. I copied the email template to my child theme but am not sure how to add the image in the .php file. (It would be great if this ability was included in the plugin in the future)

Viewing 15 replies - 1 through 15 (of 16 total)
  • Thread Starter austriker27

    (@austriker27)

    I figured it out. use this code:

    <div class="gift-card-image"><img src="<?php echo get_stylesheet_directory_uri(); ?>/woocommerce/emails/gift-card.jpg" /></div>

    Plugin Author pimwick

    (@pimwick)

    Glad you got it sorted out, let us know if you need anything else!

    Hate to interfere but could you possibly show what this looks like in the email. I want to do this exact thing and was wondering what it looks like in practice

    • This reply was modified 5 years, 11 months ago by sab66.
    Thread Starter austriker27

    (@austriker27)

    Here’s what it looked like for me.

    Thanks for sharing. That looks great.

    Thanks for sharing this!! Is there any way to have the featured image of the gift card product pulled into the email? I’ve got several different designs.

    Plugin Author pimwick

    (@pimwick)

    We use the built in WooCommerce email template system. To override the email you should copy this file:

    /wp-content/plugins/pw-woocommerce-gift-cards/templates/woocommerce/emails/customer-pw-gift-card.php

    To here (you may need to create the subfolders if they do not exist in your theme folder):

    /wp-content/themes/<your_theme>/woocommerce/emails/customer-pw-gift-card.php

    Once the file is in your theme folder, open it up in a text editor and make any changes. You can change colors, wording, etc.

    You can find out more about customization here: https://docs.woocommerce.com/document/configuring-woocommerce-settings/#section-21

    To add a background image for the gift card, insert the “background-image” CSS tag. For example:

    .pwgc-gift-card-container {
        border-style: solid;
        border-width: 1px;
        border-color: #333;
        border-radius: 16px;
        background-color: #FFFEE0;
        padding: 0px 24px;
        background-image: url('https://yoursite.com/wp-content/uploads/bg-email-card.jpg');
    }

    Hope that helps, let me know if you have any questions!

    Thank you for supplying the steps. When I go to the url I get a fatal error.

    Fatal error: Uncaught Error: Call to undefined function do_action() in E:\web\public_html\lfcshared17825\backyardpollinator.com\wp-content\themes\lucida-pro-child\woocommerce\emails\customer-pw-gift-card.php:21 Stack trace: #0 {main} thrown in E:\web\public_html\lfcshared17825\backyardpollinator.com\wp-content\themes\lucida-pro-child\woocommerce\emails\customer-pw-gift-card.php on line 21

    You didn’t mention if the code austriker added (above) is necessary ie:
    <div class=”gift-card-image”>/woocommerce/emails/gift-card.jpg” /></div>

    • This reply was modified 5 years, 10 months ago by FireFlyWebs.
    • This reply was modified 5 years, 10 months ago by FireFlyWebs.

    I got this sorted out. You can’t actually see the card by going to the .php file.

    I had to purchase and send myself a card in order to see how it looked. Is there another way to view the email version of the card?

    You might add the optimal image size to the instructions…had to do this by trial and error.

    Thanks…. Great plug in.

    Plugin Author pimwick

    (@pimwick)

    Glad to hear you were able to figure it out, the Pro version allows you to re-send gift card emails which is helpful in previewing as well.

    Lucy

    (@kiddiestuff)

    What file do I add this code to
    <div class=”gift-card-image”>/woocommerce/emails/gift-card.jpg” /></div>

    • This reply was modified 5 years, 9 months ago by Lucy.

    I have now purchased the pro version for another site this card will be added to. You stated above that “the Pro version allows you to re-send gift card emails which is helpful in previewing”
    I do need to see how the email will look before we make this available. How do I preview what it will look like please. I don’t see how that is made available?

    Plugin Author pimwick

    (@pimwick)

    To quickly test the gift card emails, follow these steps:

    1. Log into your WordPress admin area.
    2. Click on Pimwick Plugins -> PW Gift Cards -> Leave the search field blank and click Search to display all cards.
    3. Click on the “Email Gift Card” button to send out a test email to yourself.

    If you do not have any gift cards created yet, click on the “Create Gift Cards” button first.

    OK. But the email option is not sending the test email.

    Can you assist further?

    @pimwick Hi how can we add the product giftcards that they bought ?

    actually the scenario we have many gift cards products .. how we can add it to the email ? the product that they bought ?

    Thanks
    Art

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Adding a photo to the gift card email template’ is closed to new replies.