Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Changing product display on Email


TerryK

Recommended Posts

Posted

I want to change the way the product title, quantity and price is displayed on the Email confirmation sent to the customer after they've finalized their order.

 

Currently, I've got my Email set up to display the product info like this:

 

Products Ordered:

1 x Disney Silly Songs CD (Audio CD) = USD $14.95
5 x Addition Unplugged CD/Book (Audio CD and Book) = USD $79.75
______________________________________________________

Sub-Total: USD $94.70
Canada Post (Shipping to British Columbia, Canada ?): USD $6.50
7% GST: USD $7.09
Total: USD $108.29

 

How I'd like it to look is like this:

 

Products Ordered:

Disney Silly Songs CD (Audio CD)
Quantity: 1
Price, Each: USD $14.95
Item Total: ?USD $14.95
______________________________________________________

Addition Unplugged CD/Book (Audio CD and Book)
Quantity: 5
Price, Each: USD $15.95
Item Total: ?USD $79.75
______________________________________________________

Sub-Total: ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?USD $ 94.70
Shipping: ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? USD $ ?6.50
7% Goods & Services Tax: ? ? ? ? ? ? ? ? ? ? ?USD $ ?7.09
Grand Total: ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?USD $108.29

 

 

 

Working first with the way the product info is displayed, it appears to be defined here in checkout_process.php:

 

 ? ?$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";
?}

 

I tried changing that code to:

 

 ? ?$products_ordered .= $order->products[$i]['name'] . ' (' . $order->products[$i]['model'] . ')' . "\n" . 'Quantity:' . $order->products[$i]['qty'] . "\n" . 'Each: ? ? ? ? ? ' . $currencies->display_price($order->products[$i]['price'] . "\n" . 'Item Total: ? ? ' . $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']) . $products_ordered_attributes . "\n\n";
?}

 

When I uploaded it, though, I got a parse error, and I can't decipher this well enough to figure out what I've done wrong. Any good eyes out there that can help me?

 

As far as how it displays the totals, I'm not sure if there's any hope for me... The code that I need to work with appears to be this:

 

 ? ? ? ? ? ? ? ? ? ? ? ? ?'currency_value' => $order->info['currency_value']);
?tep_db_perform(TABLE_ORDERS, $sql_data_array);
?$insert_id = tep_db_insert_id();
?for ($i=0, $n=sizeof($order_totals); $i<$n; $i++) {
? ?$sql_data_array = array('orders_id' => $insert_id,
? ? ? ? ? ? ? ? ? ? ? ? ? ?'title' => $order_totals[$i]['title'],
? ? ? ? ? ? ? ? ? ? ? ? ? ?'text' => $order_totals[$i]['text'],
? ? ? ? ? ? ? ? ? ? ? ? ? ?'value' => $order_totals[$i]['value'],
? ? ? ? ? ? ? ? ? ? ? ? ? ?'class' => $order_totals[$i]['code'],
? ? ? ? ? ? ? ? ? ? ? ? ? ?'sort_order' => $order_totals[$i]['sort_order']);
? ?tep_db_perform(TABLE_ORDERS_TOTAL, $sql_data_array);
?}

 

and this:

 

 ?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";
?}

 

but I don't quite know where that's defined for output.

 

Anyone? Please? :)

 

Many thanks,

 

Terry

Terry Kluytmans

 

Contribs Installed: Purchase Without Account (PWA); Big Images, Product Availability, Description in Product Listing, Graphical Infobox, Header Tags Controller, Login Box, Option Type Feature, plus many layout changes & other mods of my own, like:

 

Add order total to checkout_shipment

Add order total to checkout_payment

Add radio buttons at checkout_shipping (for backorder options, etc.)

Duplicate Table Rate Shipping Module

Better Product Review Flow

 

* If at first you don't succeed, find out if there's a prize for the loser. *

Archived

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

×
×
  • Create New...