Home › Forums › WoodMart support forum › Dynamic discounts – error
Dynamic discounts – error
- This topic has 17 replies, 2 voices, and was last updated 1 year, 4 months ago by
Artem Temos.
-
AuthorPosts
-
November 28, 2023 at 12:53 pm #516292
aleksandreeuParticipantHi,
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/BGSxSnDCould you please check?
November 28, 2023 at 6:58 pm #516546
Artem TemosKeymasterHello,
Please, send us your FTP access so we can further troubleshoot this issue.
Kind Regards
November 28, 2023 at 7:02 pm #516550
aleksandreeuParticipanthi, sending you ftp data to access.
November 29, 2023 at 1:01 pm #516772
Artem TemosKeymasterHello,
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
November 29, 2023 at 6:04 pm #516912
aleksandreeuParticipantHi,
I have created Staging verison for you to test and then provid solution.
Please used access:November 29, 2023 at 6:41 pm #516942
Artem TemosKeymasterTry 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);
November 29, 2023 at 6:54 pm #516947
aleksandreeuParticipantI 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.November 30, 2023 at 10:42 am #517097
Artem TemosKeymasterHello,
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
November 30, 2023 at 11:07 am #517112
aleksandreeuParticipanthttps://monosnap.com/file/lOl89BrYEc9DpoPx98iCMQSSYoZtk8
ere you can see. It happens with EUR and CZK as well (defauld currency)
November 30, 2023 at 11:09 am #517113
aleksandreeuParticipantSomehow 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.November 30, 2023 at 12:24 pm #517156
Artem TemosKeymasterCould you please clarify what website you sent screenshot from and send us FTP access to that website so we can fix this?
November 30, 2023 at 12:25 pm #517157
aleksandreeuParticipantIts the same website just Prod version.
There can’t be disabled plugins as we have visitors now. Is it okay?November 30, 2023 at 3:04 pm #517257
Artem TemosKeymasterSure, we will not disable plugins to fix this.
November 30, 2023 at 3:32 pm #517273
aleksandreeuParticipantThanks. Please find details below ofr access:
November 30, 2023 at 4:06 pm #517300
Artem TemosKeymasterPlease, test how it works now.
November 30, 2023 at 4:11 pm #517302
aleksandreeuParticipantThank you! Looks like it works perfectly.
November 30, 2023 at 4:12 pm #517304
aleksandreeuParticipantShould we leave this snippet ON? [Woodmart – Dynamic discounts – multicurrency]
November 30, 2023 at 4:44 pm #517338
Artem TemosKeymasterYes, 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.
-
AuthorPosts
- You must be logged in to create new topics. Login / Register