2

I've created an order-based store using ... Store! Recently my client asked if certain orders could be send to a different email-adress based on which member-category (using IntoEEtive's Member Categories) the customer belonged to.

I created a hidden input-field on the check-out-page, with an email dynamically inserted based on the member's category. Can I use that value in any way to send confirmation-emails? When I tried to enter {order_custom1} in the BBC-field I got an error (of course...).

2

The BBC field uses CodeIgnitors "valid_emails" form rules to make sure that the emails entered are valid. I might be mistaken but even removing that rule from the code would not allow for order fields to be parsed in the BBC field.

At the moment you would need to write an extension based upon the store_order_complete_end tag to send the email after the order has been completed.

| improve this answer | |
  • I was afraid of something like that. It makes total sense, though. Would be nice to have more report options. Thanks for the explanation! – Atle Feb 21 '13 at 11:13
  • If you have specific ideas of reports or features that you would like shoot an email to support@exp-resso.com so we can add it to the feature request list. – Justin Long Feb 21 '13 at 17:00
0

I haven't tried this, but we used a similar message to customize the outgoing message subject, when orders were processed from different sections and sub-sites, so it may also work for email.

CONFIRMATION: Publication Order from {order_custom9}

Basically, we created a custom order field and inserted that into the subject from the checkout_review template, with a hidden input variable

<input type="hidden" name="order_custom9" value="Social Science Store" />

So, I imagine, but can't guarantee this would work, but you could insert a custom field into the BCC: field, like:

BCC: default@domain.org, {order_custom10}

<div class="form-actions">
    <input type="hidden" name="payment_method" value="free" />
    <input type="hidden" name="order_custom10" value="{selected_email}" />
    <a href="{path='store/order_checkout'}" class="btn">Back</a>
    <input type="submit" name="submit" value="Place Order" class="btn btn-success" />
</div>

where the {selected_email} would be the results of whatever calculation you use to determine the proper email address. This could be straight up text, with an {if}{if:else} statement or potentially a field. We've worked with just straight up text, so I can't say a field would work, but it could.

Anyway, there's no harm in trying. But this is how we've been using custom_fields, basically to modify the outgoing email messages.

| improve this answer | |
  • Hmmm, I'm already using custom_fields to add dynamic info to the message, but only in the message-body. When I tried using it in the BBC-field I got an error about valid email required, just as Justin explained above... – Atle Feb 21 '13 at 11:18
  • You should be able to use the store order fields in the email subject and the message portion without problems. But since the BBC field is only meant to add emails (even if you remove the rule to check only valid emails) it doesn't have the extra overhead of processing order details – Justin Long Feb 21 '13 at 16:58
  • Well, that sucks, but is understandable. Could something like PostMaster be used? – nonprofit_tech Feb 21 '13 at 21:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.