I’d like to sell services with WooCommerce solution. So far so good.
Example: propose to bill for the translation of a book (or other) based on a number of words. The more words, the less expensive.
Example: (not real)
– From 1 to 100 words: $10
– From 101 to 200 words: $19
– Etc.
It could be a different discount pourcentage to each 100 words?
Other example:
100 words: $10
200 words: 2% discount
X words: X% discount
Or something similar to that latest example?
Question:
Is it possible to establish a rule with WooCommerce to reach this result?
Thanking you in advance for your kind assistance.
Best regards, Eric
]]>I have a rule, five to ten products apply 5% discount and eleven to twenty apply 10% discount. Is this possible?
No problem if I need do many coupon.
]]>I teach kids, and if there is more than one child attending overall, I want to reduce the price by 500. Note this is not for each additional child, just once.
When all the kids are the same price, then I just adjust the overall price to reflect the discount,
$price = (($seats * $price) - 500)/$seats;
as shown below based on the example in the faq for discounts. The relevant part is the else part of the
if ($found == 1&&eme_is_multi($booking['booking_price'])) {
section below.
But now I want to charge older kids a different price. With a multiprice, I dont know how to adjust the price. What I want is if the total number of seats is more than one, regardless of the ages, to somehow take 500 off the price. If there is only one child, that child should be charged teh appropriate price. I can’t use the formula above because there are different seats and prices involved. There may be just one child for each price. I don’t care about the individual prices so much as the total price.
I suppose there might be a way to use discounts, but I don’t know how, and I dont want parents to have to enter “coupons”. I just want to automatically take the discount. It would be nice to be able to show them in my RSVP form that they had x kids at price 1 x kids at price 2 and there was a discount taken, but just as long as I can tell them the final price.
NOTE: I don’t need at this point to send the revised amounts to a payment vendor, as people pay at the door, but the question does come up.
add_action('eme_insert_rsvp_action', 'my_eme_discount_function',20,1);
function my_eme_discount_function($booking) {
global $wpdb;
$bookings_table = $wpdb->prefix.BOOKINGS_TBNAME;
$where = array();
$fields = array();
$booking_id = $booking['booking_id'];
$event_id = $booking['event_id'];
//not sure why this is here, but somehow I needed it.
header("X-XSS-Protection: 0");
//initialize find loop. This is a loop that can be ignored now, but might be used later.
$found=0;
// This section used to search for only a specific category to apply discount to.
// Presently the actual check for a particular category is disabled. all categories work.
// First, collect the event categories for this event
$event_c = eme_get_event_categories($event_id);
$event_ct = $event_c[0];
foreach($event_c as $x => $x_value) {
//disabled check, all categories
//if ($x_value['category_id'] == 3) {
$found=1;
//echo "We found it!!! ".$found."<br />";
//};
//echo "<br>";
};
//echo "did we find it?".$found."<br />";
if ($found == 1&&eme_is_multi($booking['booking_price'])) {
// echo "this is a multiprice event".eme_is_multi($booking['booking_price']);
// THIS IS WHERE I WANT TO PUT MY NEW CODE.
} else {
// echo "this is a single price event".eme_is_multi($booking['booking_price']);
$seats=$booking['booking_seats'];
$price=$booking['booking_price'];
// more than 2 seats, then the price is reduced 500
if ($seats> 1) {
$price = (($seats * $price) - 500)/$seats;
}
$fields['booking_price'] = $price;
$where['booking_id'] = $booking['booking_id'];
$wpdb->update($bookings_table, $fields, $where);
}
return;
}
]]>Prior to the change in coupons with 3.0, I could create coupons for volume discounts. For instance, buy five $5 stickers for $22.
Since the update, these no longer work correctly.
The sticker coupon is set to Fixed Product Discount at $.60. It is set to be restricted to the “sticker” category, and the minimum purchase to $25.
This used to mean that the customer had to buy $25 worth of stickers to get the discount. But the way it now works is the customer can spend $25 on non-sticker items and get the discount on stickers, without buying 5.
I’ve tried all three discount types and they all behave the same.
I updated to 3.0.1 and it still has not resolved this issue.
I’m also very sad that the % product discount went away as it has caused the same problem with other coupons!!!
Any help would be greatly appreciated! Thanks
Darcy
]]>I have a situation where we have a contractor role that gets a certain discount, and when they buy in bulk they get a deeper discount.
There is also a role of dealer, who gets a deeper discount, and when they buy in bulk they get a deeper discount (different discount than the contractor).
The front end displays retail price.
How can I use these two functions together?
https://www.ads-software.com/plugins/woocommerce-jetpack/
]]>Is there anyone that can help me do this, or point me in the right direction? I would be extremely grateful!
Thanks in advance.
https://www.ads-software.com/plugins/event-espresso-decaf/
]]>It appears the short code is only used to display that the coupon/discount has been applied. I need it to calculate.
Am I missing something?
https://www.ads-software.com/plugins/woocommerce-coupon-shortcodes/
]]>