• Resolved lenamtl

    (@lenamtl)


    Hi,

    I need to find a solution for this scenario.

    I’m looking for a way to apply a % rebate on the Final subtotal after all coupon applied and before shipping and taxes

    The case:
    The store give a % rebate based on subtotal.
    If the cart has some item that will be free by a coupon or get some other rebate by a coupon, the item price will be counted in the subtotal.

    For example the cart has
    1 item at 45$
    1 item at 10$ (this item will be free or will get a special price by a coupon code applied after the subtotal).

    The store offer 10% rebate if the subtotal is over 50$

    So the subtotal is 55$
    the coupon applied let say -10$ so the final subtotal is 45$

    I would like to apply the 10% on Final subtotal if it is +50$
    (after coupons is applied and before shipping & taxes)

    So how can I get the final subtotal based on my example?
    Can I use this function if not which is the function to use so I can create a snippet to fix the problem?

    //Gets cart total. This is the total of items in the cart, but after discounts.

    `public function get_cart_contents_total() {
    return apply_filters( ‘woocommerce_cart_’ . __FUNCTION__, $this->get_totals_var( ‘cart_contents_total’ ) );
    }

    I’m open to suggestion
    Thanks

    • This topic was modified 3 years, 4 months ago by lenamtl.
    • This topic was modified 3 years, 4 months ago by lenamtl.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi @lenamtl!

    Since this requires custom coding, I’m going to leave it open for a bit to see if anyone is able to chime in to help you out.

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

    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.

    Also, I found a plugin that could be useful to your case: the Cart Pricing For WooCommerce. With this plugin, you can add a discount on the cart according to the subtotal of the purchase.

    You can check more about it here: https://woocommerce.com/products/cart-pricing-for-woocommerce/

    If you have any pre-sales questions about that plugin, please create a ticket here: https://woocommerce.com/my-account/create-a-ticket/.

    I hope this helps!

    Mirko P.

    (@rainfallnixfig)

    Hi there,

    We’ve not seen any activity on this thread for a while, so I’m marking this thread as resolved.

    Hopefully, you were able to find a solution and the above resources for developers and plugin recommendations were helpful. If you have further questions, please feel free to open a new topic.

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to get final subtotal after coupon applied?’ is closed to new replies.