Change Review-Order template
-
Hi Guys,
So the way I have things set up, I have to enable “Show prices INCLUDING TAX in checkout & cart” as this plays with a certain logic I have. However, I actually need to have the Subtotal (without Tax), Total (including Tax) and tax amount.
AT the moment, only the Subtotal is the issue. It includes tax. Cart value = €79, subtotal is at €79 (which can’t be).
So, I found that If I edited your template > checkout > review-order.php, I can manipulate this to show the correct subtotal value. I replaced this code:
<tr class="cart-subtotal"> <th><?php esc_html_e( 'Subtotal', 'woocommerce' ); ?></th> <td><?php wc_cart_totals_subtotal_html(); ?></td> </tr>
With this code here:
<tr class="cart-subtotal"> <th><?php printf( __( 'Subtotal %s', 'woocommerce' ), '' );?></th> <td><?php echo wc_price( WC()->cart->get_subtotal() ); ?></td> </tr>
And it works exactly as I had hoped. However, The second you release an update to this plugin, this is going to wipe out entirely. Can you help me find a way to keep this persistent? Im not exactly familiar with Hooks & Filters, but if you have a moment I would really appreciate your help. Even if it’s a simple plugin.
- The topic ‘Change Review-Order template’ is closed to new replies.