0.00  View Cart

Forum Replies Created

Viewing 15 posts - 1,216 through 1,230 (of 1,241 total)
  • Author
    Posts
  • in reply to: [Resolved] Need variations while using bookable products #379

    Ashanna
    Plugin's author

    Hello,

    Yes, I changed this in the last update and variations are managed individually now 🙂
    I’m glad you found it !

    in reply to: [Resolved] Get list of booked items by date #369

    Ashanna
    Plugin's author

    Ok, so I think I see where the issue is.

    Could you go to the file easy-booking-availability-check-update.php and remove lines 111, 112, 113 and then recheck updates ?

    I send you the file anyway 🙂

    in reply to: [Resolved] Get list of booked items by date #367

    Ashanna
    Plugin's author

    Hello,

    This is weird, I did receive the update on my test site.

    Could you try manually check for update in your WordPress admin (Dashboard > Updates) ? Don’t forget to save your license key.

    If it still doesn’t work, I’ll send you the file by e-mail while I try to fix this !

    in reply to: [Resolved] Get list of booked items by date #363

    Ashanna
    Plugin's author

    Hello,

    The update is available, I hope it works as you wanted 🙂
    Don’t forget to update WooCommerce Easy Booking before.

    Thank you for the Spanish translation !

    in reply to: [Resolved] Get list of booked items by date #350

    Ashanna
    Plugin's author

    Hello,

    So, I added this feature to the plugin in the next update (coming very soon). You will be able to see a report of all booked dates, quantity, and stock left, for each booked product in the admin.

    I don’t know if the presentation is optimal, but I guees it will be better than nothing 🙂

    It would be great to have the Spanish translation, you can send the files at contact@herownsweetway.com.

    Thank you !

    in reply to: [Resolved] Get list of booked items by date #346

    Ashanna
    Plugin's author

    Hello,

    For the moment, you can only see this in each admin product’s page.

    I planned on making a report of all the booked dates in the admin for a future update. I’m still thinking about how I could display this…

    It is stored in the product postmeta. You can get it by doing : get_post_meta( $post_id, '_booking_days', true);

    However, this will only work for a single product.

    To get an array of all booked products, dates and quantity booked, you can use this function :

    EBAC()->easy_booking_availability_get_booked_items_from_orders();

    Note that it only stores future dates, and past dates are deleted on a daily schedule. This is to avoid having too much data stored.

    I hope I helped !

    in reply to: show only Bookable product #341

    Ashanna
    Plugin's author

    Hello,

    This is more about theme customization, but here’s what I would do :

    Create a new template page in your theme (create a child-theme, if you don’t already have one). I called it bookable.php in the example.

    Create a new page in your WordPress administration, link it with the new template page.

    In your template page, you’ll have to do a custom query to filter bookable products and include your product-archive template.

    <?php
    /*
    	//Template Name: Bookable
    */
    ?>
    
    <?php
    
    if ( ! defined( 'ABSPATH' ) ) {
    	exit; // Exit if accessed directly
    } ?>
    
    <?php get_header( 'shop' ); ?>
    
    	<?php
    		/**
    		 * woocommerce_before_main_content hook
    		 *
    		 * @hooked woocommerce_output_content_wrapper - 10 (outputs opening divs for the content)
    		 * @hooked woocommerce_breadcrumb - 20
    		 */
    		do_action( 'woocommerce_before_main_content' );
    	?>
    
    	<?php if ( apply_filters( 'woocommerce_show_page_title', true ) ) : ?>
    
    		<h1 class="page-title"><?php woocommerce_page_title(); ?></h1>
    
    	<?php endif; ?>
    
    	<?php do_action( 'woocommerce_archive_description' ); ?>
    
    	<?php $args = array(
            'post_type' => 'product',
            'meta_key' => '_booking_option',
            'meta_value' => 'yes'
        );
    
        $bookable_products = new WP_Query( $args ); ?>
    
    	<?php if ( $bookable_products->have_posts() ) : ?>
    
    		<?php
    			/**
    			 * woocommerce_before_shop_loop hook
    			 *
    			 * @hooked woocommerce_result_count - 20
    			 * @hooked woocommerce_catalog_ordering - 30
    			 */
    			do_action( 'woocommerce_before_shop_loop' );
    		?>
    
    		<?php woocommerce_product_loop_start(); ?>
    
    			<?php woocommerce_product_subcategories(); ?>
    
    			<?php while ( $bookable_products->have_posts() ) : $bookable_products->the_post(); ?>
    
    				<?php wc_get_template_part( 'content', 'product' ); ?>
    
    			<?php endwhile; // end of the loop. ?>
    
    		<?php woocommerce_product_loop_end(); ?>
    
    		<?php
    			/**
    			 * woocommerce_after_shop_loop hook
    			 *
    			 * @hooked woocommerce_pagination - 10
    			 */
    			do_action( 'woocommerce_after_shop_loop' );
    		?>
    
    	<?php elseif ( ! woocommerce_product_subcategories( array( 'before' => woocommerce_product_loop_start( false ), 'after' => woocommerce_product_loop_end( false ) ) ) ) : ?>
    
    		<?php wc_get_template( 'loop/no-products-found.php' ); ?>
    
    	<?php endif; ?>
    
    	<?php
    		/**
    		 * woocommerce_after_main_content hook
    		 *
    		 * @hooked woocommerce_output_content_wrapper_end - 10 (outputs closing divs for the content)
    		 */
    		do_action( 'woocommerce_after_main_content' );
    	?>
    
    	<?php
    		/**
    		 * woocommerce_sidebar hook
    		 *
    		 * @hooked woocommerce_get_sidebar - 10
    		 */
    		do_action( 'woocommerce_sidebar' );
    	?>
    
    <?php get_footer( 'shop' ); ?>

    Note that you will have to add the following code in your functions.php, to get the right woocommerce CSS :

    add_filter( 'body_class', 'add_woocommerce_body_class' );
    
    function add_woocommerce_body_class( $classes ) {
    	global $post;
    	
    	$classes = (array) $classes;
    
    	if ( is_page_template('templates/bookable.php') ) {
    		$classes[] = 'woocommerce';
    	}
    
    	return array_unique( $classes );
    }

    There is probably a better solution, but I don’t have time to look for it right now. Categories would be much easier actually.

    • This reply was modified 4 years, 6 months ago by  Ashanna.

    Ashanna
    Plugin's author

    Hello,

    So, I think the issue comes from your theme (maybe it’s not up-to-date with WooCommerce ?).

    In the Update 2.3 of WooCommerce, they changed an input in the add-to-cart form.

    I think this will solve the problem :

    Go to the WooCommerce template : templates/single-product/add-to-cart/variable.php (It should be in your theme though).
    Find this <input type="hidden" name="variation_id" value="" /> (line 93 maybe), and replace it with <input type="hidden" name="variation_id" class="variation_id" value="" />.

    • This reply was modified 4 years, 6 months ago by  Ashanna.
    in reply to: Weekly Pricing – any progress? #338

    Ashanna
    Plugin's author

    Hello,

    This function should work better :

    add_filter( 'easy_booking_display_price', 'display_weekly_booking_price', 10, 2 );
    
    function display_weekly_booking_price( $display_price, $content ) {
        global $post;
    
        $product = wc_get_product( $post->ID ); // Get Product
        $tax_display_mode = get_option( 'woocommerce_tax_display_shop' ); // Get Tax Display Mode
    
        if ( $product->is_type('variable') ) {
        	$variation_ids = $product->get_children();
    
            $variation_prices = array();
            if ( $variation_ids ) foreach ( $variation_ids as $variation_id ) {
            	$variation = wc_get_product( $variation_id );
            	$variation_prices[] = $tax_display_mode == 'incl' ? $variation->get_price_including_tax() : $variation->get_price_excluding_tax(); // Get product price
            }
    
            $min = wc_format_decimal( min( $variation_prices ) * 7 );
            $max = wc_format_decimal( max( $variation_prices ) * 7 );
            $display_price = wc_price( $min ) . '-' . wc_price( $max ) . ' / Week'; // Get formatted price
        } else {
        	$price = $tax_display_mode == 'incl' ? $product->get_price_including_tax() : $product->get_price_excluding_tax(); // Get product price
    	    $weekly_price = wc_format_decimal( $price * 7 ); // Multiply product price by 7
    	    $display_price = wc_price( $weekly_price ) . ' / Week'; // Get formatted price
        }
    
        return $display_price;
    }
    in reply to: Products not showing when "Bookable" is activated. #331

    Ashanna
    Plugin's author

    Hello,

    Is the product invisible just on the archive page ? Can you still access the product page ? Do you have a link to a bookable product’s page (the blank page) ? Maybe there’s an error.

    It’s hard to find the problem without accessing the code, is there a way you could give me a temporary admin access (with the contact form) ?

    in reply to: problem in stock availibility when booking nights #330

    Ashanna
    Plugin's author

    Hello,

    Unfortunately, as written in the terms of use, we don’t refund downladable products. Unless there is a bug that we aren’t able to fix.

    Can you tell me more about your issue ? Maybe, I can do something about it.

    in reply to: problem in stock availibility when booking nights #320

    Ashanna
    Plugin's author

    Hello,

    Actually, I thought a lot about which date to disable. The thing is, when you book the night from 20th to 21st, you can still book the one from 19th to 20th, so 20th must be available. Do you follow me ?

    To disable 20/04, you need to book from 19/04 to 20/04.
    If you want both dates to be disabled, I think you need to activate the “Days” mode.

    in reply to: Constant loading when calculating price #313

    Ashanna
    Plugin's author

    Hello,

    I can’t do anything else, the code must be in your theme or something.

    in reply to: Constant loading when calculating price #310

    Ashanna
    Plugin's author

    Hello,

    I don’t know if this is causing the issue, but there is something wrong in the Ajax request’s response when calculating the new price : Issue with WooCommerce Easy Booking

    (Bigger image here : http://hpics.li/4fe5d92).

    It seems that there is some commented code somewhere that might be conflicting. Could you check this in your theme / or in the plugin if you modified files ?

    in reply to: [Resolved] Not logged users can’t add product to cart #307

    Ashanna
    Plugin's author

    Haha, ok, I’m glad you made it work !

    I thought it would not be compatible with the One Page Checkout plugin, it’s good to know, did you have to change anything to make it work ?

Viewing 15 posts - 1,216 through 1,230 (of 1,241 total)

Want to know what's next with Easy Booking? Check the roadmap!