I can't use the field REF from woocommerce products in the forms:
I want to make a form to create a easy way for a store manager to input new products but the field REF doesn't appear. Can you fix it please. So when I go to list all product I can order by that reference.
If I use the form from woocommerce it works fine.
Thanks
Hello,
Please elaborate the questions with more details.
What is the "field REF"? Is it custom reference field created with Toolset Types plugin?
How do you make the form? it is a Toolset post form for creating Woocommerce product post?
As you can see in the image, there is a field called Ref from woocommerce product that I want to be able to use in the form to insert new product. Because for the store having a "reference" field is the best way to identify and prepare the orders, so every item must have it's unique REF.
I have tried the latest version of Woocommece plugin + fresh WP installtion in my localhost, there isn't such a field "REF", see my screenshot REF.jpg.
So I am not sure how do you setup the REF field, it seems to be came from other plugins, can you confirm it?
If it is, you will need to check it with the plugin author of other plugin, check how does it store the REF field value.
If it is a custom post field, you can use [wpv-post-field] shortcode to display it:
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-post-field
If it is a custom taxonomy, you can try shortcode [wpv-post-taxonomy]:
https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#wpv-post-taxonomy
You have the SKU field instead of REF, it's the same, because mine is the Portuguese and it's translated.
I think that it's supposed to be used as a serial number for every product.
Thanks for the details, please try below shortcode:
[wpv-post-field name='_sku']
Your code didn't do anything and I don't know how to use it in the input form. But as you can see woocommerce uses that information automatically
Woocommerce plugin is using a hidden field "_sku" to store the SKU value.
If you are going to put that field into Toolset post form, you can try these:
1) Dashboard-> Toolset-> Post Forms, click button "Manage non-Toolset Post Fields", find and add field "_sku", see my screenshot sku.PNG
2) Create a new post form for editing/creating product posts, you should be able to see the field "_sku"
My issue is resolved now. Thank you!
Many thanks mate, keep up the good work.