X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Display company name as Email sender (https://forum.x-cart.com/showthread.php?t=63170)

BounceHouse 04-04-2012 09:52 AM

Display company name as Email sender
 
I am trying to figure out how to change the actual email sent from the store when an order is processed, complete, newletters set, etc. It says just sales@website.com and I would like it to actually say the name of company and for newletters say monthly newletter or some sort. Anyone can help with this would be greatly appreciated. Thanks!!!

BounceHouse 04-04-2012 04:47 PM

Re: Email Displays from Auto store Email
 
Does anyone know how to change the display name when your store sends auto emails to your customers? It just displays the actual email address but instead it would be better to display your store or company name to stand out to them. IDEAS?

qualiteam 04-09-2012 04:59 AM

Re: Email Displays from Auto store Email
 
This is possible, but a slight modification is required.

Here are instructions (for X-Cart 4.4.5):

1. alter the "include/func/func.core.php" script and replace this piece of code:
PHP Code:

return "^[a-z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+\/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z](?:[a-z0-9-]*[a-z0-9])$"

with this one:
PHP Code:

return "^([a-z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+\/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z](?:[a-z0-9-]*[a-z0-9]))|([A-z 0-9]{3,}[ ]{1}(<){1}[a-z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+\/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z](?:[a-z0-9-]*[a-z0-9])(>){1})$"


2. alter the "admin/configuration.php" script and replace this piece of code:
PHP Code:

$trusted_post_variables = array(
    
'gpg_key',
    
'pgp_key',
    
'xpc_private_key_password',
    
'xpc_private_key',
    
'xpc_public_key',
    
'breadcrumbs_separator',
    
'wibiya_integration_code',
); 

with this this one:
PHP Code:

$trusted_post_variables = array(
    
'gpg_key',
    
'pgp_key',
    
'xpc_private_key_password',
    
'xpc_private_key',
    
'xpc_public_key',
    
'breadcrumbs_separator',
    
'wibiya_integration_code',
    
'site_administrator',
    
'users_department',
    
'orders_department',
    
'support_department',
    
'smtp_mail_from',
); 


To apply the modification the FTP/SSH access is required.

Once the modification is applied, you will be able to use the following e-mail format on the Company options page: Your Company Name <sales@yourstore.com>

That will make emails show Your Company Name as a sender.

NOTE: additional changes are required in case X-Payments is used.

qualiteam 04-09-2012 05:01 AM

Re: Email Displays from Auto store Email
 
Moving to "Completed Custom Mods & Templates" forum.

cflsystems 04-09-2012 08:15 AM

Re: Display company name as Email sender
 
Consider including it in 4.4.6 Alex. It is a simple change

thebluedoorboutique 04-13-2012 06:34 AM

Re: Display company name as Email sender
 
I had just opened a ticket for this on the Help Desk, and they suggested this method. But then e-mailed me back to tell me that this wouldn't work due to Javascript of some sort and that the company name would have to be stored in a language variable. Thoughts?

qualiteam 04-13-2012 06:38 AM

Re: Display company name as Email sender
 
The introduced changes should apply only to email notifications.

Not sure how it is related... any other clarification what page javascript?

thebluedoorboutique 04-13-2012 08:22 AM

Re: Display company name as Email sender
 
Quote:

Originally Posted by qualiteam
The introduced changes should apply only to email notifications.

Not sure how it is related... any other clarification what page javascript?


Not sure, but you can check my ticket: 1073880059

lcg 04-14-2012 09:48 PM

Re: Email Displays from Auto store Email
 
Quote:

Originally Posted by qualiteam
This is possible, but a slight modification is required.

Here are instructions (for X-Cart 4.4.5):

1. alter the "include/func/func.core.php" script and replace this piece of code:
PHP Code:

return "^[a-z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+\/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z](?:[a-z0-9-]*[a-z0-9])$"

with this one:
PHP Code:

return "^([a-z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+\/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z](?:[a-z0-9-]*[a-z0-9]))|([A-z 0-9]{3,}[ ]{1}(<){1}[a-z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+\/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z](?:[a-z0-9-]*[a-z0-9])(>){1})$"


2. alter the "admin/configuration.php" script and replace this piece of code:
PHP Code:

$trusted_post_variables = array(
    
'gpg_key',
    
'pgp_key',
    
'xpc_private_key_password',
    
'xpc_private_key',
    
'xpc_public_key',
    
'breadcrumbs_separator',
    
'wibiya_integration_code',
); 

with this this one:
PHP Code:

$trusted_post_variables = array(
    
'gpg_key',
    
'pgp_key',
    
'xpc_private_key_password',
    
'xpc_private_key',
    
'xpc_public_key',
    
'breadcrumbs_separator',
    
'wibiya_integration_code',
    
'site_administrator',
    
'users_department',
    
'orders_department',
    
'support_department',
); 


To apply the modification the FTP/SSH access is required.

Once the modification is applied, you will be able to use the following e-mail format on the Company options page: Your Company Name <sales@yourstore.com>

That will make emails show Your Company Name as a sender.


Hello, is there sample code for X-Cart 4.0.18? Thanks in advance.

qualiteam 04-16-2012 01:20 AM

Re: Display company name as Email sender
 
No, in 4.0.x it is even simpler.

All you need to do is alter the "admin/configuration.php" script and replace this piece of code:
PHP Code:

$trusted_post_variables = array("gpg_key""pgp_key"); 


with this:
PHP Code:

$trusted_post_variables = array("gpg_key""pgp_key""site_administrator""users_department""orders_department""support_department""newsletter_email"); 



All times are GMT -8. The time now is 02:28 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.