Home Forums WoodMart support forum Dynamic discounts – error

Dynamic discounts – error

Viewing 18 posts - 1 through 18 (of 18 total)
  • Author
    Posts
  • #516292

    aleksandreeu
    Participant

    Hi,

    I have just saw that dynamic discount does not work correctly on you theme (woodmart) with currency plugin (https://codecanyon.net/item/woocommerce-multi-currency/20948446?gad_source=1 )

    It shows correct prices in the table on the product page (we have discount in %), but when we add it to the cart, price changes to some unknown numbers.

    Here I am adding some spice (10 pcs) and price looks good in the mini-cart: https://ibb.co/dgqxmq6
    When i go to the purchase page to pay, and choose Slovakia (it has EUR currency set up) I am getting wrong price, it shows 1,64 EUR for 10pcs of spices (should be 29,39 EUR): https://ibb.co/BGSxSnD

    Could you please check?

    #516546

    Artem Temos
    Keymaster

    Hello,

    Please, send us your FTP access so we can further troubleshoot this issue.

    Kind Regards

    #516550

    aleksandreeu
    Participant

    hi, sending you ftp data to access.

    #516772

    Artem Temos
    Keymaster

    Hello,

    It looks like you changed the FTP so we can’t work now. Can you please provide us with a new FTP access?

    Kind Regards

    #516912

    aleksandreeu
    Participant

    Hi,

    I have created Staging verison for you to test and then provid solution.
    Please used access:

    #516942

    Artem Temos
    Keymaster

    Try to add the following PHP code snippet to the child theme functions.php file to fix this

    add_action('woodmart_pricing_before_calculate_discounts', function ($price, $cart_item) {
    	if (function_exists('wmc_revert_price')) {
    		$current_product = wc_get_product( $cart_item['data']->get_id() );
    
    		return wmc_revert_price($current_product->get_price());
    	}
    	return $price;
    }, 10, 2);
    #516947

    aleksandreeu
    Participant

    I cant check, because when I added code, it started adding to the cart for veeery long time.

    Attachments:
    You must be logged in to view attached files.
    #517097

    Artem Temos
    Keymaster

    Hello,

    We have tested this code on your website and it works well https://monosnap.com/file/HsAi5QB1zEJTcBeJnvl4kdLvzo3HHh
    Could you please record a short video demonstrating the problem?

    Kind Regards

    #517112

    aleksandreeu
    Participant

    https://monosnap.com/file/lOl89BrYEc9DpoPx98iCMQSSYoZtk8

    ere you can see. It happens with EUR and CZK as well (defauld currency)

    #517113

    aleksandreeu
    Participant

    Somehow video is cut, I think, but button is just rotating loading ico… and the product are addedto the cart (even when button is “laoding”), but I can see mini-cart with some extra number (screenshot)

    Attachments:
    You must be logged in to view attached files.
    #517156

    Artem Temos
    Keymaster

    Could you please clarify what website you sent screenshot from and send us FTP access to that website so we can fix this?

    #517157

    aleksandreeu
    Participant

    Its the same website just Prod version.
    There can’t be disabled plugins as we have visitors now. Is it okay?

    #517257

    Artem Temos
    Keymaster

    Sure, we will not disable plugins to fix this.

    #517273

    aleksandreeu
    Participant

    Thanks. Please find details below ofr access:

    #517300

    Artem Temos
    Keymaster

    Please, test how it works now.

    #517302

    aleksandreeu
    Participant

    Thank you! Looks like it works perfectly.

    #517304

    aleksandreeu
    Participant

    Should we leave this snippet ON? [Woodmart – Dynamic discounts – multicurrency]

    #517338

    Artem Temos
    Keymaster

    Yes, it should be enabled, because there is a custom code for integration with the plugin that we gave you and you added it, or moved it to the child theme. Because it will not work without custom code.

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