You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.
Hi all,
I have a client that wants the Dropshipper emails to have the customers delivery address in a position that when the email is printed (A4) and paper folded in half the customers delivery address is showing through the address window of the A5 envelope.
Does anybody know how this can be done or is this impossible?
Is there a add-on module that allows some flexibility with how the confirmation email looks?
Kind Regards, Steven
Last edited by beeman (01-24-2011 16:03:13)
Offline
Any help on this would be appreciated, has any body managed to make any similar modifications?
Steven
Offline
You need to modify the layout of one of the files, - that is all. - I am not sure, offhand, which file that would be, but suspect that you need to modify the following:
You should not need to make any code modifications.
Last edited by Design_Wholesale (01-28-2011 15:52:21)
Offline
Hi John,
I'm sorry but the code on this page is not in HTML so it can be put in an editor and displayed so that I can edit it.
I think it's a complete rewrite by sombody who knows what they are doing.
If I could find a way to see it in dreamweaver then it might be possible?
Cheers for taking the trouble to reply
Regards Steven
Offline
No problem, - but the HTML parts are embedded in the file in the form of PHP statements ...and I use Notepad or nano, not Dreamweaver, so I cannot help you with that.
<?php // +-- // | This include is used to print order summary information for // | the order confirmation page. // +-- $app = $this->globals('khxc_display.app'); $eol = $this->globals('khxc.eol'); $ns = $this->globals('khxc.namespace'); $order = $this->globals('ecom.order_summary'); $dtformat = $this->globals('khxc_settings.' . $app . '.datetime_format'); $shownums = $this->globals('khxc_settings.' . $app . '.dispprodnums'); $currapp = $this->globals('khxc_settings.' . $app . '.basecurrency'); $currshow = $this->globals('khxc_session.show_currency'); $optlb = $this->globals('khxc_settings.' . $app . '.dispprodoptlinebr'); $eutax_text = $this->globals('eutax_text'); $eutaxname = $this->globals('khxc_settings.' . $app . '.eutaxname'); $manageeutax = $this->globals('khxc_settings.' . $app . '.manageeutax'); $euptaxinvoice = $this->globals('khxc_settings.' . $app . '.euptaxinvoice'); // +-- // | Always show prices in the application currency for BackEnd // | requests. // +-- if ($this->globals('khxc.interface') == 'BackEnd') { $currshow = $this->globals('khxc_settings.' . $app . '.basecurrency'); } // End of if statement. // +-- // | Determine whether the order is complete or not. // +-- $ordercompl = 0; if (($order['order']['status'] != 'P') && ($order['order']['status'] != 'X')) { $ordercompl = 1; } // End of if statement. // +-- // | Print the order summary if we have both an order and items. // +-- if ((!(empty($order['order']))) && (!(empty($order['items'])))) { // +-- // | Figure out our order totals. // +-- $totals = array(); if ((!(empty($order['order']['subtotal']))) && ($order['order']['subtotal'] > 0)) { $totals['Item Subtotal' . ' ' . $eutax_text['first']] = $order['order']['subtotal']; } if ((!(empty($order['order']['shiptotal']))) && ($order['order']['shiptotal'] > 0)) { $totals['Delivery Total'] = $order['order']['shiptotal']; } if ((!(empty($order['order']['taxsptotal']))) && ($order['order']['taxsptotal'] > 0)) { $totals['Tax Total: State/Province'] = $order['order']['taxsptotal']; } if ($manageeutax == 'excleutax') { if ((!(empty($order['order']['taxctotal']))) && ($order['order']['taxctotal'] > 0)) { $totals['Tax Total: ' . $eutaxname] = $order['order']['taxctotal']; } } else if ($manageeutax == 'incleutax') { if ((!(empty($order['order']['eutaxrefundtotal']))) && ($order['order']['eutaxrefundtotal'] > 0)) { $totals['LESS: Refunded Tax Total: ' . $eutaxname] = $order['order']['eutaxrefundtotal']; } } else { if ((!(empty($order['order']['taxctotal']))) && ($order['order']['taxctotal'] > 0)) { $totals['Tax Total: Country'] = $order['order']['taxctotal']; } } if ((!(empty($order['order']['disctotal']))) && ($order['order']['disctotal'] > 0)) { $totals['Discount'] = $order['order']['disctotal']; } if ((!(empty($order['order']['custsaletotal']))) && ($order['order']['custsaletotal'] > 0)) { $text = 'Sale'; if (!(empty($order['order']['custsaledesc']))) {$text = $order['order']['custsaledesc'];} $totals['Discount: ' . $text] = $order['order']['custsaletotal']; } if ((!(empty($order['order']['ordertotal']))) && ($order['order']['ordertotal'] > 0)) { $totals['Total'] = $order['order']['ordertotal']; } else { $totals['Total'] = 0; } if (($manageeutax == 'excleutax') && (!(empty($order['order']['recurtotaleutax'])))) { if ((!(empty($order['order']['recurtotal']))) && ($order['order']['recurtotal'] > 0)) { $totals['Recurring Charge Subtotal'. ' ' . $eutax_text['first']] = $order['order']['recurtotal']; } if ((!(empty($order['order']['recurtotaleutax']))) && ($order['order']['recurtotaleutax'] > 0)) { $totals['Recurring Tax Total: ' . $eutaxname] = $order['order']['recurtotaleutax']; $totals['Recurring Charge Total'] = $order['order']['recurtotaleutax'] + $order['order']['recurtotal']; } } else if (($manageeutax == 'incleutax') && (!(empty($order['order']['recurtotaleutaxrefund'])))) { if ((!(empty($order['order']['recurtotal']))) && ($order['order']['recurtotal'] > 0)) { $totals['Recurring Charge Subtotal'. ' ' . $eutax_text['first']] = $order['order']['recurtotal']; } if ((!(empty($order['order']['recurtotaleutaxrefund']))) && ($order['order']['recurtotaleutaxrefund'] > 0)) { $totals['LESS: Refunded Recurring Tax Total: ' . $eutaxname] = $order['order']['recurtotaleutaxrefund']; $totals['Recurring Charge Total'] = $order['order']['recurtotal'] - $order['order']['recurtotaleutaxrefund']; } } else { if ((!(empty($order['order']['recurtotal']))) && ($order['order']['recurtotal'] > 0)) { $totals['Recurring Charge Total'] = $order['order']['recurtotal']; } } if (($manageeutax == 'excleutax') && ($euptaxinvoice)) { if ($this->debug) {$this->debugger("ordersummary: EU Tax Invoice.");} print '<div class="khxc_regtablehead">Order Items Totals</div>' . $eol . $eol; print '<table id="ORDERTOTALS" class="khxc_regtable">' . $eol . $eol; print '<tr class="khxc_regtable">' . $eol; print '<td class="khxc_regtable" style="width: 10%">' . $eol; print 'Quantity' . $eol; print '</td>' . $eol; print '<td class="khxc_regtable" style="width: 60%">' . $eol; print 'Details' . $eol; print '</td>' . $eol; print '<td class="khxc_regtable" style="width: 10%; text-align: right">' . $eol; print 'Net <br />Amount' . $eol; print '</td>' . $eol; print '<td class="khxc_regtable" style="width: 10%; text-align: right">' . $eol; print $this->xhtml_encode($eutaxname) . '<br />Rate' . $eol; print '</td>' . $eol; print '<td class="khxc_regtable" style="width: 10%; text-align: right">' . $eol; print $this->xhtml_encode($eutaxname) . $eol; print '</td>' . $eol; print '</tr>' . $eol; foreach ($order['items'] as $num => $item) { // +-- // | Print our cell opener and the item information. // +-- if ($this->debug) {$this->debugger("ordersummary: Order Items Info " . print_r($item,1)) ;} print '<tr class="khxc_regtable">' . $eol; // Print the Quntity. print '<td class="khxc_regtable" style="width: 10%">' . $eol; print $this->xhtml_encode($item['itemquan']) . $eol; print '</td>' . $eol; // Print Product Details print '<td class="khxc_regtable" style="width: 60%">' . $eol; if ($shownums) {$name = $item['itemnum'] . ' - ' . $item['itemname'];} else {$name = $item['itemname'];} $name = $this->xhtml_encode($name); print '<p>' . $name . '</p>' . $eol; if (!(empty($item['itemopts']))) { print '<p>' . $this->xhtml_encode($item['itemopts']) . '</p>'; } // End of if statement. print '</td>' . $eol; // Print the net amount print '<td class="khxc_regtable" style="width: 10%; text-align: right">' . $eol; $amount_array = array('amount' => $item['ordertotal'], 'entrycurr' => $currapp, 'returncurr' => $currshow, 'formatwsym' => 1); $subtotal = $this->include_namespace($app,'getprice',$amount_array); if ($this->debug) {$this->debugger("ordersummary: EU Tax Invoice Item Price .'{$item['cartdata']['subtotal']}' Item EU Tax .'{$item['cartdata']['subtotaleutax']}'") ;} if ($manageeutax == 'excleutax') { // The prices exclude EU Tax. $amount_array = array('amount' => $item['cartdata']['subtotal'], 'entrycurr' => $currapp, 'returncurr' => $currshow, 'formatwsym' => 1); $subtotal = $this->include_namespace($app,'getprice',$amount_array); $amount_array = array('amount' => $item['cartdata']['subtotaleutax'] - $item['cartdata']['subtotal'], 'entrycurr' => $currapp, 'returncurr' => $currshow, 'formatwsym' => 1); $subtotaleutax = $this->include_namespace($app,'getprice',$amount_array); if ($item['cartdata']['subtotal'] > 0) { $taxrate = ((($item['cartdata']['subtotaleutax'] / $item['cartdata']['subtotal']) -1) * 100); $taxrate = round($taxrate,1); } else { $taxrate = 0; } } else if ($manageeutax == 'incleutax') { // The prices include EU Tax. $amount_array = array('amount' => $item['cartdata']['subtotaleutax'], 'entrycurr' => $currapp, 'returncurr' => $currshow, 'formatwsym' => 1); $subtotal = $this->include_namespace($app,'getprice',$amount_array); $amount_array = array('amount' => $item['cartdata']['subtotal'] - $item['cartdata']['subtotaleutax'], 'entrycurr' => $currapp, 'returncurr' => $currshow, 'formatwsym' => 1); $subtotaleutax = $this->include_namespace($app,'getprice',$amount_array); if ($item['cartdata']['subtotaleutax'] == 0) { $taxrate = '0'; } else { $taxrate = ((($item['cartdata']['subtotal'] / $item['cartdata']['subtotaleutax']) -1) * 100); $taxrate = round($taxrate,1); } // End of if statement. }// End of if statement. $subtotal = $this->xhtml_encode($subtotal); print '<p>' . $subtotal . '</p>' . $eol; $subtotalrec = ''; $subtotalreceutax = ''; $taxraterec = ''; if ($item['recurtotal'] > 0) { $amount_array = array('amount' => $item['recurtotal'], 'entrycurr' => $currapp, 'returncurr' => $currshow, 'formatwsym' => 1); $subtotalrec = $this->include_namespace($app,'getprice',$amount_array); $subtotalrec = $this->xhtml_encode($subtotalrec); if ($manageeutax == 'excleutax') { // The prices exclude EU Tax. $amount_array = array('amount' => $item['cartdata']['subtotalrec'], 'entrycurr' => $currapp, 'returncurr' => $currshow, 'formatwsym' => 1); $subtotalrec = $this->include_namespace($app,'getprice',$amount_array); $amount_array = array('amount' => $item['cartdata']['subtotalreceutax'] - $item['cartdata']['subtotalrec'], 'entrycurr' => $currapp, 'returncurr' => $currshow, 'formatwsym' => 1); $subtotalreceutax = $this->include_namespace($app,'getprice',$amount_array); $taxraterec = ((($item['cartdata']['subtotalreceutax'] / $item['cartdata']['subtotalrec']) -1) * 100); $taxraterec = round($taxraterec,1); } else if ($manageeutax == 'incleutax') { // The prices include EU Tax. $amount_array = array('amount' => $item['cartdata']['subtotalreceutax'], 'entrycurr' => $currapp, 'returncurr' => $currshow, 'formatwsym' => 1); $subtotalrec = $this->include_namespace($app,'getprice',$amount_array); $amount_array = array('amount' => $item['cartdata']['subtotalrec'] - $item['cartdata']['subtotalreceutax'], 'entrycurr' => $currapp, 'returncurr' => $currshow, 'formatwsym' => 1); $subtotalreceutax = $this->include_namespace($app,'getprice',$amount_array); if ($item['cartdata']['subtotaleutax'] == 0) { $taxrate = '0'; } else { $taxraterec = ((($item['cartdata']['subtotalrec'] / $item['cartdata']['subtotalreceutax']) -1) * 100); $taxraterec = round($taxraterec,1); } // End of if statement. } // End of if statement. print '<p>Recur: ' . $subtotalrec . '</p>' . $eol; } // End of if statement. print '</td>' . $eol; // Print Vat Rate print '<td class="khxc_regtable" style="width: 10%; text-align: right">' . $eol; if (empty($item['cartdata']['eutaxrefunded'])) { print '<p>' . $this->xhtml_encode($taxrate . '%') . '</p>' . $eol; if (!empty($taxraterec)) { print '<p>Recur: ' . $this->xhtml_encode($taxraterec . '%') . '</p>' . $eol; } } print '</td>' . $eol; // Print Vat Amount print '<td class="khxc_regtable" style="width: 10%; text-align: right">' . $eol; if (empty($item['cartdata']['eutaxrefunded'])) { print '<p>' . $this->xhtml_encode($subtotaleutax) . '</p>' . $eol; if (!empty($subtotalreceutax)) { print '<p>Recur: ' . $this->xhtml_encode($subtotalreceutax) . '</p>' . $eol; } } print '</td>' . $eol; print '</tr>' . $eol; } // End of foreach statement. print '</table>' . $eol . $eol; } // End of if statement. // +-- // | Print the order totals. // +-- print '<div class="khxc_regtablehead">Order Totals</div>' . $eol . $eol; print '<table id="ORDERTOTALS" class="khxc_regtable">' . $eol . $eol; foreach ($totals as $text => $amount) { $amount_array = array('amount' => $amount, 'entrycurr' => $currapp, 'returncurr' => $currshow, 'formatwsym' => 1); $xtext = $this->xhtml_encode($text); $amount = $this->include_namespace($app,'getprice',$amount_array); $amount = $this->xhtml_encode($amount); if (($text == 'Total') || ($text == 'Recurring Charge Total')) { print '<tr class="khxc_regtable">' . $eol; print '<td class="khxc_regtable" style="width: 90%"><strong>' . $xtext . '</strong></td>' . $eol; print '<td class="khxc_regtable" style="width: 10%; text-align: right"><strong>' . $amount . '</strong></td>' . $eol; print '</tr>' . $eol; } else { print '<tr class="khxc_regtable">' . $eol; print '<td class="khxc_regtable" style="width: 90%">' . $xtext . '</td>' . $eol; print '<td class="khxc_regtable" style="width: 10%; text-align: right">' . $amount . '</td>' . $eol; print '</tr>' . $eol; } // End of if statement. } // End of foreach statement. print '</table>' . $eol . $eol; if (($manageeutax == 'incleutax') && ($euptaxinvoice)) { // +-- // | Print the Vat Information. // +-- print '<div class="khxc_regtablehead">' . $eutaxname . ' Information</div>' . $eol . $eol; print '<table id="TAXINFO" class="khxc_regtable">' . $eol . $eol; $eutaxtotal = $order['order']['taxctotal'] - $order['order']['eutaxrefundtotal']; $eusubtotal = $order['order']['ordertotal'] - $eutaxtotal; $amount_array = array('amount' => $eusubtotal, 'entrycurr' => $currapp, 'returncurr' => $currshow, 'formatwsym' => 1); $eusubamount = $this->include_namespace($app,'getprice',$amount_array); $eusubamount = $this->xhtml_encode($eusubamount); $amount_array = array('amount' => $eutaxtotal, 'entrycurr' => $currapp, 'returncurr' => $currshow, 'formatwsym' => 1); $eutaxtotal = $this->include_namespace($app,'getprice',$amount_array); $eutaxtotal = $this->xhtml_encode($eutaxtotal); $amount_array = array('amount' => $order['order']['ordertotal'], 'entrycurr' => $currapp, 'returncurr' => $currshow, 'formatwsym' => 1); $eutotal = $this->include_namespace($app,'getprice',$amount_array); $eutotal = $this->xhtml_encode($eutotal); print '<tr class="khxc_regtable">' . $eol; print '<td class="khxc_regtable"><strong>Ex ' . $eutaxname . ' : ' . $eusubamount . '</strong></td>' . $eol; print '<td class="khxc_regtable"><strong>' . $eutaxname . ' : ' . $eutaxtotal . '</strong></td>' . $eol; print '<td class="khxc_regtable"><strong>Total: ' . $eutotal . '</strong></td>' . $eol; if ((!(empty($order['order']['recurtotal']))) && ($order['order']['recurtotal'] > 0)) { $eutaxtotal = $order['order']['recurtotaleutax'] - $order['order']['recurtotaleutaxrefund']; $eusubtotal = $order['order']['recurtotal'] - $order['order']['recurtotaleutax']; $amount_array = array('amount' => $eusubtotal, 'entrycurr' => $currapp, 'returncurr' => $currshow, 'formatwsym' => 1); $eusubamount = $this->include_namespace($app,'getprice',$amount_array); $eusubamount = $this->xhtml_encode($eusubamount); $amount_array = array('amount' => $eutaxtotal, 'entrycurr' => $currapp, 'returncurr' => $currshow, 'formatwsym' => 1); $eutaxtotal = $this->include_namespace($app,'getprice',$amount_array); $eutaxtotal = $this->xhtml_encode($eutaxtotal); $amount_array = array('amount' => $order['order']['recurtotal'] - $order['order']['recurtotaleutaxrefund'], 'entrycurr' => $currapp, 'returncurr' => $currshow, 'formatwsym' => 1); $eutotal = $this->include_namespace($app,'getprice',$amount_array); $eutotal = $this->xhtml_encode($eutotal); print '<tr class="khxc_regtable">' . $eol; print '<td class="khxc_regtable"><strong>Recurring Ex ' . $eutaxname . ' : ' . $eusubamount . '</strong></td>' . $eol; print '<td class="khxc_regtable"><strong>' . $eutaxname . ' : ' . $eutaxtotal . '</strong></td>' . $eol; print '<td class="khxc_regtable"><strong>Total: ' . $eutotal . '</strong></td>' . $eol; } // End of if statement. print '</tr>' . $eol; print '</table>' . $eol . $eol; } // End of if statement. // +-- // | Print our summary information. // +-- print '<div class="khxc_regtablehead">Order Information</div>' . $eol . $eol; print '<table id="ORDERNUMTIME" class="khxc_regtable">' . $eol . $eol; $id = $this->xhtml_encode($order['order']['id']); $status = $order['order']['status']; if (!(empty($order['display']['orderstatus'][$status]))) {$status = $order['display']['orderstatus'][$status];} $status = $this->xhtml_encode($status); $date = @date($dtformat,$order['order']['epochorder']); $date = $this->xhtml_encode($date); $ipaddress = $this->xhtml_encode($order['order']['ipaddress']); $netbanxref = $this->xhtml_encode($order['order']['netbanxref']); print '<tr class="khxc_regtable">' . $eol; print '<td class="khxc_regtable" style="width: 50%"><p class="strong">Order Number</p><p>' . $id . '</p></td>' . $eol; print '<td class="khxc_regtable" style="width: 50%"><p class="strong">Order Status</p><p>' . $status . '</p></td>' . $eol; print '</tr>' . $eol; print '<tr class="khxc_regtable">' . $eol; print '<td class="khxc_regtable" style="width: 50%"><p class="strong">Order Date and Time</p><p>' . $date . '</p></td>' . $eol; print '<td class="khxc_regtable" style="width: 50%"><p class="strong">IP Address</p><p>' . $ipaddress . '</p></td>' . $eol; print '</tr>' . $eol; if (!(empty($netbanxref))) { print '<tr class="khxc_regtable">' . $eol; print '<td class="khxc_regtable" style="width: 50%"><p class="strong">NetBanx Ref</p><p>' . $netbanxref . '</p></td>' . $eol; print '<td class="khxc_regtable" style="width: 50%"> </td>' . $eol; print '</tr>' . $eol; } print '</table>' . $eol . $eol; // +-- // | Print the billing information. // +-- print '<div class="khxc_regtablehead">Invoicing Information</div>' . $eol . $eol; print '<table id="BILLINFO" class="khxc_regtable">' . $eol . $eol; $address = array('fname' => $order['order']['fname'], 'lname' => $order['order']['lname'], 'company' => $order['order']['company'], 'addone' => $order['order']['addone'], 'addtwo' => $order['order']['addtwo'], 'city' => $order['order']['city'], 'stateprov' => $order['order']['stateprov'], 'country' => $order['order']['country'], 'postalcode' => $order['order']['postalcode']); $address = $this->include_namespace($app,'getaddress',array('address' => $address, 'format' => 'XHTML')); print '<tr class="khxc_regtable">' . $eol; print '<td class="khxc_regtable" style="width: 50%"><p class="strong">Invoice Address</p><p>' . $address . '</p></td>' . $eol; print '<td class="khxc_regtable" style="width: 50%">' . $eol; if (!(empty($order['order']['email']))) { $email = $this->xhtml_encode($order['order']['email']); print '<p class="strong">Email Address</p><p>' . $email . '</p>' . $eol; } // End of if statement. if (!(empty($order['order']['phone']))) { $phone = $this->xhtml_encode($order['order']['phone']); print '<p class="strong">Telephone Number</p><p>' . $phone . '</p>' . $eol; } // End of if statement. if (!(empty($order['order']['fax']))) { $fax = $this->xhtml_encode($order['order']['fax']); print '<p class="strong">Fax Number</p><p>' . $fax . '</p>' . $eol; } // End of if statement. if (!(empty($order['order']['eutaxno']))) { $email = $this->xhtml_encode($order['order']['eutaxno']); print '<p class="strong">EU Tax Reg No.</p><p>' . $order['order']['eutaxno'] . '</p>' . $eol; } // End of if statement. print '</td>' . $eol; print '</tr>' . $eol; print '</table>' . $eol . $eol; // +-- // | Create our shipping groups. We do this because we group items based on // | shipping address. // +-- $ship_array = array('NOTSHIPPED' => array()); $ship_addys = array(); $ship_count = 0; foreach ($order['items'] as $num => $item) { if ($item['shipstatus'] == 'N') { $ship_array['NOTSHIPPED'][] = $item['id']; } else { $ship_addy = array('fname' => $item['fname'], 'lname' => $item['lname'], 'company' => $item['company'], 'addone' => $item['addone'], 'addtwo' => $item['addtwo'], 'city' => $item['city'], 'stateprov' => $item['stateprov'], 'country' => $item['country'], 'postalcode' => $item['postalcode']); $ship_hash = md5(serialize($ship_addy)); $ship_addys[$ship_hash] = $ship_addy; $ship_array[$ship_hash][] = $item['id']; $ship_count++; } // End of foreach statement. } // End of foreach statement. // +-- // | Print our items. // +-- print '<div class="khxc_regtablehead">Items</div>' . $eol . $eol; print '<table id="ORDERITEMS" class="khxc_regtable">' . $eol . $eol; foreach ($ship_array as $ship_type => $ship_items) { if (!(empty($ship_items))) { // +-- // | Print a row for the ship group. // +-- print '<tr class="khxc_regtable">' . $eol; // +-- // | Print our item information cell. // +-- if ($ship_type != 'NOTSHIPPED') {print '<td class="khxc_regtable" style="width: 50%">' . $eol;} elseif ($ship_count == 0) {print '<td class="khxc_regtable" style="width: 100%">' . $eol;} else {print '<td class="khxc_regtable" style="width: 100%" colspan="2">' . $eol;} foreach ($ship_items as $key_num => $item_num) { foreach ($order['items'] as $num => $item) { if ($item_num == $item['id']) { // +-- // | Print the item name. // +-- if ($shownums) {$name = $item['itemnum'] . ' - ' . $item['itemname'];} else {$name = $item['itemname'];} $name = $this->xhtml_encode($name); $quan = $this->xhtml_encode($item['itemquan']); print '<p class="strong">' . $name . '</p>' . $eol; // +-- // | Print options. // +-- if (!(empty($item['cartdata']['optdisp']))) { $xodisp = ''; foreach ($item['cartdata']['optdisp'] as $oname => $ovalue) { if (!(empty($ovalue))) { $oname = $this->xhtml_encode($oname); $ovalue = $this->xhtml_encode($ovalue); $xodisp .= $oname . ': ' . $ovalue; if ($optlb) {$xodisp .= '<br />';} else {$xodisp .= '; ';} } // End of if statement. } // End of foreach statement. $xodisp = preg_replace('/\; $/','',$xodisp); $xodisp = preg_replace('/\<br \/\>$/','',$xodisp); if (!(empty($xodisp))) {print '<p>' . $xodisp . '</p>';} } // End of if statement. // +-- // | Print ship status. // +-- if ($item['shipstatus'] != 'N') { $status = $order['display']['shipstatus'][$item['shipstatus']]; print '<p>Delivery Method: ' . $this->xhtml_encode($item['shipmethod']); if (!(empty($status))) {print ' (' . $this->xhtml_encode($status) . ')';} print '</p>' . $eol; } // End of if statement. // +-- // | Print download information. // +-- if (!(empty($item['cartdata']['dlfiles']))) { if (empty($ordercompl)) { print '<p>Digital download access information will be sent via email for this item when this order has completed processing.</p>' . $eol; } else { print '<p>Digital download access information has been sent via email for this item.</p>' . $eol; } // End of if statement. } // End of if statement. // +-- // | Print quantity and amounts. // +-- $amount_array = array('amount' => $item['ordertotal'], 'entrycurr' => $currapp, 'returncurr' => $currshow, 'formatwsym' => 1); $subtotal = $this->include_namespace($app,'getprice',$amount_array); $subtotal = $this->xhtml_encode($subtotal . ' ' . $eutax_text['first']); print '<p>Quantity: ' . $quan; print ' Subtotal: ' . $subtotal; if ($item['recurtotal'] > 0) { $amount_array = array('amount' => $item['recurtotal'], 'entrycurr' => $currapp, 'returncurr' => $currshow, 'formatwsym' => 1); $subtotalrec = $this->include_namespace($app,'getprice',$amount_array); $subtotalrec = $this->xhtml_encode($subtotalrec . ' ' . $eutax_text['first']); print ' Recurring Charge: ' . $subtotalrec; } // End of if statement. print '</p>' . $eol . $eol; } // End of if statement. } // End of foreach statement. } // End of foreach statement. print '</td>' . $eol; // +-- // | Print our delivery address cell if needed. // +-- if ($ship_type != 'NOTSHIPPED') { print '<td class="khxc_regtable" style="width: 50%">' . $eol; print '<p class="strong">Delivery Address</p>' . $eol; $address = $this->include_namespace($app,'getaddress',array('address' => $ship_addys[$ship_type], 'format' => 'XHTML')); print '<p>' . $address . '</p>' . $eol; print '</td>' . $eol; } // End of if statement. print '</tr>' . $eol; } // End of if statement. } // End of foreach statement. print '</table>' . $eol . $eol; // +-- // | Handle custom fields. We do this by working with the 'custom' key in // | the order array. // +-- if (!(empty($order['custom']))) { // +-- // | See how many fields for which we have data to print. If we don't // | have any we skip displaying this section. // +-- $count = 0; foreach ($order['custom'] as $ordfield => $name) { if (!(empty($order['order'][$ordfield]))) {$count++;} } // End of if statement. if (!(empty($count))) { print '<div class="khxc_regtablehead">Other Information</div>' . $eol . $eol; print '<table id="OTHERINFO" class="khxc_regtable">' . $eol . $eol; $field_count = 1; foreach ($order['custom'] as $ordfield => $name) { $name = $this->xhtml_encode($name); $ordfield = $order['order'][$ordfield]; if (!(empty($ordfield))) { if (empty($ordfield)) {$ordfield = 'Not Entered';} if ($field_count == 1) {print '<tr class="khxc_regtable">' . $eol;} print '<td class="khxc_regtable" style="width: 50%"><p class="strong">' . $name . '</p><p>' . $ordfield . '</p></td>' . $eol; if ($field_count == 2) {print '</tr>' . $eol; $field_count = 1;} else {$field_count = 2;} } // End of if statement. } // End of foreach statement. if ($field_count == 2) { print '<td class="khxc_regtable" style="width: 50%"> </td>' . $eol; print '</tr>' . $eol; } // End of if statement. print '</table>' . $eol . $eol; } // End of if statement. } // End of if statement. // +-- // | Handle comments. // +-- if (!(empty($order['order']['commentsext']))) { print '<div class="khxc_regtablehead">Order Comments</div>' . $eol . $eol; print '<table id="ORDERCOMMENTS" class="khxc_regtable">' . $eol; print '<tr class="khxc_regtable"><td class="khxc_regtable" style="width: 100%">' . $eol; print '<p class="strong">Comments</p>' . $eol . $eol; print '<p>' . $this->xhtml_encode($order['order']['commentsext']) . '</p>' . $eol; print '</td></tr>' . $eol; print '</table>' . $eol . $eol; } // End of if statement. } // End of if statement. ?>
Offline
Hi John,
I don't think I have the right environment setup in dreamweaver to edit this as WYSIWYG. How do the professionals do it I wonder?
Regards Steven
Offline