diff --git a/package/DEBIAN/control b/package/DEBIAN/control
index 17527ca4..6559cde0 100644
--- a/package/DEBIAN/control
+++ b/package/DEBIAN/control
@@ -3,6 +3,7 @@ Version: 1.0-47
Architecture: all
Maintainer: Juan Ferrer Toribio
Depends: apache2, php5-mysql, php-vn-web
+Suggests: php-text-captcha, php5-imap, vn-image, tinymce
Section: misc
Priority: optional
Description: Verdnatura's web page
diff --git a/package/DEBIAN/postinst b/package/DEBIAN/postinst
index 1cf85653..90237ab0 100755
--- a/package/DEBIAN/postinst
+++ b/package/DEBIAN/postinst
@@ -1,5 +1,6 @@
#!/bin/bash
+a2enconf hedera-web
service apache2 reload
service cron restart
diff --git a/package/etc/apache2/conf.d/hedera-web b/package/etc/apache2/conf-available/hedera-web.conf
similarity index 89%
rename from package/etc/apache2/conf.d/hedera-web
rename to package/etc/apache2/conf-available/hedera-web.conf
index b20018c3..9a60aca0 100644
--- a/package/etc/apache2/conf.d/hedera-web
+++ b/package/etc/apache2/conf-available/hedera-web.conf
@@ -1,4 +1,4 @@
-Alias /hedera-web /usr/share/hedera-web/
+# Alias /hedera-web /usr/share/hedera-web/
@@ -19,3 +19,4 @@ Alias /hedera-web /usr/share/hedera-web/
+
diff --git a/package/etc/hedera-web/config.php b/package/etc/hedera-web/config.php
index 5d1c9b71..b59b22a8 100755
--- a/package/etc/hedera-web/config.php
+++ b/package/etc/hedera-web/config.php
@@ -10,7 +10,7 @@ $conf = [
'db' => [
'host' => 'db.verdnatura.es'
,'schema' => 'hedera-web'
- ,'user' => 'root'
+ ,'user' => 'hedera-web'
,'pass' => 'base64pass'
]
diff --git a/package/usr/share/hedera-web/forms/account/address/address.js b/package/usr/share/hedera-web/forms/account/address/address.js
index f85218fb..af753096 100755
--- a/package/usr/share/hedera-web/forms/account/address/address.js
+++ b/package/usr/share/hedera-web/forms/account/address/address.js
@@ -16,6 +16,17 @@ Vn.Address = new Class
if (this.$('address').value == 0)
form.insertRow ();
}
+
+ ,onIterChange: function (form)
+ {
+ // TODO: Implement one way binding in Vn.Param
+
+ if (form.get ('country_id') != this.country)
+ {
+ this.country = form.get ('country_id');
+ this.$('country').value = this.country;
+ }
+ }
,onOperationsDone: function ()
{
diff --git a/package/usr/share/hedera-web/forms/account/address/ui.xml b/package/usr/share/hedera-web/forms/account/address/ui.xml
index 0b3df783..81694027 100755
--- a/package/usr/share/hedera-web/forms/account/address/ui.xml
+++ b/package/usr/share/hedera-web/forms/account/address/ui.xml
@@ -3,11 +3,13 @@
-
+
- SELECT id, name, consignee, city, zip_code, province_id
+ SELECT a.id, a.name, a.consignee, a.city, a.zip_code, a.province_id, c.Id country_id
FROM address_view a
- WHERE active != FALSE AND id = #address
+ LEFT JOIN vn2008.province p ON p.province_id = a.province_id
+ JOIN vn2008.Paises c ON c.Id = p.Paises_Id
+ WHERE active != FALSE AND a.id = #address
@@ -46,12 +48,26 @@
+
+
+
+
+
+ SELECT Id, Pais FROM vn2008.Paises
+ ORDER BY Pais
+
+
+
SELECT province_id, name FROM vn2008.province
+ WHERE Paises_Id = #country
ORDER BY name
+
+
+
diff --git a/package/usr/share/hedera-web/forms/account/conf/ui.xml b/package/usr/share/hedera-web/forms/account/conf/ui.xml
index bd824be2..e4e78a80 100755
--- a/package/usr/share/hedera-web/forms/account/conf/ui.xml
+++ b/package/usr/share/hedera-web/forms/account/conf/ui.xml
@@ -9,9 +9,10 @@
- SELECT id, consignee, p.name province, zip_code, city, a.name, active
+ SELECT a.id, a.consignee, p.name province, a.zip_code, a.city, a.name, a.active, c.Pais country
FROM address_view a
- JOIN vn2008.province p ON a.province_id = p.province_id
+ LEFT JOIN vn2008.province p ON a.province_id = p.province_id
+ JOIN vn2008.Paises c ON c.Id = p.Paises_Id
WHERE active != FALSE
@@ -84,11 +85,12 @@
-
-
- SELECT Id_Agencia, Agencia FROM vn2008.Agencias
- WHERE web != FALSE ORDER BY Agencia
-
-
-
-
-
-
-
-
-
- Insurance
-
-
-
-
-
-
-
-
-
ShippingAddress
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
+
+
+
+
DeliveryOrPickupQuestion
+
+
+
+
+
+
+
+
+
+
-
+
+
OrderDateDeliveryQuestion
+
+
+
+
+
+
AddressQuestion
+
+
+
+
+
+
+
+
+
+ -
+
+
+
+ -
+
+
+
+
+
+
+
AgencyQuestion
+
+
+
+ SELECT a.Id_Agencia, a.description
+ FROM vn2008.Agencias a
+ JOIN vn2008.Vistas v ON a.Vista = v.vista_id
+ WHERE a.web != FALSE
+ AND v.code = 'AGENCY'
+ ORDER BY a.description
+
+
+
+ NEXT
+
+
+
+
+
+
PickupWarehouseQuestion
+
+
+
+ SELECT a.Id_Agencia, SUBSTR(a.description, 5)
+ FROM vn2008.Agencias a
+ JOIN vn2008.Vistas v ON a.Vista = v.vista_id
+ WHERE a.web != FALSE
+ AND v.code = 'PICKUP'
+ ORDER BY a.description
+
+
+
+ NEXT
+
+
+
+
+
+
+ SELECT a.Id_Agencia, a.description
+ FROM vn2008.Agencias a
+ JOIN vn2008.Vistas v ON a.Vista = v.vista_id
+ WHERE a.web != FALSE
+ AND v.code = 'AGENCY'
+ ORDER BY a.description
+
+
+
+
+
+
+
+ SELECT a.Id_Agencia, a.description
+ FROM vn2008.Agencias a
+ JOIN vn2008.Vistas v ON a.Vista = v.vista_id
+ WHERE a.web != FALSE
+ AND v.code = 'PICKUP'
+ ORDER BY a.description
+
+
+
+
+
+
+
+
+
+
+
+
+
ShippingAddress
+
+
+
+ AddAddress
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+
diff --git a/package/usr/share/hedera-web/forms/ecomerce/orders/orders.js b/package/usr/share/hedera-web/forms/ecomerce/orders/orders.js
index 3555fb77..06447e8f 100755
--- a/package/usr/share/hedera-web/forms/ecomerce/orders/orders.js
+++ b/package/usr/share/hedera-web/forms/ecomerce/orders/orders.js
@@ -31,7 +31,7 @@ Vn.Orders = new Class
,onStartClick: function ()
{
Vn.Cookie.unset ('order');
- this.hash.set ({'form': 'ecomerce/basket'});
+ this.hash.set ({'form': 'ecomerce/checkout'});
}
,onContinueClick: function (column, orderId)
@@ -140,10 +140,14 @@ Vn.Orders = new Class
if (res && res.next ())
{
- var transactionId = res.get ('ds_order');
-
var form = this.$('tpv-form');
- var formMap =
+ form.action = res.get ('url');
+
+ var transactionId = res.get ('ds_order');
+ form['Ds_Merchant_UrlOK'].value = this.getTpvUrl ('ok', transactionId);
+ form['Ds_Merchant_UrlKO'].value = this.getTpvUrl ('ko', transactionId);
+
+ var fieldsMap =
{
'Ds_Merchant_Amount': 'amount'
,'Ds_Merchant_Order': 'ds_order'
@@ -155,15 +159,8 @@ Vn.Orders = new Class
,'Ds_Merchant_MerchantSignature': 'signature'
};
- form.action = res.get ('url');
-
- for (var name in formMap)
- form[name].value = res.get (formMap[name]);
-
- form['Ds_Merchant_UrlOK'].value = this.getTpvUrl ('ok', transactionId);
- form['Ds_Merchant_UrlKO'].value = this.getTpvUrl ('ko', transactionId);
-
- // Showing TPV on the same window
+ for (var field in fieldsMap)
+ form[field].value = res.get (fieldsMap[field]);
form.submit ();
}
diff --git a/package/usr/share/hedera-web/forms/ecomerce/orders/style.css b/package/usr/share/hedera-web/forms/ecomerce/orders/style.css
index da6a2202..37493da2 100755
--- a/package/usr/share/hedera-web/forms/ecomerce/orders/style.css
+++ b/package/usr/share/hedera-web/forms/ecomerce/orders/style.css
@@ -11,6 +11,10 @@
{
height: 5em;
}
+.orders .confirmed
+{
+ margin-top: 1em;
+}
/* Info box */
diff --git a/package/usr/share/hedera-web/forms/ecomerce/orders/ui.xml b/package/usr/share/hedera-web/forms/ecomerce/orders/ui.xml
index e0d8ace2..beab0a7f 100755
--- a/package/usr/share/hedera-web/forms/ecomerce/orders/ui.xml
+++ b/package/usr/share/hedera-web/forms/ecomerce/orders/ui.xml
@@ -28,7 +28,7 @@
+
+
+
+ SELECT a.Id_Agencia, a.description
+ FROM vn2008.Agencias a
+ JOIN vn2008.Vistas v ON a.Vista = v.vista_id
+ WHERE a.web != FALSE
+ AND v.code = 'PICKUP'
+ ORDER BY a.description
+
+
+
+
+
+
+
+ SELECT a.Id_Agencia, a.description
+ FROM vn2008.Agencias a
+ JOIN vn2008.Vistas v ON a.Vista = v.vista_id
+ WHERE a.web != FALSE
+ AND v.code = 'AGENCY'
+ ORDER BY a.description
+
+
+