ExVat IncVat on single Product Page of Woocommerce - woocommerce

I am trying to integrate the exVat incVat auto Suffix from the Cart Page to the single product page..
Currently if you go to checkout the prices will show exVat incVAT depending on how taxes are set up within woocoomerce when change the country they change automatically to display correctly. However on the single product page it either shows nothing or you can force it to say one in the settings. Would be much nicer if it could display either suffix.
Screenshots of example from shop page:
incVat
exVat
Is there a solution to make the single product page do this?
(I have spent 5+hrs trying options from custom code and editing the templates but with little success so would appreciate some help :D)
I have tried a mash of other codes and my own experience into fucntions.php with fatal errors or not really touching what I am looking for.
I have also tried unsuccessfully editing WooCommerce template files.
Any help much appreciated.

Related

Create Custom Woocommerce Text Fields and display on frontend

I wanted to create Additional WooCommerce Custom Fields that I can display on my Archive Page and Single Product Page.
So I followed this Tutorial— ( https://www.cloudways.com/blog/add-custom-product-fields-woocommerce) — and this— https://www.youtube.com/watch?v=yTDE6pJjOKs —– and this —- (https://wpsimplehacks.com/how-to-create-custom-fields-in-wordpress)
But these Tutorials are too complex. I have been able to follow them and get my Custom Field on my Backend as you can see here— (https://prnt.sc/VzBQDq-jp0PY)
The challenge I’m facing now is that I’ve not been able to translate that Data to show on the Frontend. I’ve been struggling with it for 6 Days now.
The thing is that I did get the Data to show on the Frontend through this (https://www.youtube.com/watch?v=yTDE6pJjOKs) —– and this —- (https://wpsimplehacks.com/how-to-create-custom-fields-in-wordpress) ——- but it scattered the entire Page Layout.
Now, I couldn’t tell what part of the code is causing that conflict.
What I am asking for now, is someone that can help me make sense of the Codes here-- (https://www.cloudways.com/blog/add-custom-product-fields-woocommerce/)
Then create it for only Text Field, and show how to output it on the frontend, on the Single Product Page to look like this-- https://prnt.sc/6W_S1w1BQlRc
Regards.

How to display revenue generated by a product from WooCommerce on the frontend

I am trying to display certain text on a website I am working on that is donations based. It uses WooCommerce and WordPress to handle the donations.
I am trying to display the text "Raised so far: $xx" dynamically so it shows the amount raised but I am struggling to find anything on Google/Stackoverflow that would give me the solution to this problem.
Does anyone know of a plugin that exists for this or some code that could make this possible? Thank you in advance.
Edit: See updated solution here

Why are products appearing with sub-sub-categories?

I've got a woocommerce site with the mayashop theme. I'm trying to make product categories show as their own page without products, then you drill down to see the products. This seems to work for subcategories for me but not on a page with sub-sub-categories. Is there a setting I've missed?
Settings to show just categories
Problem page, the subcategory is Collections>Travel and the sub-sub-categories are the geographic regions. But the test project IN one of those regions is showing...
Any help much appreciated. I'm happy enough with creating simple plugins etc if needed but woocommerce is too big to do this without being pointed at the right parts to change :)
I found the issue; the theme's version of archive-product.php was displaying too much.
I added a condition: if the woocommerce_product_subcategories() method output any categories, it will withold outputting posts (products). Perhaps a bit simplistic but the smallest change to my child theme to get the effect I was after.
archive-product.php diff

Woo commerce - variable product prices missing from WP

hoping for some help.
We use the following - Wordpress/ woo commerce /wcvendors pro. Prices for variable products are disappearing from wp engine view despite being in the product variation information. It doesn't impact every product on our site but a fair few. How it occurs is, the price is disappearing when you go in and edit the product. If we quick edit the product the price reappears. But it will dissapears again if we use the edit button. Initially the problem started because under the "Products" and "Inventory" We had checked the following setting: "Hide out of stock items from the catalog". Now this button is not ticked but it is still causing us issues.
It seems you have an error on the product page which cause the price not to be saved.
There can be some reasons, here are two I see occasioanlly:
PHP error is caused during the save, and therefore the data is lost. WordPress and WooCommerce works flawlessly together, so the first suspects are other plugins and your theme. Try first to turn off all your plugins and switch to another theme to see if this happens again. If not try to activate your theme, and recheck, and then the plugins one after the other, and check after each activation, until you find the one makes the problem.
Too many data is being saved at one time. It can be too many variations or too many custom fields. This can be fixed by changing some PHP settings. Please have a look here especially under the WPEngine note, and also check this plugin.

WooCommerce - Variations

I am using WooCommerce in my project and would like to display variations in a similar style like http://www.e-rudy.com/en/products/detail/SN220724R1. They have a tab called "other colors". Is it possible to do that in WooCommerce?
Yes, it is possible, but you will have to add a custom template for that to be incorporated in the product tabs. In that template you should pull all the variations information corresponding to the main product.
If you don't do it as parent->variations products, you can still link them in the backend and show those in the template. In short, it's doable but you or someone else will have to code that part. It might also be possible to do it with wp-types views, but I have never used it so I can't comment.
Hope that helps to get you started.
Like this https://woocamp.com/product/classic-wordpress-shirt/ ?
When you click on the additional sizes, nothing visually happens. But the size is registered as a variation. Now, when you select a different color, the image actually changes and the image switches as well!
I did that using WooCommerce Variations and Swatches

Resources