Closed (fixed)
Project:
Ubercart
Version:
6.x-2.7
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
20 Mar 2012 at 06:53 UTC
Updated:
19 Dec 2012 at 12:04 UTC
Hi,
Is there any way or option to include product node title and product attribute into emails configured on conditional actions?
Thanks in advance,
AnAnD
Comments
Comment #1
tr commentedAvailable tokens are shown in the "Replacement patterns" fieldset when editing the conditional action Action. The set of tokens available depends on the context.
Comment #2
Anandyrh commentedHi TR,
Thanks a lot for the quick reply.
Below are the list of tokens listed, but there is no token for product title or product attribute :(
Global tokens
[current-page-number] The page number of the current page when viewing paged lists.
[current-page-path] The URL alias of the current page.
[current-page-path-raw] The URL alias of the current page. Warning: Token value contains raw user input.
[current-page-title] The title of the current page.
[current-page-url] The URL of the current page.
[site-date-d] The current day (one or two digits without leading zeros)
[site-date-date] The current date (numeric representation of the day of the week)
[site-date-day] The current day (full word)
[site-date-dd] The current day (two digits with leading zeros)
[site-date-ddd] The current day (abbreviation)
[site-date-m] The current month (one or two digits without leading zeros)
[site-date-mm] The current month (two digits with leading zeros)
[site-date-mon] The current month (abbreviated)
[site-date-month] The current month (full word)
[site-date-raw] The current in UNIX timestamp format (1332232937)
[site-date-since] The current in 'time-since' format. (42 years 12 weeks)
[site-date-small] The current date in 'small' format. (2012-03-20 08:42)
[site-date-ww] The current week (two digits with leading zeros)
[site-date-yy] The current year (two digit)
[site-date-yyyy] The current year (four digit)
[site-login] A link to the site login page.
[site-logo] The URL for the site logo.
[site-mail] The administrative email address for the site.
[site-mission] The optional 'mission' of the site.
[site-name] The name of the site.
[site-slogan] The slogan of the site.
[site-url] The URL of the site's front page.
[store-address] The Ubercart store mailing address.
[store-email] The Ubercart store e-mail address.
[store-fax] The Ubercart store fax number.
[store-help-url] The URL to the store help page.
[store-link] A link to the Ubercart store using the store name.
[store-name] The Ubercart store name.
[store-owner] The Ubercart store owner.
[store-phone] The Ubercart store phone number.
[store-url] The Ubercart store URL.
[store-vat-number] Your store VAT number.
[user-id] The user ID of the currently logged in user.
[user-mail] The email address of the currently logged in user.
[user-name] The name of the currently logged in user.
Uc_file tokens
[file-downloads] The list of file download links (if any) associated with an order
Global tokens
[store-vat-number] Your store VAT number.
Comment #3
Anandyrh commentedI am theming this email to send product download link to customers.
My setup:
Meta Data
1. Trigger: E-mail for generated files
Conditions
2. None
Actions
3. Action: Send an order email regarding files.
4. Message: some content with tokens
Here can I add custom tokens to print product node title and product attributes in the email?
Thanks for the help
AnAnD
Comment #5
Anandyrh commentedI still have this issue...
also any way to print the order comments in the email? please let me know if i have to create a new ticket.
Comment #6
longwaveThere are no tokens for this, because there could be multiple products in the order, and tokens are designed to display one piece of information only.
If you explain a bit more about what you are trying to do and what you have tried so far, we might be able to help, but in 6.x at least you will probably need some custom code.
Comment #7
longwaveYou should also try posting your question on ubercart.org, as the support forums there are more active than support requests here.
Comment #8
Anandyrh commentedHi Longwave
Thanks for the reply. I tried posting on ubercart.org, but unfortunately there is low response there.
I have products which can be pre-ordered, so I have to configure customer emails based on few conditions of catalog term.
so I am trying to include product's Title, and CCK fields in to CA emails.
and I am also trying include order comments because, I also have configured for admin to create orders for users, so when admin adds some extra comments for an order those comments should be printed on the email. or any alternative for admin to add some text in to email.
I know that this is too much for customizing email on CA, but still I want to give it a try ;)
Comment #9
Anandyrh commentedYou are right, I am already facing issue with multiple products. when multiple products purchase happens all the file download links are right next to each other, and users are very confused about it.
We can introduce separation field like on views. a field to mention separation character when there is multiple products.
or the easiest way could be to have PHP code to print multiple fields/tokens in an 'un-order list'.
Comment #10
longwaveI would do this by implementing a custom order invoice in your theme, and putting PHP code in the template or (preferably) a preprocess function to add the information about file downloads, rather than trying to use tokens. Order invoices allow a lot more control over the output but need PHP code behind them to add variables with the necessary information.
Comment #11
Anandyrh commentedThanks a lot, that's exactly what I am on right now ;)
Trying to create a custom email template, apart from admin and customer templates.
but am lill poor when it comes to coding ;(
Comment #12
Anandyrh commentedI did create a custom template,
but I am unable to print 'order-first-name' , and at this point, I am not sure about the other replacement patters :(
Comment #13
Anandyrh commentedadding
<?=$order->delivery_first_name?>instead of[order-first-name]worked for me...cheers :D
Comment #14
Anandyrh commentedHi I managed to theme the email template by adding report title in an array, below is the code for the same.
This code can be pasted in an custom email template. I am looking for someone who can help me to link those product titles to the corresponding links, please help me..
Thanks in advance,
Anand
Comment #15
Anandyrh commentedI finally have fully customized email template :)
Below is the code for the same.
The out put of the above code will be as:
Had to refer few of the forums to get this done. :)
Cheers..!!
Comment #17
Anandyrh commented$eventtime = strtotime($noderef->field_event_date[0]['value']);above code is not working because the date selected on the CCK field and the date sent in the emails are different.
Comment #18
longwaveDifferent how? Examples would be helpful. If you mean only in formatting, then it is your code's responsibility to handle that. If they are only a day out (sometimes), then that is probably a timezone issue.
Comment #19
Anandyrh commentedHi longwave, thanks for the quick response.
Issue is fixed now :)
problem was with the echo content:
eleminate:
and replace it with:date('l, F, t, Y', $eventtime)date('F d, Y', $eventtime)works fine.Thanks,
Anand
Comment #20
Anandyrh commented