Page 4 of 4 FirstFirst ... 234
Results 31 to 34 of 34
  1. #31
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Customizing confirmation e-mail

    Quote Originally Posted by gjh42 View Post
    The documentation and discussion I read on empty() tended to agree that this was a good and concise way to do the job, as it wouldn't throw an error in any case, and if it is either empty or not set the code using it should be bypassed.

    The wiki example comment about setting observer instantiation to after its caller class was instantiated led me to think that this was necessary for the notifier to function.
    "Note: 90 has been chosen as the offset since the observer needs to attach to the $SESSION['cart'] class, which is instantiated at offset 80."
    Thinking about it, it would seem that once the order class was instantiated, the observer would need to be instantiated before the order processing reached a relevant notifier point. Would there be a problem with instantiating the observer before the order is instantiated? It sounds like you are saying this would be okay, in which case, using a breakpoint like 160 would have the observer ready to act when order starts processing.

    The discussion about saving the tag info between page loads is concerning, though one of the debug lines I put in should add a snippet to the attributes content any time the update is run. This content persists until the order confirmation e-mail is sent. I could see if there is an issue with maintaining the custom content inside the update until adding it later in the process.
    Right, so !empty on a variable that is declared as an array() will allow processing to the next "area", but performing foreach on a non-array will cause an error... The intent of the "check" is to ensure that what is to follow can be properly processed where the important part of that internal function is that there are or are not values to be processed AND that the data type is the right style.

    To try to help further, seeing as the other questions asked have been missed...

    Please list the filenames including extension inside the includes/auto_loaders directory.

    Please provide the entirety of code in the function create_add_products that is within the includes/classes/order.php file. Then I recommend a search for 'function create_add_products' from the developers toolkit. Then also a search for each of the notifiers that are reportedly being observed. Right now there is insufficient information to be able to diagnose why the code that has appeared to be properly written is not being accessed as expected.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  2. #32
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Customizing confirmation e-mail

    I support the idea of being thorough in general, though when the array setup is just a few lines above in the same file which nobody else can edit, I feel safe in a shortcut.

    config.orderTagbuilder.php is the only non-stock file in /autoloaders. The others are "config.canonical.php" "config.core.php" "index.html" "paypal_ipn.core.php", and /autoloaders/overrides has only index.html.

    There are no edits of any kind inside create_add_products; the only edits I had to order.php were in function send_order_email, in the admin e-mail subject creation area as posted above, after the confirmation e-mail is sent. [php]
    function create_add_products($zf_insert_id, $zf_mode = false) {
    global $db, $currencies, $order_total_modules, $order_totals, $zco_notifier;

    // initialized for the email confirmation

    $this->products_ordered = '';
    $this->products_ordered_html = '';
    $this->subtotal = 0;
    $this->total_tax = 0;

    // lowstock email report
    $this->email_low_stock='';

    for ($i=0, $n=sizeof($this->products); $i<$n; $i++) {
    $custom_insertable_text = '';
    // Stock Update - Joao Correia
    if (STOCK_LIMITED == 'true') {
    if (DOWNLOAD_ENABLED == 'true') {
    $stock_query_raw = "select p.products_quantity, pad.products_attributes_filename, p.product_is_always_free_shipping
    from " . TABLE_PRODUCTS . " p
    left join " . TABLE_PRODUCTS_ATTRIBUTES . " pa
    on p.products_id=pa.products_id
    left join " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD . " pad
    on pa.products_attributes_id=pad.products_attributes_id
    WHERE p.products_id = '" . zen_get_prid($this->products[$i]['id']) . "'";

    // Will work with only one option for downloadable products
    // otherwise, we have to build the query dynamically with a loop
    $products_attributes = $this->products[$i]['attributes'];
    if (is_array($products_attributes)) {
    $stock_query_raw .= " AND pa.options_id = '" . $products_attributes[0]['option_id'] . "' AND pa.options_values_id = '" . $products_attributes[0]['value_id'] . "'";
    }
    $stock_values = $db->Execute($stock_query_raw);
    } else {
    $stock_values = $db->Execute("select * from " . TABLE_PRODUCTS . " where products_id = '" . zen_get_prid($this->products[$i]['id']) . "'");
    }

    $zco_notifier->notify('NOTIFY_ORDER_PROCESSING_STOCK_DECREMENT_BEGIN');

    if ($stock_values->RecordCount() > 0) {
    // do not decrement quantities if products_attributes_filename exists
    if ((DOWNLOAD_ENABLED != 'true') || $stock_values->fields['product_is_always_free_shipping'] == 2 || (!$stock_values->fields['products_attributes_filename']) ) {
    $stock_left = $stock_values->fields['products_quantity'] - $this->products[$i]['qty'];
    $this->products[$i]['stock_reduce'] = $this->products[$i]['qty'];
    } else {
    $stock_left = $stock_values->fields['products_quantity'];
    }

    // $this->products[$i]['stock_value'] = $stock_values->fields['products_quantity'];

    $db->Execute("update " . TABLE_PRODUCTS . " set products_quantity = '" . $stock_left . "' where products_id = '" . zen_get_prid($this->products[$i]['id']) . "'");
    // if ( ($stock_left < 1) && (STOCK_ALLOW_CHECKOUT == 'false') ) {
    if ($stock_left <= 0) {
    // only set status to off when not displaying sold out
    if (SHOW_PRODUCTS_SOLD_OUT == '0') {
    $db->Execute("update " . TABLE_PRODUCTS . " set products_status = 0 where products_id = '" . zen_get_prid($this->products[$i]['id']) . "'");
    }
    }

    // for low stock email
    if ( $stock_left <= STOCK_REORDER_LEVEL ) {
    // WebMakers.com Added: add to low stock email
    $this->email_low_stock .= 'ID# ' . zen_get_prid($this->products[$i]['id']) . "\t\t" . $this->products[$i]['model'] . "\t\t" . $this->products[$i]['name'] . "\t\t" . ' Qty Left: ' . $stock_left . "\n";
    }
    }
    }

    // Update products_ordered (for bestsellers list)
    // $db->Execute("update " . TABLE_PRODUCTS . " set products_ordered = products_ordered + " . sprintf('%d', $order->products[$i]['qty']) . " where products_id = '" . zen_get_prid($order->products[$i]['id']) . "'");
    $db->Execute("update " . TABLE_PRODUCTS . " set products_ordered = products_ordered + " . sprintf('%f', $this->products[$i]['qty']) . " where products_id = '" . zen_get_prid($this->products[$i]['id']) . "'");

    $zco_notifier->notify('NOTIFY_ORDER_PROCESSING_STOCK_DECREMENT_END');

    $sql_data_array = array('orders_id' => $zf_insert_id,
    'products_id' => zen_get_prid($this->products[$i]['id']),
    'products_model' => $this->products[$i]['model'],
    'products_name' => $this->products[$i]['name'],
    'products_price' => $this->products[$i]['price'],
    'final_price' => $this->products[$i]['final_price'],
    'onetime_charges' => $this->products[$i]['onetime_charges'],
    'products_tax' => $this->products[$i]['tax'],
    'products_quantity' => $this->products[$i]['qty'],
    'products_priced_by_attribute' => $this->products[$i]['products_priced_by_attribute'],
    'product_is_free' => $this->products[$i]['product_is_free'],
    'products_discount_type' => $this->products[$i]['products_discount_type'],
    'products_discount_type_from' => $this->products[$i]['products_discount_type_from'],
    'products_prid' => $this->products[$i]['id']);
    zen_db_perform(TABLE_ORDERS_PRODUCTS, $sql_data_array);

    $order_products_id = $db->Insert_ID();

    $zco_notifier->notify('NOTIFY_ORDER_DURING_CREATE_ADDED_PRODUCT_LINE_ITEM', array_merge(array('orders_products_id' => $order_products_id), $sql_data_array));

    $zco_notifier->notify('NOTIFY_ORDER_PROCESSING_CREDIT_ACCOUNT_UPDATE_BEGIN');
    $order_total_modules->update_credit_account($i);//ICW ADDED FOR CREDIT CLASS SYSTEM

    $zco_notifier->notify('NOTIFY_ORDER_PROCESSING_ATTRIBUTES_BEGIN');

    //------ bof: insert customer-chosen options to order--------
    $attributes_exist = '0';
    $this->products_ordered_attributes = '';
    if (isset($this->products[$i]['attributes'])) {
    $attributes_exist = '1';
    for ($j=0, $n2=sizeof($this->products[$i]['attributes']); $j<$n2; $j++) {
    if (DOWNLOAD_ENABLED == 'true') {
    $attributes_query = "select popt.products_options_name, poval.products_options_values_name,
    pa.options_values_price, pa.price_prefix,
    pa.product_attribute_is_free, pa.products_attributes_weight, pa.products_attributes_weight_prefix,
    pa.attributes_discounted, pa.attributes_price_base_included, pa.attributes_price_onetime,
    pa.attributes_price_factor, pa.attributes_price_factor_offset,
    pa.attributes_price_factor_onetime, pa.attributes_price_factor_onetime_offset,
    pa.attributes_qty_prices, pa.attributes_qty_prices_onetime,
    pa.attributes_price_words, pa.attributes_price_words_free,
    pa.attributes_price_letters, pa.attributes_price_letters_free,
    pad.products_attributes_maxdays, pad.products_attributes_maxcount, pad.products_attributes_filename
    from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " .
    TABLE_PRODUCTS_ATTRIBUTES . " pa
    left join " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD . " pad
    on pa.products_attributes_id=pad.products_attributes_id
    where pa.products_id = '" . zen_db_input($this->products[$i]['id']) . "'
    and pa.options_id = '" . $this->products[$i]['attributes'][$j]['option_id'] . "'
    and pa.options_id = popt.products_options_id
    and pa.options_values_id = '" . $this->products[$i]['attributes'][$j]['value_id'] . "'
    and pa.options_values_id = poval.products_options_values_id
    and popt.language_id = '" . $_SESSION['languages_id'] . "'
    and poval.language_id = '" . $_SESSION['languages_id'] . "'";

    $attributes_values = $db->Execute($attributes_query);
    } else {
    $attributes_values = $db->Execute("select popt.products_options_name, poval.products_options_values_name,
    pa.options_values_price, pa.price_prefix,
    pa.product_attribute_is_free, pa.products_attributes_weight, pa.products_attributes_weight_prefix,
    pa.attributes_discounted, pa.attributes_price_base_included, pa.attributes_price_onetime,
    pa.attributes_price_factor, pa.attributes_price_factor_offset,
    pa.attributes_price_factor_onetime, pa.attributes_price_factor_onetime_offset,
    pa.attributes_qty_prices, pa.attributes_qty_prices_onetime,
    pa.attributes_price_words, pa.attributes_price_words_free,
    pa.attributes_price_letters, pa.attributes_price_letters_free
    from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa
    where pa.products_id = '" . $this->products[$i]['id'] . "' and pa.options_id = '" . (int)$this->products[$i]['attributes'][$j]['option_id'] . "' and pa.options_id = popt.products_options_id and pa.options_values_id = '" . (int)$this->products[$i]['attributes'][$j]['value_id'] . "' and pa.options_values_id = poval.products_options_values_id and popt.language_id = '" . $_SESSION['languages_id'] . "' and poval.language_id = '" . $_SESSION['languages_id'] . "'");
    }

    //clr 030714 update insert query. changing to use values form $order->products for products_options_values.
    $sql_data_array = array('orders_id' => $zf_insert_id,
    'orders_products_id' => $order_products_id,
    'products_options' => $attributes_values->fields['products_options_name'],

    // 'products_options_values' => $attributes_values->fields['products_options_values_name'],
    'products_options_values' => $this->products[$i]['attributes'][$j]['value'],
    'options_values_price' => $attributes_values->fields['options_values_price'],
    'price_prefix' => $attributes_values->fields['price_prefix'],
    'product_attribute_is_free' => $attributes_values->fields['product_attribute_is_free'],
    'products_attributes_weight' => $attributes_values->fields['products_attributes_weight'],
    'products_attributes_weight_prefix' => $attributes_values->fields['products_attributes_weight_prefix'],
    'attributes_discounted' => $attributes_values->fields['attributes_discounted'],
    'attributes_price_base_included' => $attributes_values->fields['attributes_price_base_included'],
    'attributes_price_onetime' => $attributes_values->fields['attributes_price_onetime'],
    'attributes_price_factor' => $attributes_values->fields['attributes_price_factor'],
    'attributes_price_factor_offset' => $attributes_values->fields['attributes_price_factor_offset'],
    'attributes_price_factor_onetime' => $attributes_values->fields['attributes_price_factor_onetime'],
    'attributes_price_factor_onetime_offset' => $attributes_values->fields['attributes_price_factor_onetime_offset'],
    'attributes_qty_prices' => $attributes_values->fields['attributes_qty_prices'],
    'attributes_qty_prices_onetime' => $attributes_values->fields['attributes_qty_prices_onetime'],
    'attributes_price_words' => $attributes_values->fields['attributes_price_words'],
    'attributes_price_words_free' => $attributes_values->fields['attributes_price_words_free'],
    'attributes_price_letters' => $attributes_values->fields['attributes_price_letters'],
    'attributes_price_letters_free' => $attributes_values->fields['attributes_price_letters_free'],
    'products_options_id' => (int)$this->products[$i]['attributes'][$j]['option_id'],
    'products_options_values_id' => (int)$this->products[$i]['attributes'][$j]['value_id'],
    'products_prid' => $this->products[$i]['id']
    );


    zen_db_perform(TABLE_ORDERS_PRODUCTS_ATTRIBUTES, $sql_data_array);

    $zco_notifier->notify('NOTIFY_ORDER_DURING_CREATE_ADDED_ATTRIBUTE_LINE_ITEM', $sql_data_array);

    if ((DOWNLOAD_ENABLED == 'true') && isset($attributes_values->fields['products_attributes_filename']) && zen_not_null($attributes_values->fields['products_attributes_filename'])) {
    $sql_data_array = array('orders_id' => $zf_insert_id,
    'orders_products_id' => $order_products_id,
    'orders_products_filename' => $attributes_values->fields['products_attributes_filename'],
    'download_maxdays' => $attributes_values->fields['products_attributes_maxdays'],
    'download_count' => $attributes_values->fields['products_attributes_maxcount'],
    'products_prid' => $this->products[$i]['id']
    );

    zen_db_perform(TABLE_ORDERS_PRODUCTS_DOWNLOAD, $sql_data_array);

    $zco_notifier->notify('NOTIFY_ORDER_DURING_CREATE_ADDED_ATTRIBUTE_DOWNLOAD_LINE_ITEM', $sql_data_array);
    }
    //clr 030714 changing to use values from $orders->products and adding call to zen_decode_specialchars()
    // $this->products_ordered_attributes .= "\n\t" . $attributes_values->fields['products_options_name'] . ' ' . $attributes_values->fields['products_options_values_name'];
    $this->products_ordered_attributes .= "\n\t" . $attributes_values->fields['products_options_name'] . ': ' . zen_decode_specialchars($this->products[$i]['attributes'][$j]['value']);
    }
    }
    //------eof: insert customer-chosen options ----

    $zco_notifier->notify('NOTIFY_ORDER_DURING_CREATE_ADD_PRODUCTS', $custom_insertable_text);

    /* START: ADD MY CUSTOM DETAILS
    * 1. calculate/prepare custom information to be added to this product entry in order-confirmation.
    * 2. Add that data to the $this->products_ordered_attributes variable, using this sort of format:
    * $this->products_ordered_attributes .= {INSERT CUSTOM INFORMATION HERE};
    */

    $this->products_ordered_attributes .= ''; // $custom_insertable_text;

    /* END: ADD MY CUSTOM DETAILS */

    // update totals counters
    $this->total_weight += ($this->products[$i]['qty'] * $this->products[$i]['weight']);
    $this->total_tax += zen_calculate_tax($total_products_price, $products_tax) * $this->products[$i]['qty'];
    $this->total_cost += $total_products_price;

    $zco_notifier->notify('NOTIFY_ORDER_PROCESSING_ONE_TIME_CHARGES_BEGIN');

    // build output for email notification
    $this->products_ordered .= $this->products[$i]['qty'] . ' x ' . $this->products[$i]['name'] . ($this->products[$i]['model'] != '' ? ' (' . $this->products[$i]['model'] . ') ' : '') . ' = ' .
    $currencies->display_price($this->products[$i]['final_price'], $this->products[$i]['tax'], $this->products[$i]['qty']) .
    ($this->products[$i]['onetime_charges'] !=0 ? "\n" . TEXT_ONETIME_CHARGES_EMAIL . $currencies->display_price($this->products[$i]['onetime_charges'], $this->products[$i]['tax'], 1) : '') .
    $this->products_ordered_attributes . "\n";
    $this->products_ordered_html .=
    '<tr>' . "\n" .
    '<td class="product-details" align="right" valign="top" width="30">' . $this->products[$i]['qty'] . '&nbsp;x</td>' . "\n" .
    '<td class="product-details" valign="top">' . nl2br($this->products[$i]['name']) . ($this->products[$i]['model'] != '' ? ' (' . nl2br($this->products[$i]['model']) . ') ' : '') . "\n" .
    '<nobr><small><em> '. nl2br($this->products_ordered_attributes) .'</em></small></nobr></td>' . "\n" .
    '<td class="product-details-num" valign="top" align="right">' .
    $currencies->display_price($this->products[$i]['final_price'], $this->products[$i]['tax'], $this->products[$i]['qty']) .
    ($this->products[$i]['onetime_charges'] !=0 ?
    '</td></tr>' . "\n" . '<tr><td class="product-details">' . nl2br(TEXT_ONETIME_CHARGES_EMAIL) . '</td>' . "\n" .
    '<td>' . $currencies->display_price($this->products[$i]['onetime_charges'], $this->products[$i]['tax'], 1) : '') .
    '</td></tr>' . "\n";
    }

    $order_total_modules->apply_credit();//ICW ADDED FOR CREDIT CLASS SYSTEM
    $zco_notifier->notify('NOTIFY_ORDER_AFTER_ORDER_CREATE_ADD_PRODUCTS');
    }[/php

    " function create_add_products" exists only in order.php.

    /home/.../public_html/includes/classes/observers/orderTagBuilder.php

    Line #18 : //$this->attach($this, array('NOTIFY_ORDER_DURING_CREATE_ADDED_ATTRIBUTE_LINE_ITEM','NOTIFY_ORDER_AFTER _ORDER_CREATE_ADD_PRODUCTS'));

    Line #20 : $zco_notifier->attach($this, array('NOTIFY_ORDER_DURING_CREATE_ADDED_ATTRIBUTE_LINE_ITEM','NOTIFY_ORDER_AFTER _ORDER_CREATE_ADD_PRODUCTS'));

    Line #29 : if($eventID == 'NOTIFY_ORDER_DURING_CREATE_ADDED_ATTRIBUTE_LINE_ITEM') {

    /home/.../public_html/includes/classes/order.php

    Line #844 : $zco_notifier->notify('NOTIFY_ORDER_DURING_CREATE_ADDED_ATTRIBUTE_LINE_ITEM', $sql_data_array);
    /home/.../public_html/includes/classes/observers/orderTagBuilder.php

    Line #18 : //$this->attach($this, array('NOTIFY_ORDER_DURING_CREATE_ADDED_ATTRIBUTE_LINE_ITEM','NOTIFY_ORDER_AFTER _ORDER_CREATE_ADD_PRODUCTS'));

    Line #20 : $zco_notifier->attach($this, array('NOTIFY_ORDER_DURING_CREATE_ADDED_ATTRIBUTE_LINE_ITEM','NOTIFY_ORDER_AFTER _ORDER_CREATE_ADD_PRODUCTS'));

    Line #38 : if($eventID == 'NOTIFY_ORDER_AFTER_ORDER_CREATE_ADD_PRODUCTS') {//attach tags & welcome letter

    /home/.../public_html/includes/classes/order.php

    Line #913 : $zco_notifier->notify('NOTIFY_ORDER_AFTER_ORDER_CREATE_ADD_PRODUCTS');

  3. #33
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Customizing confirmation e-mail

    The above may be moot, as I have been thinking about the processing sequence while studying the various files. There is no reason for orderTagBuilder.php to be autoloaded on every page. It only needs to be active when the order class is active. If it would be discarded and rebuilt on a fresh page load with autoload, it would actually be bad to autoload.

    What I am thinking is to have an autoloaded observer that looks for the order class to be instantiated, and load and instantiate orderTagBuilder at that time (only). If the order class/object persists until the end of checkout, would orderTagBuilder also persist when instantiated in the same way?

    config.orderTagBuilderLoader.php:
    PHP Code:
    <?php
    /*
     * //@package autoloaders (In includes/auto_loaders)
     * @copyright Copyright 2017 Glenn J. Herbert (gjh42)
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: config.orderTagBuilderLoader.php 2017-04-04 gjh42 $
     */

    $autoLoadConfig[10][] = array('autoType'=>'class',
                                  
    'loadFile'=>'observers/orderTagBuilderLoader.php');
    $autoLoadConfig[160][] = array('autoType'=>'classInstantiate',
                                  
    'className'=>'orderTagBuilderLoader',
                                  
    'objectName'=>'orderTagBuilderLoader');//160 to be ready when order is instantiated?
    //eof
    orderTagBuilderLoader.php:
    PHP Code:
    <?php
    /**
     * File loads & instantiates the car & tent tag building code for confirmation e-mail
     *
     * //@package classes
     * @copyright Copyright 2017 Glenn J. Herbert (gjh42)
     * @copyright Copyright 2003-2007 Zen Cart Development Team
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: orderTagBuilderLoader.php 2017-04-04 gjh42 $
     */
     
    class orderTagBuilderLoader extends base {
      
      function 
    __construct() {
        
    //$this->attach($this, array('NOTIFY_CHECKOUT_PROCESS_BEFORE_ORDER_TOTALS_PRE_CONFIRMATION_CHECK'));
        
    global $zco_notifier;//alternate version of constructor
        
    $zco_notifier->attach($this, array('NOTIFY_CHECKOUT_PROCESS_BEFORE_ORDER_TOTALS_PRE_CONFIRMATION_CHECK'));//from /includes/modules/checkout_process.php
      
    }
      
      function 
    update(&$class$eventID) {
        require(
    DIR_WS_CLASSES 'observers/orderTagBuilder.php');
        
    $orderTagBuilder = new orderTagBuilder;
      }
    }
    //eof
    /includes/modules/checkout_process.php, lines 55-66:
    PHP Code:
    require(DIR_WS_CLASSES 'order.php');
    $order = new order;

    // prevent 0-entry orders from being generated/spoofed
    if (sizeof($order->products) < 1) {
      
    zen_redirect(zen_href_link(FILENAME_SHOPPING_CART));
    }

    require(
    DIR_WS_CLASSES 'order_total.php');
    $order_total_modules = new order_total;

    $zco_notifier->notify('NOTIFY_CHECKOUT_PROCESS_BEFORE_ORDER_TOTALS_PRE_CONFIRMATION_CHECK'); 

  4. #34
    Join Date
    Feb 2016
    Location
    Canada
    Posts
    143
    Plugin Contributions
    0

    Default Re: Customizing confirmation e-mail

    Hello,

    I have added the products price to my order confirmation email. The issue I have is that it is not formatted as currency ($-Canadian). See below:

    3 x KARMA Wellness Water - Probiotics Blueberry Lemonade 12 x 532ml Plastic (KAR532PBL) @ 35.2 = $105.60

    I want the price 35.2 to appear as $35.20 and don't know the syntax.

    Below in red is what I changed/added in includes/classes/order.php

    \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    \$sql_data_array = array('orders_id' => $zf_insert_id,
    'products_id' => zen_get_prid($this->products[$i]['id']),
    'products_model' => $this->products[$i]['model'],
    'products_name' => $this->products[$i]['name'],
    'products_description' => zen_get_products_description($this->products[$i]['id']), //added by JM
    'products_price' => $this->products[$i]['price'],
    'final_price' => $this->products[$i]['final_price'],
    'onetime_charges' => $this->products[$i]['onetime_charges'],
    'products_tax' => $this->products[$i]['tax'],
    'products_quantity' => $this->products[$i]['qty'],
    'products_priced_by_attribute' => $this->products[$i]['products_priced_by_attribute'],
    'product_is_free' => $this->products[$i]['product_is_free'],
    'products_discount_type' => $this->products[$i]['products_discount_type'],
    'products_discount_type_from' => $this->products[$i]['products_discount_type_from'],
    'products_prid' => $this->products[$i]['id']);
    zen_db_perform(TABLE_ORDERS_PRODUCTS, $sql_data_array);
    \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\


    I also added the following in red:

    \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    $this->products[$index] = array('qty' => $products[$i]['quantity'],
    'name' => $products[$i]['name'],
    'model' => $products[$i]['model'],
    'tax_groups'=>$taxRates,
    'tax_description' => zen_get_tax_description($products[$i]['tax_class_id'], $taxCountryId, $taxZoneId),
    'price' => zen_round($products[$i]['price'],$decimals),
    'final_price' => zen_round($products[$i]['price'] + $_SESSION['cart']->attributes_price($products[$i]['id']), $decimals),
    'onetime_charges' => $_SESSION['cart']->attributes_price_onetime_charges($products[$i]['id'], $products[$i]['quantity']),
    'weight' => $products[$i]['weight'],
    'products_priced_by_attribute' => $products[$i]['products_priced_by_attribute'],
    'product_is_free' => $products[$i]['product_is_free'],
    'products_discount_type' => $products[$i]['products_discount_type'],
    'products_discount_type_from' => $products[$i]['products_discount_type_from'],
    'id' => $products[$i]['id'],
    'rowClass' => $rowClass);
    \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\


    the line that displays details of the product order has been changed to the following:

    $this->products_ordered .= $this->products[$i]['qty'] . ' x ' . $this->products[$i]['name'] . ' ' .zen_get_products_description($this->products[$i]['id']) . ' ' . ($this->products[$i]['model'] != '' ? ' (' . $this->products[$i]['model'] . ') ' : '') . '@ ' .$this->products[$i]['price']. ' = ' .

    Any help is appreciated.

    Thanks in advance!

 

 
Page 4 of 4 FirstFirst ... 234

Similar Threads

  1. Help customizing Confirmation Email
    By aperfecthost in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 15 Oct 2009, 08:19 PM
  2. Customizing Confirmation Email
    By OLdSalt in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 29 Mar 2009, 01:12 AM
  3. E-mail Text on Confirmation e-mail
    By beth99 in forum General Questions
    Replies: 3
    Last Post: 18 Sep 2006, 02:37 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR