Editing an Order - "Special" products

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
niall08
Commander (CMDR)
Commander (CMDR)
Posts: 175
Joined: Tue Dec 09, 2008 10:29 am

Editing an Order - "Special" products

Post by niall08 » Tue Jul 21, 2009 1:57 am

Hi,
We need the system to be flexible - i.e. a customer may phone and, if they are a frequent customer, we'll give them a special price on the product they're buying.

At present, if we build the order, they'll receive an email with the standard costs - if we edit the order afterwards to use a "special" price, the customer still has the original order confirmation with the higher cost.

Can anyone think of a way to handle this scenario so the customer doesn't get the higher cost in the order confirmation email?

niall08
Commander (CMDR)
Commander (CMDR)
Posts: 175
Joined: Tue Dec 09, 2008 10:29 am

Re: Editing an Order - "Special" products

Post by niall08 » Tue Jul 21, 2009 2:59 am

The only way I can think of is to create a new email template (called "Order Edited", for example) and get the administrator to manually send this email from a button click when the order is edited.

But how can I prevent the original email being sent?

For instance:
A checkbox which, if checked, would not trigger the "Order Confirmation" trigger.

Any ideas how to prevent this trigger being fired??

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Editing an Order - "Special" products

Post by mazhar » Tue Jul 21, 2009 3:31 am

I just tried to check this and Email being sent contains the updated information. Once order is placed and you modified taxes etc then you can trigger Order Notification your self manually by clicking the customer email address on order summary page. It will bring you to the Email template selection where you can select the Order Confirmation template and then send to that particular customer, this Email will contain the updated information.

niall08
Commander (CMDR)
Commander (CMDR)
Posts: 175
Joined: Tue Dec 09, 2008 10:29 am

Re: Editing an Order - "Special" products

Post by niall08 » Tue Jul 21, 2009 6:03 am

Hi Mazhar,
Thanks, I've just seen that - and I've added a button to the Order Menu to perform this functionality.

What about opting out of the Order Confirmation when the order is first created by the admin, before the order items are edited??

niall08
Commander (CMDR)
Commander (CMDR)
Posts: 175
Joined: Tue Dec 09, 2008 10:29 am

Re: Editing an Order - "Special" products

Post by niall08 » Tue Jul 21, 2009 7:41 am

bump

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Editing an Order - "Special" products

Post by mazhar » Tue Jul 21, 2009 7:47 am

If you want to disable that just remove the Order Placed trigger from Order Confirmation Email template.

niall08
Commander (CMDR)
Commander (CMDR)
Posts: 175
Joined: Tue Dec 09, 2008 10:29 am

Re: Editing an Order - "Special" products

Post by niall08 » Tue Jul 21, 2009 7:49 am

But that will remove the automated trigger for website customers, won't it?

I just need admins to be able to create and edit an order before an order confirmation email is sent..

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Editing an Order - "Special" products

Post by mazhar » Tue Jul 21, 2009 8:02 am

Yes disabling it will disable automatic confirmation Email for site users as well.

niall08
Commander (CMDR)
Commander (CMDR)
Posts: 175
Joined: Tue Dec 09, 2008 10:29 am

Re: Editing an Order - "Special" products

Post by niall08 » Tue Jul 21, 2009 8:09 am

Is there any way to disable the sending of the email through the codebehind?

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Editing an Order - "Special" products

Post by mazhar » Tue Jul 21, 2009 8:16 am

The only way I can think of is to disable the order placed trigger for order confirmation template. Now merchant part is good because system is not sending any Email automatically and merchant can send Email after adjustment. Problem is with the store side where customer aren't getting any Order Confirmation Email against order. So in order to fix this put some code in one page checkout page's CheckedOut method to load and send order confirmation Email manually. Read following topic about sending manual Emails
viewtopic.php?f=42&t=8682

niall08
Commander (CMDR)
Commander (CMDR)
Posts: 175
Joined: Tue Dec 09, 2008 10:29 am

Re: Editing an Order - "Special" products

Post by niall08 » Tue Jul 21, 2009 8:26 am

Thanks Mazhar, but that's not an option - administrators having to send emails manually for every order?

Customers want to see that there order has been confirmed straight-away..

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Editing an Order - "Special" products

Post by mazhar » Tue Jul 21, 2009 8:32 am

Well removing the order placed trigger disables the order confirmation for both normal and admin users. So if there are very orders that would need order item price adjustments and for all other you want to send Email automatically then perhaps you can customize you admin order module to incorporate to flag that whether system should send an automatic Email or admin will take care at his/her own after adjustment. Depending upon that flag you can trigger Email by putting some code in admin order module as you can do with store side in one page checkout.

niall08
Commander (CMDR)
Commander (CMDR)
Posts: 175
Joined: Tue Dec 09, 2008 10:29 am

Re: Editing an Order - "Special" products

Post by niall08 » Tue Jul 21, 2009 8:50 am

So let me get this right:

I could disable the trigger for order confirmation;
In the customer checkout, I can explicitly call the template, passing in the values needed for the template;
In the admin side, with the trigger still disabled, I can make all admin-generated orders require manual sending of an email.

Is that right?

niall08
Commander (CMDR)
Commander (CMDR)
Posts: 175
Joined: Tue Dec 09, 2008 10:29 am

Re: Editing an Order - "Special" products

Post by niall08 » Tue Jul 21, 2009 8:58 am

And, if this is the case, do you have a list of all of the variables that the order confirmation email template needs to be passed in??

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Editing an Order - "Special" products

Post by mazhar » Tue Jul 21, 2009 9:00 am

niall08 wrote:So let me get this right:

I could disable the trigger for order confirmation;
In the customer checkout, I can explicitly call the template, passing in the values needed for the template;
In the admin side, with the trigger still disabled, I can make all admin-generated orders require manual sending of an email.

Is that right?
Yes

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Editing an Order - "Special" products

Post by mazhar » Tue Jul 21, 2009 9:05 am

niall08 wrote:And, if this is the case, do you have a list of all of the variables that the order confirmation email template needs to be passed in??

Code: Select all

emailTemplates[0].Parameters.Add("store", Token.Instance.Store);
emailTemplates[0].Parameters.Add("order", order);
emailTemplates[0].Parameters.Add("customer", order.User);
emailTemplates[0].Parameters.Add("payments", order.Payments);
where order represents currently placed order

niall08
Commander (CMDR)
Commander (CMDR)
Posts: 175
Joined: Tue Dec 09, 2008 10:29 am

Re: Editing an Order - "Special" products

Post by niall08 » Tue Jul 21, 2009 9:07 am

Brilliant Mazhar - thanks for your help - greatly appreciated!

Post Reply