Admin Fields Not Showing in Front End
-
Hi,
I have created a test admin field and want this to show in place of the short description all of which I have set up but this field won’t show when viewing the product in the front end http://www.nebulasdesign.com/covertex/collections/new-collections/imperiale/avanti. This is also the same with the default 2016 theme. Do you know what the issue could be?
Thanks,
James Isles
-
Hi, by default admin fields won’t display on product page, but you can display theme on cart, checkout, order and email fields.
I will enable this option with my next release.
mean time do some thing like this to achieve this
function inject_wccaf_admin_field() { global $post; $all_fields = apply_filters( 'wcff/load/all_fields', $post->ID, 'wccaf', "any" ); if( count( $all_fields ) > 0 ) { foreach ( $all_fields as $fields ) { if( count( $fields ) > 0 ) { foreach ( $fields as $key => $field ) { $mval = ""; $mval = get_post_meta( $post->ID, "wccaf_". $field["name"], true ); if( !$mval ) { if( isset( $field["default_value"] ) && $field["type"] != "radio" && $field["type"] != "select" ) { $mval = $field["default_value"]; } else { $mval = ""; } } $field["value"] = $mval; $field["location"] = "product-page"; echo apply_filters( 'wcff/render/admin/field/type='.$field["type"], $field ); } } } } } add_action( 'woocommerce_before_add_to_cart_button', "inject_wccaf_admin_field" );Hi,
That works thank you although we aren’t using any of the cart and buy buttons so what would be the hook to add it before the short description? I have found the hook to replace it but would like to leave it in in case my client wishes to add more info.
Also don’t want to show the tool tips http://www.nebulasdesign.com/covertex/collections/plain/avanti I can hide them with CSS for no no problem.
Do you know when you will adding this feature in and releasing the new version?
Is it also possible to get the fields to hide in the front end if nothing has been entered in the edit product page?
Hello,
One more thing I’ve just noticed with the admin fields is that the fields don’t show when adding a new product you have to save or publish the product before they show. I assume this is something to do with the rules and had a play with the various options but none make the fields show. Is it possible to fix this?
where did you paste this code?
Is there an answer on this?
I’ve the same need to show admin fields in frontend.Hi all,
This feature is available with V1.3.1 onward.
Hi,
Thanks for adding this but as an update I need this a while ago and as a work around in the end I used Advanced Custom Fields and just added the tags into the single-product/short-description.php template and styled it as I needed.
Jim
Hey Saravana,
I installed your plugin only today. I can’t seem to get the custom filed to show on front end though. Here’s my demo link
http://working-new-rapsel.pantheonsite.io/product/rapsel-angle-cock-campass/
I can create an admin level access for you to view the settings. Please let me know your preferred email address.
Thanks,
Hi @htezabwala, by default admin fields will not be displayed on the front end product page, unless you have configured so.
The following option has to be set for each admin fields you have created.
1. Show on Product Page this option has to be turned on to show the fields on the product page.
2. Show on Cart & Checkout this option has to be turned on to show on cart & checkout page.
3. Order Item Meta this option has to be turned on to add this fields as order meta.
You may also refer this article for further details.
Hey Saravana,
Thanks for the reply (on a Sunday!)
Here’s the admin settings for plugin. I had read the article previously, yet could not get the desired results.
plugin settings – http://prntscr.com/b1nabj, http://prntscr.com/b1nail
product page – http://prntscr.com/b1nawaI am okay with providing you admin access if you want to check further.
Thanks,
HusainHi @htezabwala, It’s a simple error on your product setup, that you haven’t entered any price for the product ( actually it’s mandatory ).
I have put some price there. now it’s displaying Admin and Product fields too.
Side note, but an important one: tl;dr Don’t request access like that again.
@mycholan I’ve deleted your offer to login to your user’s site. I’m am 100% sure you mean well but please never ask for credentials on these forums.
http://codex.wordpress.org/Forum_Welcome#The_Bad_Stuff
Now for the why: The internet is a wonderful place full of very nice people and a few very bad ones. I’m sure everyone here is very nice however, by giving some ones keys to your house you are trusting they wont steal anything. Likewise the person who takes the keys is now responsible for the house FOREVER.
If something was to go wrong, then you the author may well legally become liable for damages, which they would not normally have been as their software is provided without warranty.
Please be aware that repeatedly asking for credentials will result in us asking you to repeatedly stop before escalating up to the plugins team.
@jan Dembowski, good point, noted thank you.!
Regards
Sark
The topic ‘Admin Fields Not Showing in Front End’ is closed to new replies.