• Resolved Carambola

    (@tsjemo)


    Is it possible to show the subscription form immediately after the stock status? Now, if you have backorders active (stock status remains “in stock”), the form appears below the “add to cart” button.

    I do see at https://businessbloomer.com/woocommerce-visual-hook-guide-single-product-page/ that there is no hook between the stock status and the “add to cart” button.

    Can I add some code to the woocommerce_single_product_summary hook (I assume that’s the good one) or redefine the content-single-product.php woocommerce template file? And can I remove / unset the way your plugin adds it to the product page by default?

    Thanks for your help!

    Best regards,
    Jurgen

Viewing 7 replies - 1 through 7 (of 7 total)
  • Dualcube

    (@dualcube)

    @tsjemo the default location of subscriber form will appear after “add to cart”. You have to change manually in order to change the position of alert form.

    Regards,
    Moumita

    I presume my last solution has helped you. With this hope, I am marking this topic as “resolved”. If you face any other issue please let us know by opening another thread. If you are happy with the performance of the core plugin, a 5/5 rating on would definitely be great way to share your experience with other users.

    Regards,
    Moumita

    Thread Starter Carambola

    (@tsjemo)

    I was able to show the form where I want it using

    function action_woocommerce_single_variation( $woocommerce_single_variation_add_to_cart_button, $int ) { 
        echo do_shortcode ('[display_stock_alert_form]');
    }; 
             
    add_action( 'woocommerce_single_variation', 'action_woocommerce_single_variation', 10, 2 );

    Can you tell me what to add to hide the standard way, i assume some remove_action statement? Thanks for helping!

    @tsjemo display_stock_alert_form, this is an function. So, what you can do is to replace do_shortcode ('[display_stock_alert_form])
    with
    <strong>$WOO_Product_Stock_Alert->frontend->$this->display_stock_alert_form($product) </strong>

    Regards,
    Moumita

    • This reply was modified 7 years, 11 months ago by Dualcube.
    Thread Starter Carambola

    (@tsjemo)

    Hi Moumita,

    As I said: I already managed to show the form where I want it, using the code I mentioned. The only thing I need now is how to avoid that the form is shown again at the regular place. Can you provide that? Thanks.

    Regards,
    Jurgen

    Thread Starter Carambola

    (@tsjemo)

    Solved it myself (quick and dirty) by adding this CSS to force it not to show on the “wrong” place after my customization.

    .single-product .summary > .alert_container { display: none !important; }

    @tsjemo Glad to know that:-)

    Regards,
    Moumita

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Location where subscription form appears’ is closed to new replies.