Hello, I find an error showing the sale percentage on my products. If the product is simple, it gives me a percentage of 100% (when in reality it is 15%), while if the product is variable it gives me the correct percentage. Why is this? Can you fix it please? Thank you. You can see an example here: https://prnt.sc/rbkf6fSite URL: hidden Theme version: 6.2.12
Seems the problem is caused by Conditional Discounts for WooCommerce por ORION plugin. Our developers will check tomorrow if the reason is related to our theme and if we could do something from our side to fix it or you need to contact plugin developer to solve the problem.
Once I get the answer I’ll inform you.
Ok, I await your response as soon as possible. Thank you.
Our developers checked the plugin response for the sale price of the variable and simple products and found that it returns the sale price for the variations https://prnt.sc/rbv1g1 and returns nothing for the simple products https://prnt.sc/rbv23j That’s why you get 100% discount when our theme calculates the percentage. So, either contact the plugin authors and ask them why they don’t return any sale price for the simple product, ask if they could fix it or disable percentage discount in theme options and use just a simple Sale text for the sale products.
Ok, I contacted the plugin support and they are working on it, but I think they have modified something and now the waiting time for my website is very slow … Do you know of any plugin that works similarly to this one? To disable this plugin. Thank you.
Hi, look, the plugin author just answered me and says the following:
hello, sorry for the delay, can you ask to the Xstore theme support, the functions that we should use for display on the banner.
Could you tell me what request you sent to the plugin author? Did you send our screenshot? Because we don’t understand what functions do they expect from our side.
I explained to you in the previous message that simple products do not have updated sale price in the DB https://prnt.sc/rbv23j and our theme does not calculate the correct discount because of this. Plugin author should check their code and fix it in the way to update sale price in the DB not just for the product variations but also for the simple products.
This is the response of the plugin author:
hello, you must first get all the discounts from the function: wad_get_active_discounts () (you will find it in the functions.php files inside the includes folder).
this function returns the discount id created, if you want to obtain the discounts objects itself, you must instantiate the WAD_Discounts class using the discount id (you will find it in the class-wad-discounts.php files inside the includes folder), with this id you can get instances of discounts.
you can call the is_applicable() method to see if the current discount is applicable to that product
Passed your task to our developers. I’ll inform you about their answer tomorrow. Sorry for the delay in answering because of the number of requests to our support.
Please, send them the question below and ask them to improve the code from their side because it does not work for us when we try.
http://prntscr.com/rjt2c6 ( with product_id also c ) -> http://prntscr.com/rjt33r
We tried to use class and function that you suggested http://prntscr.com/rjt2c6 ( with product_id also c ) -> http://prntscr.com/rjt33r but it seems like all the available discounts applied to the product at same time (the real sale price is only one of them)
So, could you check our code (xstore/framework/woo.php) and tell us if we missed something or is it a bug from your side? Maybe, take private details of this user to improve our code in the most proper way.
Hello, this is what the author of the plugin answers me:
hello, they can use this function like this : “wad_get_active_discounts(true)” , she will return the discounts list and now they can check if the discount is applicable to this products
Unfortunately, it still does not work for our side. If plugin author knows how to implement this then he may try, we mentioned file where our function is placed. We don’t have a solution. So, disable the percentage discount if you want to use that plugin – all that we can suggest to you in this case.
Hello, finally I already spoke to the author of the plugin and he fixed it.
He modified the woo.php file inside xstore / framework.
I inform you because when you update the theme, take this change into account, not only for me, but for the rest of the people who can use this plugin. If you update the theme, but don’t fix this, it will go wrong again … Thanks for your help…
Great but could you either send us that file with the fix to check it and include in the update or restore the access to your FTP to allow to download that file?
Thank you. Fix will be included in the next update. And the fix is different than they explained before, by the way.
You must be logged in to reply to this topic.Log in/Sign up
One standard license is valid only for 1 project. Running multiple projects on a single license is a copyright violation.
The message was successfully sent
Your shopping cart is empty