Latest News: (loading..)
Sign in to follow this  
Followers 0
Gergely

Orders update email

9 posts in this topic

Hi,

 

How can I add really line feed into admin\includes\languages\en_US\orders.php email_body?

 

 

email_body = %s
------------------------------------------------------
Order Number: %s
Detailed Invoice: %s
Date Ordered: %s
email_body_comment = Order Comment
------------------------------------------------------
%s

 

The results now:

Teszt Shop------------------------------------------------------Order Number: 2Detailed Invoice: http://webshop.hu/account_history_info.php?order_id=2Ordered Date: szerda 29 július, 2009

 

Start in:

admin/includes/application/orders/orders.php

about in line 206

$email_body = sprintf($osC_Language->get('email_body'), STORE_NAME, $id, osc_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . $id, 'SSL', false, false, true), osC_DateTime::getLong($Qorder->value('date_purchased'))) . "\n\n";

 

I would like to to see in separated lines in email.

like this:

 

Teszt Shop

------------------------------------------------------

Order Number: 2

Detailed Invoice: http://webshop.hu/account_history_info.php?order_id=2

Ordered Date: szerda 29 július, 2009

 

Have you got any tips?

Share this post


Link to post
Share on other sites
I think you will find the answer you need in this topic email issues

 

Thanks!

 

This is usefull for new contribs, but very complicated. I'm looking for simply method.

Share this post


Link to post
Share on other sites

Thanks!

 

This is usefull for new contribs, but very complicated. I'm looking for simply method.

 

 

Here's a simple answer... Using vi, insert a ctrl-L after each line you wish to have a newline on.

 

In vi:

 

Go to insert mode (i) then press ctrl-V, then press ctrl-L. Voila you will see the ^L.

Share this post


Link to post
Share on other sites

Hi,

 

I have the same problem with OSC v.3. The update order email is not displayed properly.

It is something like:

 

OsCommerce shop------------------------------------------------------Order Number: 26Detailed Invoice: http://myshop.com/toys/account_history_info.php?order_id=26Date Ordered: 09.11.2010

Comment------------------------------------------------------

 

Status------------------------------------------------------New Status: Preparing

 

 

Is there any way I can fix this?

 

 

Thanks a lot,

Deyan

Share this post


Link to post
Share on other sites

Hi,

 

I have the same problem with OSC v.3. The update order email is not displayed properly.

It is something like:

 

OsCommerce shop------------------------------------------------------Order Number: 26Detailed Invoice: http://myshop.com/to...order_id=26Date Ordered: 09.11.2010

Comment------------------------------------------------------

 

Status------------------------------------------------------New Status: Preparing

 

 

Is there any way I can fix this?

 

 

Thanks a lot,

Deyan

 

Hi,

 

Use this contribution

Share this post


Link to post
Share on other sites

Hi,

 

How can I add really line feed into admin\includes\languages\en_US\orders.php email_body?

 

 

email_body = %s
------------------------------------------------------
Order Number: %s
Detailed Invoice: %s
Date Ordered: %s
email_body_comment = Order Comment
------------------------------------------------------
%s

 

The results now:

Teszt Shop------------------------------------------------------Order Number: 2Detailed Invoice: http://webshop.hu/account_history_info.php?order_id=2Ordered Date: szerda 29 július, 2009

 

Start in:

admin/includes/application/orders/orders.php

about in line 206

$email_body = sprintf($osC_Language->get('email_body'), STORE_NAME, $id, osc_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . $id, 'SSL', false, false, true), osC_DateTime::getLong($Qorder->value('date_purchased'))) . "\n\n";

 

I would like to to see in separated lines in email.

like this:

 

Teszt Shop

------------------------------------------------------

Order Number: 2

Detailed Invoice: http://webshop.hu/account_history_info.php?order_id=2

Ordered Date: szerda 29 július, 2009

 

Have you got any tips?

 

 

You will need to control the dotted line by making it a variable. eg;

 

email_order_sep    = ------------------------------------------------------

 

and in creating your email you call it like:

 

$email_body .= $osC_Language->get('email_order_sep') . "\n";

Share this post


Link to post
Share on other sites

 

Hi,

 

if I install this contribute I may delete some of the mods I've done.

Can you please tell me what is the solution of the email showing at one line and how can I fix it?

 

Thanks a lot,

Deyan

Share this post


Link to post
Share on other sites

Hi,

 

if I install this contribute I may delete some of the mods I've done.

Can you please tell me what is the solution of the email showing at one line and how can I fix it?

 

Thanks a lot,

Deyan

 

Hi,

 

 

OSCOM Admin email Line Feeder

When admin sent emails, the LF operation was missed.

This modification use oscommerce name standard to generate email line feeds.

The name standard "email_" in language files. When the keys start as "email_"

the feeder add after one "\n" LF operator in each new rows.

 

 

Find in catalog/admin/includes/classes/language.php

 

Change:

 

          if ( $delimiter !== false ) {
           $key = trim(substr($line, 0, $delimiter));
           $value = trim(substr($line, $delimiter + 1));

           $ini_array[$key] = $value;
         } elseif ( isset($key) ) {
           $ini_array[$key] .= trim($line);
         }

 

to:

 

          if ( $delimiter !== false ) {
           $key = trim(substr($line, 0, $delimiter));
           $value = trim(substr($line, $delimiter + 1));

           $ini_array[$key] = $value;
           if ( substr($key, 0, 6 ) == 'email_' ) { //admin email text LF slicer
             $ini_array[$key] .= "\n"; // slice first row
           }
         } elseif ( isset($key) ) {
           $ini_array[$key] .= trim($line);
           if ( substr($key, 0, 6 ) == 'email_' ) { //admin email text LF slicer
             $ini_array[$key] .= "\n"; // slice more rows
           }
         } 

 

 

Method:

 

You can find admin language in files. (orders.php)

When one language definition start with "email_"

 

ie:

 

email_body = %s

------------------------------------------------------

 

the program code change linefeeds to "\n".

 

Nothing to do only edit in simple text editor. If you press enter in text (as LF) the program interprets as LF.

 

email_body = %s
I write here this text
------------------------------------------------------
email_body_comment = Order Comment
------------------------------------------------------
and I write here something
%s

 

You can see like this in recived email:

 

balbalbal

I write here this text

------------------------------------------------------

 

blablabla

------------------------------------------------------

and I write here something

blablabla

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0