• Resolved martijn6

    (@martijn6)


    Hi!

    I’m looking for a way to display the calendar and ‘book now’ button of the Woocommerce Bookings plugin on a normal page. This is for a holiday booking website. The reason is simply that a normal page can be created using a visual composer and the product page not. I’ve searched around a lot on the internet, but I can’t find a satisfying solution. I’ld like to stick with Woocommerce Bookings, because of the payment methodes they provide (iDeal for the Netherlands). Do you have any ideas?

    Thanks in advance!

    Martijn

Viewing 9 replies - 1 through 9 (of 9 total)
  • Luminus Alabi

    (@luminus)

    Automattic Happiness Engineer

    @martijn6,

    WooCommerce comes with a couple of shortcodes by default. You can use the Product Page shortcode to display the single product page for any product on a separate page.

    You can learn more about that here –
    https://docs.woocommerce.com/document/woocommerce-shortcodes/#section-10

    Thread Starter martijn6

    (@martijn6)

    Hi @luminus, thank you for your response! This is definitely a step forward. Is there also a way to only display the calendar and ‘book now’ button and not the title/images/reviews and all the other information of the single product page?

    Thread Starter martijn6

    (@martijn6)

    In addition, if I use a custom template for the single product page I get the following message on the page where the shortcode is applied:

    “Shortcode “Single Product Page Add To Cart”. Please view Product after assigning Custom Template”

    Luminus Alabi

    (@luminus)

    Automattic Happiness Engineer

    @martijn6,

    Is there also a way to only display the calendar and ‘book now’ button and not the title/images/reviews and all the other information of the single product page?

    You’d need to override the template that displays single products in that case. Bear in mind that this will affect all of your single product pages. You can learn more about templates, where to find them and hot to override them in an update safe way here – https://docs.woocommerce.com/document/template-structure/

    In addition, if I use a custom template for the single product page I get the following message on the page where the shortcode is applied:

    “Shortcode “Single Product Page Add To Cart”. Please view Product after assigning Custom Template”

    Can you provide more information here? The more specific the better as I’m not following what you’re describing.

    Screenshots are also helpful. I recommend https://snag.gy for easily sharing screenshots – please follow the instructions on the page, then paste the URL here. It works with Chrome, Firefox and IE.

    Thread Starter martijn6

    (@martijn6)

    Thanks for your reply again @luminus! I have a solution that works for me now. For people who come across this topic in the future, I used the following code to adjust the standard template:

    remove_action( 'woocommerce_before_single_product_summary', 'woocommerce_show_product_images', 20);
    
    remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_title', 5);
    remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_rating', 10);
    remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_price', 10);
    remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_excerpt', 20);
    remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_meta', 40);
    remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_sharing', 50);
    
    remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_upsell_display', 15);
    remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_related_products', 20);

    Indeed, this does effect all product pages, but for my site this is the intention. I placed this code in a own plugin, but off course you can also place it in the theme functions.php file.

    The warning “Shortcode “Single Product Page Add To Cart”. Please view Product after assigning Custom Template” was from the plugin ‘Woocommerce Single Product Page Builder’. I used this plugin to try to adjust the product template, but that didn’t work out for me.

    Luminus Alabi

    (@luminus)

    Automattic Happiness Engineer

    @martijn6,

    Glad to hear you got this sorted.

    I’ll mark this thread as resolved now.

    @martijn6,

    What WooCommerce Bookings file did you add the code to to make this work?

    Thread Starter martijn6

    (@martijn6)

    @wparsons, You can add the code in the functions.php file.

    Hi @martijn6 ! I’m looking for the solution to the same problem.

    The idea is that in a hotel room page I can insert a shortcode with ONLY a calendar, and a client can book the room for day/s. Will that works also for me?

    I see that you’ve researched more than me, can you please solve the doubt?

    The “book” button can be customize? will it summ the all days and redirect to a checkout page?

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Woocommerce Bookings Calendar’ is closed to new replies.