Exemple #1
0
function getCountryName($countryId)
{
    global $ddbb;
    if ($countryId != null && trim($countryId) != "") {
        $data = $ddbb->executePKSelectQuery("SELECT name FROM NPS_PAISES WHERE id=" . $countryId);
        return NP_get_i18n(NP_DDBB::decodeSQLValue($data["name"], "STRING_I18N"));
    }
}
Exemple #2
0
}
?>
							<?php 
if (showValue($item->complement2)) {
    ?>
<li><?php 
    echo NP_get_i18n($item->complement2);
    ?>
<br><?php 
}
?>
                            <?php 
if (showValue($item->description)) {
    ?>
<li><?php 
    echo NP_get_i18n($item->description);
    ?>
<br><?php 
}
?>



							<br><li class="li-blanco"><span class=titulo6><?php 
echo $item->prize;
?>
 €</span>
						</ul>
<?php 
if ($item->stock > 0) {
    ?>
Exemple #3
0
<?php 
foreach ($cart->items as $itemId => $item) {
    ?>
	<tr>
		<td class="00" width=200 style="border-bottom:1px #DADADA solid;" style="border-left:1px #DADADA solid;">
			<img src="<?php 
    echo SKIN_ROOT;
    ?>
../../images/<?php 
    echo $item->id;
    ?>
_p.jpg" border=0>
		</td>
		<td class="t-01" width=300 style="border-bottom:1px #DADADA solid;">
				<B><?php 
    echo NP_get_i18n($item->name);
    ?>
</B><br>
				<?php 
    echo _("Ref.");
    ?>
 <?php 
    echo $item->id;
    ?>
</a> <br>
				<?php 
    if (showValue($item->weight)) {
        echo _("Peso:");
        ?>
 <?php 
        echo $item->weight;
Exemple #4
0
    buildSQL();
}
$ddbb->executeSelectQuery($sqlProducts, "fetchProducts");
$ddbb->executeSelectQuery($sqlCategories, "fetchCategories");
if (count($itemIds) == 0) {
    /*
    if (isset($_GET['sourceCategoryId'])) {
        buildSQL($_GET['sourceCategoryId']);
        
        $tmp = $_GET['categoryId'];
        $_GET['categoryId'] = $_GET['sourceCategoryId'];
        $_GET['sourceCategoryId'] = $tmp;
        
        $tmp = $categoryTitle;
        $categoryTitle = $sourceCategoryTitle;
        $sourceCategoryTitle = $tmp;
        
        NP_executeSelect($sqlProducts, "fetchProducts");
    }
    $msg = $sourceCategoryTitle." a la venta próximamente.";
    */
    $msg = sprintf(_("%s a la venta próximamente."), NP_get_i18n($categoryTitle));
}
$items = array();
foreach ($itemIds as $id) {
    if (trim($id) != "") {
        $item = new Item($id);
        array_push($items, $item);
    }
}
showSkin(basename(__FILE__));
Exemple #5
0
    echo _("Detalle 1");
    ?>
</td><td><?php 
    echo NP_get_i18n($item->complement);
    ?>
</td></tr><?php 
}
?>
    			<?php 
if (showValue($item->complement2)) {
    ?>
<tr><td><?php 
    echo _("Detalle 2");
    ?>
</td><td><?php 
    echo NP_get_i18n($item->complement2);
    ?>
</td></tr><?php 
}
?>
    
            </table>
        </center>
        </form>
        <br/><br/>
        
        <h2><?php 
echo _("Imágenes del producto");
?>
</h2>
        <form action="" target="upload_iframe" method="post" enctype="multipart/form-data" onSubmit="return uploadImage(this);">
Exemple #6
0
 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 . " &euro;]</li>";
     }
     $text .= "</ul>";
     $text .= "<blockquote>";
     $text .= _("Subtotal") . ": " . $this->getSubTotal() . " &euro;<br/>";
     $text .= _("Gastos de envío") . ": " . $this->getShippingCost(1) . " &euro;<br/>";
     $text .= "<br/><b>" . _("TOTAL") . ": " . $this->getTotal(1) . " &euro;</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;
 }