Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

emailordertext addon problem


bigbird_3156

Recommended Posts

Hi there...

 

I used a new addon called emailordertext - see it here -

 

its an addon designed to allow you to easily modify the order confirmation e-mail that gets sent out to your customer

 

It's kind of all in auto translated english from german....

 

I have installed it and it seems to work quite well, except for one major flaw, that when it generates the e-mail it only includes the cents of the transaction and not the dollars.... so a 10.95 transaction shows up on the e-mail as .95...

 

Has anyone dealt with this addon before and know how to fix this bug... I've been looking for an answer but most of the write up is in german

Link to comment
Share on other sites

I think it must relate to the following code that the instructions said I had to change but for the life of me i cant figure it out... any ideas?

 

# Edit in /catalog/checkout_process.php
############################################


>>>>> LOOK FOR THE FOLLOWING CODE: >>>>>>>>>>>>>>>>BEGIN>>>>>>>>>>>>>>


//------insert customer choosen option eof ----
$total_weight += ($order->products[$i]['qty'] * $order->products[$i]['weight']);
$total_tax += tep_calculate_tax($total_products_price, $products_tax) * $order->products[$i]['qty'];
$total_cost += $total_products_price;

$products_ordered .= $order->products[$i]['qty'] . ' x ' . $order->products[$i]['name'] . ' (' . $order->products[$i]['model'] . ') = ' . $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']) . $products_ordered_attributes . "\n";
 }

// 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) . "\n\n";
 if ($order->info['comments']) {
$email_order .= tep_db_output($order->info['comments']) . "\n\n";
 }
 $email_order .= EMAIL_TEXT_PRODUCTS . "\n" . 
			  EMAIL_SEPARATOR . "\n" . 
			  $products_ordered . 
			  EMAIL_SEPARATOR . "\n";

 for ($i=0, $n=sizeof($order_totals); $i<$n; $i++) {
$email_order .= strip_tags($order_totals[$i]['title']) . ' ' . strip_tags($order_totals[$i]['text']) . "\n";
 }

 if ($order->content_type != 'virtual') {
$email_order .= "\n" . EMAIL_TEXT_DELIVERY_ADDRESS . "\n" . 
				EMAIL_SEPARATOR . "\n" .
				tep_address_label($customer_id, $sendto, 0, '', "\n") . "\n";
 }

 $email_order .= "\n" . EMAIL_TEXT_BILLING_ADDRESS . "\n" .
			  EMAIL_SEPARATOR . "\n" .
			  tep_address_label($customer_id, $billto, 0, '', "\n") . "\n\n";
 if (is_object($$payment)) {
$email_order .= EMAIL_TEXT_PAYMENT_METHOD . "\n" . 
				EMAIL_SEPARATOR . "\n";
$payment_class = $$payment;
$email_order .= $payment_class->title . "\n\n";
if ($payment_class->email_footer) { 
  $email_order .= $payment_class->email_footer . "\n\n";
}
 }




<<<<END<<<< ...AND EXCHANGE THIS WITH THE FOLLOWING:  >>>>BEGIN>>>>>



//------insert customer choosen option eof ----
$total_weight += ($order->products[$i]['qty'] * $order->products[$i]['weight']);
$total_tax += tep_calculate_tax($total_products_price, $products_tax) * $order->products[$i]['qty'];
$total_cost += $total_products_price;
	if (EMAIL_USE_HTML == 'true'){
	  $products_ordered .= $order_totals_zelle_beginn . $order->products[$i]['qty'] . ' x ' . $order->products[$i]['name'] . ' (' . $order->products[$i]['model'] . ') = ' . $order_totals_zelle_mitte . $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']) . $products_ordered_attributes . $order_totals_zelle_end;
	}
	else{
  $products_ordered .= $order->products[$i]['qty'] . ' x ' . $order->products[$i]['name'] . ' (' . $order->products[$i]['model'] . ') = ' . $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']) . $products_ordered_attributes . "\n";	
	}
 }
if (EMAIL_USE_HTML == 'true'){
 $products_ordered .= $order_totals_table_end;
}
if (EMAIL_USE_HTML == 'true'){
 $text_query = tep_db_query("SELECT * FROM eorder_text where eorder_text_id = '2' and language_id = '" . $languages_id . "'");	
}
else{
 $text_query = tep_db_query("SELECT * FROM eorder_text where eorder_text_id = '1' and language_id = '" . $languages_id . "'");
}
	$werte = tep_db_fetch_array($text_query);
	$text = $werte["eorder_text_one"];
$text = preg_replace('/<-STORE_NAME->/', STORE_NAME, $text);
$text = preg_replace('/<-insert_id->/', $insert_id, $text);
$text = preg_replace('/<-INVOICE_URL->/', tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $insert_id, 'SSL', false), $text);
$text = preg_replace('/<-DATE_ORDERED->/', strftime(DATE_FORMAT_LONG), $text);
  if ($order->info['comments']) {
	$text = preg_replace('/<-Customer_Comments->/', tep_db_output($order->info['comments']), $text);
  }
  else{
	  $text = preg_replace('/<-Customer_Comments->/', '', $text);
  }  
$text = preg_replace('/<-Item_List->/', $products_ordered, $text);
if (EMAIL_USE_HTML == 'true'){	
	$list_total = $order_totals_table_beginn;
	for ($i=0, $n=sizeof($order_totals); $i<$n; $i++) {
	$list_total .= $order_totals_zelle_beginn . strip_tags($order_totals[$i]['title']) . $order_totals_zelle_mitte . strip_tags($order_totals[$i]['text']) . $order_totals_zelle_end;
	}
	$list_total .= $order_totals_table_end;
}
else{
	for ($i=0, $n=sizeof($order_totals); $i<$n; $i++) {
	$list_total .= strip_tags($order_totals[$i]['title']) . ' ' . strip_tags($order_totals[$i]['text']) . "\n";
	}
}	
$text = preg_replace('/<-List_Total->/', $list_total, $text);
if ($order->content_type != 'virtual') {
	$text = preg_replace('/<-DELIVERY_Adress->/', tep_address_label($customer_id, $sendto, 0, '', "\n"), $text);
}
elseif($order->content_type == 'virtual') {	
	if ((DOWNLOAD_ENABLED == 'true') && isset($attributes_values['products_attributes_filename']) && tep_not_null($attributes_values['products_attributes_filename'])) {
	  $text = preg_replace('/<-DELIVERY_Adress->/', "Nach Zahlungseingang können Sie Ihr Produkt hier downloaden. Sie erhalten dann eine seperate EMail: \n" . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $insert_id, 'SSL', false), $text);
	}
	else{
	  $text = preg_replace('/<-DELIVERY_Adress->/', '', $text);
	}	
}
else{
  $text = preg_replace('/<-DELIVERY_Adress->/', '', $text);
}
$text = preg_replace('/<-BILL_Adress->/', tep_address_label($customer_id, $billto, 0, '', "\n"), $text);  
  if (is_object($$payment)) {
	$payment_class = $$payment;
	$text = preg_replace('/<-Payment_Modul_Text->/', $payment_class->title, $text);
	if ($payment_class->email_footer) { 
	  $text = preg_replace('/<-Payment_Modul_Text_Footer->/', $payment_class->email_footer, $text);
	}
  }

$text = preg_replace('/<-FIRMENANSCHRIFT->/', STORE_NAME_ADDRESS, $text);
$text = preg_replace('/<-FINANZAMT->/', OWNER_BANK_FA, $text);
$text = preg_replace('/<-STEUERNUMMER->/', OWNER_BANK_TAX_NUMBER, $text);
$text = preg_replace('/<-USTID->/', OWNER_BANK_UST_NUMBER, $text);
$text = preg_replace('/<-BANKNAME->/', OWNER_BANK_NAME, $text);
$text = preg_replace('/<-KONTOINHABER->/', OWNER_BANK_ACCOUNT, $text);
$text = preg_replace('/<-BLZ->/', STORE_OWNER_BLZ, $text);
$text = preg_replace('/<-KONTONUMMER->/', OWNER_BANK, $text);
$text = preg_replace('/<-SWIFT->/', OWNER_BANK_SWIFT, $text);
$text = preg_replace('/<-IBAN->/', OWNER_BANK_IBAN, $text);

  $email_order = $text;


<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<END<<<<<<<<<<<

Link to comment
Share on other sites

  • 5 months later...
Hi there...

 

I used a new addon called emailordertext - see it here -

 

its an addon designed to allow you to easily modify the order confirmation e-mail that gets sent out to your customer

 

It's kind of all in auto translated english from german....

 

I have installed it and it seems to work quite well, except for one major flaw, that when it generates the e-mail it only includes the cents of the transaction and not the dollars.... so a 10.95 transaction shows up on the e-mail as .95...

 

Has anyone dealt with this addon before and know how to fix this bug... I've been looking for an answer but most of the write up is in german

 

Did you ever get a resolution to this. I just installed this and getting the same thing. Cents but no dollars

Link to comment
Share on other sites

  • 2 months later...
Did you ever get a resolution to this. I just installed this and getting the same thing. Cents but no dollars

 

Same here, dead keen to here if there is a solution. I can't seem to find any reason for it to be occuring

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...