• Resolved nick

    (@nszumowski)


    Any snippets or tips on updating /woo-rfq-for-woocommerce/woocommerce/emails/admin-new-rfq.php to display the regular and sale price in the Price column? Thanks for any help!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Neah Plugins

    (@gplsaver)

    As a starting point you would need to copy
    “\wp-content\plugins\woo-rfq-for-woocommerce\woocommerce\emails\rfqtk-email-order-items.php”
    to yourtheme\woocommerce\emails\rfqtk-email-order-items.php
    and look at line 69
    <td class="td" style="text-align:left; vertical-align:middle; border: 1px solid #eee; font-family: 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif;"><?php echo $order->get_formatted_line_subtotal( $item ); ?></td>

    That is where you can add an additional price. This is also used for the email that goes to the customer. So if you are showing prices for quote items you need to put additional checks in that code if you don’t want the customer to see it.

    Thread Starter nick

    (@nszumowski)

    Thanks!
    Got it working updating that line with:

    <?php if (($show_prices  == true || $sent_to_admin == true) && $hide_admin==false) : ?>
        <td class="td" style="text-align:left; vertical-align:middle; border: 1px solid #eee; font-family: 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif;">
            
            <p style="font-weight:bold;margin-bottom:20px;">Total: <?php echo $order->get_formatted_line_subtotal( $item ); ?></p>
    
            <?php 
                if( $product->is_on_sale() ) {
                    echo '<p style="font-size: 12px;">Sale Price:<br>$' . $product->get_sale_price() . '</p>';
                    echo '<p style="font-size: 12px;">Regular Price:<br>$' . $product->get_regular_price() . '</p>';
                } else {
                    echo '<p style="font-size: 12px;">Regular Price:<br>$' . $product->get_regular_price() . '</p>';
                }
            ?>
            <!-- or could use -->
            <?php echo $product->get_price_html(); ?>
    
        </td>
    <?php endif; ?>
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Show regular and sale price in email’ is closed to new replies.