Forum Replies Created
- AuthorPosts
- m.loreauxParticipant
Hi,
There is an error line 95, replace “jQuery(document).ready(function() {” by “jQuery(document).ready(function($) {”
And How can I restrict the display of the upload with just the videos and not with the images?
I think that in the file media-upload.js
line 95 replace “library:wp.media.query({type: ‘image’}),” by “library:wp.media.query({type: mime}),”
and line 99 : “filterable: ‘image’,” by “filterable: mime,”Thx for this update please
m.loreauxParticipantHi,
I did not see your answer but I managed to do it.
Could you add an add_filter in the function wcaddons_wcfm_products_manage_3() that is in the WCFMu_WCAddons class in the wc-frontend-manager-ultimate/core/class-wcfmu-wcaddons.php file for the variable $product_addons because I would like to put the global fields
Thank you
m.loreauxParticipantHi,
Ok but I would just like to know how I can add a page in the dashboard that I would code to display the entries I want to display
If you have a blank plugin to do that or code to put in function.php
Thx
m.loreauxParticipantHi,
No, Just see the forms entries for store managers
Thx
September 27, 2019 at 6:18 pm in reply to: Synchro all calendars and filter by date and price #84045m.loreauxParticipantHi
Yes he do.
When I talk sync between calendars, it’s with the reservation calendars in a product, with the woocommerce appointment plugin
September 25, 2019 at 4:03 am in reply to: Synchro all calendars and filter by date and price #83500m.loreauxParticipantHi,
Ok I did Because the synchronization did not work. So for synchronization between the calendars of products from a vendor :
add_action( ‘woocommerce_order_status_processing’, ‘woocommerce_order_add_all_synchro_appointment’, 10, 1 );
add_action( ‘woocommerce_order_status_completed’, ‘woocommerce_order_add_all_synchro_appointment’, 10, 1 );
function woocommerce_order_add_all_synchro_appointment( $order ) {
global $wpdb, $WCFM;$order = wc_get_order($order);
foreach( $order->get_items() as $item_id => $item ){
$product_id = $item->get_product_id();
$vendor_id = wcfm_get_vendor_id_by_post( $product_id );
$products_objs = $WCFM->wcfm_vendor_support->wcfm_get_products_by_vendor( $vendor_id );$appointment_id = WC_Appointment_Data_Store::get_appointment_ids_from_order_item_id( $item_id );
$appointment = new WC_Appointment( $appointment_id[0] );$date_time_start = explode(“,”, $appointment->get_start_date(“Y-m-d”, “, H:i”));
$date_time_end = explode(“,”, $appointment->get_end_date(“Y-m-d”, “, H:i”));
$date_start = $date_time_start[0];
$date_end = $date_time_end[0];
$time_start = $date_time_start[1];
$time_end = $date_time_end[1];foreach($products_objs as $product_obj){
$is_exist = $wpdb->get_row(
$wpdb->prepare(
“SELECT ID
FROM {$wpdb->prefix}wc_appointments_availability
WHEREkind_id
= %d
AND from_range = %s
AND to_range = %s
AND from_date = %s
AND to_date = %s”,
$product_obj->ID, $time_start, $time_end, $date_start, $date_end
),
OBJECT
);if(empty($is_exist)){
$wpdb->insert(
$wpdb->prefix . ‘wc_appointments_availability’,
array(
‘kind’ => ‘availability#product’,
‘kind_id’ => $product_obj->ID,
‘title’ => ”,
‘range_type’ => “custom:daterange”,
‘from_range’ => $time_start,
‘to_range’ => $time_end,
‘from_date’ => $date_start,
‘to_date’ => $date_end,
‘appointable’ => “no”,
‘priority’ => “1”,
‘ordering’ => “0”,
‘rrule’ => “”,
‘date_created’ => current_time( ‘mysql’ ),
‘date_modified’ => current_time( ‘mysql’ ),
)
);
}}
}}
add_action( ‘woocommerce_order_status_cancelled’, ‘woocommerce_order_delete_synchro_appointment’, 10, 1 );
add_action( ‘woocommerce_order_status_refunded’, ‘woocommerce_order_delete_synchro_appointment’, 10, 1 );
add_action( ‘woocommerce_order_status_failed’, ‘woocommerce_order_delete_synchro_appointment’, 10, 1 );
add_action( ‘woocommerce_trash_order’, ‘woocommerce_order_delete_synchro_appointment’, 10, 1 );
add_action( ‘woocommerce_delete_order’, ‘woocommerce_order_delete_synchro_appointment’, 10, 1 );
function woocommerce_order_delete_synchro_appointment( $order ) {
global $wpdb, $WCFM;$order = wc_get_order($order);
foreach( $order->get_items() as $item_id => $item ){
$product_id = $item->get_product_id();
$vendor_id = wcfm_get_vendor_id_by_post( $product_id );
$products_objs = $WCFM->wcfm_vendor_support->wcfm_get_products_by_vendor( $vendor_id );$appointment_id = WC_Appointment_Data_Store::get_appointment_ids_from_order_item_id( $item_id );
$appointment = new WC_Appointment( $appointment_id[0] );$date_time_start = explode(“,”, $appointment->get_start_date(“Y-m-d”, “, H:i”));
$date_time_end = explode(“,”, $appointment->get_end_date(“Y-m-d”, “, H:i”));
$date_start = $date_time_start[0];
$date_end = $date_time_end[0];
$time_start = $date_time_start[1];
$time_end = $date_time_end[1];foreach($products_objs as $product_obj){
$wpdb->delete(
$wpdb->prefix . ‘wc_appointments_availability’,
array(
‘kind’ => ‘availability#product’,
‘kind_id’ => $product_obj->ID,
‘range_type’ => “custom:daterange”,
‘from_range’ => $time_start,
‘to_range’ => $time_end,
‘from_date’ => $date_start,
‘to_date’ => $date_end,
‘appointable’ => “no”,
‘priority’ => “1”,
)
);
}
}
} - AuthorPosts