• Is there a way to update the shortcode for the ‘Products’ section so it will also show the total sales of that product for the time period?

    For example:

    4 x Widget (AAP227B-5)

    would now look like this:

    4 x Widget (AAP227B-5) $245.87

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter britand

    (@britand)

    Has anyone on your team seen this?

    Thread Starter britand

    (@britand)

    Do you monitor this thread? Please advise.

    Plugin Author Dmytro Holovnia

    (@dholovnia)

    Hi,

    You need to rewrite our template email. For this in the child theme create folder woocommerce-sales_report and there create file email.php. Copy content from our plugin file templates/email.php to your email.php file.
    Find there this line of code

    
    foreach($ready_products as $product) {
        echo '<p style="font-size: 1em;padding: 0;margin: 0;">', $product['quantity'], ' x <strong>', $product['name'],
        ( ( empty( $product['sku'] ) ) ? '' : ' (' . $product['sku'] . ')' ),'</strong></p>';
    }
    

    change to this

    
    foreach($ready_products as $product_id => $product) {
        echo '<p style="font-size: 1em;padding: 0;margin: 0;">', $product['quantity'], ' x <strong>', $product['name'],( ( empty( $product['sku'] ) ) ? '' : ' (' . $product['sku'] . ')' ), ' '.get_post_meta( $product_id, '_price', true ),'</strong></p>';
    }
    

    Test it on dev server before use.

    Regards,
    Dima

    Thread Starter britand

    (@britand)

    We added this code and it works, but it is just showing the price of each product and not the total sales per product.

    For example:

    3 x Lyzme 5 (AAC191-90) 39.99

    should actually show like this…

    3 x Lyzme 5 (AAC191-90) 119.97

    How can this be fixed?

    Plugin Author Dmytro Holovnia

    (@dholovnia)

    Hi,

    We are not providing custom coding. You can hire a developer/freelancer for this.

    Regards,
    Dima

    Thread Starter britand

    (@britand)

    Understood. I will say that if you added this as a standard feature, this will be the best plugin of its kind without a doubt.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Sales Per Product’ is closed to new replies.