Home Forums WoodMart support forum Dynamic discount issues and feature requests

Dynamic discount issues and feature requests

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #712494

    metuza
    Participant

    Hello,

    I have just replaced YITH dynamic pricing with Woodmart dynamic discounts and so far it looks very good for the use we have, but i have found a few issues and future problems using it:

    1. When i am using a coupon code set to disabled for onsale products i get the success message “coupon was added successfully” and in order total box i get “Discount (coupon name): kr 0.00 X”. So a little confusing for customers as they normally should see a message telling that coupon can not be used on these products.

    2. The very best behavior should be to disable the dynamic discount whenever and coupon code is used as normally a coupon code has a better discount than normally given as dynamic discount/quantity discount. Atleast make it an option to disable dynamic discount if an coupon code is used.

    3. There should also be an option to disable dynamic discounts for onsale products. This has to be added on per rule basis as some rules might have a little discount and causing no big losses.

    As i see it for now the biggest problem is the coupn code not overwriting the dynamic discount. Problems with ie. onsale products i can solve by giving them a tag or attribute.

    Brgds
    Rune

    #712515

    metuza
    Participant

    Hi again,

    I was able to solve the onsale and coupon code problem using the below filter:

    function afas_disable_dynamic_pricing( $price, $cart_item ) {
    	$saleprice = get_post_meta( $cart_item['product_id'], '_sale_price', true );
    	if ( $saleprice > 0 || ( is_object( WC()->cart ) && count( WC()->cart->get_applied_coupons() ) > 0 ) ) {
    	  $price = 0;
    	}
    	return $price;
    }
    add_filter( 'woodmart_pricing_before_calculate_discounts', 'afas_disable_dynamic_pricing', 99, 2 );

    Now i just have to find a way to hide the quantity discount table from onsale products.

    Brgds
    Rune

    #712560

    Aizaz Imtiaz Awan
    Keymaster
    Xtemos team

    Hello,

    Can you please share the page URL so I can give you the possible solution after checking the page.

    Best Regards.

    #712579

    metuza
    Participant

    Hello,

    I could not find any usable filters to hide the quantity table so i have added a code with the conditions needed and hiding the table using inline css and that seems to work just fine.

    I was not able to post the solution here because of wordfence blocked me.

    Brgds
    Rune

    #712584

    Aizaz Imtiaz Awan
    Keymaster
    Xtemos team

    Hello,

    Thank you for the update and for sharing your workaround.

    Wordfence may sometimes block posts that contain code snippets because they can be detected as potentially unsafe content by its firewall rules.

    If you would like, you can also share the snippet through a paste service and provide the link here so other users facing the same situation can benefit from your solution.

    We also appreciate your feedback regarding the dynamic discounts behavior with coupons and on-sale products. I will pass these suggestions to our development team for consideration in future updates.

    Best Regards.

Viewing 5 posts - 1 through 5 (of 5 total)