hello. Is there any way to set a minimum price when vendors adding a new product? Seems like stripe need to have a price at about 5sek for a purchase to go through but right now its possible to set price lower than that. And I get error in cart
There's no default feature for setting a minimum price, but this can be achieved with a bit of custom JavaScript validation.
To approach this technically, I'd recommend the following:
- Hide the default "Publish" button and create a duplicate (fake) one
- When your duplicate button is clicked, first check if your minimum price condition (and any other conditions) are met
- If conditions pass, use jQuery's .click() to trigger the real publish button, otherwise show a custom error message
If it helps, I can try pointing you in the right direction and share some sample code for this.
Also, do you have only simple products or also variable products? (for variable products, would you need the minimum for each variation?)
hello. Is there any way to set a minimum price when vendors adding a new product? Seems like stripe need to have a price at about 5sek for a purchase to go through but right now its possible to set price lower than that. And I get error in cart
Hi Anton,
Thanks for reaching out.
There's no default feature for setting a minimum price, but this can be achieved with a bit of custom JavaScript validation.
To approach this technically, I'd recommend the following:
- Hide the default "Publish" button and create a duplicate (fake) one
- When your duplicate button is clicked, first check if your minimum price condition (and any other conditions) are met
- If conditions pass, use jQuery's .click() to trigger the real publish button, otherwise show a custom error message
If it helps, I can try pointing you in the right direction and share some sample code for this.
Also, do you have only simple products or also variable products? (for variable products, would you need the minimum for each variation?)
Kind regards,
Stefan