• Resolved kindred

    (@kindred)


    So, I am using a post-snippet with javascript to generate the shopify purchase buttons.

    I wanted to create a single snippet and pass the BookID into it by variable (that way, I only have to change the homepage shortcode and it would pull the correct book)
    However, if I try to pass the bookid like so

    <div id='product-component-{bookid}'></div>

    and then in the javascript section

        ShopifyBuy.UI.onReady(client).then(function (ui) {
    ui.createComponent('product', {
    id: '{bookid}',
    node: document.getElementById('product-component-{bookid}'),
    ...

    and the shortcode

    [preorderbook 1234567890]

    I get nothing… the variable is never passed….

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Mirza Hamza

    (@hamza1010)

    Hello @kindred,

    Thanks for contacting us,

    I hope you are doing well, We’ve informed our technical team about your issue, and they will work on it promptly. When we receive their response, we will get back to you. Our team is here to assist you. Thank you for your patience.

    Thanks & Regards
    WP Experts Support Team

    Thread Starter kindred

    (@kindred)

    I apologize…. I thought I had posted an update.
    There is no problem with the module — I was using it incorrectly.

    The correct syntax to use the shortcode with a variable is this… and now it works
    (Suggestion, make this easier to find in your FAQ)

    [preorderbook bookid="1234567890"]
    Plugin Support Mirza Hamza

    (@hamza1010)

    Hello @kindred,

    Thanks for your suggestion, If you have any questions, feel free to reach out. We’re here to assist you.

    Thank you

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.