Details
Custom Fields for WP e-Commerce allows store owners to manage additional Product detail fields with the ease WordPress users have come used to through standard field controls displayed on the Add/Edit Products page in both WP e-Commerce 3.8+ and legacy 3.7 stores.
The recent release of Custom Fields 1.1 includes support for text boxes in conjunction to standard input fields, this enhancement makes it possible for store owners to add additional content blocks to the Product detail page.
WP e-Commerce Compatibility
- WP e-Commerce 3.7 ready (up to 3.7.8)
- WP e-Commerce 3.8+ ready (up to 3.13.*)
Documentation
Looking for support, a copy of the readme, Plugin updates, Ideas or usage instructions? Check out our Documentation for Custom Fields.
Hi Michael,
This looks great, just what I’m looking for. However I’m new to this so I’m not quite sure what do once I have created my field.
Do I need to put something in the custom field box in the product edit page? Also I have put the code snippet into the the default products page container section of the products_page.php but there’s nothing showing on the web page. Admitedly I am diggin into code I have little understanding of and I am new to WP so your help is really greatly received here.
I am running WP 3.2.1
Thanks!
oooops, yes and WPEC 3.8.5
Hi Tracey, how Custom Fields works is you open Settings > Custom Fields and create your custom fields, an example for a toy shop would be ‘Product Code’ and ‘Recommended Age’. Once these fields have been created they are visible for filling under the Add/Edit Products page. You’ll need to copy and paste the snippets into your Products Page and/or single Products template.
What I’ll do though to make things easier is add an option to automatically add these custom fields to the Products Page and single Products. Store owners can then enable/disable this as needed. I’ll get this update out the door in the next few days.
Hey Michael,
Thanks for getting back to so quickly. The fields are there in my edit products page, just don’t know my way around the template files (yet!).
An enable/disable option would be fantastic!
Thanks again
Hi Tracey, you can control the position from Settings > Custom Fields.
Hey,
Thanks for this, great.
This plugin does not seem to work with Multi Site WP implementation.
Nevermind… it was caused by missing wpsc_get_major_version in the sub site. I manually updated the wp_X_options table adding wpsc_version to it.
Hi Alex, just to confirm is Custom Fields working with Multi Site WP implimentations, if not what change is required to enable this? Thanks Alex.
Hi, Michael.
Thanks for the plugin.
1.) Specific question: It appears that the maximum number of custom fields that can be created is six. Is that correct?
If so, was that your choice, or is that a WPEC limitation?
2.) General question: When you indicate that a plugin is “WP e-Commerce 3.8 ready,” does that usually mean up to the latest 3.8.3, too?
Thanks!
Hi Jeffreyrbk, there ‘shouldn’t’ be a restriction on the number of custom fields… I’ll look into this, secondly I’ve tested up to 3.8.2 so will adjust the Plugin notes to indicate what WP e-Commerce version each Plugin has been tested up to (e.g. up to 3.8.2, 3.8.3, etc.).
Typically though each Plugin is ready and working with the latest WordPress and WP e-Commerce version as my development sites run the latest WordPress release as it comes out (except my WP e-Commerce 3.7 sites), hope this helps 🙂
How can I include this custom meta in a product_search?
I would really like to know that as well 🙂
I also would like to know how product search can be used for custom fields
I would like to do this too, let me look into this further, I’ve got a few Plugin updates to get done across the Premium Plugin suite but will give this area some love shortly! 🙂
That would be awesome. I tried to do it myself, I’m not a total noob :), but I couldn’t find the search routine in the WPSC plugin. So maybe I am a total WPSC noob. If you could point me in the right direction, I could update the search function myself.
My function is sitting somewhere around here:
function custom_search_metadata($where)
{
global $wp_query;
if(!empty($_REQUEST['product_search'])) {
$where .= " or (mymeta_name_meta.meta_value like '%" . $_REQUEST['product_search'] . "%' $where)";
}
error_log("metadata where: ". $where);
return $where;
}
function custom_search_metadata_join($join)
{
global $wp_query, $wpdb;
if(!empty($_REQUEST['product_search'])) {
$join .= "LEFT JOIN (select post_id, meta_value from $wpdb->postmeta where $wpdb->postmeta.meta_key = '_wpsc_mymeta') as mymeta_name_meta on $wpdb->posts.ID = mymeta_name_meta.post_id";
}
error_log("metadata join: ".$join);
return $join;
}
add_filter('posts_where', 'custom_search_metadata');
add_filter('posts_join', 'custom_search_metadata_join');
If I use this plugin to add data to my products (like ISBN to books and author and stuff), would I be able to use this in search? Like search for an author or ISBN.
I’m using WPSC 3.8 and Gold cart 2.9
I get this error when using this plugin:
Call to undefined function wpsc_get_major_version()
Hey Rick, will sort now, if you’re using any of my other Plugins you won’t notice the error it’s just standalones where it’s affected. 🙂
I fixed it by removing the < 3.8 or 3.8 check by hardcoding it to 3.8.
Plugin update is out, enjoy 1.0.5 🙂
Just a couple of questions with regards to your custom fields plugin for WP e-commerce.
How does this differ from the existing advanced settings custom meta fields in 3.8?
Have you got a screenshot showing integration?
Thanks.
Hi hm2k, I’ll put some screenshots up shortly. The differences between the standard Advanced fields in WP e-Commerce and those available within Custom Fields are clearly explained in the Plugin description above. 🙂
Hey everybody having issues with 3.8, you need to do the following:
1. Find the following file:
wp-content/plugins/wp-e-commerce-custom-fields/includes/release-3_8.php
2. Find the following line (somewhere around 44):
<input type="text" id="wpsc_cf_product_" name="productmeta_values[]" value="" size="32" />
3. Replace that line with the following one:
<input type="text" id="wpsc_cf_product_" name="meta[]" value="ID,$wpsc_cf_field['slug'],true ); ?>" size="32" />
Hope that helps someone!
ABORT! ABORT!
It stripped out some of the important code from my comment, so here’s the instructions posted somewhere else:
http://pastie.org/1765111
That fix worked great! Thank you!!
Nice Ryan, I’ll cook this into the current version and get an urgent update out.
William Wnekowicz (http://www.altumdesign.com) has been working on a new Plugin update to support field types and all sorts of magic, soon as it’s gone through the checks we’ll get it out the door! 🙂
Custom Fields 1.0.2 is out with Ryan’s patch. 🙂
Thx so much Ryan, it now works for me! 🙂
hey there, do you think it’ll be possible to add functions like check boxes, radio buttons, etc? awesome plugin by the way!!
Hi Diana, 1.0.3/1.1 will likely have this functionality 🙂
Rock on!
Did anybody make it work on 3.8? The data com the custom fields never get saved!
xoxo
Hi Carlos, give the 1.0.2 update a whirl.
I implemented custom fields with WP-Ecommerce 3.8 but it does not appear that the values I enter are getting saved. I tried saving as draft and I also tried publishing directly, but neither appears to be saving the values I enter. When I edit the product, my fields come back blank. How can I troubleshoot this?
I’m having the same problem. I’m using WP-ecommerce 3.8 RC3. Any help would be greatly appreciated!
Hi Keith and Rory, let me confirm whether widget options have changed since 3.8 beta to 3.8 RC3, from memory there may have been a major re-structuring of widgets within the Products page which will cause the issue you’re experiencing, I’ll confirm and prepare a Plugin update to fix this. 🙂
Michael,
Any progress on this? I’d really like to use WP-eCommerce 3.8, I’ve rolled back to 3.7.8 for now, but I am looking to implement this over the weekend. I looked over the code and I didn’t see anything glaringly obvious, but I am a C# developer and PHP is not my strong suit.
Thanks,
k
Hi, im using the 3.8 WP E-commerce, but i cant get this CF plugin to work. I enable it just as I did back in 3.7 and the plugin activates just fine, but nothing happens. Am I missing something? I’ve read the readme with no luck.
Does this plugin do multiple custom fields such as Name, Date, Paragraph text, etc? and does it show up in the invoice?
Kimberly
Hi Kimberley, Custom Fields adds additional Product detail fields, these details do not carry across to the Invoice but could be called within the Admin Report/Purchase Receipt with some effort.
As the Admin Report/Purchase Receipt is very limited in terms of customisation I do not see this being implimented any time soon without custom development.
Download link appears to be broken…
Hi Ryan, you’re right! I guess WordPress didn’t like the migration to a sub-directory instead of web root. I’ll look at it now 🙂
Rolled back the changes, will do some reading and give it another shot later.
Much appreciated!
Hello,
How can I include these custom fields for Bulk CSV import?
please help.
Thank You!
Hi Red, the Custom Fields Plugin integrates well with Product Importer Deluxe, any custom fields that you create are shown in the list of available Product details import fields.
http://64.207.152.104/wp-ecommerce/plugins/product-importer-deluxe/
Thanks Visser!
Hi Adam, custom fields add details to Products, it does not integrate with Checkout for additional charges. You may be able to customise your existing shipping option to include support for adding additional charges, e.g. ‘cold shippping’.
Would this allow for a custom field during checkout? We need to be able to have an option during checkout for a special kind of shipping (cold shipping)…so if they want to pay extra to have their whole shipment kept cold, they can just choose this option during checkout.