I want to buy a Book

Hello guys!

The problem,
We want to sold a PDF/BOOK in a website, we are looking for a plugin can solve the next question:

We need show 5/10 pages of pdf to the user
We need a buy button for unlock the book/pdf
When user reads that pages, we need show a button for buy the complete book/pdf or another similar way...

Do you know something plugin can solve that?
Can you help us in this question?

Thank you very much and sry for my english!

  • Predrag Dubajic

    Hi Que Happy Agencia Creativa,

    Hope you're doing well today :slight_smile:

    I'm not familiar with out of the box solution for this but it could be done with couple of plugins combined.

    First thing is to find a plugin that will allow you to embed your PDF via shortcode, something like this should do the trick:

    And you will need another plugin to protect the full book, you can use Membership 2 for that:

    You will now need to have 2 separate PDFs, one with 5 pages only and that would be your book preview and then another that will be your full book.

    By using PDF plugin you can embed the PDF via shortcode like this:
    [pdfviewer width="600px" height="849px" beta="true/false"]URL_TO_PDF[/pdfviewer]

    Now for the "complicated" part.
    We can now add both of those PDFs to same page and by using M2 shortcodes we will hide Full book for site visitors and show buy button while for M2 members only full book will be shown.
    For this your page content will need to look like this:

    [ms-protect-content id="X" access="no" silent="yes"]
    [pdfviewer width="600px" height="849px" beta="true/false"]URL_TO_SHORT_PDF[/pdfviewer]
    [ms-protect-content id="X" access="no" silent="yes"]
    [ms-membership-buy id="X" label="Buy now!"]
    [ms-protect-content id="X" silent="yes"]
    [pdfviewer width="600px" height="849px" beta="true/false"]URL_TO_FULL_PDF[/pdfviewer]

    Replace X with your membership ID and that should be it.

    Would something like this work for you?

    Best regards,

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.