<?php echo $order->user->shippingData['phone']; ?> </nobr><br> <?php echo _("CP:"); ?> <?php echo $order->user->shippingData['postalCode']; ?> <?php echo $order->user->shippingData['city']; ?> <br> <?php echo getProvinceName($order->user->shippingData['province']); ?> (<?php echo getCountryName($order->user->shippingData['country']); ?> ) </td> <!--td><?php echo $order->tpvData; ?> </td--> </tr> <?php } ?>
<?php define('APP_ROOT', ".."); require_once APP_ROOT . "/config/main.php"; require_once APP_ROOT . "/common/commonFunctions.php"; $cart = get_cart(); $billingData_province = null; $billingData_country = null; $shippingData_province = null; $shippingData_country = null; if (isset($cart->user)) { $action = "confirm"; $billingData_province = getProvinceName($cart->user->billingData['province']); $billingData_country = getCountryName($cart->user->billingData['country']); $shippingData_province = getProvinceName($cart->user->shippingData['province']); $shippingData_country = getCountryName($cart->user->shippingData['country']); showSkin(basename(__FILE__), $action); } else { redirect(APP_ROOT . "/flows/login.php"); }
function _buildMail() { global $npshop; $text = implode('', file(APP_ROOT . $npshop['skin']['path'] . $npshop['skin']['name'] . "/npshop/email_header.php")); $text .= sprintf(_("Hola %s"), $this->user->billingData['name']) . ",<br/><br/>"; $text .= sprintf(_("Estos son los productos asociados al pedido %s:"), formatOrderId($this)) . "<br/>"; $text .= "<ul>"; foreach ($this->items as $item) { $text .= "<li><b>" . NP_get_i18n($item->name) . "</b> (" . _("Ref.") . " " . $item->id . "): " . _("Cantidad") . " [" . $item->quantity . "], " . _("Precio por unidad") . " [" . $item->prize . " €]</li>"; } $text .= "</ul>"; $text .= "<blockquote>"; $text .= _("Subtotal") . ": " . $this->getSubTotal() . " €<br/>"; $text .= _("Gastos de envío") . ": " . $this->getShippingCost(1) . " €<br/>"; $text .= "<br/><b>" . _("TOTAL") . ": " . $this->getTotal(1) . " €</b><br/>"; $text .= "</blockquote>"; $text .= "<br/>"; $text .= "<p>" . _("Datos personales") . ":</p>"; $text .= "<center><table border='0' width='70%'>"; $text .= " <tr>"; $text .= " <td width='50%' valign='top'>"; $text .= " <b>" . _("Datos de facturación") . "</b><br/>"; //$text .= " <ul>"; $text .= " <br/>" . $this->user->billingData['name'] . " " . $this->user->billingData['surname']; $text .= " <br/>"; $text .= " <br/>" . $this->user->billingData['address'] . " " . $this->user->billingData['address2']; $text .= " <br/>" . $this->user->billingData['postalCode'] . " " . $this->user->billingData['city']; $text .= " <br/>" . getProvinceName($this->user->billingData['province']); $text .= " <br/>" . getCountryName($this->user->billingData['country']); //$text .= " <br/>"; //$text .= " <li>Teléfono: ".$this->user->billingData['phone']." </li>"; //$text .= " </ul>"; $text .= " </td>"; $text .= " <td width='50%' valign='top'>"; $text .= " <b>Datos de envío</b><br/>"; //$text .= " <ul>"; $text .= " <br/>" . $this->user->shippingData['name'] . " " . $this->user->shippingData['surname']; $text .= " <br/>"; $text .= " <br/>" . $this->user->shippingData['address'] . " " . $this->user->shippingData['address2']; $text .= " <br/>" . $this->user->shippingData['postalCode'] . " " . $this->user->shippingData['city']; $text .= " <br/>" . getProvinceName($this->user->shippingData['province']); $text .= " <br/>" . getCountryName($this->user->shippingData['country']); //$text .= " <br/>"; //$text .= " <li>Teléfono: ".$this->user->shippingData['phone']." </li>"; //$text .= " </ul>"; $text .= " </td>"; $text .= " </tr>"; $text .= "</table></center><br/>"; if ($this->orderStatus == $npshop['constants']['ORDER_STATUS']['PAYMENT_OK']) { $text .= _("El pedido <b>queda confirmado</b>.") . "<br/>"; } else { if ($this->orderStatus == $npshop['constants']['ORDER_STATUS']['PAYMENT_TRANSFER']) { $text .= _("El pedido <b>queda confirmado</b> y pendiente de que realices una transferencia por la cantidad total del pedido a este número de cuenta: 2038-1576-52-6000042530 (Caja Madrid), Titular: David Benavente.") . "<br/>"; } else { if ($this->orderStatus == $npshop['constants']['ORDER_STATUS']['PENDING_SENT_ONDELIVERY']) { $text .= _("El pedido <b>queda confirmado</b> y será enviado contrareembolso a la dirección que has indicado.") . "<br/>"; } else { if ($this->orderStatus == $npshop['constants']['ORDER_STATUS']['PAYMENT_ERROR']) { $text .= _("El pedido <b>no ha podido ser confirmado</b>.") . "<br/>"; } else { $text .= sprintf(_("El pedido queda con estado <b>%s</b>."), $this->orderStatus) . "<br/>"; } } } } $text .= "<br/>"; $text .= _("Un saludo"); $text .= implode('', file(APP_ROOT . $npshop['skin']['path'] . $npshop['skin']['name'] . "/npshop/email_footer.php")); return $text; }