• Resolved hwamart

    (@hwamart)


    Is it possible to move the form above the add to cart button when displaying on back order products?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author CodeWooGeek

    (@codewoogeek)

    Hello there,

    Good Day !!!

    Yes it is possible, but doable via custom function. Just go to our settings page of back in stock notifier, in there find option under visibility settings “Show Subscribe Form on Backorders” just uncheck this one(this is not even needed when we use custom function).

    Use the below code in your theme functions.php and it will show the subscribe form above add to cart

    add_action('woocommerce_before_add_to_cart_button', 'cwg_position_subscribe_form_on_backorder');
    
    function cwg_position_subscribe_form_on_backorder() {
        global $product;
        $product_type = $product->get_type();
        if (is_product() && $product_type == 'simple' && $product->is_on_backorder(1)) {
            $obj = new CWG_Instock_Notifier_Product();
            echo $obj->html_subscribe_form($product);
        }
    }

    Hope it helps!!! Let us know
    [ Signature deleted ]

    • This reply was modified 5 years, 5 months ago by CodeWooGeek.
    • This reply was modified 5 years, 5 months ago by Jan Dembowski.
    Thread Starter hwamart

    (@hwamart)

    Perfect

    Thanks you

    Plugin Author CodeWooGeek

    (@codewoogeek)

    Hello there,

    Glad it works for you ?? If you feel our plugin is helpful please do rate our plugin with your valuable feedback.

    https://www.ads-software.com/support/plugin/back-in-stock-notifier-for-woocommerce/reviews/

    [ Signature deleted ]

    • This reply was modified 5 years, 5 months ago by Jan Dembowski.
    Thread Starter hwamart

    (@hwamart)

    I think I might have spoken to soon.

    The form is positioned perfectly however the email didn’t seem to get triggered automatically when the product when back into stock.

    It works fine in the form is used via the setting check box below the ‘add to cart’ button.

    Any thoughts?

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    @codewoogeek I’ve deleted your offer to login to your user’s site. I’m am 100% sure you mean well but please never ask for credentials. I have flagged your account temporarily. That just means that your post will need to be approved and @ notifications from you will not work.

    https://www.ads-software.com/support/guidelines/#the-bad-stuff

    Now for the why: The internet is a wonderful place full of very nice people and a few very bad ones. I’m sure everyone here is very nice however, by giving some ones keys to your house you are trusting they wont steal anything. Likewise the person who takes the keys is now responsible for the house FOREVER.

    If something was to go wrong, then you the author may well legally become liable for damages, which they would not normally have been as their software is provided without warranty.

    Please be aware that repeatedly asking for credentials will result in us asking you to repeatedly stop before escalating up to the plugins team.

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    @codewoogeek Thanks for the great support but please lose the signature. That’s prohibited in these forums as it’s been horribly abused in the past by others.

    Thank you,
    Vij,
    CodeWooGeek Team.

    Yes, bad people ruin it for others. No, I am not kidding. Please refrain from that.

    https://www.ads-software.com/support/guidelines/#avoid-signatures

    Also do not put ?filter=5 on your review links as that hides all of the non-five start reviews and that is dishonest.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Move form above add to cart’ is closed to new replies.