Top WooCommerce & WordPress Plugins › Forums › Product Price by Formula for WooCommerce › How to generate the special price just for one product?
- Support forum for the Product Price by Formula for WooCommerce.
- This topic has 4 replies, 2 voices, and was last updated 4 years, 4 months ago by
Tom Anbinder.
- AuthorPosts
-
May 22, 2019 at 9:59 am #99109
Ismar
GuestHello,
thank you very much for your great plugin.
I am using the shortcode for generating the prices for all products in my shop:
x[if_product_category slug="cat1,cat2"]*1.10[/if_product_category][if_product_category not_slug="cat1,cat2"]*1.20[/if_product_category]
Now I have the first product in used condition and therefore I need a separate price just for one product.
How can I generate the special price just for one product?
Thank you very much in advance.
Best regards,
Ismar DerlicMay 22, 2019 at 5:26 pm #99110Hi Ismar,
First solution that comes to mind:
1. Change your formula to:
x[if_product_category slug="cat1,cat2"]*p1[/if_product_category][if_product_category not_slug="cat1,cat2"]*1.20[/if_product_category]
2. Set “Number of parameters” to
1
and save changes.3. For
p1
value set:[if_product_id compare_operator="in" compare_to_value="1659"]2.5[/if_product_id][if_product_id compare_operator="not_in" compare_to_value="1659"]1.10[/if_product_id]
Here you need to replace
1659
(in two places) with the product ID you wish to make the exception for. You can also enter multiple product IDs with comma-separated list, e.g.:1659,1710,1900
. Also you need to change2.5
with the coefficient you wish to apply for the exception product.Hope you get the idea. Please let me know if something is not working as expected or if you have any questions. And if you like the plugin, please consider leaving us a rating.
May 23, 2019 at 7:20 am #99111Ismar
GuestHello Tom,
thank you for your help. I did exactly what you have described and the plugin outputs a price of 0,00 € for the specific product. Also all other prices of the category with variable p1 have changed to 0,00 €.
Maybe I can give you access to my website and you can take look?
Thank you very much.
Best regards,
IsmarMay 23, 2019 at 12:13 pm #99112Hi Ismar,
Yes, website access would help. My email is [email protected].
May 23, 2019 at 1:27 pm #99113If anyone else has a similar question – as we’ve figured out in private emails – the problem was that “Use same formula” option had to be set to “Yes (with same params)” (instead of “Yes (with individual params)”) (in plugin’s “General” settings section).
- AuthorPosts
- You must be logged in to reply to this topic.