Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Euro currency


wouter

Recommended Posts

I'm a European (Holland) and so a have to use the euro.

But if you use the ? (alt+0128) as left symbol you get messed up text emails with ? signs in it.

So i tried to figure out a way to use ? on the shop and Euro in the emails.

I altered checkout_process.php and modified it a bit.

After you insert the 2 lines on the client machine upload them, on the webserver the lines changes to ~@ instead of ?

 

Now the only thing you have to do is test it!

 

And another tip to get a space between the ? and the price, alter the left symbol in the database itself en put a space in after it.

 

 

// lets start with the email confirmation

$email_order = STORE_NAME . "n" .

EMAIL_SEPARATOR . "n" .

EMAIL_TEXT_ORDER_NUMBER . ' ' . $insert_id . "n" .

EMAIL_TEXT_INVOICE_URL . ' ' . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $insert_id, 'SSL', false) . "n" .

EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "nn";

if ($order->info['comments']) {

$email_order .= $order->info['comments'] . "nn";

}

// start

$products_ordered = str_replace("?","Euro ",$products_ordered);

// end

$email_order .= EMAIL_TEXT_PRODUCTS . "n" .

EMAIL_SEPARATOR . "n" .

$products_ordered .

EMAIL_SEPARATOR . "n";

 

for ($i=0; $i<sizeof($order_totals); $i++) {

$email_order .= strip_tags($order_totals[$i]['title']) . ' ' . strip_tags($order_totals[$i]['text']) . "n";

// start

$email_order = str_replace("?","Euro ",$email_order);

// end

}

 

$email_order .= "n" . EMAIL_TEXT_DELIVERY_ADDRESS . "n" .

EMAIL_SEPARATOR . "n" .

tep_address_label($customer_id, $sendto, 0, '', "n") . "nn";

if (is_object($$payment)) {

$email_order .= EMAIL_TEXT_PAYMENT_METHOD . "n" .

EMAIL_SEPARATOR . "n";

$payment_class = $$payment;

$email_order .= $payment_class->title . "nn";

if ($payment_class->email_footer) {

$email_order .= $payment_class->email_footer . "nn";

}

}

Link to comment
Share on other sites

That's a good idea!

You can do this a bit quicker/cleaner by just replacing all occurences of ? in the $email_order AFTER it's been completely build but BEFORE it is e-mailed out ($email_order contains the contents of $products_ordered)

(This is done in checkout_process.php)

 

// lets start with the email confirmation

$email_order = STORE_NAME . "n" .

EMAIL_SEPARATOR . "n" .

EMAIL_TEXT_ORDER_NUMBER . ' ' . $insert_id . "n" .

EMAIL_TEXT_INVOICE_URL . ' ' . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $insert_id, 'SSL', false) . "n" .

EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "nn";

if ($order->info['comments']) {

$email_order .= $order->info['comments'] . "nn";

}

$email_order .= EMAIL_TEXT_PRODUCTS . "n" .

EMAIL_SEPARATOR . "n" .

$products_ordered .

EMAIL_SEPARATOR . "n";

for ($i=0; $i<sizeof($order_totals); $i++) {

$email_order .= strip_tags($order_totals[$i]['title']) . ' ' . strip_tags($order_totals[$i]['text']) . "n";

}

$email_order .= "n" . EMAIL_TEXT_DELIVERY_ADDRESS . "n" .

EMAIL_SEPARATOR . "n" .

tep_address_label($customer_id, $sendto, 0, '', "n") . "nn";

if (is_object($$payment)) {

$email_order .= EMAIL_TEXT_PAYMENT_METHOD . "n" .

EMAIL_SEPARATOR . "n";

$payment_class = $$payment;

$email_order .= $payment_class->title . "nn";

if ($payment_class->email_footer) {

$email_order .= $payment_class->email_footer . "nn";

}

}

// start hack

$email_order = str_replace("?","Euro ",$email_order); 

// end hack

 

Regards,

Mattice

"Politics is the art of preventing people from taking part in affairs which properly concern them"

Link to comment
Share on other sites

And another tip to get a space between the ? and the price, alter the left symbol in the database itself en put a space in after it.

 

I have put a space behind the euro-sign, however nothing is changing. When I use " ", it works. The only problem is that in selection boxes (like options) this 'word' appears instead of the space. :cry:

 

How to solve this problem?

 

Liesbeth

Link to comment
Share on other sites

  • 5 months later...

When you want to replace the ? to Euro in the emails you

use the nice add-om like above in checkout_proces.php

 

 

When you want to add a space aftre the ? you change in admin

symbol left to ?  You will het a space after the ? on your site

like : ? 20,00

 

 

When you change checkout_proces.php like above the email looks like

this Euro  20,00 checkout_proces.php to the code below

 

// start hack

$email_order = str_replace("? ","Euro ",$email_order);

// end hack

 

 

Your email now looks like this: Euro 20,00

 

It's very simple

 

Ooooooooo zo simpel is het he....

 

Het ? symbool is klootte... En je moet er voor Klootte om er wat van

te kunnen maken..... AH heeft er ook al problemen mee....

Link to comment
Share on other sites

  • 2 weeks later...

The euro hack does not work with payal IPN. With all other payments the hack works only with paypal IPN there is a problem.

 

Does anybody know a solution ?

 

Sub-Totaal: ? 20.00

incl BTW 19%: ? 3.19

Totaal: ? 21.17

Link to comment
Share on other sites

did someone tried this:

 

€ 

 

 

Just an old Dutchie idea, who's left his country years ago...

 

Let me know if it works

Robert

 

We all need to learn it once, how hard it may seem when you look at it, also you will master it someday ;)

Link to comment
Share on other sites

forgot to say there is also a difference if you use MIME or HTML email !!!

if you use ALT + 0128 then you should use the MIME email option for a good result...

 

just trying to share knowledge :)

Robert

 

We all need to learn it once, how hard it may seem when you look at it, also you will master it someday ;)

Link to comment
Share on other sites

Your solution gives the same problems.

 

In mime email only the papypal IPN makes the problem with the ? sign.

When I select HTML it works but then you have no clickable url to the order history.

Did someone found a solution for this ?

Link to comment
Share on other sites

  • 9 months later...

Go to the lanquage file Dutch or Enlish.php and change this line

 

// charset for web pages and emails

define('CHARSET', 'ISO_8859-1');

 

Change to:

 

// charset for web pages and emails

define('CHARSET', 'ISO_8859-5')

 

And there is no problem for ?

 

BTW: ?8.11

Sub-Totaal: ?50.81

TPGpost (Nederland:1 x 23 gr ): ?6.71

Totaal: ?57.52

 

Gr Piet

Link to comment
Share on other sites

  • 1 year later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...