Remove "(incl. tax)" from Woocommerce tables and emails - php

I want to remove the "(incl. tax)" fromm Woocommerce cart and checkout tables as well as emails. I still need to keep the "(incl. ...$ tax)" that shows the actual tax amount and is displayed in the totals row. If I simply use
.tax_label{
display:none;
}
it is still displaye in emails and I'd prefer a cleaner way.

To edit Woocommerce emails, you have to edit the email template files:
https://woocommerce.com/posts/how-to-customize-emails-in-woocommerce/
Not hard to do, just remember to copy your customizations into the current theme, and remember to copy them and test them again if you change themes.
EDIT:
To edit the template files for woocommerce, the files are
/wp-content/plugins/woocommerce/templates/cart/cart-totals.php
/wp-content/plugins/woocommerce/templates/checkout/review-order.php
Copy them to your theme as recommended in the link above. I don't really remember exactly what line to edit, but a little experimenting won't hurt. Just play around a bit until you get the results you are after.

Related

Editing WooCommerce Emails

In the new orders email from Woocommerce it displays the products and the meta data in a bullet point list below said product.
I have tract down the email_order_items.php file to find this bit of code to render the bullet point list.
I have tried looking for file that contains the code for both do_actions in the image above but haven't had any luck. I did think it was class-wc-order-item-meta.php but after a quick edit nothing changes.
Does anyone know where it is located ?

How to remove invoice fee from Woocommerce order mail template?

As the title says, I want to remove the invoice fee from the customer-processing-order.php (I Think this is the right template)
https://github.com/woothemes/woocommerce/blob/master/templates/emails/customer-processing-order.php
From what I understand it comes from the function get_order_item_totals().
I can't just use CSS to hide it either because everything is inside a table. I found a website where someone was trying to hide the shipping cost and he used this:unset($totals['shipping']); inside the php file, which seemed pretty straightforward and clean. I wish you could just write something like unset($totals['invoice']); but unfortunately that's not the case.
Anyone got any ideas? I can't turn it off anywhere inside Woocommerce either.
do you have a screenshot of what exactly you want to be removed? I don't have an "invoice fee" anywhere at checkout ...

Woocommerce - Order Review total on checkout page not refreshing

After changing the shipping method on the Checkout page of my Woocommerce store, the total price does not update to reflect the new shipping cost.
I disabled all plugins, checked for errors, but everything is running like it should - except the total won't update.
I can't find anything about this on Google either. Anyone know what would cause this, or what steps I need to take to fix?
I had this problem and it was caused by outdated custom woocommerce template files.
For example, the review-order.php file in themes/my-theme/woocommerce/ was outdated and it included some of my own code.
I updated the version of that file, brought my custom code over and voila, upon changing shipping methods it successfully makes an AJAX call and refreshes the order totals.
In your case problem with html classes. When editing the checkout/review-order.php file, you need to keep the right html class shop_table woocommerce-checkout-review-order-table at the highest parent node. The file should look something like this:
<div class="shop_table woocommerce-checkout-review-order-table">
<?php //do stuff, add or remove anything you want ?>
</div>

Magento hide / remove prices from transactional emails

I am trying to hide / remove prices from within magento transactional
emails.
I have been able to hide the prices from the everywhere else in the
cart via css but not the emails.
I have tried commenting out the code that renders the price but it
seems mag needs this code to send the emails.
Any help would be appreciated.
Thanks
The default .phtml files for the order emails that display prices are saved in
app/design/frontend/default/base/template/email/order/items/
and
app/design/adminhtml/default/default/template/email/order/items.phtml
To remove prices from these emails, look through them for references to the function formatPrice and remove the surrounding HTML. If you remove the entire "Subtotal" <td>, then you'll want to also remove the "Subtotal" heading <th> from
app/design/frontend/default/base/template/email/order/items.phtml
Ideally you should avoid modifying the original files and would instead copy the files to your own theme folder and make your changes to the copy.
Not a good idea, this might take out all the information below the product rows plus you may find any products other than the first one missing.
If you just want to hide the totals, edit your local.xml file by adding this:
<sales_email_order_items>
<remove name="order_totals" />
</sales_email_order_items>
This will remove the information from your order emails and leave the info there for invoices etc.
OR if using 1.9 then probably best to edit etc/theme.xml but I am not sure what you would need to do there.

Zen Cart :: coupons - is there a way to create a page that will pull in the existing coupons and display them?

Zen Cart :: coupons - is there a way to create a page that will pull in the existing coupons and display them?
I am supposing that you mean a public (catalog) page.
I have never done it, but just in case it helps, I would start by looking at the file /includes/modules/pages/discount_coupon/header.php. This header gets the coupon id from the POST and retrieves its data from DB.
So it seems moderately easy to just duplicate this folder, rename it as "discount_coupons_list", modify the header.php to allow for a loop and do the rest of minor modifications that you would need to add any new page to Zen Cart (instructions here). For the template file, you could also use tpl_discount_coupon_default.php as a starting point.

Categories