Anzeige der Artikel in "change order mail.html"? – Wiki | modified eCommerce Shopsoftware

Anzeige der Artikel in "change order mail.html"?

Aus Wiki | modified eCommerce Shopsoftware

Gibt es die Möglichkeit die bestellten Artikel in der Bestellstatus-Mail darzustellen?


Antwort von Benny, 08.2010


/admin/orders.php:

Suchen nach:

// assign language to template for caching
$smarty->assign('language', $_SESSION['language']);

Darüber einfügen:

// get products data
          require_once (DIR_FS_INC.'xtc_get_order_data.inc.php');
          require_once (DIR_FS_INC.'xtc_get_attributes_model.inc.php');
          require_once (DIR_FS_ADMIN.DIR_WS_CLASSES.'order_mail.php');
          require_once (DIR_FS_CATALOG.DIR_WS_CLASSES.'/xtcPrice.php');
          $order = new order_mail($oID);
          $xtPrice = new xtcPrice($order->info['currency'], $order->customer['customers_status']);
          $order_query = xtc_db_query("SELECT
                    products_id,
                    orders_products_id,
                    products_model,
                    products_name,
                    final_price,
                    products_quantity
                    FROM ".TABLE_ORDERS_PRODUCTS."
                    WHERE orders_id=".$oID);
  				$order_data = array ();
          while ($order_data_values = xtc_db_fetch_array($order_query)) {
              /*
              $attributes_query = xtc_db_query("SELECT
                          products_options,
                          products_options_values,
                          price_prefix,
                          options_values_price
                          FROM ".TABLE_ORDERS_PRODUCTS_ATTRIBUTES."
                          WHERE orders_products_id='".$order_data_values['orders_products_id']."'");
              $attributes_data = '';
              $attributes_model = '';
              while ($attributes_data_values = xtc_db_fetch_array($attributes_query)) {
                  $attributes_data .= $attributes_data_values['products_options'].':'.$attributes_data_values['products_options_values'].'<br />';
                  $attributes_model .= xtc_get_attributes_model($order_data_values['products_id'], $attributes_data_values['products_options_values']).'<br />';
              }
              */

              $order_data[] = array (
                                    'PRODUCTS_MODEL' => $order_data_values['products_model'],
                                    'PRODUCTS_ID' => $order_data_values['products_id'],
                                    'PRODUCTS_NAME' => $order_data_values['products_name'],
                                    'PRODUCTS_QTY' => $order_data_values['products_quantity']
                                    );
          }
          $smarty->assign('order_data', $order_data);
        //

/templates/DEIN_TEMPLATE/admin/mail/german/change_order_mail.html:

An beliebiger Stelle kann nun die foreachschleife folgendermaßen aufgerufen werden:

{foreach name=aussen item=order_values from=$order_data}
<ul>
  {foreach name=aussen item=order_values from=$order_data}
    <li>
      {$order_values.PRODUCTS_QTY}x :{$order_values.PRODUCTS_NAME}
    </li>
  {/foreach}
</ul>
{/foreach}

Einbau auf eigene Gefahr.

  • Diese Seite wurde zuletzt am 3. August 2010 um 10:16 Uhr bearbeitet.