• Resolved lala1003

    (@lala1003)


    Hi everyone!

    Maybe anyone will be able to help me on this.

    I am looking at changing this section of the code:

    <h3><?php _e( ‘Product Details’, ‘woocommerce-product-stock-alert’ ); ?></h3>
    <table cellspacing=”0″ cellpadding=”6″ style=”width: 100%; border: 1px solid #eee;” border=”1″ bordercolor=”#eee”>
    <thead>
    <tr>
    <th scope=”col” style=”text-align:left; border: 1px solid #eee;”><?php _e( ‘Product’, ‘woocommerce-product-stock-alert’ ); ?></th>
    <th scope=”col” style=”text-align:left; border: 1px solid #eee;”><?php _e( ‘Price’, ‘woocommerce-product-stock-alert’ ); ?></th>
    </tr>
    </thead>
    <tbody>
    <tr>
    <th scope=”col” style=”text-align:left; border: 1px solid #eee;”><?php _e( $product_obj->get_name(), ‘woocommerce-product-stock-alert’ ); ?>
    <?php if($product_obj->get_type() == ‘variation’){
    foreach ($product_obj->get_attributes() as $label => $value) {
    echo “<br>”.ucfirst(wc_attribute_label($label)).”: “.ucfirst($value).”“;
    }
    } ?></th>
    <th scope=”col” style=”text-align:left; border: 1px solid #eee;”><?php _e( $product_price, ‘woocommerce-product-stock-alert’ ); echo ( isset( $is_prices_including_tax ) && ($is_prices_including_tax != “yes” )) ? WC()->countries->ex_tax_or_vat() : WC()->countries->inc_tax_or_vat(); ?></th>
    </tr>
    </tbody>
    </table>

    <p style=”margin-top: 15px !important;”><?php printf( __( “Following is the product link : “, ‘woocommerce-product-stock-alert’ ) ); ?>“><?php echo $product_name; ?></p>

    Would it be possible to display only the first product image on the left side, the product title + price on the right side of the image and a “Buy now” button?
    Here is an example what I mean:
    https://s19.directupload.net/images/200211/85cpzga3.png

    I would be thankful for any reply on this.

    xx

Viewing 5 replies - 1 through 5 (of 5 total)
  • Dualcube

    (@dualcube)

    Hi @lala1003, can you please explain exactly what modification are you looking for Stock alert button, so we can help you out.

    Thread Starter lala1003

    (@lala1003)

    Hello @dualcube

    firstly I am very thankful for your reply on my topic.

    I would like to modify the php email template of the stock_alert_email.php.

    Right now, with the code I posted previously, the e-mail looks like this:
    https://s19.directupload.net/images/200220/f8gd3kml.png

    I would like to have it look like this:
    https://s19.directupload.net/images/200211/85cpzga3.png

    That means:
    -display the first product image on the left side
    -display the product title + price on the right side of the image
    -display a “Buy now” button (that contains the link to the product)

    Could you help me with this?

    Best regards

    Dualcube

    (@dualcube)

    @lala1003, thanks for the update. Yes, you have to override our template file stock_alert_email.php. After that, you have to modify our structure and add ours.

    Thread Starter lala1003

    (@lala1003)

    Hello @dualcube

    yes, I would love to override the template file, but unfortunately I don’t know how to code php template files ??

    That’s why I was hoping you could maybe look into the code, to make the e-mail look like in the image posted? I would be so thankful for any help with the code ??

    Dualcube

    (@dualcube)

    Hi @lala1003, please do contact our development team over forum, so they can help you out : https://wc-marketplace.com/support-forum

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Add product image to subscriber alert email’ is closed to new replies.