In desperation: Willing to pay for answer to this question
Hi,
I have a simple question that I urgently need an answer to. Having tried to get support from Appthemes without success, I am now at the point where I am willing to pay someone to tell me the answer. Please contact me urgently if you would like to work with me on this, including your price for a fix.
Here's my problem:
I have a custom form in Vantage, with a number of custom fields that are comprised of multiple checkboxes. Each checkbox group allows 'tick all that apply'.
If I add a new listing via the front end, each checkbox value that is ticked gets written to wp_postmeta as a separate row. So for days of week, a row each for Monday, Tuesday, Wednesday etc...
If I add a listing via the CSV importer, all the checkbox values get added to wp_postmeta as a single row. So for days of week, one single row in wp_postmeta containing meta_value of 'Monday,Tuesday, Wednesday etc'.
Because I have additional custom coding elsewhere that relies on the values being stored in the way they are for the front end, I desperately need to get the CSV importer to work in an identical way to the front end.
Vantage documentation advises including additional custom fields in the CSV importer using a small function in your child theme's functions.php which I have done. The fields go into Vantage OK, it's just that they are being stored the wrong way.
This is how I am currently adding the custom field 'day' to my CSV importer:
Code:
$args['custom_fields']['day'] = array( 'internal_key' => 'app_day' );
I believe I need to rewrite this to tell the Importer to handle the
value passed as an array, but I don't know how.
The code in framework/admin/importer.php has this in the comments:
Code:
/*
* Args can have 3 elements:
* 'taxonomies' => array( 'valid', 'taxonomies' ),
* 'custom_fields' => array(
* 'csv_key' => 'internal_key',
* 'csv_key' => array(
* 'internal_key' => 'key',
* 'default' => 'value'
* )
* ),
* 'tax_meta' => array( array( 'tax' => array( 'csv_key' => 'tax_key' ) )
*/
which I believe hold the answer, but I cannot for the life of me translate that comment into the correct code to add to my custom_csv_fields function in my child theme's functions.php.
All I want is for someone to give me the correct structure for that one single line
Code:
$args['custom_fields']['day'] = array( 'internal_key' => 'app_day' );
to enable the importer to treat the value passed as an array.
I would *LOVE* to get this resolved today and would love to hear from anyone who might be able to help. I repeat I am willing to pay for a resolution to this issue.
Frustratedly, but optimistically....
red20