• endees

    (@endees)


    Hello,

    I need to display a waitlist form in a custom popup on a product page. The popup is shown after clicking on the corresponding section informing about the status of the product. In case the product is not available, I display a shortcode with the form in it.

    The problem is that after clicking “Add to waitlist” the form in the popup loads endlessly, but the form which shows automatically under the product price informs that the user has been added to the waitlist.

    I am attaching a screenshot due to the fact that I am still building the site locally.

    elseif ($availability['class'] === 'out-of-stock') {
    echo '<p class="stock out-of-stock">' . esc_html__('Niedostępny', 'pressmatic') . '</p>';
    // Dodatkowe informacje o dostawie
    echo '<div class="delivery-info">';
    echo '<p>' . esc_html__('Produkt jest aktualnie niedostępny. Jeśli chcesz zostać poinformowany o jego ponownej dostępności wypełnij poniższy formularz.', 'pressmatic') . '</p>';
    echo '</div>';
    echo '<div class="product-contact-form">';
    // print_r($product);
    echo do_shortcode('[ywcwtl_form product_id="'. esc_attr($product->id) .'"]');
    echo '</div>';
    }
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Vanesa

    (@vanesarodriguez)

    Hello there!

    Thanks for reaching out to us and telling us your issue.

    It seems at first sight the shortcode is being set correctly.

    Could you, please, share with us the url of the page you need help with?

    We will be waiting for your response.

    Have a nice day!

    Thread Starter endees

    (@endees)

    Hello,

    This is my site: https://pressmatic.vp-test.com.pl/produkt/pressmatic-model-pm12000d/
    When you click on this:

    A pop-up window will be displayed, when you click add to waiting list in the pop-up window, an error will appear

    Hi there,

    If you want to use the shortcode instead of the default location of the form, I suggest you add the following PHP code in the functions.php file of your current theme:

    add_filter( 'yith_wcwtl_show_form', '__return_false' );

    We’ll remain at your disposal.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Shortcode on product page’ is closed to new replies.