filipV-3
In den letzten 30 Tagen erstellte Support-Threads: 0
Lieblings-Forenthemen
This user has no favorite topics.
Forum Topics Created
Status | Thema | Supporter | Stimmen | Artikel | Aktualität |
---|---|---|---|---|---|
Custom type field entries won't save any more
1
2
Gestartet von: filipV-3 in: Toolset Professional Support |
3 | 30 | vor 7 Jahren, 3 Monaten | ||
CRED repeating image fields – gallery. Woo and non-woo
Gestartet von: 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 | vor 7 Jahren, 3 Monaten | ||
woocommerce product native taxonomies can’t make hierarchical
Gestartet von: 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 | vor 7 Jahren, 3 Monaten | ||
no results map multiple markers
Gestartet von: filipV-3 in: Toolset Professional Support |
2 | 8 | vor 7 Jahren, 3 Monaten | ||
Terribly frustrating!!
Gestartet von: filipV-3 in: Toolset Professional Support |
2 | 5 | vor 7 Jahren, 3 Monaten |