filipV-3
Support threads created in the last 30 days: 0
Favorite Forum Topics
This user has no favorite topics.
Forum Topics Created
Status | Topic | Supporter | Voices | Posts | Freshness |
---|---|---|---|---|---|
Custom type field entries won't save any more
1
2
Started by: filipV-3 in: Toolset Professional Support |
3 | 30 | 7 years, 3 months ago | ||
CRED repeating image fields – gallery. Woo and non-woo
Started by: filipV-3
in: Toolset Professional Support
Problem: I would like to allow my site users to upload images and create a product image gallery when they create a new Product using CRED. I would rather not show the custom fields in the Product editing screen. Solution: Create a repeating image custom field and apply that field to the Product post type. Create a CRED form that will create new Products. Auto-generate the form so your custom repeated image input is added. Use the cred_save_data hook to capture the images uploaded with CRED, and determine the image IDs using the post guid and image URLs. Generate a comma-separated list of IDs, and store that list in the _product_image_gallery meta field of the new Product. add_action('cred_save_data', 'cred_product_gallery_action',10,2); function cred_product_gallery_action($post_id, $form_data) { global $wpdb; // if a specific form if ($form_data['id']==69) { if (isset($_POST['wpcf-product-gallery-image-cred'])) { $list_ids = array(); foreach($_POST['wpcf-product-gallery-image-cred'] as $url) { $item_id = $wpdb->get_col($wpdb->prepare("SELECT ID FROM $wpdb->posts WHERE guid='%s';", $url )); $list_ids[] = $item_id[0]; } update_post_meta($post_id, '_product_image_gallery', implode($list_ids,',')); delete_post_meta($post_id, 'wpcf-product-gallery-image-cred'); } } } You may twirl the custom field section closed in the Product editing screen, or you can hide it completely from the admin area using the Screen Options tab in the top right corner of the admin screen. Relevant Documentation: https://toolset.com/documentation/programmer-reference/cred-api/#cred_save_data |
2 | 11 | 7 years, 3 months ago | ||
woocommerce product native taxonomies can’t make hierarchical
Started by: filipV-3
in: Toolset Professional Support
Problem: I would like to use a select field to display Product Categories in a CRED form that creates WooCommerce Products, but I can only choose checkboxes. Solution: Modify the CRED field shortcode to use type "select" and single_select "true". [cred_field field='product_cat' display='select' single_select='true' output='bootstrap'] Relevant Documentation: https://toolset.com/documentation/user-guides/cred-shortcodes/#cred_field |
2 | 6 | 7 years, 3 months ago | ||
no results map multiple markers
Started by: filipV-3 in: Toolset Professional Support |
2 | 8 | 7 years, 3 months ago | ||
Terribly frustrating!!
Started by: filipV-3 in: Toolset Professional Support |
2 | 5 | 7 years, 3 months ago |