Repository Forums Support WooCommerce Extended Coupon Features PRO WooCommerce Booking System Compatibility

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #2445
    paul
    Participant

    I have a client who’s current booking system does not work as expected with this plugin. They wish to add coupons so their clients can receive 1 free child with every full paying adult, e.g. 1 adult 1 child free, 2 adults 2 children free etc.

    Is this plugin compatible with the WooCommerce Booking System, in order to achieve the above?

    #2446
    Soft79
    Keymaster

    I have never tested it in combination with any booking plugin. Which one do you use and what problem do you have?

    #2447
    paul
    Participant

    It’s the Pinpoint Booking System plugin. All works as expected, however this booking system does not show the quantities correctly in the client’s basket. For example when 2 bookings are made it shows 2 bookings, quantity 1, rather than quantity 2. So I cannot apply the coupons as needed, since the coupon only sees 1 booking when there is indeed 2.

    #2449
    Soft79
    Keymaster

    Hi, I just investigated the source of the free version of Pinpoint a bit. Discount rules like you described are not be possible without custom development.

    #2451
    paul
    Participant

    Yes that’s right, which is why I need to know if this Coupon extension will work as expected with WooCommerce Booking System plugin ? Is there a demo of the two together I can see?

    #2452
    Soft79
    Keymaster

    No, but you can download the free version of the plugin here.

    The PRO version is the same, but with additional files for the additional functionality. You need good PHP knowledge to achieve what you want. Take a look at class-woocommerce-cart.php of the Pinpoint plugin to get a hint of the cart_item data they use.

    #2461
    paul
    Participant

    Thank you for your help. Is there anyway way I can check the basket includes x2 of product A and x2 of product B before a coupon is applied with this plugin?

    #2468
    Soft79
    Keymaster

    This snippet shows you how to iterate the cart contents:

    
    $items = WC()->cart->get_cart();
    $product_names=array();
    foreach($items as $item => $cart_item) { 
        $product  = $cart_item['data']; 
        $quantity = $cart_item['quantity']; 
    }  
    
Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.