VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: Robert_ITMan on October 21, 2019, 18:38:24 PM

Title: Editing Orders: How do I update coupon descriptions and amounts?
Post by: Robert_ITMan on October 21, 2019, 18:38:24 PM
Editing Orders: How do I update coupon descriptions and amounts (per order) when editing?

When editing the order it does not give us the ability to edit these and I have to edit these directly in the DB _virtuemart_orders (both coupon_discount & coupon_code).

VirtueMart 3.6.3 10184
Title: Re: Editing Orders: How do I update coupon descriptions and amounts?
Post by: Robert_ITMan on April 11, 2020, 21:15:10 PM
Still not working in VM 3.6.11 10289 - still need to edit changes to Coupon Discounts in the database table directly #__virtuemart_orders

I see some progress as the amount for the Coupon Discount 'coupon_discount' is now editable ... but if you change the value of the Coupon Discount then the order total is not calculated correctly.

Also, still unable to edit the Coupon Code 'coupon_code' when editing an order - just having a text field we can edit would be great (not asking for values from VM Coupons or 3rd party component / plugin like 'AwoCoupon Virtuemart' ... though that would be an awesome improvement).

Also, if you update your order items and change their amounts, the Coupon Discount amount is not updated automatically.
Title: Re: Editing Orders: How do I update coupon descriptions and amounts?
Post by: pinochico on April 12, 2020, 01:20:53 AM
I do not want to edit orders in the administration after finished and definitely do not want to edit the coupon!!!

Pls don't add this option to new version VM.


If I bought something on Amazon or AllyExpress, I can't edit order after finish too, only as storno. And Coupon? Oh my googness, why?
Title: Re: Editing Orders: How do I update coupon descriptions and amounts?
Post by: AH on April 12, 2020, 09:43:55 AM
Testing 10292

Editing coupon discount and saving works as expected.
Core functionality is for discounts at product level to be "fixed" and not adjusted per QTY changes. So consider that this is part of the "training" required when someone touches orders in admin.

Regarding coupon text, maybe sometimes you have to accept what is provided is useful for 90% of users and that the extra 10% has to be developed personally or funded by those that really need it.

Title: Re: Editing Orders: How do I update coupon descriptions and amounts?
Post by: Robert_ITMan on April 12, 2020, 15:55:46 PM
AH - thank you again for your reply! Fair enough, editing the coupon code is not in high demand ... but if I wanted to add this, how would I do it? Can I add this ability in my template override? Would AWO Coupon or other coupon plugin ever have this ability / trigger? Would I need to edit core models/order.php or other file ... and when I get it working would VM ever use my version of it?

FYI - If you are wondering why I am asking for this it is because my clients use VM for services and school year programs as well as products - and they need to edit some orders themselves instead of getting me to do it directly in the DB, costing time and money. My client's orders have programs for the year ahead and our payment plugin automates monthly subscription payments attached to the order in which the order item paid status affects student enrollment. When a student changes classes or cancels one of several programs we adjust the order and send the customer a comment showing what changed - when it is less work than cancelling and refunding past payments and attached 'add-on' orders such as costumes. We automate our coupons internally - customers don't enter coupons and the coupon codes are really a description of the discount, for example: "3-5 programs saves 5%". I have a video showing how I do this here: https://www.1danceschool.com/faq/how-do-we-setup-discounts-upsell-messages

Also, In this case editing an order is good business and our customers can login and view their statements showing actual payments and can change the credit card ... and we can setup different payment methods for full payments / monthly payments and more with rules for different products / programs... we use PayPal and have a customized VM payment plugin care of Stephen at: https://online-store.co.uk/
Title: Re: Editing Orders: How do I update coupon descriptions and amounts?
Post by: pinochico on April 12, 2020, 18:57:35 PM
Great.

If you are editing an order paid by Paypal, you are in breach of your Paypal contract and robbing Paypal of commissions.
Is it right?

At the same time you have to adjust your tax return and tax paid to the state, our company certainly.
More work than you hope.

Therefore, it is 100% better to cancel and create a new order.

Maybe you see a different context than me.
Title: Re: Editing Orders: How do I update coupon descriptions and amounts?
Post by: AH on April 12, 2020, 20:34:01 PM
I don't think anyone is suggesting to edit an already paid for order that has an invoice.
Title: Re: Editing Orders: How do I update coupon descriptions and amounts?
Post by: Robert_ITMan on April 12, 2020, 20:46:01 PM
Quote from: AH on April 12, 2020, 20:34:01 PM
I don't think anyone is suggesting to edit an already paid for order that has an invoice.

Exactly - thanks again AH!