Can this be done somehow already?
Otherwise my suggestion is a general discount command, say DC[amount], subtracting from total and added to UC order as a line item. Maybe requiring supervisor privileges to call?
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | up_special_price-percent-off-721132.patch | 8.53 KB | krlucas |
| #3 | command.dc_.html_.zip | 797 bytes | ludde_t |
| #2 | command.dc_.html_.gz | 282 bytes | slip |
| #1 | up_discount_price.tar_.gz | 1.76 KB | slip |
Comments
Comment #1
slip commentedwell, d.o user maxcpr has recently emailed me a module that implements a DC command. I haven't tried it out yet but it looks like it should work. It works a bit differently than what you're saying. It accepts the following input [percentage of discount]DC[sku] ... No supervisor privileges in there. Please review it if you'd like.
Comment #2
slip commentedhere's the help file max made. Just decompress it and move it to up_discount_price/command.dc.html directory if you want to use it.
Comment #3
ludde_t commentedThanks! And thanks maxcpr. This works perfectly right out of the box!
Help file is a little confusing though, attached is the version I implemented.
/Ludvig
Comment #4
slip commentedmarking this as RTBC because I'll probably eventually commit it but I want to spend a bit of time on it first.
Comment #5
last call media commentedWorks great. Commited. It does not yet do line item discounts, but you can re-add the item at the discount and void the non-discounted one.
Comment #6
krlucas commentedTalked with slip and kdizzle a little bit about this. The up_discount_price sub-module this patch provides is a near clone of the special price module so I would lobby to patch that module instead, to accept either an absolute price (as it does now) or a percentage off as input. That way we aren't duplicating those common bits of tax logic.
And by "lobby" I mean I will post that patch--so I'm going to re-open this issue.
The idea was to use the "%" character to differentiate between absolute and percentage discounts. So
1000SPSKU1
adds SKU1 @ 10
whereas
10%SPSKU1
adds SKU1 @ sell_price - (sell_price * .10)
So maybe the patch should also provide a % button?
Comment #7
krlucas commentedComment #8
krlucas commentedThe attached patch adds percent off functionality to the up_special_price module instead of adding a bunch of duplicate logic via the uc_discount_price module.
As an added bonus a description can be optionally appended to the command to override the product title that displays on the order.
The syntax of the command is now
[PRICE]SP[SKU][,[DESCRIPTION]]
or
[PERCENT-OFF]%SP[SKU][,[DESCRIPTION]]
The patch also removes the uc_discount_price module.
Comment #9
last call media commentedWorks great. Committed. The only thing I see with descriptions is that many people have their scanners to enter after scan so it would be harder for them to use the description option. They would have to key in the sku manually.
Comment #10
krlucas commentedYeah the description functionality is not super useful for most people. I imagine if there's more demand for ad-hoc/memo items it'll have to get re-thought.
Marking as closed.