• Resolved morelmm

    (@morelmm)


    Hi,

    Your plugin counts cart total value always without tax, which causes wrong coupons displayed when shop displays prices with tax. For example coupon is fromm $200, i have $230 in cart and cannot apply coupon because WC()->cart->get_subtotal() is $194 without tax. I had to add

    if (WC()->cart->display_prices_including_tax()) {
    $cart_subtotal = $cart_subtotal + WC()->cart->get_subtotal_tax();
    }

    Second, i think this should not be negated (class-frontend.php) – if excluded categories intersect with product we want to remove it

    if (! count(array_intersect($product_cats, $coupon->get_excluded_product_categories()))) {

    And third, why not just use internal woocommerce validation for coupons?

    $discounts = new WC_Discounts(WC()->cart);

    foreach ($coupon_ids as $coupon_id) {
    $coupon = new WC_Coupon($coupon_id);
    $valid = $discounts->is_coupon_valid($coupon);
    if (is_wp_error($valid)) {
    continue;
    }

    ...
    }
Viewing 1 replies (of 1 total)
  • Plugin Support Janilyn Tran

    (@janilyn409)

    Hi @morelmm ,

    For your information, by default, in order to make this plugin work properly with other special pricing and discount plugins, ie smart product types such as smart bundles/grouped/composite, the tax must be calculated at the last step after applying discounts. This will also help it avoid any conflicts with third-party dynamic pricing/discount or tax plugins. The coupon application also depends on the general price settings (entered values were tax included or excluded) of your site as well.

    The second issue was based on the coupon settings. Kindly note that our plugin will list coupons that are applicable to the current cart, thus, it will need to respect the specific coupon settings.

    Again, this was built for being able to work with other plugins in general. There will be some settings or functionalities that might not suit your needs or preferences. You can always modify our plugin and keep a custom version that works for your site, but our developers have to keep it the way that benefits the majority of users.

    Best regards.

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.