Home Forums WoodMart support forum Print Order receipt on thank you page

Print Order receipt on thank you page

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #195872

    simontayler
    Participant

    Hi there,
    I’m trying to add in a button on the ‘Thank You’ page that will allow the user to print their invoice. I used the code below but every time I save the theme it strips the onclick=”window.print()” from the code.

    How could I achieve this?

    <p>[vc_row gap=”35″ mobile_bg_img_hidden=”no” tablet_bg_img_hidden=”no” woodmart_parallax=”0″ woodmart_gradient_switch=”no” row_reverse_mobile=”0″ row_reverse_tablet=”0″ woodmart_disable_overflow=”0″][vc_column width=”1/6″][/vc_column][vc_column width=”1/6″][/vc_column][vc_column width=”1/6″][vc_column_text]<button style=”color: #5e5e5e; border-color: #ececec; background-color: #ececec; border-radius: 5px; padding: 15px;” onclick=”window.print()”>Print this page</button>[/vc_column_text][/vc_column][vc_column width=”1/6″][vc_btn title=”MY ACCOUNT” link=”url:https%3A%2F%2Fstaging.bushido.ca%2Fmy-account%2F|title:My%20Account||”][/vc_column][vc_column width=”1/6″][/vc_column][vc_column width=”1/6″][/vc_column][/vc_row]</p>

    #195916

    Artem Temos
    Keymaster

    Hi,

    Sorry, but there is no such option in our theme and WooCommerce by default. It may require additional code customization or extra plugin but we don’t have an instruction for this. It is out of our theme support scope.

    Regards

    #195918

    simontayler
    Participant

    So I added it to a page and it worked great!
    Just not on that thank you page? Is there anyway you could help?

    #195925

    Artem Temos
    Keymaster

    If you mean that you want to add it on the Thank you page then you can find the code for this page in the file woodmart/woocommerce/checkout/thankyou.php.

    Kind Regards

    #196200

    simontayler
    Participant

    Can I ask what script I would use to add it to a button on the thank you page. Every single option I have tried gets stripped or removed.

    #196271

    Artem Temos
    Keymaster

    Sorry, but we don’t have such scripts that should help you. If you want to add a simple button then you can use the following HTML for example

    <a href="#" class="btn btn-color-primary">Read More</a>

Viewing 6 posts - 1 through 6 (of 6 total)