diff --git a/debian/changelog b/debian/changelog index 5943f593..45e254e4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -hedera-web (1.319-deb8) stable; urgency=low +hedera-web (1.321-deb8) stable; urgency=low * Initial Release. diff --git a/lib/vn/tpv/tpv.php b/lib/vn/tpv/tpv.php index 1591e784..40564149 100755 --- a/lib/vn/tpv/tpv.php +++ b/lib/vn/tpv/tpv.php @@ -29,6 +29,7 @@ class Tpv ,$conf['db']['user'] ,base64_decode ($conf['db']['pass']) ,$conf['db']['schema'] + ,$conf['db']['port'] ); } @@ -83,7 +84,7 @@ class Tpv $params = []; $body = imap_fetchbody ($imap, $msg, '1'); $strings = explode (';', $body); - + foreach ($strings as $string) { $x = explode (':', $string); @@ -100,7 +101,7 @@ class Tpv $folder = $imapConf['success_folder']; else $folder = $imapConf['error_folder']; - + $folder = sprintf ('INBOX.%s', $folder); if (!imap_mail_move ($imap, $msg, $folder)) @@ -185,15 +186,14 @@ class Tpv && isset ($params['Ds_Order']) && isset ($params['Ds_MerchantCode']) && isset ($params['Ds_Currency']) - && isset ($params['Ds_Response']) - && isset ($params['Ds_Signature'])) + && isset ($params['Ds_Response'])) { if (isset ($params['Ds_ErrorCode'])) $error = $params['Ds_ErrorCode']; else $error = NULL; - try { + try { return self::$conn->query ( 'CALL transaction_confirm (#, #, #, #, #, #)', [ diff --git a/php-test b/php-test new file mode 100755 index 00000000..4900d9db --- /dev/null +++ b/php-test @@ -0,0 +1,3 @@ +#!/bin/bash + +php -d auto_prepend_file=configure.php "$@" diff --git a/web/forms/ecomerce/basket/style.css b/web/forms/ecomerce/basket/style.css index a57d55a4..c250a813 100755 --- a/web/forms/ecomerce/basket/style.css +++ b/web/forms/ecomerce/basket/style.css @@ -6,12 +6,7 @@ { max-width: 30em; margin: 0 auto; -} -.basket .form -{ - padding: 1em; - margin: 0; - background-color: #009688; + padding: 0 2em; } .basket .form > p { @@ -20,12 +15,55 @@ color: white; text-align: right; } -.basket .config +.basket .head +{ + padding: 1.8em 0; + margin: 0; + border-bottom: 1px solid #DDD; +} +.basket .head p { margin: 0; + padding: 0; + font-size: 1.4em; + text-align: right; } -/* Rows */ +/* Lines */ + +.basket .lines +{ + padding: .8em 0; +} +.basket .line +{ + padding: 1em 0; +} +.basket .line > .delete +{ + margin: -0.5em; + margin-top: .3em; + margin-right: .5em; + float: left; +} +.basket .line > .photo +{ + margin-right: 1em; + float: left; + border-radius: 50%; + height: 3.2em; +} +.basket .line > p +{ + margin: .1em 0; + margin-left: 7.5em; +} +.basket .line .subtotal +{ + float: right; +} + +/* Fields */ .basket td.available-exceeded input { @@ -36,33 +74,3 @@ border-radius: 50%; } -/* Lines */ - -.basket-line -{ - padding: 1em; - border-bottom: 1px solid #DDD; -} -.basket-line > .delete -{ - margin-top: .3em; - margin-right: .5em; - float: left; -} -.basket-line > .photo -{ - margin-right: 1em; - float: left; - border-radius: 50%; - height: 3.2em; -} -.basket-line > p -{ - margin: .1em 0; - margin-left: 7.5em; -} -.basket-line .subtotal -{ - float: right; -} - diff --git a/web/forms/ecomerce/basket/ui.xml b/web/forms/ecomerce/basket/ui.xml index 7c2d4f40..629c3036 100755 --- a/web/forms/ecomerce/basket/ui.xml +++ b/web/forms/ecomerce/basket/ui.xml @@ -21,59 +21,59 @@
-
- - - - SELECT i.id, i.amount, i.price, a.Article, a.Categoria, - a.Medida, a.Tallos, a.Color, o.Abreviatura, a.Foto - FROM basket_item i - JOIN vn2008.Articles a ON a.Id_Article = i.item_id - LEFT JOIN vn2008.Origen o ON a.id_origen = o.id - - - -
- - -

- - - -

-

- x - - - - -

-
-
- - -
+

- OrderTotal + Total

-
+
+ + + + SELECT i.id, i.amount, i.price, a.Article, a.Categoria, + a.Medida, a.Tallos, a.Color, o.Abreviatura, a.Foto + FROM basket_item i + JOIN vn2008.Articles a ON a.Id_Article = i.item_id + LEFT JOIN vn2008.Origen o ON a.id_origen = o.id + + + +
+ + +

+ + + +

+

+ x + + + + +

+
+
+ + +
diff --git a/web/forms/ecomerce/catalog/catalog.js b/web/forms/ecomerce/catalog/catalog.js index 5a3589ab..0af1c00b 100755 --- a/web/forms/ecomerce/catalog/catalog.js +++ b/web/forms/ecomerce/catalog/catalog.js @@ -55,11 +55,8 @@ Vn.Catalog = new Class ,setView: function (view) { - if (this.viewNode) - { - Vn.Node.remove (this.viewNode); - this.viewHolder.model = null; - } + var grid = this.$('grid-view'); + var node = grid.getNode (); if (view === Vn.Catalog.View.GRID) { @@ -68,8 +65,7 @@ Vn.Catalog = new Class tip: _('List view') }); this.view = Vn.Catalog.View.GRID; - this.viewNode = this.$('grid-view').getNode (); - this.viewHolder = this.$('grid-view'); + var className = 'grid-view'; } else { @@ -78,13 +74,11 @@ Vn.Catalog = new Class tip: _('Grid view') }); this.view = Vn.Catalog.View.LIST; - this.viewNode = this.$('list-view'); - this.viewHolder = this.$('items-grid'); + var className = 'list-view'; } - this.$('main').appendChild (this.viewNode); - this.viewHolder.model = this.$('items-model'); - Vn.Cookie.set ('hedera_view', this.view) + node.className = className; + Vn.Cookie.set ('hedera_view', this.view); } ,onBasketReady: function (form) diff --git a/web/forms/ecomerce/catalog/style.css b/web/forms/ecomerce/catalog/style.css index 3697ed10..e541d11f 100755 --- a/web/forms/ecomerce/catalog/style.css +++ b/web/forms/ecomerce/catalog/style.css @@ -181,8 +181,8 @@ button.confirm > img height: 1em; } -/* List view */ - +/* Items */ +/* .catalog .list-view { margin: 0 auto; @@ -214,7 +214,7 @@ button.confirm > img max-height: 2.5em; max-width: 2.5em; border-radius: 50%; -} +}*/ td.second-category { font-weight: bold; @@ -236,16 +236,112 @@ td.third-category text-align: center; } +/* List view */ + +.list-view +{ + max-width: 30em; + margin: 0 auto; + padding: 1em; +} +.list-view .item-box +{ + display: block; + position: relative; + width: 100%; + margin: 0; + height: 5.5em; + overflow: visible; + border-bottom: 1px solid #DDD; +} +.list-view .item-box > .image +{ + margin: 1em; + width: 3.5em; + height: 3.5em; + float: left; + border-radius: 50%; + overflow: hidden; +} +.list-view .item-box > .image > img +{ + max-width: 100%; + height: 100%; + display: block; + margin: 0 auto; +} +.list-view .item-info +{ + position: absolute; + left: 4.6em; + right: 0; + top: 0; + bottom: 0; + margin: .9em; +} +.list-view .item-info > h2 +{ + font-size: 1em; + font-weight: normal; + padding: 0; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; +} +.list-view .item-info > p +{ + margin: 0; + padding: 0; + color: #777; + font-size: .8em; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; +} +.list-view .item-info > .producer +{ + text-transform: uppercase; +} +.list-view .item-info > .color +{ + display: none; +} +.list-view .item-info > .aval-price +{ + position: absolute; + bottom: 0; + right: .3em; +} +.list-view .item-info .from +{ + font-size: .8em; + font-style: italic; +} +.list-view .item-info > .htk-button +{ + float: right; + margin: -.3em; + padding: .3em; +} +.list-view .item-info > .htk-button > img +{ + vertical-align: middle; +} +.list-view .item-info > .info-button +{ + margin-right: 0; +} + /* Grid view */ -.catalog .grid-view +.grid-view { padding: 1em; padding-right: .2em; padding-bottom: .4em; text-align: center; } -.item-box +.grid-view .item-box { text-align: left; position: relative; @@ -257,20 +353,20 @@ td.third-category height: 10em; overflow: hidden; } -.item-box > .image +.grid-view .item-box > .image { width: 10em; height: 100%; float: left; } -.item-box > .image > img +.grid-view .item-box > .image > img { max-width: 100%; height: 100%; display: block; margin: 0 auto; } -.item-info +.grid-view .item-info { position: absolute; left: 10.4em; @@ -279,13 +375,13 @@ td.third-category bottom: 0; margin: .6em; } -.item-info > h2 +.grid-view .item-info > h2 { font-size: 1.2em; font-weight: normal; padding-top: 0; } -.item-info > p +.grid-view .item-info > p { margin: 0; padding: 0; @@ -295,33 +391,33 @@ td.third-category white-space: nowrap; overflow: hidden; } -.item-info > .producer +.grid-view .item-info > .producer { text-transform: uppercase; } -.item-info > .aval-price +.grid-view .item-info > .aval-price { position: absolute; bottom: 0; right: 2.8em; } -.item-info .from +.grid-view .item-info .from { font-size: .8em; font-style: italic; } -.item-info .add-button +.grid-view .item-info .add-button { position: absolute; bottom: 0; right: 0; padding: .3em; } -.item-info .add-button > img +.grid-view .item-info .add-button > img { vertical-align: middle; } -.item-info > .info-button +.grid-view .item-info > .info-button { float: right; } diff --git a/web/forms/ecomerce/catalog/ui.xml b/web/forms/ecomerce/catalog/ui.xml index cb55d6aa..b0d1b335 100755 --- a/web/forms/ecomerce/catalog/ui.xml +++ b/web/forms/ecomerce/catalog/ui.xml @@ -117,8 +117,72 @@ param="search"/>
-
+
+ + +
+
+ +
+
+ + +
+ + + from + + + + +
+

+ +

+

+ +

+

+ Size , + Category +

+

+ Color + +

+
+
+
+
+
+

diff --git a/web/forms/ecomerce/ticket/ui.xml b/web/forms/ecomerce/ticket/ui.xml index 155bc643..a3e3fe35 100755 --- a/web/forms/ecomerce/ticket/ui.xml +++ b/web/forms/ecomerce/ticket/ui.xml @@ -60,7 +60,7 @@

- Total + Total diff --git a/web/js/hedera/login.css b/web/js/hedera/login.css index b840d47c..c540860c 100755 --- a/web/js/hedera/login.css +++ b/web/js/hedera/login.css @@ -62,7 +62,7 @@ body right: 0; } -@media (max-height: 700px) +@media (max-height: 630px) { .vn-login { diff --git a/web/js/hedera/style.css b/web/js/hedera/style.css index 8633bb62..31553bde 100755 --- a/web/js/hedera/style.css +++ b/web/js/hedera/style.css @@ -10,7 +10,7 @@ /* Desktop - Laptop 1360x768 */ @media (max-resolution: 119dpi) and (min-device-width: 1340px) and (max-device-width: 1899px) { - body { font-size: 12pt; } + body { font-size: 11pt; } } /* Desktop - FHD 1920x1080 */ diff --git a/web/locale/ca/forms/ecomerce/orders.json b/web/locale/ca/forms/ecomerce/orders.json index 8d8345d8..49f1c177 100755 --- a/web/locale/ca/forms/ecomerce/orders.json +++ b/web/locale/ca/forms/ecomerce/orders.json @@ -11,7 +11,7 @@ ,"LastOrders": "Últimes comandes" ,"Balance:": "Saldo:" - ,"PaymentInfo": "La quantitat que mostrada és el teu saldo pendent (negatiu) o favorable a dia d'avui, no té en compte comandes del futur. Perquè la teva comanda sigui enviat, aquesta quantitat ha de ser igual o més gran que 0. Si vols fer un lliurament a compte, esborra la quantitat suggerida i introdueix la quantitat que vulguis." + ,"PaymentInfo": "La quantitat mostrada és el teu saldo pendent (negatiu) o favorable a dia d'avui, no té en compte comandes del futur. Perquè la teva comanda sigui enviat, aquesta quantitat ha de ser igual o més gran que 0. Si vols fer un lliurament a compte, prem el botó de pagament, esborra la quantitat suggerida e introdueix la quantitat que vulguis." ,"MakePayment": "Realitzar pagament" ,"Company": "Empresa" ,"Pending": "Pendent" diff --git a/web/locale/en/forms/ecomerce/orders.json b/web/locale/en/forms/ecomerce/orders.json index a2833d1b..fc2c17ec 100755 --- a/web/locale/en/forms/ecomerce/orders.json +++ b/web/locale/en/forms/ecomerce/orders.json @@ -11,7 +11,7 @@ ,"LastOrders": "Last orders" ,"Balance:": "Balance:" - ,"PaymentInfo": "The amount shown is your slope (negative) or favorable balance today, it disregards future orders. For get your order shipped, this amount must be equal to or greater than 0. If you want to make a down payment, delete the suggested amount and enter the amount you want." + ,"PaymentInfo": "The amount shown is your slope (negative) or favorable balance today, it disregards future orders. For get your order shipped, this amount must be equal to or greater than 0. If you want to make a down payment, click the payment button, delete the suggested amount and enter the amount you want." ,"MakePayment": "Make payment" ,"Company": "Company" ,"Pending": "Pending" diff --git a/web/locale/es/forms/ecomerce/orders.json b/web/locale/es/forms/ecomerce/orders.json index d529fee7..cc8c5ddc 100755 --- a/web/locale/es/forms/ecomerce/orders.json +++ b/web/locale/es/forms/ecomerce/orders.json @@ -11,7 +11,7 @@ ,"LastOrders": "Últimos pedidos" ,"Balance:": "Saldo:" - ,"PaymentInfo": "La cantidad que mostrada es tu saldo pendiente (negativa) o favorable a día de hoy, no tiene en cuenta pedidos del futuro. Para que tu pedido sea enviado, esta cantidad debe ser igual o mayor que 0. Si quieres realizar una entrega a cuenta, borra la cantidad sugerida e introduce la cantidad que desees." + ,"PaymentInfo": "La cantidad mostrada es tu saldo pendiente (negativa) o favorable a día de hoy, no tiene en cuenta pedidos del futuro. Para que tu pedido sea enviado, esta cantidad debe ser igual o mayor que 0. Si quieres realizar una entrega a cuenta, pulsa el botón de pago, borra la cantidad sugerida e introduce la cantidad que desees." ,"MakePayment": "Realizar pago" ,"Company": "Empresa" ,"Pending": "Pendiente" diff --git a/web/locale/pt/forms/ecomerce/orders.json b/web/locale/pt/forms/ecomerce/orders.json index f9da5c4b..cdb5f7c9 100644 --- a/web/locale/pt/forms/ecomerce/orders.json +++ b/web/locale/pt/forms/ecomerce/orders.json @@ -11,7 +11,7 @@ ,"LastOrders": "Últimos pedidos" ,"Balance:": "Saldo:" - ,"PaymentInfo": "A quantidade mostrada é seu saldo pendente (negativo) ou favorável a dia de hoje, não se vincula a pedidos futuros. Para que seu pedido seja enviado, esta quantidade deve ser igual ou superior a 0. Se queres realizar um depósito à conta, apague a quantidade sugerida e introduza a quantidade que deseje." + ,"PaymentInfo": "A quantidade mostrada é seu saldo pendente (negativo) ou favorável a dia de hoje, não se vincula a pedidos futuros. Para que seu pedido seja enviado, esta quantidade deve ser igual ou superior a 0. Se queres realizar um depósito à conta, clique no botão de pagamento, apague a quantidade sugerida e introduza a quantidade que deseje." ,"MakePayment": "Realizar pagamento" ,"Company": "Empresa" ,"Pending": "Pendente" diff --git a/web/rest/tpv.php b/web/rest/tpv.php index d01ae0f7..e4ce989b 100755 --- a/web/rest/tpv.php +++ b/web/rest/tpv.php @@ -28,7 +28,6 @@ class RestMod extends Rest\Module ,'params' => $params ,'signature' => $signature ]; - trigger_error (print_r ($result, TRUE)); return $result; } diff --git a/web/rest/visits-sync.php b/web/rest/visits-sync.php new file mode 100644 index 00000000..35fcdd0b --- /dev/null +++ b/web/rest/visits-sync.php @@ -0,0 +1,57 @@ +conn; + $result = $conn->query ("SELECT id, agent FROM visit_agent " + ."WHERE version = '0.0' OR platform = 'unknown' OR cookies IS NULL ORDER BY id DESC"); + + $stmt = $conn->prepare ( + 'UPDATE visit_agent SET platform = ?, browser = ?, version = ?, javascript = ?, cookies = ? WHERE id = ?'); + + if ($result && $stmt) + { + set_time_limit (0); + + $stmt->bind_param('sssiii' + ,$platform + ,$browser + ,$version + ,$javascript + ,$cookies + ,$id + ); + + // Update the visit info using browscap + + while ($row = $result->fetch_assoc ()) + { + $info = get_browser ($row['agent']); + $platform = $info->platform; + $browser = $info->browser; + $version = $info->version; + $javascript = $info->javascript; + $cookies = $info->cookies; + $id = $row['id']; + $stmt->execute (); + } + + $result = TRUE; + } + else + $result = FALSE; + + if ($stmt) + $stmt->close (); + if ($result) + $result->free (); + + return $result; + } +} + +?> diff --git a/web/visits-sync.php b/web/visits-sync.php deleted file mode 100755 index 26baca41..00000000 --- a/web/visits-sync.php +++ /dev/null @@ -1,66 +0,0 @@ -connect_error) - exit ($conn->connect_error); - -$result = $conn->query ("SELECT id, agent FROM visit_agent " - ."WHERE version = '0.0' OR platform = 'unknown' OR cookies IS NULL ORDER BY id DESC"); - -$stmt = $conn->prepare ( - 'UPDATE visit_agent SET platform = ?, browser = ?, version = ?, javascript = ?, cookies = ? WHERE id = ?'); - -if ($result && $stmt) -{ - set_time_limit (0); - - $stmt->bind_param('sssiii' - ,$platform - ,$browser - ,$version - ,$javascript - ,$cookies - ,$id - ); - - while ($row = $result->fetch_assoc ()) - { - echo sprintf ("Processing row: %d\n", $row['id']); - - $info = get_browser ($row['agent']); - $platform = $info->platform; - $browser = $info->browser; - $version = $info->version; - $javascript = $info->javascript; - $cookies = $info->cookies; - $id = $row['id']; - $stmt->execute (); - } -} - -if ($stmt) - $stmt->close (); -if ($result) - $result->free (); - -if ($conn->errno) - exit ($conn->error); - -$conn->close (); - -?>