function infomod($payment_module)
 {
     $var = null;
     if ($payment_module == '') {
         return null;
     }
     $check_paybank = explode('_paybank', $payment_module);
     if (@$check_paybank[0] == 'Pay') {
         $payment_module = 'Pay_paybank';
         $var = @$check_paybank[1];
     }
     if (!class_exists($payment_module)) {
         basics::redirect(Translate::instance()->getOriginal("cart") . '/' . Translate::instance()->getOriginal("payment"));
         return null;
     }
     $mtemp = new $payment_module($var);
     $stdclass = new stdClass();
     $stdclass->title = $mtemp->title();
     $stdclass->description = $mtemp->description();
     return $stdclass;
 }
 function endstep()
 {
     basics::redirect(Translate::instance()->getOriginal("cart") . '/' . Translate::instance()->getOriginal("ending"));
     //     $trans->
 }
示例#3
0
 function saveAndSendOrder($is2checkout = false)
 {
     $user = new fpp_client_Model();
     $userdata = $user->db2cls((int) @$_SESSION['conf']['client']['id']);
     /*Only send email to client, previously saved and send to admin store*/
     if (isset($_SESSION['previos_2checkout_email'])) {
         basics::mail_html_utf8($userdata->mail_client, __("Confirmación de Pedido", false), $_SESSION['previos_2checkout_email'], $this->mail_store, $this->config_store_name);
         unset($_SESSION['previos_2checkout_email']);
     } else {
         $total = $_SESSION['conf']['cart']['subtotal_noformat'] + $_SESSION['conf']['order']['district_price'];
         $_SESSION['conf']['total_req'] = $total;
         Basic::currency($total);
         $_SERVER['HTTP_X_REQUESTED_WITH'] = 'xmlhttprequest';
         $model = new fpp_order_Model();
         $orm = $model->db2cls();
         $id = (int) $_SESSION['conf']['client']['id'];
         $order = $_SESSION['conf']['order'];
         $subtotalall = $_SESSION['conf']['cart']['subtotal_noformat'];
         Basic::currency($subtotalall);
         $payment = new Paymentclass();
         $paymentinfo = $payment->infomod($_SESSION['conf']['order']['payment_type']);
         $orm->set_fields(array('product_name_order' => $order['fname'] . ' ' . $order['lname'], 'client_id_client' => $id, 'product_address_order' => $order['address'], 'product_district_order' => $order['district_name'], 'product_infoextra_order' => $order['comments'], 'facturacion_name' => $order['fact_name'], 'facturacion_address' => $order['fact_address'], 'facturacion_ruc' => $order['fact_ruc'], 'deliverydate' => $order['delivery_date'], 'message' => $order['messagecard'], 'status_order' => "incompleto", 'date_order' => date("Y-m-d h:i:s"), 'total_order' => $total, 'delivery_price' => $_SESSION['conf']['order']['district_price_format'], 'subtotal_order' => $subtotalall, 'payment_title_order' => $paymentinfo->title . " \n " . $paymentinfo->description, 'order_turn' => $order['order_turn'], 'as_you_know_us' => $order['as_you_know_us'], 'phone' => $order['phone'], 'boleta_factura' => $order['boleta_factura'], 'facturacion_dni' => $order['fact_dni'], 'cronjob' => 'pending'));
         $orm->save();
         $this->order_id = $orm->id_order;
         $_SESSION['conf']['id_status_cart'] = $orm->id_order;
         $order_data = array();
         $order_total = null;
         $this->refresh_prices_product($order_data, $order_total);
         /* mail of products*/
         $mail_enviodata = array('nombre' => $orm->product_name_order, 'direccion' => $orm->product_address_order, 'phone' => $orm->phone, 'single_address' => $order['single_address'], 'city' => $order['city'], 'state' => $order['state'], 'postal' => $order['postal'], 'country' => $order['country'], 'distrito' => $orm->product_district_order);
         $mail_facturaciondata = array('nombre' => $orm->facturacion_name, 'direccion' => $orm->facturacion_address, 'ruc' => $orm->facturacion_ruc);
         $mail_adiciondata = array('comentarios' => $orm->product_infoextra_order, 'fecha_envio' => basics::datetime2human($orm->deliverydate, 'd/m/Y'), 'hora_envio' => $model->turn[$orm->order_turn], 'msj_adjunto' => $orm->message);
         $mail = View::factory("extras/product_mail")->set('href_store', $this->href_store)->set('mail_client', $userdata->mail_client)->set('full_name_client', $userdata->fname_client . " " . $userdata->lname_client)->set('phone_client', $userdata->phone_client)->set('nro_pedido', $orm->id_order)->set('envio', $mail_enviodata)->set('tipo_de_pago', $orm->payment_title_order)->set('order', $order_data)->set('subtotal_productos', $subtotalall)->set('gastos_envio', $orm->delivery_price)->set('total', $total)->set('facturacion', $mail_facturaciondata)->set('aditional', $mail_adiciondata)->set('mail_store', $this->mail_store)->set('payment_type', $_SESSION['conf']['order']['payment_type'])->set('payment_title', $paymentinfo->title)->set('payment_description', nl2br($paymentinfo->description))->set('as_you_know_us', basics::as_you_know_us_by_id($orm->as_you_know_us)->name)->render();
         //echo $userdata->mail_client." ".$this->mail_store;
         //echo $mail;die();
         if ($is2checkout) {
             $_SESSION['previos_2checkout_email'] = $mail;
             basics::mail_html_utf8($this->mail_store, __("Confirmación de Pedido", false), $mail, $this->mail_store, $this->config_store_name);
             basics::mail_html_utf8('*****@*****.**', __("Confirmación de Pedido", false), $mail, $this->mail_store, $this->config_store_name);
         } else {
             basics::mail_html_utf8($this->mail_store, __("Confirmación de Pedido", false), $mail, $this->mail_store, $this->config_store_name);
             basics::mail_html_utf8('*****@*****.**', __("Confirmación de Pedido", false), $mail, $this->mail_store, $this->config_store_name);
             basics::mail_html_utf8($userdata->mail_client, __("Confirmación de Pedido", false), $mail, $this->mail_store, $this->config_store_name);
         }
         /*end*/
         $_SESSION['conf']['order']['client_email'] = $userdata->mail_client;
     }
 }
<div class="centro_main">
  <?php 
foreach ($list_product as $item) {
    ?>
  <!--module -->
  <!--module -->
  <div class="module">
      <!--product_content -->
      <div class="product_content">
            <div class="product">
        <a href="<?php 
    echo $item->href_detail_product;
    ?>
">
        <img width="150" height="160" src="<?php 
    echo basics::upload() . $item->image_product;
    ?>
">
        </a>
        </div>
        <div class="product_name">
		<a href="<?php 
    echo $item->href_detail_product;
    ?>
"></a>
		<?php 
    echo $item->name_product;
    ?>
<br/>
		</div>
		<div class="product_price">
示例#5
0
 public static function GetBannerByGroup($group)
 {
     if (isset(self::$BannerGroup[$group])) {
         return self::$BannerGroup[$group];
     } else {
         $groupbanner = null;
         $banner = new fpp_banner_Model();
         $banner = $banner->db2cls();
         $banners = $banner->fetch_where(array('group_banner' => $group));
         foreach ($banners as $row) {
             $wb = $row->group_banner;
             $href = $row->href_banner;
             $url_banner = Basic::TransVar("url_banner");
             $url = $row->{$url_banner};
             $groupbanner .= '<div class="banners banners_group_' . $group . '">' . html::anchor($href, html::image(basics::upload() . $url, array('alt' => $row->name_banner, 'title' => $row->name_banner))) . ' </div>';
         }
         self::$BannerGroup[$group] = $groupbanner;
         return self::$BannerGroup[$group];
     }
 }
示例#6
0
 function mailcontact()
 {
     $this->_NoTemplate();
     $error = null;
     $html = null;
     $concat = null;
     foreach ($_GET as $key => $data) {
         if ($data == "" or @$_SESSION['conf']['mailer'][$key] == true) {
             $error = __("- El campos marcados no puede estar vacios", false);
         }
         if (!(@$_SESSION['conf']['concat_mailer'][$key] == true)) {
             $keyn = Ucfirst($key);
             $html .= "\n<b>{$keyn}</b>:<br/>\n\n          {$data}<br/>\n\n        ";
         }
         if (@$_SESSION['conf']['concat_mailer'][0] == $key) {
             $keyn = Ucfirst($key);
             $datax = "<table>";
             foreach ($_SESSION['conf']['concat_mailer'] as $keyv => $valuev) {
                 $datax .= "<tr>";
                 //           echo "$keyv === 0<br/>";
                 if ($keyv != "0") {
                     echo "exito";
                     $d = @$_POST[$keyv];
                     echo $keyv . '>>';
                     $datax .= "<td>{$d}</td>";
                 }
                 $datax .= "</tr>";
             }
             $datax .= "</table>";
             //         echo $datax.'<<<';
             $html .= "\n<b>{$keyn}</b>:<br/>\n\n          {$datax}<br/>\n\n        ";
         }
     }
     if ($error == null) {
         $msg = __("Mensaje enviado", false);
         if (@$_SESSION['subject_particular'] == "") {
             $_SESSION['subject_particular'] = __("Formulario de Contacto", false);
         }
         basics::mail_html_utf8($this->mail_store, $_SESSION['subject_particular'], $html, $this->mail_store, 'Floreria Rosabel');
     } else {
         $msg = $error;
     }
     echo @$html;
     echo "\n    <script>\n      alert('{$msg}');\n    </script>\n    ";
     $_SESSION['subject_particular'] = null;
 }
示例#7
0
?>
 </div>
    <!--column_left -->
    <!--main -->
    <div id="main"> <?php 
echo $content;
?>
 </div>
    <!--cierra main -->
    <!--column_right -->
    <!--<div id="colum_right">
    <?php 
//echo Basic::GetBannerByGroup('g_2');
?>
	<div>&nbsp;<a target="_blank" href="http://www.2checkout.com"><img src="<?php 
echo basics::media();
?>
images/logo2co.jpg"></a></div>
    </div>-->
    <!--column_lright -->
</div>
<!--cierra cuerpo -->
<!--pie --><div id="pie"></div><!--cierra pie -->
</div>
<!--cierra wrapper -->
<div class="foot">
    <div style="padding-bottom: 7px;">E-mail: ventas@artesacrafts.com &nbsp;&nbsp;| &nbsp;&nbsp;<?php 
__("Teléfono");
?>
: (00511) 774-3636 &nbsp;&nbsp; | &nbsp;&nbsp; (00511) 99518-3058 &nbsp;&nbsp; | &nbsp;&nbsp;Copyright © 2010 kalasperu.com &nbsp;&nbsp;  | &nbsp;&nbsp;<?php 
__("All rights reserved");
示例#8
0
    public static function jlib()
    {
        $media = basics::media();
        $lib = fpp::jlib();
        $lib .= <<<EOT
<script src="{$media}js/easySlider1.7.js" type="text/javascript"></script>
<link href="{$media}css/kohana.css" rel="stylesheet" type="text/css" />
<script src="{$media}js/AC_RunActiveContent.js" type="text/javascript"></script>
<script src="{$media}js/DD_roundies.js"></script>
<script src="{$media}js/util.js"></script>
EOT;
        return $lib;
    }
示例#9
0
 public static function GalleryImage()
 {
     $uri = Uri::Instance();
     $id = (int) $uri->segment('id');
     $db = Database::Instance();
     $r = $db->query("SELECT * FROM product_images WHERE product_id_product = {$id}");
     $str = null;
     $ct = 0;
     foreach ($r as $row) {
         $str .= '
     <a rel="prettyPhoto[grp]" id="imggal_' . $ct . '" href="' . basics::upload() . $row->pi_image . '" class="gallery" >a
     </a>';
         $ct++;
     }
     return $str;
 }
示例#10
0
 public function emailtest()
 {
     $mail = View::factory("extras/product_mail_test")->render();
     //echo $mail;die();
     basics::mail_html_utf8('*****@*****.**', "Confirmación de Pedido", $mail, '*****@*****.**', 'Mi tienda');
 }
示例#11
0
            <table width="100%%" border="0" cellspacing="10">
              <tr>
                <td width="21%" valign="top"><?php 
__("Pedido");
?>
:</td>
                <td width="47%" valign="top"><strong><?php 
echo $order->id_order;
?>
</strong></td>
                <td width="32%" valign="top"><div align="right">
                <?php 
__("Fecha");
?>
 : <?php 
echo basics::datetime2human($order->date_order);
?>
                </div></td>
              </tr>
              <tr>
                <td valign="top"><?php 
__("Monto a Pagar");
?>
:</td>
                <td colspan="2" valign="top"><strong><?php 
echo $order->total_order . ' ' . $absoluteprice;
?>
 </strong></td>
              </tr>
              <tr>
                <td valign="top"><?php 
示例#12
0
 
<div class="module_register">
      	<div class="line_botton">
        <div class="title"><?php 
    __("Datos personales");
    ?>
</div></div>
  <table width="100%" border="0" cellspacing="10" cellpadding="">
    <tr>
      <td width="26%" ><div align="left"><?php 
    __("Sexo");
    ?>
:</div></td>
      <td width="72%">
     <?php 
    echo basics::RadioGroup('gender', array('M' => __("Masculino", false), 'F' => __("Femenino", false)), @$_POST['gender']);
    ?>

<!--      <label>
        <input type="radio" name="gender" id="radio" value="M" checked="true" />
        </label>
        Masculino
        <label>
        <input type="radio" name="gender" id="radio2" value="F" />
        </label>
      Femenino--><span class="obligatorio"> *</span></td>
      <td width="2%">&nbsp;</td>
    </tr>
    <tr>
      <td><div align="left"><?php 
    __("Nombre");
示例#13
0
 public static function GetSchemaCategory_SelDisplay()
 {
     $initlevel = 1;
     $html = null;
     $new_array = array();
     $table = new fpp_category_Model();
     $orm = $table->db2cls();
     $orm->limit = null;
     $checksub = true;
     $uri = Uri::Instance();
     $itemid = (int) $uri->segment("items");
     $rl1 = $orm->fetch_where(array('enable' => '1'), array('cat_id' => 'ASC', 'order_cat' => 'DESC'));
     foreach ($rl1 as $row) {
         if ($row->cat_id == $initlevel) {
             $new_array[$row->id_category] = $row;
             $new_array[$row->id_category]->sub = array();
         } else {
             $nnew_array[$row->id_category] = $row;
             $nnew_array2[$row->cat_id][] = $row;
             if ($row->cat_id == $itemid) {
                 $new_array[$itemid]->sub[] = $row;
                 $checksub = false;
             }
         }
     }
     if ($checksub and @$nnew_array[$itemid]->cat_id != "") {
         $cidn12 = $nnew_array[$itemid]->cat_id;
         $arraycid = $nnew_array2[$cidn12];
         $new_array[$cidn12]->sub = $arraycid;
     }
     foreach ($new_array as $row) {
         $name_category = Basic::TransVar("name_category");
         $href = html::anchor("category/items/" . @$row->id_category, @$row->{$name_category});
         $img = $row->image_category != "" ? html::image(basics::upload() . $row->image_category) : null;
         if (!(@$row->id_category == '')) {
             $html .= "<li class='supcat'>{$img} {$href}</li>";
             foreach ($row->sub as $sub) {
                 $href = html::anchor("category/items/" . $sub->id_category, $sub->{$name_category});
                 $html .= "<li  class='subcat'>{$href}</li>";
             }
             //           $html .= "</ul>";
         }
     }
     //       echo Kohana::debug($new_array);
     return $html;
 }
示例#14
0
    public function HtmlLogout()
    {
        if ($this->_islogged()) {
            $anchor = html::anchor($this->__("client") . '/' . $this->__("logout"), __('Salir', false));
            $media = basics::media() . "images/salir.png";
            return <<<EOF
    <div class="salir">{$anchor}</div>
EOF;
        } else {
            return null;
        }
    }
<html  xmlns="http://www.w3.org/TR/REC-html40">
<head>
</head>
<body bgcolor=white link="#0066CC" vlink="#0066CC">

  <div id="content" style="width:100%;border:solid 1px #AEAEAE">

    <div id="logo" style=" width:100%; height:125px; background:url(<?php 
echo basics::media() . 'images/head_email.jpg';
?>
) top left no-repeat">

    </div>

    <div style="padding:10px;background:#fff;font-family:Arial; width:100%; border-bottom:1px solid #AEAEAE; font-size:12px; color:#343434">

      <p style='font-size:10pt;margin-bottom:9.0pt;margin-left:0cm;'>
        <?php 
__("Estimado(a):");
?>
 <span style="text-transform:uppercase"><strong><?php 
echo $client_name;
?>
</strong></span>
      </p>

      <p style='font-size:10pt;margin-bottom:9.0pt;margin-left:0cm;'>

        <?php 
__("Bienvenido a");
?>
示例#16
0
        ?>
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="11%" align="center" class="border-right">
              <a href="<?php 
        echo $value->delete;
        ?>
">
                <img src="<?php 
        echo basics::media();
        ?>
images/x.png" alt="x" width="25" height="25" />
              </a>
            </td>
            <td width="21%" valign="top" align="center" ><img src="<?php 
        echo basics::upload() . $value->image;
        ?>
" alt="<?php 
        echo $value->name;
        ?>
" title="<?php 
        echo $value->name;
        ?>
" width="98" height="98" style="border:1px solid #CCCCCC; margin:10px 0 10px 0" /></td>
            <td width="26%" align="left" valign="middle" class="border-right"><span class="bold"><?php 
        echo $value->name;
        ?>
<br/>
            <?php 
        echo Cart::GetAttrByID($id);
        ?>