Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi Tony!

    If you are comfortable and familiar with coding, I recommend you check the following: https://stackoverflow.com/questions/55247087/display-a-woocommerce-coupon-input-field-anywhere-with-a-shortcode.

    I can also recommend the WooCommerce Developer Resources Portal for resources on developing for WooCommerce.

    You can also visit the WooCommerce Facebook group or the #developers channel of the WooCommerce Community Slack. We’re lucky to have a great community of open-source developers for WooCommerce, and many of our developers hang out there, as well.

    For additional assistance on this topic, we recommend getting in touch with one of the customization experts listed on the WooCommerce Customizations Page.

    I hope this helps!

    Thread Starter Tony

    (@frfvipy)

    Thank for that @judagutor

    I used the StackOverflow way with shortcode but also I need to use this way in the Elementor button and when the coupon is applied it redirects it to a specific page

    • This reply was modified 3 years, 4 months ago by Tony.
    Thread Starter Tony

    (@frfvipy)

    @judagutor

    I have used this function and it works very well, but I also use the Cartflows plugin, normally this function works fine but not on the checkout page in Cartflows plugin, so can you teach me how I can do this, please thank you.

    if ( ! defined( ‘ABSPATH’ ) ) {
    exit; // Exit if accessed directly.
    }
    /**
    * Shortcode to enter gift code
    */
    function fgc_gift_claim_form() {

    if ( function_exists( ‘wc_coupons_enabled’ ) && wc_coupons_enabled() ) { ?>
    <form class=”woocommerce-cart-form” action=”<?php echo ( home_url( ‘/checkout-woo’ ) ); ?>” method=”post”>
    <div class=”actions”>
    <div class=”coupon”>
    <label for=”coupon_code”><?php esc_html_e( ”, ‘wc-fgc-coupon-redemption’ ); ?></label>
    <input type=”text” name=”coupon_code” class=”input-text” id=”coupon_code” value=”” placeholder=”<?php esc_attr_e( ‘Coupon code’, ‘wc-fgc-coupon-redemption’ ); ?>” />
    <button type=”submit” class=”button” name=”apply_coupon” value=”<?php esc_attr_e( ‘Claim free gift’, ‘wc-fgc-coupon-redemption’ ); ?>”><?php esc_attr_e( ‘Claim Free Gift’, ‘wc-fgc-coupon-redemption’ ); ?></button>
    <?php do_action( ‘woocommerce_cart_coupon’ ); ?>
    </div>
    </div>
    </form>

    <?php } ?>
    <?php
    }
    add_shortcode( ‘fgc_form’, ‘fgc_gift_claim_form’ );

    Mirko P.

    (@rainfallnixfig)

    Hi @frfvipy!

    so can you teach me how I can do this

    We’d recommend getting in touch with the web developer community at large for more help on that since this forum is more focused on the default functions packaged with the core WooCommerce plugin and support staff on these forums are not developers.

    However, I’m going to leave this thread open for a bit to see if anyone is able to chime in to help you out.

    Cheers.

    Thread Starter Tony

    (@frfvipy)

    Ok thank you @rainfallnixfig

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Show the coupon field applicator on another page’ is closed to new replies.