Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Tokens in email subjects

 
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)
 
Thread Tools Search this Thread
  #1  
Old 10-02-2015, 10:40 PM
 
drholmes drholmes is offline
 

Advanced Member
  
Join Date: Oct 2014
Posts: 84
 

Default Tokens in email subjects

Hi,

I'd like to know if there's a way to use more tokens in email notifications. Currently, there only appears to be tokens for company name, address etc.

For example, if you want to put the order id in the subject, how would do this? E.g. "Company Name Order #%orderid%"

I especially need %customeremail% and %orderid%, because then we can make download links directly in the customer email.

What am I missing? Is there some documentation somewhere that I'm not aware of? Or is X-Cart literally showing the only available tokens directly in the popup?

Per
__________________
X-Cart Business 5.4.1.7, No third party modules, most modules disabled, zero modifications other than CSS.
Reply With Quote
  #2  
Old 10-05-2015, 05:31 AM
  razortw's Avatar 
razortw razortw is offline
 

X-Cart team
  
Join Date: Feb 2015
Posts: 807
 

Default Re: Tokens in email subjects

Quote:
Originally Posted by drholmes
Hi,

I'd like to know if there's a way to use more tokens in email notifications. Currently, there only appears to be tokens for company name, address etc.

For example, if you want to put the order id in the subject, how would do this? E.g. "Company Name Order #%orderid%"

I especially need %customeremail% and %orderid%, because then we can make download links directly in the customer email.

What am I missing? Is there some documentation somewhere that I'm not aware of? Or is X-Cart literally showing the only available tokens directly in the popup?

Per
Hello.
The popup tooltip displays the complete list of available tokens. The only possible way to add new tags to X-Cart is to create a module for that purpose.
I am wondering what is the purpose of that, maybe we can find another solution for what you are trying to achieve?
__________________
Best regards,
Igor Pudovkin
X-Cart hosting team
Reply With Quote
  #3  
Old 10-05-2015, 05:41 AM
  razortw's Avatar 
razortw razortw is offline
 

X-Cart team
  
Join Date: Feb 2015
Posts: 807
 

Default Re: Tokens in email subjects

In addition to my previous message, here is a quick tutorial that shows how to create your own custom email notification.
* http://kb.x-cart.com/display/XDD/Creating+custom+email+notifications
__________________
Best regards,
Igor Pudovkin
X-Cart hosting team
Reply With Quote
  #4  
Old 10-05-2015, 06:12 AM
 
drholmes drholmes is offline
 

Advanced Member
  
Join Date: Oct 2014
Posts: 84
 

Default Re: Tokens in email subjects

Hi,

Yes, I just changed the template again, I was just under the assumption that the email customization in 5.2 finally did away with the need to do that.

Having the order number in the subject is pretty essential for us, otherwise every single order looks the same when browsing through a list, you have to literally go inside every email to discover the order number.

So I just changed the template back, and now our subjects again say

Our Company Name Order #12345

But I'm just wondering why you're so restrictive? It's clear that you're going out of your way to create a reduced feature-set in X-Cart 5, and I don't know if this is some kind of response to X-Cart 4 having too many features or if you're trying to go for a demographic that wouldn't know what to do with options.

I personally see no reason why you couldn't have a much longer list of tokens, especially customer info including emails. Then you could craft download-link emails, personal greeting etc directly from the X-Cart admin. The only way right now to do what I consider normal is to hack the skin, and that becomes a problem on every update that you need to steer the updater around these files that are supposed to remain.

I think it's too much to require people to customize the actual template when the changes are this simple. I know how to do it, so for me it's just annoying. But for non-technical users, this is forcing them into a single formatting, and it's severely restricting their ability to really customize X-Cart at all. It becomes one size fit all, and if you don't like X-Cart's decision, you'd then actually have to hire a developer to change one word on an invoice. That's too much to ask.

Best,

Per
__________________
X-Cart Business 5.4.1.7, No third party modules, most modules disabled, zero modifications other than CSS.
Reply With Quote
  #5  
Old 10-05-2015, 06:27 AM
 
drholmes drholmes is offline
 

Advanced Member
  
Join Date: Oct 2014
Posts: 84
 

Default Re: Tokens in email subjects

For me, ideally, you'd move the entire email generation out of the skin and into the admin. You could just turn every module in the invoice into a token and give people a basic HTML editor where they can put in a token for "%invoicebox%, then %billingbox%, %shippingbox% etc. Then anybody could get exactly the invoice they wanted. There would be little need for anybody to change what's actually inside each box, and that IMO ought to be the threshold for when people should learn to edit templates.

But as I said, I'm taken care of. It's just an unexpected and tough requirement of X-Cart 5 that you actually need to understand the entire API and object model in order to make even trivial changes. I understand that it's a reaction to X-Cart 4 where everyone hacked the code and it became a mess.

But the object model is made by programmers and it's made to be user by programmers. It's not meant to be used by civilians. But most if your users are civilians, who then need to hire a developer to make trivial changes. You've chosen to expose little or nothing in the admin. You've definitely achieved your goal of making X-Cart customizable, it truly is. But this is only available for a chosen few people. I have to assume that 99% of your users are people running small websites, and those people practically don't benefit from this customizability.

Best,

Per
__________________
X-Cart Business 5.4.1.7, No third party modules, most modules disabled, zero modifications other than CSS.
Reply With Quote
  #6  
Old 10-07-2015, 04:40 AM
  razortw's Avatar 
razortw razortw is offline
 

X-Cart team
  
Join Date: Feb 2015
Posts: 807
 

Default Re: Tokens in email subjects

Thank you for your feedback, we do appreciate it.
X-Cart 5 is still a young platform and it certainly lacks a lot of functionality that is available in X-Cart 4 out of the box. However, it is growing and expanding very quickly, and lots of features are yet to be implemented.
The core principle of X-Cart 5, that makes it so different from X-Cart 4, is to be a truly modular system, with each module being independent on any other which would result in ability to install/update/remove any module without affecting everything else, and to provide hassle-free upgrades without a need to manually patch some files like it was in X-Cart 4. That is why the software has a very complicated structure and requires knowledge of its API.
There are a lot of possible features being discussed down here, and such decisions are usually made based on customers' needs shared at our idea portal
* http://ideas.x-cart.com/forums/229428-x-cart-5-x
Please feel free to submit an idea or vote for an existing one.
__________________
Best regards,
Igor Pudovkin
X-Cart hosting team
Reply With Quote
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 07:13 AM.

   

 
X-Cart forums © 2001-2020