• Hi there,

    Tried to add course start/end date and course title of LearnPress plugin.

    1. Is it possible to add data from LearnPress ?
    2. Tried to workaround by creating post2pdf and added [e2pdf-content key=”post2pdf”] inside E2Pdf Template, but nothing displayed.

    Any suggestion?

    Thanks

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 19 total)
  • Plugin Author E2Pdf

    (@oleksandrz)

    Hello,

    [e2pdf-content key="post2pdf"] inside the E2Pdf template should output data from the post_content (course description) where the relevant part of the content is wrapped by:

    [e2pdf-content key="post2pdf"]This content must appear inside pdf[/e2pdf-content]

    If you need to work with Courses, the E2Pdf Template should be connected to WordPress → Courses. Once connected, you should be able to see the available data that can be retrieved using the Visual Mapper (accessed via Right Mouse Click → Map on custom field in the E2Pdf Template).

    To get the course title, the shortcode is:[e2pdf-wp key="post_title"]

    Regarding the date, if it’s stored in the meta fields, it should also be accessible in the Visual Mapper. You can try finding the required shortcode by filtering for “date” or a similar keyword. If you can’t find it, could you please clarify how the start date is added and whether any addons are being used?

    For quick testing, we recommend using E2Pdf → Create PDF. Please note that by default, the shortcode [e2pdf-download id="1"] should be placed on the Course page content itself and won’t work on custom pages like postpdf mentioned above without additional configuration.

    Thread Starter mubiesam

    (@mubiesam)

    As suggested, I added wrapper in the post2pdf as screenshot 090006.

    Then added [e2pdf-content key="post2pdf"] using html inside template as screenshot 085744

    But still can not see the content generated from Forminator with [e2pdf-view id=”2″] as screenshot 085915

    Thread Starter mubiesam

    (@mubiesam)

    Thanks for instruction, I have better understanding now.

    What we need is to generate the certificate of course completion in PDF format, but will need to use Forminator to ask user to verify the name to be shown on the certificate.

    I have created this page 下載研習證明 using Forminator with [e2pdf-view id=”2″] successfully, but if I connect to WordPress → Courses, is it still possible to get Forminator field inside the E2Pdf template?

    Plugin Author E2Pdf

    (@oleksandrz)

    Unfortunately, no – it’s not possible to retrieve Forminator form data when connected to WordPress → Courses.

    However, you can try setting up the connection in reverse (Forminator → Your Form). If some data needs to be predefined, you can try using hidden form fields. In this case, you should be able to use the [e2pdf-view id="2"] shortcode in the Success Message of the Forminator form, which will be displayed after the form is submitted, allowing you to include the form field data in the PDF.

    Thread Starter mubiesam

    (@mubiesam)

    Thanks for your quick response, very helpful!

    I’m getting very close to connect to WordPress>>Courses https://seelearningtaiwan.org/courses/test-course-to-download-certificate/ displaying all the mapped fields needed.

    Meanwhile, found that you have provided [e2pdf-if] but not sure whether it is possible to show/hide the [e2pdf-view id="3"]

    What we want is to use [e2pdf-wp key="_lp_has_finish" meta="true"] to verify the user whether completed the course or not, if yes, show pdf.

    Plugin Author E2Pdf

    (@oleksandrz)

    Unfortunately, no. The [e2pdf-if] shortcode can only be used within an E2Pdf Template context. To enable or disable the shortcodes, you can try using global actions inside the E2Pdf Template: https://ibb.co/p65YPzY7

    Thread Starter mubiesam

    (@mubiesam)

    Yes, global actions will work. But unfortunately, [e2pdf-wp key="_lp_has_finish" meta="true"] seems not what I expected, it always return “no”

    How did you get all the map fields? Do you have any idea how can I verify the user whether completed the course or not? I know this question should ask LearnPress which I will too, but if you have any suggestion, your quick response is always a great help.

    Thanks

    p.s. LearnPress provides Rest API https://learnpresslms.com/docs/learnpress/developer-guide/rest-api/ with Finish course endpoint but need to enable as user instead of admin.

    • This reply was modified 9 months, 3 weeks ago by mubiesam.
    Plugin Author E2Pdf

    (@oleksandrz)

    The [e2pdf-wp key="_lp_has_finish" meta="true"] shortcode retrieves metadata from the page or post where the [e2pdf-download] shortcode is placed, so it will likely return the same value for all users. We’re not sure if LearnPress stores required information as user meta, but ideally, you should update the user’s meta data with a value indicating whether they have completed the course.

    In that case, you can try using the [e2pdf-user key="metakey" meta="true"] shortcode to check whether the user has completed the course, where metakey should contain a value indicating the course completion status.

    Thread Starter mubiesam

    (@mubiesam)

    Found in the LearnPress provides Rest API https://learnpresslms.com/docs/learnpress/developer-guide/rest-api/ 10. List all my course >> Respond >> “”meta_data””: “”_lp_has_finish””: “”yes””,

    Is it different from [e2pdf-wp key="_lp_has_finish" meta="true"]

    Can I use that as metakey ? How?

    Thanks

    Plugin Author E2Pdf

    (@oleksandrz)

    E2Pdf doesn’t have a built-in integration for this. However, you could try creating your own shortcode that checks the course completion status via API for the currently logged-in user. The shortcode can then output a value indicating whether the course is finished or not, which you can use in your actions.

    [e2pdf-wp key="_lp_has_finish" meta="true"] – will output the metadata value for the specified key from the page or post, not from the API or any other dynamic data.

    Thread Starter mubiesam

    (@mubiesam)

    If i create a shortcode, can it be used in Global Action?

    Plugin Author E2Pdf

    (@oleksandrz)

    Yes, it can be used.

    Thread Starter mubiesam

    (@mubiesam)

    Hi @oleksandrz,

    It’s a great pleasure to work with you, everything is working as expected now with [learnpress_course_completion_status course_id="2793"]

    One last question, since you charge per template, it will become very expensive if we will use one template per course, is it possible to use one template for multiple courses?

    Thanks

    Sam

    Plugin Author E2Pdf

    (@oleksandrz)

    If the E2Pdf template is connected to WordPress → Courses, it will be valid for any page or post that uses that post type. You can use the same template. However, you need to configure it in a way that allows the correct course to be identified for using with [learnpress_course_completion_status course_id="2793"]. If the [e2pdf-download] or [e2pdf-view] shortcodes are placed on the course page, the shortcode can be modified to:

    [learnpress_course_completion_status course_id="[e2pdf-dataset]"]

    In that case, the [e2pdf-dataset] would be dynamically replaced with the Course ID.

    Thread Starter mubiesam

    (@mubiesam)

    We need to have 4 variables in the template…

    1. [e2pdf-user key="user_lastname"] and [e2pdf-user key="user_firstname"]
    2. [e2pdf-content key="Test course to download certificate"] with [e2pdf-content key="Test course to download certificate"] 2024 年 3 月 14 日 至 2024 年 3 月 16 日[/e2pdf-content] placed in the course page.
    3. [e2pdf-wp key="post_title"]
    4. [e2pdf-wp key="post_date"] or better with 3 numeric variables for year/month/day.

    [e2pdf-dataset] is a good way to handle variables, but can we have multiple dataset?

    Meanwhile, how to add data into dataset?

    Thanks

Viewing 15 replies - 1 through 15 (of 19 total)

The topic ‘Can not display [e2pdf-content key=”page1″] after adding inside E2Pdf Template’ is closed to new replies.