Forum Replies Created

Viewing 15 replies - 1 through 15 (of 27 total)
  • Thread Starter rienco

    (@rienco)

    Bedankt, ook in de live omgeving lijkt het weer te werken.

    Thread Starter rienco

    (@rienco)

    @joerimyparcel dit lijkt inderdaad te werken, waar kan ik deze versie vinden? WP geeft niet aan dat er een update beschikbaar is.

    Thread Starter rienco

    (@rienco)

    Hoi Joeri,

    Bedankt voor je reactie

    • Ordermodus staat inderdaad aan
    • Bij Automatisch verwerken staat de status “In de wacht”
    • De vier keuzes zijn respectievelijk: Afgerond | Geen | Geen | Geen
    • Ik stuur jullie een link naar onze stagingomgeving.
    Thread Starter rienco

    (@rienco)

    Hi Joeri,

    We hebben nog steeds gedeeltelijk dit probleem. Op het moment we de status wijzigen via een custom order status die via de backend besteloverzichtspagina aangepast kan worden geeft deze nog steeds dezelfde foutmelding. Dit is de code die we hiervoor gebruiken:

    <?php
    /**
    * Plugin Name: Custom Order Status Buttons
    * Description: Voeg twee aangepaste orderstatussen toe (Betaald en Afgerond, wacht op betaling) met snelle actieknoppen in het WooCommerce bestellingenoverzicht.
    * Author: Rienco | Teqz
    * Version: 1.0
    */

    if (!defined('ABSPATH')) exit;

    // 1. Registreer aangepaste statussen
    add_action('init', function() {
    register_post_status('wc-betaald', [
    'label' => 'Betaald',
    'public' => true,
    'show_in_admin_all_list' => true,
    'show_in_admin_status_list' => true,
    'label_count' => _n_noop('Betaald <span class="count">(%s)</span>', 'Betaald <span class="count">(%s)</span>'),
    ]);

    register_post_status('wc-afgerond-wacht-op', [
    'label' => 'Afgerond, wacht op betaling',
    'public' => true,
    'show_in_admin_all_list' => true,
    'show_in_admin_status_list' => true,
    'label_count' => _n_noop('Afgerond, wacht op betaling <span class="count">(%s)</span>', 'Afgerond, wacht op betaling <span class="count">(%s)</span>'),
    ]);
    });

    add_filter('wc_order_statuses', function($statuses) {
    $statuses['wc-betaald'] = 'Betaald';
    $statuses['wc-afgerond-wacht-op'] = 'Afgerond, wacht op betaling';
    return $statuses;
    });

    // 2. Voeg knoppen toe aan het bestellingenoverzicht
    add_filter('woocommerce_admin_order_actions', function($actions, $order) {
    if ($order->get_status() !== 'betaald') {
    $actions['mark_betaald'] = [
    'url' => wp_nonce_url(admin_url('admin-ajax.php?action=mark_order_status&status=betaald&order_id=' . $order->get_id()), 'mark_order_status'),
    'name' => __('Markeer als Betaald', 'custom-order-status-buttons'),
    'action' => 'mark_betaald',
    ];
    }
    if ($order->get_status() !== 'afgerond-wacht-op') {
    $actions['mark_afgerond_wacht_op'] = [
    'url' => wp_nonce_url(admin_url('admin-ajax.php?action=mark_order_status&status=afgerond-wacht-op&order_id=' . $order->get_id()), 'mark_order_status'),
    'name' => __('Afgerond, wacht op betaling', 'custom-order-status-buttons'),
    'action' => 'mark_afgerond_wacht_op',
    ];
    }
    return $actions;
    }, 20, 2);

    // 3. AJAX handler voor statuswijziging
    add_action('wp_ajax_mark_order_status', function() {
    if (!current_user_can('edit_shop_orders') || !check_admin_referer('mark_order_status')) {
    wp_die(__('Geen toegang', 'custom-order-status-buttons'));
    }

    $order_id = intval($_GET['order_id'] ?? 0);
    $status = sanitize_text_field($_GET['status'] ?? '');

    if (!$order_id || !$status) {
    wp_die(__('Ongeldige gegevens', 'custom-order-status-buttons'));
    }

    $order = wc_get_order($order_id);
    if (!$order) {
    wp_die(__('Order niet gevonden', 'custom-order-status-buttons'));
    }

    $order->update_status('wc-' . $status, __('Status handmatig gewijzigd via snelactie', 'custom-order-status-buttons'));
    wp_safe_redirect(wp_get_referer());
    exit;
    });

    // 4. Styling van de knoppen
    add_action('admin_head', function() {
    echo '<style>
    .wc-action-button.mark_betaald::after {
    content: "";
    color: #fff;
    background: #3bb54a;
    border-radius: 50%;
    display: inline-block;
    width: 20px !important;
    height: 20px !important;
    text-align: center;
    margin: 4px 2px !important;
    }
    .wc-action-button.mark_afgerond_wacht_op::after {
    content: "";
    color: #fff;
    background: #f9a825;
    border-radius: 50%;
    display: inline-block;
    width: 20px !important;
    height: 20px !important;
    text-align: center;
    margin: 4px 2px !important;
    }
    </style>';
    });

    @femiyb We have several webshops on our 2 Siteground VPSes that still has issues with statusupdate after payment. How can I reach you to add the extra details?

    yes, that’s correct from our side.

    We have 2 customers with the same problem. Maybe it’s because of the WP 6.8.3 update?

    • This reply was modified 4 months, 2 weeks ago by rienco.
    Thread Starter rienco

    (@rienco)

    This issue still persists. Any updates about it?

    Thread Starter rienco

    (@rienco)

    Unfortunately, when i select the dutch language, i can’t see this phrase:

    https://prnt.sc/L-we4ts5Bfat

    I will send you an email.

    Thread Starter rienco

    (@rienco)

    Unfortunately it doesn’t have the same functionality as your plugin does.

    Thread Starter rienco

    (@rienco)

    Yes we know this and it works. However we have the entire website built on the other plugin discounts. Is it possible to apply only this rule and remain the other discounts from the other plugin that it works both on the same website?

    Thread Starter rienco

    (@rienco)

    Hi Algol,

    Thanks for you quick response.

    We want to be able to set an agreed fixed price per customer for different products in woocommerce, we are currently stuck in that.

    @emilyvansomeren Could you please tell us how you fixed it? We’re facing the same problem here. We have a Javascript error like this:

    Uncaught (in promise) SyntaxError: Expected property name or '}' in JSON at position 1 (line 1 column 2)
    at Function.parse as parseJSON
    at em_maps_load_locations (maps.js:41:23)
    at HTMLDivElement. (maps.js:136:60)
    at Function.each (jquery-3.4.1.min.js?ver=3.4.1:2:2777)
    at k.fn.init.each (jquery-3.4.1.min.js?ver=3.4.1:2:1419)
    at em_maps (maps.js:136:33)
    at js?v=quarterly&libraries=places&callback=em_maps&key=AIzaSyA_y7NmQY28SH0ldRcTe6NdZGgjLyTwee8:288:509
    at js?v=quarterly&libraries=places&callback=em_maps&key=AIzaSyA_y7NmQY28SH0ldRcTe6NdZGgjLyTwee8:288:21

    It’s a error that occurs on this piece of code:

    function em_maps_load_locations(el){
    var el = jQuery(el);
    var map_id = el.attr('id').replace('em-locations-map-','');
    var em_data = jQuery.parseJSON( el.nextAll('.em-locations-map-coords').first().text() );
    if( em_data == null ){
    var em_data = jQuery.parseJSON( jQuery('#em-locations-map-coords-'+map_id).text() );
    }

    The JSON looks like this:

    {“em_ajax”:true,”query”:”GlobalEventsMapData”,”width”:”400px”,”height”:”300px”,”id”:486052607}

    However in my html it parses html entities:

    <div class='em-locations-map-coords' id='em-locations-map-coords-1667966170' style="display:none; visibility:hidden;">{“em_ajax”:true,”query”:”GlobalEventsMapData”,”width”:”400px”,”height”:”300px”,”id”:1667966170}</div>

    Like this:

    <div class=’em-locations-map-coords’ id=’em-locations-map-coords-1667966170′ style=”display:none; visibility:hidden;”>{“em_ajax”:true,”query”:”GlobalEventsMapData”,”width”:”400px”,”height”:”300px”,”id”:1667966170}</div>

    It seems the quotes are not the correct opening and closing quotes?

    • This reply was modified 1 year, 10 months ago by rienco.

    Ah ok, I see.

    About the other solutions: i don’t use shortcodes to show the pagination or calendar, We’re using the basic settings from Events Manager

    I found a fix on this thread:

    https://wordpress.org/support/topic/ajax-paging-fails-on-default-events-page/#post-16682303

    To fix this change line 40 of wp-content/plugins/events-manager/em-functions.php from this:

    $data_atts = 'data-em-ajax="'.esc_attr(build_query($data)).'"'; //for inclusion later on

    To this:

    $ajax_data = $data;
                    unset($ajax_data['header_format']);
                    $data_atts = 'data-em-ajax="'.esc_attr(build_query($ajax_data)).'"'; //for inclusion later on

    Hopefully the plugin author will provide a fix for this in the next release.

Viewing 15 replies - 1 through 15 (of 27 total)