Refactor billing form templates and improve error handling
- Updated billing code label from "Kod" to "Kod pocztowy" for clarity. - Enhanced error message handling in createFirstUserDataSuccess.php for better user feedback. - Removed deprecated userdata_order_form.html and userdata_order_form_billing.html.bck templates. - Adjusted layout in userdata_order_form.html for better responsiveness. - Added input formatting for postal code in userdata_order_form.html to enforce correct input format.
This commit is contained in:
16
.vscode/ftp-kr.sync.cache.json
vendored
16
.vscode/ftp-kr.sync.cache.json
vendored
@@ -3,12 +3,6 @@
|
|||||||
"domains": {
|
"domains": {
|
||||||
"grzanieplus.pl": {
|
"grzanieplus.pl": {
|
||||||
"public_html": {
|
"public_html": {
|
||||||
".gitignore": {
|
|
||||||
"type": "-",
|
|
||||||
"size": 32,
|
|
||||||
"lmtime": 0,
|
|
||||||
"modified": false
|
|
||||||
},
|
|
||||||
"apps": {
|
"apps": {
|
||||||
"frontend": {
|
"frontend": {
|
||||||
"modules": {
|
"modules": {
|
||||||
@@ -1578,8 +1572,8 @@
|
|||||||
},
|
},
|
||||||
"one_column.html": {
|
"one_column.html": {
|
||||||
"type": "-",
|
"type": "-",
|
||||||
"size": 2730,
|
"size": 3068,
|
||||||
"lmtime": 1725624369265,
|
"lmtime": 1748290022761,
|
||||||
"modified": false
|
"modified": false
|
||||||
},
|
},
|
||||||
"two_column.html": {
|
"two_column.html": {
|
||||||
@@ -3814,6 +3808,12 @@
|
|||||||
},
|
},
|
||||||
"doc": {},
|
"doc": {},
|
||||||
"fastcache": {},
|
"fastcache": {},
|
||||||
|
".gitignore": {
|
||||||
|
"type": "-",
|
||||||
|
"size": 32,
|
||||||
|
"lmtime": 0,
|
||||||
|
"modified": false
|
||||||
|
},
|
||||||
"install": {},
|
"install": {},
|
||||||
"lib": {},
|
"lib": {},
|
||||||
"log": {},
|
"log": {},
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* SOTESHOP/stUser
|
* SOTESHOP/stUser
|
||||||
*
|
*
|
||||||
* Ten plik należy do aplikacji stUser opartej na licencji (Professional License SOTE).
|
* Ten plik należy do aplikacji stUser opartej na licencji (Professional License SOTE).
|
||||||
* Nie zmieniaj tego pliku, jeśli chcesz korzystać z automatycznych aktualizacji oprogramowania.
|
* Nie zmieniaj tego pliku, jeśli chcesz korzystać z automatycznych aktualizacji oprogramowania.
|
||||||
* Jeśli chcesz wprowadzać swoje modyfikacje do programu, zapoznaj się z dokumentacją, jak zmieniać
|
* Jeśli chcesz wprowadzać swoje modyfikacje do programu, zapoznaj się z dokumentacją, jak zmieniać
|
||||||
* oprogramowanie bez zmiany kodu bazowego http://www.sote.pl/modifications
|
* oprogramowanie bez zmiany kodu bazowego http://www.sote.pl/modifications
|
||||||
*
|
*
|
||||||
* @package stUser
|
* @package stUser
|
||||||
* @subpackage actions
|
* @subpackage actions
|
||||||
* @copyright SOTE (www.sote.pl)
|
* @copyright SOTE (www.sote.pl)
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Akcje profili użytkownika
|
* Akcje profili użytkownika
|
||||||
*
|
*
|
||||||
* @author Bartosz Alejski <bartosz.alejski@sote.pl>
|
* @author Bartosz Alejski <bartosz.alejski@sote.pl>
|
||||||
*
|
*
|
||||||
@@ -37,7 +37,7 @@ class stUserDataActions extends stActions
|
|||||||
$this->show_address_more = $user_config->get('show_address_more');
|
$this->show_address_more = $user_config->get('show_address_more');
|
||||||
|
|
||||||
$change_default_user = $user_config->get('change_default_user');
|
$change_default_user = $user_config->get('change_default_user');
|
||||||
|
|
||||||
if ($this->getRequest()->getMethod() == sfRequest::POST)
|
if ($this->getRequest()->getMethod() == sfRequest::POST)
|
||||||
{
|
{
|
||||||
$userDataBilling = $this->getRequestParameter('user_data_billing');
|
$userDataBilling = $this->getRequestParameter('user_data_billing');
|
||||||
@@ -55,11 +55,11 @@ class stUserDataActions extends stActions
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(!stTheme::is_responsive()){
|
if(!stTheme::is_responsive()){
|
||||||
$this->redirect('stUser/editAccount');
|
$this->redirect('stUser/editAccount');
|
||||||
}else{
|
}else{
|
||||||
$this->redirect('stUserData/userPanel');
|
$this->redirect('stUserData/userPanel');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$userDataBilling = $this->getUserDataBillingDefault($this->getUser()->getGuardUser()->getId());
|
$userDataBilling = $this->getUserDataBillingDefault($this->getUser()->getGuardUser()->getId());
|
||||||
@@ -67,10 +67,10 @@ class stUserDataActions extends stActions
|
|||||||
|
|
||||||
$userDataDelivery = $this->getUserDataDeliveryDefault($this->getUser()->getGuardUser()->getId());
|
$userDataDelivery = $this->getUserDataDeliveryDefault($this->getUser()->getGuardUser()->getId());
|
||||||
$this->userDataDelivery = $userDataDelivery;
|
$this->userDataDelivery = $userDataDelivery;
|
||||||
|
|
||||||
$this->type1_delivery_checker = 1;
|
$this->type1_delivery_checker = 1;
|
||||||
$this->type2_delivery_checker = 0;
|
$this->type2_delivery_checker = 0;
|
||||||
|
|
||||||
if($change_default_user!=1)
|
if($change_default_user!=1)
|
||||||
{
|
{
|
||||||
$this->type1_billing_checker = 1;
|
$this->type1_billing_checker = 1;
|
||||||
@@ -79,11 +79,11 @@ class stUserDataActions extends stActions
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->type1_billing_checker = 0;
|
$this->type1_billing_checker = 0;
|
||||||
$this->type2_billing_checker = 1;
|
$this->type2_billing_checker = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->different_billing = 0;
|
$this->different_billing = 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -95,22 +95,22 @@ class stUserDataActions extends stActions
|
|||||||
{
|
{
|
||||||
if($this->getUser()->isAuthenticated())
|
if($this->getUser()->isAuthenticated())
|
||||||
{
|
{
|
||||||
$userDataBilling = stUser::updateUserData(null,$this->getUser()->getGuardUser()->getId(),1,1);
|
$userDataBilling = stUser::updateUserData(null,$this->getUser()->getGuardUser()->getId(),1,1);
|
||||||
$this->redirect('stUserData/editProfile?userDataType=billing&userDataId='.$userDataBilling->getId().'&showEditProfileForm=true');
|
$this->redirect('stUserData/editProfile?userDataType=billing&userDataId='.$userDataBilling->getId().'&showEditProfileForm=true');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
stUser::processAuthentication();
|
stUser::processAuthentication();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function executeCreateFirstUserDataDelivery()
|
public function executeCreateFirstUserDataDelivery()
|
||||||
{
|
{
|
||||||
if($this->getUser()->isAuthenticated())
|
if($this->getUser()->isAuthenticated())
|
||||||
{
|
{
|
||||||
$userDataDelivery = stUser::updateUserData(null,$this->getUser()->getGuardUser()->getId(),0,1);
|
$userDataDelivery = stUser::updateUserData(null,$this->getUser()->getGuardUser()->getId(),0,1);
|
||||||
$this->redirect('stUserData/editProfile?userDataType=delivery&userDataId='.$userDataDelivery->getId().'&showEditProfileForm=true');
|
$this->redirect('stUserData/editProfile?userDataType=delivery&userDataId='.$userDataDelivery->getId().'&showEditProfileForm=true');
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -193,45 +193,45 @@ class stUserDataActions extends stActions
|
|||||||
|
|
||||||
if($this->getUser()->isAuthenticated())
|
if($this->getUser()->isAuthenticated())
|
||||||
{
|
{
|
||||||
|
|
||||||
$userDataBilling = $this->getUserDataBillingDefault($this->getUser()->getAttribute('user_id', null, 'sfGuardSecurityUser'));
|
$userDataBilling = $this->getUserDataBillingDefault($this->getUser()->getAttribute('user_id', null, 'sfGuardSecurityUser'));
|
||||||
$this->userDataBilling = $userDataBilling;
|
$this->userDataBilling = $userDataBilling;
|
||||||
|
|
||||||
$userDataDelivery = $this->getUserDataDeliveryDefault($this->getUser()->getAttribute('user_id', null, 'sfGuardSecurityUser'));
|
$userDataDelivery = $this->getUserDataDeliveryDefault($this->getUser()->getAttribute('user_id', null, 'sfGuardSecurityUser'));
|
||||||
$this->userDataDelivery = $userDataDelivery;
|
$this->userDataDelivery = $userDataDelivery;
|
||||||
|
|
||||||
if(!stTheme::is_responsive()){
|
if(!stTheme::is_responsive()){
|
||||||
|
|
||||||
if($userDataBilling->getAddress()=="" || $userDataDelivery->getAddress()=="")
|
if($userDataBilling->getAddress()=="" || $userDataDelivery->getAddress()=="")
|
||||||
{
|
{
|
||||||
$this->redirect('stUserData/createFirstUserData');
|
$this->redirect('stUserData/createFirstUserData');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$c = new Criteria();
|
$c = new Criteria();
|
||||||
$c->add(OrderPeer::SF_GUARD_USER_ID, $this->getUser()->getAttribute('user_id', null, 'sfGuardSecurityUser'));
|
$c->add(OrderPeer::SF_GUARD_USER_ID, $this->getUser()->getAttribute('user_id', null, 'sfGuardSecurityUser'));
|
||||||
$c->setLimit(10);
|
$c->setLimit(10);
|
||||||
$orders = OrderPeer::doSelect($c);
|
$orders = OrderPeer::doSelect($c);
|
||||||
|
|
||||||
if($orders)
|
if($orders)
|
||||||
{
|
{
|
||||||
$this->user_order = 1;
|
$this->user_order = 1;
|
||||||
$this->orders = $orders;
|
$this->orders = $orders;
|
||||||
}
|
}
|
||||||
|
|
||||||
$c = new Criteria();
|
$c = new Criteria();
|
||||||
$c->add(OrderPeer::SF_GUARD_USER_ID, $this->getUser()->getAttribute('user_id', null, 'sfGuardSecurityUser'));
|
$c->add(OrderPeer::SF_GUARD_USER_ID, $this->getUser()->getAttribute('user_id', null, 'sfGuardSecurityUser'));
|
||||||
$c->addDescendingOrderByColumn('CREATED_AT');
|
$c->addDescendingOrderByColumn('CREATED_AT');
|
||||||
$lastOrder = OrderPeer::doSelectOne($c);
|
$lastOrder = OrderPeer::doSelectOne($c);
|
||||||
|
|
||||||
if($lastOrder)
|
if($lastOrder)
|
||||||
{
|
{
|
||||||
$this->lastOrder = $lastOrder;
|
$this->lastOrder = $lastOrder;
|
||||||
$this->currency = $lastOrder->getOrderCurrency();
|
$this->currency = $lastOrder->getOrderCurrency();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$c = new Criteria();
|
$c = new Criteria();
|
||||||
$c->add(DiscountUserPeer::SF_GUARD_USER_ID, $this->getUser()->getAttribute('user_id', null, 'sfGuardSecurityUser'));
|
$c->add(DiscountUserPeer::SF_GUARD_USER_ID, $this->getUser()->getAttribute('user_id', null, 'sfGuardSecurityUser'));
|
||||||
$userDiscount = DiscountUserPeer::doSelectOne($c);
|
$userDiscount = DiscountUserPeer::doSelectOne($c);
|
||||||
@@ -255,11 +255,11 @@ class stUserDataActions extends stActions
|
|||||||
$discount_count = DiscountPeer::doCount($c);
|
$discount_count = DiscountPeer::doCount($c);
|
||||||
|
|
||||||
if($userDiscount){
|
if($userDiscount){
|
||||||
$this->user_discounts = $discount_count > 0 || @$user_discount && $user_discount->getDiscount()->getValue() > 0;
|
$this->user_discounts = $discount_count > 0 || @$user_discount && $user_discount->getDiscount()->getValue() > 0;
|
||||||
}else{
|
}else{
|
||||||
$this->user_discounts = false;
|
$this->user_discounts = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -271,16 +271,16 @@ class stUserDataActions extends stActions
|
|||||||
$newsletterConfig = $newsletterConfig->load();
|
$newsletterConfig = $newsletterConfig->load();
|
||||||
|
|
||||||
$this->newsletterConfig = $newsletterConfig;
|
$this->newsletterConfig = $newsletterConfig;
|
||||||
|
|
||||||
|
|
||||||
$pointsConfig = stConfig::getInstance($this->getContext(), 'stPointsBackend');
|
$pointsConfig = stConfig::getInstance($this->getContext(), 'stPointsBackend');
|
||||||
|
|
||||||
$pointsConfig = $pointsConfig->load();
|
$pointsConfig = $pointsConfig->load();
|
||||||
|
|
||||||
stPoints::refreshLoginStatusPoints();
|
stPoints::refreshLoginStatusPoints();
|
||||||
|
|
||||||
$this->pointsConfig = $pointsConfig;
|
$this->pointsConfig = $pointsConfig;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function executeTest()
|
public function executeTest()
|
||||||
@@ -326,40 +326,40 @@ class stUserDataActions extends stActions
|
|||||||
$userData = $this->getRequestParameter('user_data');
|
$userData = $this->getRequestParameter('user_data');
|
||||||
$userDataType = $this->getRequestParameter('userDataType');
|
$userDataType = $this->getRequestParameter('userDataType');
|
||||||
$showEditProfileForm = $this->getRequestParameter('showEditProfileForm');
|
$showEditProfileForm = $this->getRequestParameter('showEditProfileForm');
|
||||||
|
|
||||||
// print_r($userData);
|
// print_r($userData);
|
||||||
// die();
|
// die();
|
||||||
|
|
||||||
if($userDataType=="billing")
|
if($userDataType=="billing")
|
||||||
{
|
{
|
||||||
$isBilling = 1;
|
$isBilling = 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$isBilling = 0;
|
$isBilling = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if($this->hasRequestParameter('user_data_delivery'))
|
if($this->hasRequestParameter('user_data_delivery'))
|
||||||
{
|
{
|
||||||
$userData['country'] = $this->getRequestParameter('user_data_delivery[country]');
|
$userData['country'] = $this->getRequestParameter('user_data_delivery[country]');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// $c = new Criteria();
|
// $c = new Criteria();
|
||||||
// $c->add(UserDataPeer::SF_GUARD_USER_ID, $this->getUser()->getGuardUser()->getId());
|
// $c->add(UserDataPeer::SF_GUARD_USER_ID, $this->getUser()->getGuardUser()->getId());
|
||||||
// $c->add(UserDataPeer::IS_BILLING, $isBilling);
|
// $c->add(UserDataPeer::IS_BILLING, $isBilling);
|
||||||
//
|
//
|
||||||
// if(!UserDataPeer::doSelectOne($c))
|
// if(!UserDataPeer::doSelectOne($c))
|
||||||
// {
|
// {
|
||||||
// $userData['isDefault']=1;
|
// $userData['isDefault']=1;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
||||||
// if($userData['isDefault']==1){
|
// if($userData['isDefault']==1){
|
||||||
// $this->setDefaultUserData($userData['id'], $userData['isBilling']);
|
// $this->setDefaultUserData($userData['id'], $userData['isBilling']);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
||||||
stUser::updateUserData($userData['id'],$this->getUser()->getGuardUser()->getId(),$userData['isBilling'],$userData['isDefault'],$userData);
|
stUser::updateUserData($userData['id'],$this->getUser()->getGuardUser()->getId(),$userData['isBilling'],$userData['isDefault'],$userData);
|
||||||
|
|
||||||
if(!$showEditProfileForm)
|
if(!$showEditProfileForm)
|
||||||
@@ -649,7 +649,7 @@ class stUserDataActions extends stActions
|
|||||||
|
|
||||||
$this->userDataBilling = $userDataBilling;
|
$this->userDataBilling = $userDataBilling;
|
||||||
$this->userDataDelivery = $userDataDelivery;
|
$this->userDataDelivery = $userDataDelivery;
|
||||||
|
|
||||||
if ($userDataDeliveryFromRequest['customer_type']==2)
|
if ($userDataDeliveryFromRequest['customer_type']==2)
|
||||||
{
|
{
|
||||||
$this->type1_delivery_checker = 0;
|
$this->type1_delivery_checker = 0;
|
||||||
@@ -660,7 +660,7 @@ class stUserDataActions extends stActions
|
|||||||
$this->type1_delivery_checker = 1;
|
$this->type1_delivery_checker = 1;
|
||||||
$this->type2_delivery_checker = 0;
|
$this->type2_delivery_checker = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($userDataBillingFromRequest['customer_type']==2)
|
if ($userDataBillingFromRequest['customer_type']==2)
|
||||||
{
|
{
|
||||||
$this->type1_billing_checker = 0;
|
$this->type1_billing_checker = 0;
|
||||||
@@ -684,10 +684,10 @@ class stUserDataActions extends stActions
|
|||||||
$this->show_region = $user_config->get('show_region');
|
$this->show_region = $user_config->get('show_region');
|
||||||
$this->show_pesel = $user_config->get('show_pesel');
|
$this->show_pesel = $user_config->get('show_pesel');
|
||||||
|
|
||||||
$this->smarty = new stSmarty($this->getModuleName());
|
$this->smarty = new stSmarty($this->getModuleName());
|
||||||
|
|
||||||
$userDataBillingFromRequest = $this->getRequestParameter('user_data_billing');
|
$userDataBillingFromRequest = $this->getRequestParameter('user_data_billing');
|
||||||
|
|
||||||
// if ($userDataBillingFromRequest['customer_billing_type']==2)
|
// if ($userDataBillingFromRequest['customer_billing_type']==2)
|
||||||
// {
|
// {
|
||||||
// $this->type1_billing_checker = 0;
|
// $this->type1_billing_checker = 0;
|
||||||
@@ -698,9 +698,9 @@ class stUserDataActions extends stActions
|
|||||||
// $this->type1_billing_checker = 1;
|
// $this->type1_billing_checker = 1;
|
||||||
// $this->type2_billing_checker = 0;
|
// $this->type2_billing_checker = 0;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
$userDataDeliveryFromRequest = $this->getRequestParameter('user_data_delivery');
|
$userDataDeliveryFromRequest = $this->getRequestParameter('user_data_delivery');
|
||||||
|
|
||||||
// if ($userDataDeliveryFromRequest['customer_delivery_type']==2)
|
// if ($userDataDeliveryFromRequest['customer_delivery_type']==2)
|
||||||
// {
|
// {
|
||||||
// $this->type1_delivery_checker = 0;
|
// $this->type1_delivery_checker = 0;
|
||||||
@@ -711,10 +711,10 @@ class stUserDataActions extends stActions
|
|||||||
// $this->type1_delivery_checker = 1;
|
// $this->type1_delivery_checker = 1;
|
||||||
// $this->type2_delivery_checker = 0;
|
// $this->type2_delivery_checker = 0;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
||||||
$this->userDataBilling = $this->getRequestParameter('user_data_billing');
|
$this->userDataBilling = $this->getRequestParameter('user_data_billing');
|
||||||
|
|
||||||
$this->userDataDelivery = $this->getRequestParameter('user_data_delivery');
|
$this->userDataDelivery = $this->getRequestParameter('user_data_delivery');
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -723,27 +723,27 @@ class stUserDataActions extends stActions
|
|||||||
public function validateCreateFirstUserData()
|
public function validateCreateFirstUserData()
|
||||||
{
|
{
|
||||||
$error_exists = false;
|
$error_exists = false;
|
||||||
|
|
||||||
$user_config = stConfig::getInstance(sfContext::getInstance(), 'stUser');
|
$user_config = stConfig::getInstance(sfContext::getInstance(), 'stUser');
|
||||||
|
|
||||||
$i18n = $this->getContext()->getI18N();
|
$i18n = $this->getContext()->getI18N();
|
||||||
|
|
||||||
$billing = $this->getRequestParameter('user_data_billing', array());
|
$billing = $this->getRequestParameter('user_data_billing', array());
|
||||||
|
|
||||||
if ($this->getRequest()->getMethod() == sfRequest::POST)
|
if ($this->getRequest()->getMethod() == sfRequest::POST)
|
||||||
{
|
{
|
||||||
// if (stConfig::getInstance('stPaczkomatyBackend')->get('enable')) {
|
// if (stConfig::getInstance('stPaczkomatyBackend')->get('enable')) {
|
||||||
// $delivery = stDeliveryFrontend::getInstance(stBasket::getInstance($this->getUser()))->getDefaultDelivery();
|
// $delivery = stDeliveryFrontend::getInstance(stBasket::getInstance($this->getUser()))->getDefaultDelivery();
|
||||||
// if (is_object($delivery) && in_array($delivery->getPaczkomatyType(), array('ALL', 'COD'))) {
|
// if (is_object($delivery) && in_array($delivery->getPaczkomatyType(), array('ALL', 'COD'))) {
|
||||||
// $user_config->set('validate_phone', 1);
|
// $user_config->set('validate_phone', 1);
|
||||||
//
|
//
|
||||||
// if (!$billing['paczkomaty_machine_number']) {
|
// if (!$billing['paczkomaty_machine_number']) {
|
||||||
// $this->getRequest()->setError('user_data_billing{paczkomaty_machine_number}', true);
|
// $this->getRequest()->setError('user_data_billing{paczkomaty_machine_number}', true);
|
||||||
// $error_exists = true;
|
// $error_exists = true;
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|
||||||
if ($billing['customer_type']==2)
|
if ($billing['customer_type']==2)
|
||||||
{
|
{
|
||||||
if (!$billing['company'])
|
if (!$billing['company'])
|
||||||
@@ -751,12 +751,12 @@ class stUserDataActions extends stActions
|
|||||||
$this->getRequest()->setError('user_data_billing{company}', $i18n->__('Brak firmy.'));
|
$this->getRequest()->setError('user_data_billing{company}', $i18n->__('Brak firmy.'));
|
||||||
$error_exists = true;
|
$error_exists = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$billing['vat_number'])
|
if (!$billing['vat_number'])
|
||||||
{
|
{
|
||||||
$this->getRequest()->setError('user_data_billing{vat_number}', $i18n->__('Brak nipu.'));
|
$this->getRequest()->setError('user_data_billing{vat_number}', $i18n->__('Brak nipu.'));
|
||||||
$error_exists = true;
|
$error_exists = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -764,73 +764,73 @@ class stUserDataActions extends stActions
|
|||||||
{
|
{
|
||||||
$this->getRequest()->setError('user_data_billing{full_name}', $i18n->__('Brak imienia i nazwiska.'));
|
$this->getRequest()->setError('user_data_billing{full_name}', $i18n->__('Brak imienia i nazwiska.'));
|
||||||
$error_exists = true;
|
$error_exists = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$billing['phone'] && $user_config->get('validate_phone')==1)
|
if (!$billing['phone'] && $user_config->get('validate_phone')==1)
|
||||||
{
|
{
|
||||||
$this->getRequest()->setError('user_data_billing{phone}', $i18n->__('Brak telefonu.'));
|
$this->getRequest()->setError('user_data_billing{phone}', $i18n->__('Brak telefonu.'));
|
||||||
$error_exists = true;
|
$error_exists = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->hasRequestParameter('different_delivery'))
|
if ($this->hasRequestParameter('different_delivery'))
|
||||||
{
|
{
|
||||||
$delivery = $this->getRequestParameter('user_data_delivery', array());
|
$delivery = $this->getRequestParameter('user_data_delivery', array());
|
||||||
|
|
||||||
$validator = new sfStringValidator();
|
$validator = new sfStringValidator();
|
||||||
$validator->initialize($this->getContext(), array(
|
$validator->initialize($this->getContext(), array(
|
||||||
'max' => 255,
|
'max' => 255,
|
||||||
'max_error' => $i18n->__('Przekroczono dozwoloną liczbę znaków.'),
|
'max_error' => $i18n->__('Przekroczono dozwoloną liczbę znaków.'),
|
||||||
|
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|
||||||
if ($delivery['customer_type']==2)
|
if ($delivery['customer_type']==2)
|
||||||
{
|
{
|
||||||
if (!$delivery['company'])
|
if (!$delivery['company'])
|
||||||
{
|
{
|
||||||
$this->getRequest()->setError('user_data_delivery{company}', $i18n->__('Brak firmy.'));
|
$this->getRequest()->setError('user_data_delivery{company}', $i18n->__('Brak firmy.'));
|
||||||
$error_exists = true;
|
$error_exists = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!$delivery['full_name'])
|
if (!$delivery['full_name'])
|
||||||
{
|
{
|
||||||
$this->getRequest()->setError('user_data_delivery{full_name}', $i18n->__('Brak imienia i nazwiska.'));
|
$this->getRequest()->setError('user_data_delivery{full_name}', $i18n->__('Brak imienia i nazwiska.'));
|
||||||
$error_exists = true;
|
$error_exists = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$delivery['address'])
|
if (!$delivery['address'])
|
||||||
{
|
{
|
||||||
$this->getRequest()->setError('user_data_delivery{address}', $i18n->__('Brak adresu.'));
|
$this->getRequest()->setError('user_data_delivery{address}', $i18n->__('Brak adresu.'));
|
||||||
$error_exists = true;
|
$error_exists = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$delivery['code'])
|
if (!$delivery['code'])
|
||||||
{
|
{
|
||||||
$this->getRequest()->setError('user_data_delivery{code}', $i18n->__('Brak kodu.'));
|
$this->getRequest()->setError('user_data_delivery{code}', $i18n->__('Brak kodu.'));
|
||||||
$error_exists = true;
|
$error_exists = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$delivery['town'])
|
if (!$delivery['town'])
|
||||||
{
|
{
|
||||||
$this->getRequest()->setError('user_data_delivery{town}', $i18n->__('Brak miasta.'));
|
$this->getRequest()->setError('user_data_delivery{town}', $i18n->__('Brak miasta.'));
|
||||||
$error_exists = true;
|
$error_exists = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$delivery['phone'] && $user_config->get('validate_phone')==1)
|
if (!$delivery['phone'] && $user_config->get('validate_phone')==1)
|
||||||
{
|
{
|
||||||
$this->getRequest()->setError('user_data_delivery{phone}', $i18n->__('Brak telefonu.'));
|
$this->getRequest()->setError('user_data_delivery{phone}', $i18n->__('Brak telefonu.'));
|
||||||
$error_exists = true;
|
$error_exists = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return !$error_exists;
|
return !$error_exists;
|
||||||
}
|
}
|
||||||
@@ -1008,6 +1008,13 @@ class stUserDataActions extends stActions
|
|||||||
$error_exists = true;
|
$error_exists = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// address_number
|
||||||
|
if ( !isset($user_data_billing['address_number']) || !$user_data_billing['address_number'])
|
||||||
|
{
|
||||||
|
$this->getRequest()->setError('user_data_billing{address_number}', $i18n->__('Brak numeru domu/mieszkania.'));
|
||||||
|
$error_exists = true;
|
||||||
|
}
|
||||||
|
|
||||||
if (!isset($user_data_billing['code']) || !$user_data_billing['code'])
|
if (!isset($user_data_billing['code']) || !$user_data_billing['code'])
|
||||||
{
|
{
|
||||||
$this->getRequest()->setError('user_data_billing{code}', $i18n->__('Brak kodu.'));
|
$this->getRequest()->setError('user_data_billing{code}', $i18n->__('Brak kodu.'));
|
||||||
@@ -1145,7 +1152,7 @@ class stUserDataActions extends stActions
|
|||||||
|
|
||||||
if ($recaptcha->score <= 0.5)
|
if ($recaptcha->score <= 0.5)
|
||||||
{
|
{
|
||||||
// Bad score
|
// Bad score
|
||||||
$captcha_mod == "standart";
|
$captcha_mod == "standart";
|
||||||
$this->getUser()->setAttribute('badscore', true);
|
$this->getUser()->setAttribute('badscore', true);
|
||||||
}
|
}
|
||||||
@@ -1212,11 +1219,11 @@ class stUserDataActions extends stActions
|
|||||||
|
|
||||||
if (isset($user_data_billing['different_delivery']))
|
if (isset($user_data_billing['different_delivery']))
|
||||||
{
|
{
|
||||||
$country = $user_data_delivery['customer_type'] == 1 ? CountriesPeer::retrieveById($user_data_delivery['country']) : null;
|
$country = $user_data_delivery['customer_type'] == 1 ? CountriesPeer::retrieveById($user_data_delivery['country']) : null;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$country = $user_data_billing['customer_type'] == 1 ? CountriesPeer::retrieveById($user_data_billing['country']) : null;
|
$country = $user_data_billing['customer_type'] == 1 ? CountriesPeer::retrieveById($user_data_billing['country']) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
$validator = new stOrderMinAmountValidator();
|
$validator = new stOrderMinAmountValidator();
|
||||||
@@ -1266,14 +1273,14 @@ class stUserDataActions extends stActions
|
|||||||
}
|
}
|
||||||
|
|
||||||
$this->getUser()->setValidVatEu(false);
|
$this->getUser()->setValidVatEu(false);
|
||||||
$error_exists = true;
|
$error_exists = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->getUser()->setValidVatEu(true);
|
$this->getUser()->setValidVatEu(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return !$error_exists;
|
return !$error_exists;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1282,26 +1289,26 @@ class stUserDataActions extends stActions
|
|||||||
$error_exists = false;
|
$error_exists = false;
|
||||||
|
|
||||||
$i18n = $this->getContext()->getI18N();
|
$i18n = $this->getContext()->getI18N();
|
||||||
|
|
||||||
$billing = $this->getRequestParameter('user_data_billing', array());
|
$billing = $this->getRequestParameter('user_data_billing', array());
|
||||||
|
|
||||||
$delivery = $this->getRequestParameter('user_data_delivery', array());
|
$delivery = $this->getRequestParameter('user_data_delivery', array());
|
||||||
|
|
||||||
if ($billing['company'] || $billing['vatNumber'])
|
if ($billing['company'] || $billing['vatNumber'])
|
||||||
{
|
{
|
||||||
if (!$billing['company'])
|
if (!$billing['company'])
|
||||||
{
|
{
|
||||||
$this->getRequest()->setError('user_data_billing{company}', $i18n->__('Brak firmy.'));
|
$this->getRequest()->setError('user_data_billing{company}', $i18n->__('Brak firmy.'));
|
||||||
$error_exists = true;
|
$error_exists = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$billing['vatNumber'])
|
if (!$billing['vatNumber'])
|
||||||
{
|
{
|
||||||
$this->getRequest()->setError('user_data_billing{vatNumber}', $i18n->__('Brak nipu.'));
|
$this->getRequest()->setError('user_data_billing{vatNumber}', $i18n->__('Brak nipu.'));
|
||||||
$error_exists = true;
|
$error_exists = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$billing['company'] && !$billing['vatNumber'] && !$billing['full_name'])
|
if (!$billing['company'] && !$billing['vatNumber'] && !$billing['full_name'])
|
||||||
{
|
{
|
||||||
$this->getRequest()->setError('user_data_billing{message}', $i18n->__('Musisz podać imię i nazwisko lub dane firmowe.'));
|
$this->getRequest()->setError('user_data_billing{message}', $i18n->__('Musisz podać imię i nazwisko lub dane firmowe.'));
|
||||||
@@ -1310,9 +1317,9 @@ class stUserDataActions extends stActions
|
|||||||
$this->getRequest()->setError('user_data_billing{vatNumber}','');
|
$this->getRequest()->setError('user_data_billing{vatNumber}','');
|
||||||
$error_exists = true;
|
$error_exists = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (!$delivery['company'] && !$delivery['full_name'])
|
if (!$delivery['company'] && !$delivery['full_name'])
|
||||||
{
|
{
|
||||||
$this->getRequest()->setError('user_data_delivery{message}', $i18n->__('Musisz podać imię i nazwisko lub nazwę firmy.'));
|
$this->getRequest()->setError('user_data_delivery{message}', $i18n->__('Musisz podać imię i nazwisko lub nazwę firmy.'));
|
||||||
@@ -1323,21 +1330,21 @@ class stUserDataActions extends stActions
|
|||||||
|
|
||||||
return !$error_exists;
|
return !$error_exists;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function validateSaveProfile()
|
public function validateSaveProfile()
|
||||||
{
|
{
|
||||||
|
|
||||||
$error_exists = false;
|
$error_exists = false;
|
||||||
|
|
||||||
$i18n = $this->getContext()->getI18N();
|
$i18n = $this->getContext()->getI18N();
|
||||||
|
|
||||||
$user_data = $this->getRequestParameter('user_data', array());
|
$user_data = $this->getRequestParameter('user_data', array());
|
||||||
|
|
||||||
$user_config = stConfig::getInstance(sfContext::getInstance(), 'stUser');
|
$user_config = stConfig::getInstance(sfContext::getInstance(), 'stUser');
|
||||||
|
|
||||||
if($user_data['isBilling']==1)
|
if($user_data['isBilling']==1)
|
||||||
{
|
{
|
||||||
|
|
||||||
if($user_data['customer_type']==2)
|
if($user_data['customer_type']==2)
|
||||||
{
|
{
|
||||||
if (!$user_data['company'])
|
if (!$user_data['company'])
|
||||||
@@ -1352,7 +1359,7 @@ class stUserDataActions extends stActions
|
|||||||
$error_exists = true;
|
$error_exists = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if($user_data['customer_type']==1)
|
if($user_data['customer_type']==1)
|
||||||
{
|
{
|
||||||
if (!$user_data['full_name'])
|
if (!$user_data['full_name'])
|
||||||
@@ -1361,8 +1368,8 @@ class stUserDataActions extends stActions
|
|||||||
$error_exists = true;
|
$error_exists = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
if($user_data['customer_type']==2)
|
if($user_data['customer_type']==2)
|
||||||
{
|
{
|
||||||
@@ -1372,7 +1379,7 @@ class stUserDataActions extends stActions
|
|||||||
$error_exists = true;
|
$error_exists = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if($user_data['customer_type']==1)
|
if($user_data['customer_type']==1)
|
||||||
{
|
{
|
||||||
if (!$user_data['full_name'])
|
if (!$user_data['full_name'])
|
||||||
@@ -1382,14 +1389,14 @@ class stUserDataActions extends stActions
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$user_data['phone'] && $user_config->get('validate_phone')==1)
|
if (!$user_data['phone'] && $user_config->get('validate_phone')==1)
|
||||||
{
|
{
|
||||||
$this->getRequest()->setError('user_data{phone}', $i18n->__('Brak telefonu.'));
|
$this->getRequest()->setError('user_data{phone}', $i18n->__('Brak telefonu.'));
|
||||||
$error_exists = true;
|
$error_exists = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return !$error_exists;
|
return !$error_exists;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1401,7 +1408,7 @@ class stUserDataActions extends stActions
|
|||||||
{
|
{
|
||||||
if ($this->getRequest()->getMethod() == sfRequest::POST)
|
if ($this->getRequest()->getMethod() == sfRequest::POST)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->forward('stOrder', 'confirm');
|
$this->forward('stOrder', 'confirm');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1427,7 +1434,7 @@ class stUserDataActions extends stActions
|
|||||||
public function handleErrorAddBasketUser()
|
public function handleErrorAddBasketUser()
|
||||||
{
|
{
|
||||||
$this->updateBasketUserData();
|
$this->updateBasketUserData();
|
||||||
|
|
||||||
return $this->forward('stBasket', 'index');
|
return $this->forward('stBasket', 'index');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1470,37 +1477,37 @@ class stUserDataActions extends stActions
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function executeAjaxProfileChange()
|
public function executeAjaxProfileChange()
|
||||||
{
|
{
|
||||||
$id = $this->getRequestParameter('id');
|
$id = $this->getRequestParameter('id');
|
||||||
|
|
||||||
$type = $this->getRequestParameter('type');
|
$type = $this->getRequestParameter('type');
|
||||||
|
|
||||||
if($type=="billing")
|
if($type=="billing")
|
||||||
{
|
{
|
||||||
stUser::setDefaultUserData($id, 1, $this->getUser()->getGuardUser()->getId());
|
stUser::setDefaultUserData($id, 1, $this->getUser()->getGuardUser()->getId());
|
||||||
$this->responseUpdateElement('user_'.$type.'_form_content', array('module' => 'stUserData', 'component' => 'orderFormBilling', 'params' => array('profile_id' => $id, 'type' => $type)));
|
$this->responseUpdateElement('user_'.$type.'_form_content', array('module' => 'stUserData', 'component' => 'orderFormBilling', 'params' => array('profile_id' => $id, 'type' => $type)));
|
||||||
}
|
}
|
||||||
|
|
||||||
if($type=="user_edit_profile_billing")
|
if($type=="user_edit_profile_billing")
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->responseUpdateElement('user_edit_profile_content', array('module' => 'stUserData', 'component' => 'ajaxEditProfile', 'params' => array('profile_id' => $id, 'type' => $type)));
|
$this->responseUpdateElement('user_edit_profile_content', array('module' => 'stUserData', 'component' => 'ajaxEditProfile', 'params' => array('profile_id' => $id, 'type' => $type)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if($type=="delivery")
|
if($type=="delivery")
|
||||||
{
|
{
|
||||||
stUser::setDefaultUserData($id, 0, $this->getUser()->getGuardUser()->getId());
|
stUser::setDefaultUserData($id, 0, $this->getUser()->getGuardUser()->getId());
|
||||||
$this->responseUpdateElement('user_'.$type.'_form_content', array('module' => 'stUserData', 'component' => 'orderFormDelivery', 'params' => array('profile_id' => $id, 'type' => $type)));
|
$this->responseUpdateElement('user_'.$type.'_form_content', array('module' => 'stUserData', 'component' => 'orderFormDelivery', 'params' => array('profile_id' => $id, 'type' => $type)));
|
||||||
}
|
}
|
||||||
|
|
||||||
if($type=="user_edit_profile_delivery")
|
if($type=="user_edit_profile_delivery")
|
||||||
{
|
{
|
||||||
$this->responseUpdateElement('user_edit_profile_content', array('module' => 'stUserData', 'component' => 'ajaxEditProfile', 'params' => array('profile_id' => $id, 'type' => $type)));
|
$this->responseUpdateElement('user_edit_profile_content', array('module' => 'stUserData', 'component' => 'ajaxEditProfile', 'params' => array('profile_id' => $id, 'type' => $type)));
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->renderResponse();
|
return $this->renderResponse();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ $smarty->assign('input_billing_address_more', input_tag('user_data_billing[addre
|
|||||||
$smarty->assign('label_billing_region', label_for('region_billing', __('Województwo')));
|
$smarty->assign('label_billing_region', label_for('region_billing', __('Województwo')));
|
||||||
$smarty->assign('input_billing_region', input_tag('user_data_billing[region]', $user_data_billing['region'], array('id' => 'region_billing', 'maxlength' => '255', 'class' => form_has_error('user_data_billing{region}') ? 'st_form-error' : '')));
|
$smarty->assign('input_billing_region', input_tag('user_data_billing[region]', $user_data_billing['region'], array('id' => 'region_billing', 'maxlength' => '255', 'class' => form_has_error('user_data_billing{region}') ? 'st_form-error' : '')));
|
||||||
|
|
||||||
$smarty->assign('label_billing_code', label_for('code_billing', "* " . __('Kod')));
|
$smarty->assign('label_billing_code', label_for('code_billing', "* " . __('Kod pocztowy')));
|
||||||
$smarty->assign('input_billing_code', input_tag('user_data_billing[code]', $user_data_billing['code'], array('id' => 'code_billing', 'maxlength' => '255', 'class' => form_has_error('user_data_billing{code}') ? 'st_form-error' : '')));
|
$smarty->assign('input_billing_code', input_tag('user_data_billing[code]', $user_data_billing['code'], array('id' => 'code_billing', 'maxlength' => '255', 'class' => form_has_error('user_data_billing{code}') ? 'st_form-error' : '')));
|
||||||
|
|
||||||
$smarty->assign('label_billing_town', label_for('town_billing', "* " . __('Miasto')));
|
$smarty->assign('label_billing_town', label_for('town_billing', "* " . __('Miasto')));
|
||||||
@@ -216,9 +216,9 @@ foreach ($tmp_string as $value) {
|
|||||||
$smarty->assign("terms_shop_text", $string);
|
$smarty->assign("terms_shop_text", $string);
|
||||||
|
|
||||||
if ($config->get('captcha_on', stConfig::INT) == 1 && sfContext::getInstance()->getUser()->getAttribute('captcha_off') != 1) {
|
if ($config->get('captcha_on', stConfig::INT) == 1 && sfContext::getInstance()->getUser()->getAttribute('captcha_off') != 1) {
|
||||||
|
|
||||||
$smarty->assign('captcha_mod', $config->get('captcha_mod'));
|
$smarty->assign('captcha_mod', $config->get('captcha_mod'));
|
||||||
|
|
||||||
$smarty->assign('captcha_on', $config->get('captcha_on', stConfig::INT) == 1);
|
$smarty->assign('captcha_on', $config->get('captcha_on', stConfig::INT) == 1);
|
||||||
|
|
||||||
$smarty->assign('error_captcha', form_error('captcha', array('suffix' => '', 'prefix' => '', 'class' => 'st_error red')));
|
$smarty->assign('error_captcha', form_error('captcha', array('suffix' => '', 'prefix' => '', 'class' => 'st_error red')));
|
||||||
@@ -230,15 +230,15 @@ if ($config->get('captcha_on', stConfig::INT) == 1 && sfContext::getInstance()-
|
|||||||
$smarty->assign('label_captcha', label_for('captcha_img', "* " . __('Cyfry z obrazka')));
|
$smarty->assign('label_captcha', label_for('captcha_img', "* " . __('Cyfry z obrazka')));
|
||||||
|
|
||||||
$smarty->assign('input_captcha', input_tag('captcha', '', array('id' => 'captcha_img', 'class' => form_has_error('captcha') ? 'st_form-error' : '')));
|
$smarty->assign('input_captcha', input_tag('captcha', '', array('id' => 'captcha_img', 'class' => form_has_error('captcha') ? 'st_form-error' : '')));
|
||||||
|
|
||||||
if($config->get('captcha_mod')=="recaptcha3")
|
if($config->get('captcha_mod')=="recaptcha3")
|
||||||
{
|
{
|
||||||
$smarty->assign('re_captcha_key', $config->get('recaptcha_key'));
|
$smarty->assign('re_captcha_key', $config->get('recaptcha_key'));
|
||||||
$smarty->assign('re_captcha_badge_position', $config->get('recaptcha_badge_position'));
|
$smarty->assign('re_captcha_badge_position', $config->get('recaptcha_badge_position'));
|
||||||
$smarty->assign('re_captcha_badge_margin', $config->get('recaptcha_badge_margin'));
|
$smarty->assign('re_captcha_badge_margin', $config->get('recaptcha_badge_margin'));
|
||||||
|
|
||||||
$smarty->assign('badscore', sfContext::getInstance()->getUser()->getAttribute('badscore'));
|
$smarty->assign('badscore', sfContext::getInstance()->getUser()->getAttribute('badscore'));
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -261,7 +261,7 @@ if (stTheme::is_responsive()) {
|
|||||||
$smarty->assign('input_billing_address', input_tag('user_data_billing[address]', $user_data_billing['address'], array('id' => 'address_billing', 'placeholder' => '* ' . __("Ulica nr domu / nr lokalu"), 'maxlength' => '255', 'class' => 'form-control')));
|
$smarty->assign('input_billing_address', input_tag('user_data_billing[address]', $user_data_billing['address'], array('id' => 'address_billing', 'placeholder' => '* ' . __("Ulica nr domu / nr lokalu"), 'maxlength' => '255', 'class' => 'form-control')));
|
||||||
$smarty->assign('input_billing_address_more', input_tag('user_data_billing[address_more]', $user_data_billing['address_more'], array('id' => 'address_more_billing', 'placeholder' => __("Adres ciąg dalszy"), 'maxlength' => '255', 'class' => 'form-control')));
|
$smarty->assign('input_billing_address_more', input_tag('user_data_billing[address_more]', $user_data_billing['address_more'], array('id' => 'address_more_billing', 'placeholder' => __("Adres ciąg dalszy"), 'maxlength' => '255', 'class' => 'form-control')));
|
||||||
$smarty->assign('input_billing_region', input_tag('user_data_billing[region]', $user_data_billing['region'], array('id' => 'region_billing', 'placeholder' => __("Województwo"), 'maxlength' => '255', 'class' => 'form-control')));
|
$smarty->assign('input_billing_region', input_tag('user_data_billing[region]', $user_data_billing['region'], array('id' => 'region_billing', 'placeholder' => __("Województwo"), 'maxlength' => '255', 'class' => 'form-control')));
|
||||||
$smarty->assign('input_billing_code', input_tag('user_data_billing[code]', $user_data_billing['code'], array('id' => 'code_billing', 'placeholder' => '* ' . __("Kod"), 'maxlength' => '255', 'class' => 'form-control')));
|
$smarty->assign('input_billing_code', input_tag('user_data_billing[code]', $user_data_billing['code'], array('id' => 'code_billing', 'placeholder' => '* ' . __("Kod pocztowy"), 'maxlength' => '255', 'class' => 'form-control')));
|
||||||
$smarty->assign('input_billing_town', input_tag('user_data_billing[town]', $user_data_billing['town'], array('id' => 'town_billing', 'placeholder' => '* ' . __("Miasto"), 'maxlength' => '255', 'class' => 'form-control')));
|
$smarty->assign('input_billing_town', input_tag('user_data_billing[town]', $user_data_billing['town'], array('id' => 'town_billing', 'placeholder' => '* ' . __("Miasto"), 'maxlength' => '255', 'class' => 'form-control')));
|
||||||
$smarty->assign('select_billing_country', countries_select_tag('user_data_billing[country]', isset($user_data_billing['country']) ? $user_data_billing['country'] : $delivery_country_id));
|
$smarty->assign('select_billing_country', countries_select_tag('user_data_billing[country]', isset($user_data_billing['country']) ? $user_data_billing['country'] : $delivery_country_id));
|
||||||
$smarty->assign('input_billing_phone', input_tag('user_data_billing[phone]', $user_data_billing['phone'], array('id' => 'phone_billing', 'placeholder' => $phone_label, 'maxlength' => '255', 'class' => 'form-control')));
|
$smarty->assign('input_billing_phone', input_tag('user_data_billing[phone]', $user_data_billing['phone'], array('id' => 'phone_billing', 'placeholder' => $phone_label, 'maxlength' => '255', 'class' => 'form-control')));
|
||||||
@@ -272,7 +272,7 @@ if (stTheme::is_responsive()) {
|
|||||||
$smarty->assign('input_delivery_address', input_tag('user_data_delivery[address]', $user_data_delivery['address'], array('id' => 'address_delivery', 'placeholder' => '* ' . __("Ulica nr domu / nr lokalu"), 'maxlength' => '255', 'class' => 'form-control')));
|
$smarty->assign('input_delivery_address', input_tag('user_data_delivery[address]', $user_data_delivery['address'], array('id' => 'address_delivery', 'placeholder' => '* ' . __("Ulica nr domu / nr lokalu"), 'maxlength' => '255', 'class' => 'form-control')));
|
||||||
$smarty->assign('input_delivery_address_more', input_tag('user_data_delivery[address_more]', $user_data_delivery['address_more'], array('id' => 'address_more_delivery', 'placeholder' => __("Adres ciąg dalszy"), 'maxlength' => '255', 'class' => 'form-control')));
|
$smarty->assign('input_delivery_address_more', input_tag('user_data_delivery[address_more]', $user_data_delivery['address_more'], array('id' => 'address_more_delivery', 'placeholder' => __("Adres ciąg dalszy"), 'maxlength' => '255', 'class' => 'form-control')));
|
||||||
$smarty->assign('input_delivery_region', input_tag('user_data_delivery[region]', $user_data_delivery['region'], array('id' => 'region_delivery', 'placeholder' => __("Województwo"), 'maxlength' => '255', 'class' => 'form-control')));
|
$smarty->assign('input_delivery_region', input_tag('user_data_delivery[region]', $user_data_delivery['region'], array('id' => 'region_delivery', 'placeholder' => __("Województwo"), 'maxlength' => '255', 'class' => 'form-control')));
|
||||||
$smarty->assign('input_delivery_code', input_tag('user_data_delivery[code]', $user_data_delivery['code'], array('id' => 'code_delivery', 'placeholder' => '* ' . __("Kod"), 'maxlength' => '255', 'class' => 'form-control')));
|
$smarty->assign('input_delivery_code', input_tag('user_data_delivery[code]', $user_data_delivery['code'], array('id' => 'code_delivery', 'placeholder' => '* ' . __("Kod pocztowy"), 'maxlength' => '255', 'class' => 'form-control')));
|
||||||
$smarty->assign('input_delivery_town', input_tag('user_data_delivery[town]', $user_data_delivery['town'], array('id' => 'town_delivery', 'placeholder' => '* ' . __("Miasto"), 'maxlength' => '255', 'class' => 'form-control')));
|
$smarty->assign('input_delivery_town', input_tag('user_data_delivery[town]', $user_data_delivery['town'], array('id' => 'town_delivery', 'placeholder' => '* ' . __("Miasto"), 'maxlength' => '255', 'class' => 'form-control')));
|
||||||
$smarty->assign('input_delivery_phone', input_tag('user_data_delivery[phone]', $user_data_delivery['phone'], array('id' => 'phone_delivery', 'placeholder' => $phone_label, 'maxlength' => '255', 'class' => 'form-control')));
|
$smarty->assign('input_delivery_phone', input_tag('user_data_delivery[phone]', $user_data_delivery['phone'], array('id' => 'phone_delivery', 'placeholder' => $phone_label, 'maxlength' => '255', 'class' => 'form-control')));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ $smarty->assign('input_billing_address_more', input_tag('user_data_billing[addre
|
|||||||
$smarty->assign('label_billing_region', label_for('billing-region', __('Województwo')));
|
$smarty->assign('label_billing_region', label_for('billing-region', __('Województwo')));
|
||||||
$smarty->assign('input_billing_region', input_tag('user_data_billing[region]', $user_data_billing['region'], array('id' => 'billing-region', 'maxlength' => '255', 'class' => form_has_error('user_data_billing{region}') ? 'st_form-error billing-region' : 'billing-region')));
|
$smarty->assign('input_billing_region', input_tag('user_data_billing[region]', $user_data_billing['region'], array('id' => 'billing-region', 'maxlength' => '255', 'class' => form_has_error('user_data_billing{region}') ? 'st_form-error billing-region' : 'billing-region')));
|
||||||
|
|
||||||
$smarty->assign('label_billing_code', label_for('billing-code', "* " . __('Kod')));
|
$smarty->assign('label_billing_code', label_for('billing-code', "* " . __('Kod pocztowy')));
|
||||||
$smarty->assign('input_billing_code', input_tag('user_data_billing[code]', $user_data_billing['code'], array('id' => 'billing-code', 'maxlength' => '255', 'class' => form_has_error('user_data_billing{code}') ? 'st_form-error billing-code' : 'billing-code')));
|
$smarty->assign('input_billing_code', input_tag('user_data_billing[code]', $user_data_billing['code'], array('id' => 'billing-code', 'maxlength' => '255', 'class' => form_has_error('user_data_billing{code}') ? 'st_form-error billing-code' : 'billing-code')));
|
||||||
|
|
||||||
$smarty->assign('label_billing_town', label_for('billing-town', "* " . __('Miasto')));
|
$smarty->assign('label_billing_town', label_for('billing-town', "* " . __('Miasto')));
|
||||||
|
|||||||
@@ -9,22 +9,22 @@
|
|||||||
|
|
||||||
<?php $user_config = stConfig::getInstance(sfContext::getInstance(), 'stUser'); ?>
|
<?php $user_config = stConfig::getInstance(sfContext::getInstance(), 'stUser'); ?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if ($sf_request->getErrors()):
|
if ($sf_request->getErrors()):
|
||||||
$smarty->assign('errors', __('Uzupełnij zaznaczone pola.'));
|
$smarty->assign('errors', __('Uzupełnij zaznaczone pola.'));
|
||||||
endif;
|
endif;
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php $smarty->assign('form_start', form_tag('stUserData/createFirstUserData', array('class' => 'st_form_ver6', 'name'=>'register'))) ?>
|
<?php $smarty->assign('form_start', form_tag('stUserData/createFirstUserData', array('class' => 'st_form_ver6', 'name'=>'register'))) ?>
|
||||||
|
|
||||||
<?php $smarty->assign('error_billing_message', form_error('user_data_billing[message]', array('suffix'=>'', 'prefix'=>'', 'class'=>'st_error'))) ?>
|
<?php $smarty->assign('error_billing_message', form_error('user_data_billing[message]', array('suffix'=>'', 'prefix'=>'', 'class'=>'st_error'))) ?>
|
||||||
<?php $smarty->assign('error_billing_full_name', form_error('user_data_billing[full_name]', array('suffix'=>'', 'prefix'=>'', 'class'=>'st_error'))) ?>
|
<?php $smarty->assign('error_billing_full_name', form_error('user_data_billing[full_name]', array('suffix'=>'', 'prefix'=>'', 'class'=>'st_error'))) ?>
|
||||||
<?php $smarty->assign('error_billing_address', form_error('user_data_billing[address]', array('suffix'=>'', 'prefix'=>'', 'class'=>'st_error'))) ?>
|
<?php $smarty->assign('error_billing_address', form_error('user_data_billing[address]', array('suffix'=>'', 'prefix'=>'', 'class'=>'st_error'))) ?>
|
||||||
<?php $smarty->assign('error_billing_address_more', form_error('user_data_billing[address_more]', array('suffix'=>'', 'prefix'=>'', 'class'=>'st_error'))) ?><?php $smarty->assign('error_billing_code', form_error('user_data_billing[code]', array('suffix'=>'', 'prefix'=>'', 'class'=>'st_error'))) ?>
|
<?php $smarty->assign('error_billing_address_more', form_error('user_data_billing[address_more]', array('suffix'=>'', 'prefix'=>'', 'class'=>'st_error'))) ?><?php $smarty->assign('error_billing_code', form_error('user_data_billing[code]', array('suffix'=>'', 'prefix'=>'', 'class'=>'st_error'))) ?>
|
||||||
<?php $smarty->assign('error_billing_region', form_error('user_data_billing[region]', array('suffix'=>'', 'prefix'=>'', 'class'=>'st_error'))) ?>
|
<?php $smarty->assign('error_billing_region', form_error('user_data_billing[region]', array('suffix'=>'', 'prefix'=>'', 'class'=>'st_error'))) ?>
|
||||||
<?php $smarty->assign('error_billing_town', form_error('user_data_billing[town]', array('suffix'=>'', 'prefix'=>'', 'class'=>'st_error'))) ?>
|
<?php $smarty->assign('error_billing_town', form_error('user_data_billing[town]', array('suffix'=>'', 'prefix'=>'', 'class'=>'st_error'))) ?>
|
||||||
<?php $smarty->assign('error_billing_phone', form_error('user_data_billing[phone]', array('suffix'=>'', 'prefix'=>'', 'class'=>'st_error'))) ?>
|
<?php $smarty->assign('error_billing_phone', form_error('user_data_billing[phone]', array('suffix'=>'', 'prefix'=>'', 'class'=>'st_error'))) ?>
|
||||||
<?php $smarty->assign('error_billing_vat', form_error('user_data_billing[vatNumber]', array('suffix'=>'', 'prefix'=>'', 'class'=>'st_error'))) ?>
|
<?php $smarty->assign('error_billing_vat', form_error('user_data_billing[vatNumber]', array('suffix'=>'', 'prefix'=>'', 'class'=>'st_error'))) ?>
|
||||||
|
|
||||||
<?php $smarty->assign('error_company', $sf_request->getError('user_data_billing{company}')); ?>
|
<?php $smarty->assign('error_company', $sf_request->getError('user_data_billing{company}')); ?>
|
||||||
<?php $smarty->assign('error_nip', $sf_request->getError('user_data_billing{vat_number}')); ?>
|
<?php $smarty->assign('error_nip', $sf_request->getError('user_data_billing{vat_number}')); ?>
|
||||||
@@ -34,7 +34,7 @@ endif;
|
|||||||
<?php $smarty->assign('error_code', $sf_request->getError('user_data_billing{code}')); ?>
|
<?php $smarty->assign('error_code', $sf_request->getError('user_data_billing{code}')); ?>
|
||||||
<?php $smarty->assign('error_town', $sf_request->getError('user_data_billing{town}')); ?>
|
<?php $smarty->assign('error_town', $sf_request->getError('user_data_billing{town}')); ?>
|
||||||
<?php $smarty->assign('error_phone', $sf_request->getError('user_data_billing{phone}')); ?>
|
<?php $smarty->assign('error_phone', $sf_request->getError('user_data_billing{phone}')); ?>
|
||||||
|
|
||||||
|
|
||||||
<?php $smarty->assign('label_billing_customer_type1', __('Klient indywidualny')) ?>
|
<?php $smarty->assign('label_billing_customer_type1', __('Klient indywidualny')) ?>
|
||||||
<?php $smarty->assign('radio_billing_customer_type1', radiobutton_tag('user_data_billing[customer_type]', 1, $type1_billing_checker)) ?>
|
<?php $smarty->assign('radio_billing_customer_type1', radiobutton_tag('user_data_billing[customer_type]', 1, $type1_billing_checker)) ?>
|
||||||
@@ -67,11 +67,11 @@ endif;
|
|||||||
<?php $smarty->assign('select_country', object_select_tag($userDataBilling->getCountriesId(), 'getId', array('id'=>'billing_country', 'related_class' => 'Countries', 'peer_method'=>"doSelectActive", 'control_name' => 'user_data_billing[country]'))) ?>
|
<?php $smarty->assign('select_country', object_select_tag($userDataBilling->getCountriesId(), 'getId', array('id'=>'billing_country', 'related_class' => 'Countries', 'peer_method'=>"doSelectActive", 'control_name' => 'user_data_billing[country]'))) ?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if($user_config->get('validate_phone')==1){
|
if($user_config->get('validate_phone')==1){
|
||||||
$smarty->assign('label_phone', label_for('billing_phone',"* ".__('Telefon')));
|
$smarty->assign('label_phone', label_for('billing_phone',"* ".__('Telefon')));
|
||||||
}else{
|
}else{
|
||||||
$smarty->assign('label_phone', label_for('billing_phone',__('Telefon')));
|
$smarty->assign('label_phone', label_for('billing_phone',__('Telefon')));
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php $smarty->assign('input_phone', input_tag('user_data_billing[phone]', $userDataBilling->getPhone(), array('id'=>'billing_phone', 'maxlength'=>'255', 'class'=>form_has_error('user_data_billing{phone}') ? 'st_form-error' : ''))) ?>
|
<?php $smarty->assign('input_phone', input_tag('user_data_billing[phone]', $userDataBilling->getPhone(), array('id'=>'billing_phone', 'maxlength'=>'255', 'class'=>form_has_error('user_data_billing{phone}') ? 'st_form-error' : ''))) ?>
|
||||||
@@ -81,7 +81,7 @@ if($user_config->get('validate_phone')==1){
|
|||||||
|
|
||||||
<?php $smarty->assign('label_pesel', label_for('billing_pesel',__('PESEL'))) ?>
|
<?php $smarty->assign('label_pesel', label_for('billing_pesel',__('PESEL'))) ?>
|
||||||
<?php $smarty->assign('input_pesel', input_tag('user_data_billing[pesel]', $userDataBilling->getPesel(), array('id'=>'billing_pesel', 'maxlength'=>'255', 'class'=>form_has_error('user_data_billing{pesel}') ? 'st_form-error' : ''))) ?>
|
<?php $smarty->assign('input_pesel', input_tag('user_data_billing[pesel]', $userDataBilling->getPesel(), array('id'=>'billing_pesel', 'maxlength'=>'255', 'class'=>form_has_error('user_data_billing{pesel}') ? 'st_form-error' : ''))) ?>
|
||||||
|
|
||||||
<?php $smarty->assign('checkbox_delivery', checkbox_tag('different_delivery', 1, $different_delivery, array('id'=>'different_delivery', 'class'=>'checkobox'))) ?>
|
<?php $smarty->assign('checkbox_delivery', checkbox_tag('different_delivery', 1, $different_delivery, array('id'=>'different_delivery', 'class'=>'checkobox'))) ?>
|
||||||
|
|
||||||
<?php $smarty->assign('error_delivery_message', form_error('user_data_delivery[message]', array('suffix'=>'', 'prefix'=>'', 'class'=>'st_error'))) ?>
|
<?php $smarty->assign('error_delivery_message', form_error('user_data_delivery[message]', array('suffix'=>'', 'prefix'=>'', 'class'=>'st_error'))) ?>
|
||||||
@@ -89,12 +89,12 @@ if($user_config->get('validate_phone')==1){
|
|||||||
<?php $smarty->assign('error_delivery_address', form_error('user_data_delivery[address]', array('suffix'=>'', 'prefix'=>'', 'class'=>'st_error'))) ?>
|
<?php $smarty->assign('error_delivery_address', form_error('user_data_delivery[address]', array('suffix'=>'', 'prefix'=>'', 'class'=>'st_error'))) ?>
|
||||||
<?php $smarty->assign('error_delivery_address_more', form_error('user_data_delivery[address_more]', array('suffix'=>'', 'prefix'=>'', 'class'=>'st_error'))) ?>
|
<?php $smarty->assign('error_delivery_address_more', form_error('user_data_delivery[address_more]', array('suffix'=>'', 'prefix'=>'', 'class'=>'st_error'))) ?>
|
||||||
<?php $smarty->assign('error_delivery_region', form_error('user_data_delivery[region]', array('suffix'=>'', 'prefix'=>'', 'class'=>'st_error'))) ?>
|
<?php $smarty->assign('error_delivery_region', form_error('user_data_delivery[region]', array('suffix'=>'', 'prefix'=>'', 'class'=>'st_error'))) ?>
|
||||||
<?php $smarty->assign('error_delivery_code', form_error('user_data_delivery[code]', array('suffix'=>'', 'prefix'=>'', 'class'=>'st_error'))) ?>
|
<?php $smarty->assign('error_delivery_code', form_error('user_data_delivery[code]', array('suffix'=>'', 'prefix'=>'', 'class'=>'st_error'))) ?>
|
||||||
<?php $smarty->assign('error_delivery_town', form_error('user_data_delivery[town]', array('suffix'=>'', 'prefix'=>'', 'class'=>'st_error'))) ?>
|
<?php $smarty->assign('error_delivery_town', form_error('user_data_delivery[town]', array('suffix'=>'', 'prefix'=>'', 'class'=>'st_error'))) ?>
|
||||||
<?php $smarty->assign('error_delivery_phone', form_error('user_data_delivery[phone]', array('suffix'=>'', 'prefix'=>'', 'class'=>'st_error'))) ?>
|
<?php $smarty->assign('error_delivery_phone', form_error('user_data_delivery[phone]', array('suffix'=>'', 'prefix'=>'', 'class'=>'st_error'))) ?>
|
||||||
<?php $smarty->assign('error_delivery_vat', form_error('user_data_delivery[vatNumber]', array('suffix'=>'', 'prefix'=>'', 'class'=>'st_error'))) ?>
|
<?php $smarty->assign('error_delivery_vat', form_error('user_data_delivery[vatNumber]', array('suffix'=>'', 'prefix'=>'', 'class'=>'st_error'))) ?>
|
||||||
|
|
||||||
<?php $smarty->assign('error_delivery_company', $sf_request->getError('user_data_delivery{company}')); ?>
|
<?php $smarty->assign('error_delivery_company', $sf_request->getError('user_data_delivery{company}')); ?>
|
||||||
<?php $smarty->assign('error_delivery_full_name', $sf_request->getError('user_data_delivery{full_name}')) ?>
|
<?php $smarty->assign('error_delivery_full_name', $sf_request->getError('user_data_delivery{full_name}')) ?>
|
||||||
<?php $smarty->assign('error_delivery_address', $sf_request->getError('user_data_delivery{address}')) ?>
|
<?php $smarty->assign('error_delivery_address', $sf_request->getError('user_data_delivery{address}')) ?>
|
||||||
<?php $smarty->assign('error_delivery_region', $sf_request->getError('user_data_delivery{region}')) ?>
|
<?php $smarty->assign('error_delivery_region', $sf_request->getError('user_data_delivery{region}')) ?>
|
||||||
@@ -102,7 +102,7 @@ if($user_config->get('validate_phone')==1){
|
|||||||
<?php $smarty->assign('error_delivery_code', $sf_request->getError('user_data_delivery{code}')); ?>
|
<?php $smarty->assign('error_delivery_code', $sf_request->getError('user_data_delivery{code}')); ?>
|
||||||
<?php $smarty->assign('error_delivery_town', $sf_request->getError('user_data_delivery{town}')); ?>
|
<?php $smarty->assign('error_delivery_town', $sf_request->getError('user_data_delivery{town}')); ?>
|
||||||
<?php $smarty->assign('error_delivery_phone', $sf_request->getError('user_data_delivery{phone}')) ?>
|
<?php $smarty->assign('error_delivery_phone', $sf_request->getError('user_data_delivery{phone}')) ?>
|
||||||
|
|
||||||
|
|
||||||
<?php $smarty->assign('label_delivery_customer_type1', __('Klient indywidualny')) ?>
|
<?php $smarty->assign('label_delivery_customer_type1', __('Klient indywidualny')) ?>
|
||||||
<?php $smarty->assign('radio_delivery_customer_type1', radiobutton_tag('user_data_delivery[customer_type]', 1, $type1_delivery_checker)) ?>
|
<?php $smarty->assign('radio_delivery_customer_type1', radiobutton_tag('user_data_delivery[customer_type]', 1, $type1_delivery_checker)) ?>
|
||||||
@@ -130,18 +130,18 @@ if($user_config->get('validate_phone')==1){
|
|||||||
<?php $smarty->assign('label_delivery_code', label_for('delivery_code',"* ".__('Kod'))) ?>
|
<?php $smarty->assign('label_delivery_code', label_for('delivery_code',"* ".__('Kod'))) ?>
|
||||||
<?php $smarty->assign('input_delivery_code', input_tag('user_data_delivery[code]', $userDataDelivery->getCode(), array('id'=>'delivery_code', 'maxlength'=>'255', 'class'=>form_has_error('user_data_delivery{code}') ? 'st_form-error' : ''))) ?>
|
<?php $smarty->assign('input_delivery_code', input_tag('user_data_delivery[code]', $userDataDelivery->getCode(), array('id'=>'delivery_code', 'maxlength'=>'255', 'class'=>form_has_error('user_data_delivery{code}') ? 'st_form-error' : ''))) ?>
|
||||||
|
|
||||||
<?php $smarty->assign('label_delivery_town', label_for('delivery_town',"* ".__('Miasto'))) ?>
|
<?php $smarty->assign('label_delivery_town', label_for('delivery_town',"* ".__('Miasto'))) ?>
|
||||||
<?php $smarty->assign('input_delivery_town', input_tag('user_data_delivery[town]', $userDataDelivery->getTown(), array('id'=>'delivery_town', 'maxlength'=>'255', 'class'=>form_has_error('user_data_delivery{town}') ? 'st_form-error' : ''))) ?>
|
<?php $smarty->assign('input_delivery_town', input_tag('user_data_delivery[town]', $userDataDelivery->getTown(), array('id'=>'delivery_town', 'maxlength'=>'255', 'class'=>form_has_error('user_data_delivery{town}') ? 'st_form-error' : ''))) ?>
|
||||||
|
|
||||||
|
|
||||||
<?php $smarty->assign('select_delivery_country', st_get_component('stUserData', 'deliveryCountriesSelect', array('force_default_country_id' => $userDataDelivery->getCountriesId()))) ?>
|
<?php $smarty->assign('select_delivery_country', st_get_component('stUserData', 'deliveryCountriesSelect', array('force_default_country_id' => $userDataDelivery->getCountriesId()))) ?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if($user_config->get('validate_phone')==1){
|
if($user_config->get('validate_phone')==1){
|
||||||
$smarty->assign('label_delivery_phone', label_for('delivery_phone',"* ".__('Telefon')));
|
$smarty->assign('label_delivery_phone', label_for('delivery_phone',"* ".__('Telefon')));
|
||||||
}else{
|
}else{
|
||||||
$smarty->assign('label_delivery_phone', label_for('delivery_phone',__('Telefon')));
|
$smarty->assign('label_delivery_phone', label_for('delivery_phone',__('Telefon')));
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php $smarty->assign('input_delivery_phone', input_tag('user_data_delivery[phone]', $userDataDelivery->getPhone(), array('id'=>'delivery_phone', 'maxlength'=>'255', 'class'=>form_has_error('user_data_delivery{phone}') ? 'st_form-error' : ''))) ?>
|
<?php $smarty->assign('input_delivery_phone', input_tag('user_data_delivery[phone]', $userDataDelivery->getPhone(), array('id'=>'delivery_phone', 'maxlength'=>'255', 'class'=>form_has_error('user_data_delivery{phone}') ? 'st_form-error' : ''))) ?>
|
||||||
@@ -149,21 +149,21 @@ if($user_config->get('validate_phone')==1){
|
|||||||
|
|
||||||
<?php if(stTheme::is_responsive()): ?>
|
<?php if(stTheme::is_responsive()): ?>
|
||||||
<?php $user_config->get('validate_phone')==1 ? $phone_label = "* ".__('Telefon') : $phone_label = __('Telefon'); ?>
|
<?php $user_config->get('validate_phone')==1 ? $phone_label = "* ".__('Telefon') : $phone_label = __('Telefon'); ?>
|
||||||
|
|
||||||
<!-- billing -->
|
<!-- billing -->
|
||||||
<?php $smarty->assign('input_company', input_tag('user_data_billing[company]', $userDataBilling->getCompany(), array('id'=>'company_billing', 'placeholder'=> '* '.__("Firma"), 'maxlength'=>'255', 'class'=>'form-control'))); ?>
|
<?php $smarty->assign('input_company', input_tag('user_data_billing[company]', $userDataBilling->getCompany(), array('id'=>'company_billing', 'placeholder'=> '* '.__("Firma"), 'maxlength'=>'255', 'class'=>'form-control'))); ?>
|
||||||
<?php $smarty->assign('input_nip', input_tag('user_data_billing[vat_number]', $userDataBilling->getVatNumber(), array('id'=>'nip_billing','placeholder'=> "* ".__($sf_user->hasVatEu() ? "Numer VAT UE" : "NIP"), 'maxlength'=>'255', 'class'=>'form-control'))) ?>
|
<?php $smarty->assign('input_nip', input_tag('user_data_billing[vat_number]', $userDataBilling->getVatNumber(), array('id'=>'nip_billing','placeholder'=> "* ".__($sf_user->hasVatEu() ? "Numer VAT UE" : "NIP"), 'maxlength'=>'255', 'class'=>'form-control'))) ?>
|
||||||
<?php $smarty->assign('input_full_name', input_tag('user_data_billing[full_name]', $userDataBilling->getFullName(), array('id'=>'full_name_billing', 'placeholder'=> "* ".__('Imię i nazwisko'), 'maxlength'=>'255', 'class'=>'form-control'))); ?>
|
<?php $smarty->assign('input_full_name', input_tag('user_data_billing[full_name]', $userDataBilling->getFullName(), array('id'=>'full_name_billing', 'placeholder'=> "* ".__('Imię i nazwisko'), 'maxlength'=>'255', 'class'=>'form-control'))); ?>
|
||||||
<?php $smarty->assign('input_address', input_tag('user_data_billing[address]', $userDataBilling->getAddress(), array('id'=>'address_billing', 'placeholder'=> '* '.__("Ulica nr domu / nr lokalu"), 'maxlength'=>'255', 'class'=>'form-control'))); ?>
|
<?php $smarty->assign('input_address', input_tag('user_data_billing[address]', $userDataBilling->getAddress(), array('id'=>'address_billing', 'placeholder'=> '* '.__("Ulica nr domu / nr lokalu"), 'maxlength'=>'255', 'class'=>'form-control'))); ?>
|
||||||
<?php $smarty->assign('input_address_more', input_tag('user_data_billing[address_more]', $userDataBilling->getAddressMore(), array('id'=>'address_more_billing', 'placeholder'=>__("Adres ciąg dalszy"), 'maxlength'=>'255', 'class'=>'form-control'))); ?>
|
<?php $smarty->assign('input_address_more', input_tag('user_data_billing[address_more]', $userDataBilling->getAddressMore(), array('id'=>'address_more_billing', 'placeholder'=>__("Adres ciąg dalszy"), 'maxlength'=>'255', 'class'=>'form-control'))); ?>
|
||||||
<?php $smarty->assign('input_region', input_tag('user_data_billing[region]', $userDataBilling->getRegion(), array('id'=>'region_billing', 'placeholder'=>__("Województwo"), 'maxlength'=>'255', 'class'=>'form-control'))); ?>
|
<?php $smarty->assign('input_region', input_tag('user_data_billing[region]', $userDataBilling->getRegion(), array('id'=>'region_billing', 'placeholder'=>__("Województwo"), 'maxlength'=>'255', 'class'=>'form-control'))); ?>
|
||||||
<?php $smarty->assign('input_code', input_tag('user_data_billing[code]', $userDataBilling->getCode(), array('id'=>'code_billing', 'placeholder'=> '* '.__("Kod"), 'maxlength'=>'255', 'class'=>'form-control'))); ?>
|
<?php $smarty->assign('input_code', input_tag('user_data_billing[code]', $userDataBilling->getCode(), array('id'=>'code_billing', 'placeholder'=> '* '.__("Kod pocztowy"), 'maxlength'=>'255', 'class'=>'form-control'))); ?>
|
||||||
<?php $smarty->assign('input_town', input_tag('user_data_billing[town]', $userDataBilling->getTown(), array('id'=>'town_billing', 'placeholder'=> '* '.__("Miasto"), 'maxlength'=>'255', 'class'=>'form-control'))); ?>
|
<?php $smarty->assign('input_town', input_tag('user_data_billing[town]', $userDataBilling->getTown(), array('id'=>'town_billing', 'placeholder'=> '* '.__("Miasto"), 'maxlength'=>'255', 'class'=>'form-control'))); ?>
|
||||||
<?php $smarty->assign('select_country', object_select_tag($userDataBilling->getCountriesId(), 'getId', array('id'=>'billing_country', 'class'=>'form-control', 'related_class' => 'Countries', 'peer_method'=>"doSelectActive", 'control_name' => 'user_data_billing[country]'))) ?>
|
<?php $smarty->assign('select_country', object_select_tag($userDataBilling->getCountriesId(), 'getId', array('id'=>'billing_country', 'class'=>'form-control', 'related_class' => 'Countries', 'peer_method'=>"doSelectActive", 'control_name' => 'user_data_billing[country]'))) ?>
|
||||||
<?php $smarty->assign('input_phone', input_tag('user_data_billing[phone]', $userDataBilling->getPhone(), array('id'=>'phone_billing', 'placeholder'=> $phone_label, 'maxlength'=>'255', 'class'=>'form-control'))); ?>
|
<?php $smarty->assign('input_phone', input_tag('user_data_billing[phone]', $userDataBilling->getPhone(), array('id'=>'phone_billing', 'placeholder'=> $phone_label, 'maxlength'=>'255', 'class'=>'form-control'))); ?>
|
||||||
<?php $smarty->assign('input_pesel', input_tag('user_data_billing[pesel]', $userDataBilling->getPesel(), array('id'=>'billing-pesel', 'placeholder'=>__('PESEL'), 'maxlength'=>'255', 'class'=>'form-control'))); ?>
|
<?php $smarty->assign('input_pesel', input_tag('user_data_billing[pesel]', $userDataBilling->getPesel(), array('id'=>'billing-pesel', 'placeholder'=>__('PESEL'), 'maxlength'=>'255', 'class'=>'form-control'))); ?>
|
||||||
|
|
||||||
<!-- delivery -->
|
<!-- delivery -->
|
||||||
<?php $smarty->assign('input_delivery_company', input_tag('user_data_delivery[company]', $userDataDelivery->getCompany(), array('id'=>'company_delivery', 'placeholder'=> '* '.__("Firma"), 'maxlength'=>'255', 'class'=>'form-control'))); ?>
|
<?php $smarty->assign('input_delivery_company', input_tag('user_data_delivery[company]', $userDataDelivery->getCompany(), array('id'=>'company_delivery', 'placeholder'=> '* '.__("Firma"), 'maxlength'=>'255', 'class'=>'form-control'))); ?>
|
||||||
<?php $smarty->assign('input_delivery_full_name', input_tag('user_data_delivery[full_name]', $userDataDelivery->getFullName(), array('id'=>'full_name_delivery', 'placeholder'=> "* ".__('Imię i nazwisko'), 'maxlength'=>'255', 'class'=>'form-control'))); ?>
|
<?php $smarty->assign('input_delivery_full_name', input_tag('user_data_delivery[full_name]', $userDataDelivery->getFullName(), array('id'=>'full_name_delivery', 'placeholder'=> "* ".__('Imię i nazwisko'), 'maxlength'=>'255', 'class'=>'form-control'))); ?>
|
||||||
<?php $smarty->assign('input_delivery_address', input_tag('user_data_delivery[address]', $userDataDelivery->getAddress(), array('id'=>'address_delivery', 'placeholder'=> '* '.__("Ulica nr domu / nr lokalu"), 'maxlength'=>'255', 'class'=>'form-control'))); ?>
|
<?php $smarty->assign('input_delivery_address', input_tag('user_data_delivery[address]', $userDataDelivery->getAddress(), array('id'=>'address_delivery', 'placeholder'=> '* '.__("Ulica nr domu / nr lokalu"), 'maxlength'=>'255', 'class'=>'form-control'))); ?>
|
||||||
@@ -175,7 +175,7 @@ if($user_config->get('validate_phone')==1){
|
|||||||
|
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<?php $smarty->assign('save_submit',submit_tag(__('Zapisz'),array('name'=>'submit_save'))) ?>
|
<?php $smarty->assign('save_submit',submit_tag(__('Zapisz'),array('name'=>'submit_save'))) ?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,485 +0,0 @@
|
|||||||
<div id="order_form">
|
|
||||||
|
|
||||||
<div id="order_form_billing" class="roundies box_form">
|
|
||||||
<h3><b>5</b> {__ text="Dane płatnika"}</h3>
|
|
||||||
|
|
||||||
<div class="box_form_content">
|
|
||||||
{slot name="user_before_order_fieldset_billing" hidden="true"}{/slot}
|
|
||||||
<fieldset>
|
|
||||||
|
|
||||||
<div class="st_row">
|
|
||||||
<div class="st_field">
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="st_row">
|
|
||||||
<div style="float:left;margin-right: 10px;">{$radio_billing_customer_type1} <i class="gray_text">{$label_billing_customer_type1}</i></div>
|
|
||||||
|
|
||||||
<div style="float:left;">{$radio_billing_customer_type2} <i class="gray_text">{$label_billing_customer_type2}</i></div>
|
|
||||||
<div class="clear"></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="company_billing_fields">
|
|
||||||
<div class="st_row row_company">
|
|
||||||
<div class="error_tooltip">
|
|
||||||
{if $error_billing_company!=""}
|
|
||||||
<img src="{image_path image='exclamation.png'}" title="{$error_billing_company}" alt="{$error_billing_company}">
|
|
||||||
{/if}
|
|
||||||
</div>
|
|
||||||
<div class="st_field">
|
|
||||||
{$label_billing_company}
|
|
||||||
{$input_billing_company}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="st_row row_nip">
|
|
||||||
<div class="error_tooltip">
|
|
||||||
{if $error_billing_vat!=""}
|
|
||||||
<img src="{image_path image='exclamation.png'}" title="{$error_billing_vat}" alt="{$error_billing_vat}">
|
|
||||||
{/if}
|
|
||||||
</div>
|
|
||||||
<div class="st_field">
|
|
||||||
{$label_billing_nip}
|
|
||||||
{$input_billing_nip}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="st_row row_full_name">
|
|
||||||
<div class="error_tooltip">
|
|
||||||
{if $error_billing_full_name!=""}
|
|
||||||
<img src="{image_path image='exclamation.png'}" title="{$error_billing_full_name}" alt="{$error_billing_full_name}">
|
|
||||||
{/if}
|
|
||||||
</div>
|
|
||||||
<div class="st_field">
|
|
||||||
{$label_billing_full_name}
|
|
||||||
{$input_billing_full_name}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="st_row row_address">
|
|
||||||
<div class="error_tooltip">
|
|
||||||
{if $error_billing_address!=""}
|
|
||||||
<img src="{image_path image='exclamation.png'}" title="{$error_billing_address}" alt="{$error_billing_address}">
|
|
||||||
{/if}
|
|
||||||
</div>
|
|
||||||
<div class="st_field">
|
|
||||||
{$label_billing_address}
|
|
||||||
{$input_billing_address}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{if $show_address_more==1}
|
|
||||||
<div class="st_row row_address_more">
|
|
||||||
<div class="st_field">
|
|
||||||
{$label_billing_address_more}
|
|
||||||
{$input_billing_address_more}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{/if}
|
|
||||||
|
|
||||||
{if $show_region==1}
|
|
||||||
<div class="st_row row_region">
|
|
||||||
<div class="st_field">
|
|
||||||
{$label_billing_region}
|
|
||||||
{$input_billing_region}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{/if}
|
|
||||||
|
|
||||||
<div class="st_row row_code_town">
|
|
||||||
<div class="error_tooltip">
|
|
||||||
{if $error_billing_code_town!=""}
|
|
||||||
<img src="{image_path image='exclamation.png'}" title="{$error_billing_code_town}" alt="{$error_billing_code_town}">
|
|
||||||
{/if}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="st_field left">
|
|
||||||
{$label_billing_code}
|
|
||||||
{$input_billing_code}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="st_field left" style="margin-left:4px;">
|
|
||||||
{$label_billing_town}
|
|
||||||
{$input_billing_town}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="clear"></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="st_row row_country">
|
|
||||||
<div class="st_field">
|
|
||||||
{$select_billing_country}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{if $show_pesel==1}
|
|
||||||
<div class="st_row row_pesel">
|
|
||||||
<div class="st_field">
|
|
||||||
{$label_billing_pesel}
|
|
||||||
{$input_billing_pesel}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{/if}
|
|
||||||
|
|
||||||
<div class="st_row row_phone">
|
|
||||||
<div class="error_tooltip">
|
|
||||||
{if $error_billing_phone!=""}
|
|
||||||
<img src="{image_path image='exclamation.png'}" title="{$error_billing_phone}" alt="{$error_billing_phone}">
|
|
||||||
{/if}
|
|
||||||
</div>
|
|
||||||
<div class="st_field">
|
|
||||||
{$label_billing_phone}
|
|
||||||
{$input_billing_phone}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="st_row row_email">
|
|
||||||
|
|
||||||
<div class="error_tooltip">
|
|
||||||
{if $error_billing_email!=""}
|
|
||||||
<img src="{image_path image='exclamation.png'}" title="{$error_billing_email}" alt="{$error_billing_email}">
|
|
||||||
{/if}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="st_field left">
|
|
||||||
{$label_billing_email}
|
|
||||||
{$input_billing_email}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="st_row row_email">
|
|
||||||
|
|
||||||
<div class="st_field left gray_text vertical-align-middle">
|
|
||||||
{$checkbox_create_account}
|
|
||||||
<span >{__ text="Załóż konto"}</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="account_fields">
|
|
||||||
|
|
||||||
<div class="st_row row_password1">
|
|
||||||
|
|
||||||
<div class="error_tooltip">
|
|
||||||
{if $error_billing_password1!=""}
|
|
||||||
<img src="{image_path image='exclamation.png'}" title="{$error_billing_password1}" alt="{$error_billing_password1}">
|
|
||||||
{/if}
|
|
||||||
</div>
|
|
||||||
<div class="st_field">
|
|
||||||
{$label_billing_password1}
|
|
||||||
{$input_billing_password1}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="st_row row_password2">
|
|
||||||
<div class="error_tooltip">
|
|
||||||
{if $error_billing_password2!=""}
|
|
||||||
<img src="{image_path image='exclamation.png'}" title="{$error_billing_password2}" alt="{$error_billing_password2}">
|
|
||||||
{/if}
|
|
||||||
</div>
|
|
||||||
<div class="st_field">
|
|
||||||
{$label_billing_password2}
|
|
||||||
{$input_billing_password2}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{if $show_invoice_request==1 && $auto_invoice_request!=1}
|
|
||||||
<div class="st_row">
|
|
||||||
<div class="st_field gray_text vertical-align-middle">
|
|
||||||
{$checkbox_invoice}
|
|
||||||
<span >{__ text="Chcę otrzymać fakturę vat"}</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{/if}
|
|
||||||
|
|
||||||
<div class="st_row row_email">
|
|
||||||
|
|
||||||
<div class="st_field left gray_text vertical-align-middle">
|
|
||||||
{$checkbox_different_delivery}
|
|
||||||
<span >{__ text="Inne dane wysyłkowe"}</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</fieldset>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="order_form_delivery">
|
|
||||||
<h3><b>6</b> {__ text="Dane wysyłkowe"}</h3>
|
|
||||||
|
|
||||||
<div class="box_form_content">
|
|
||||||
<fieldset>
|
|
||||||
|
|
||||||
<div class="st_row">
|
|
||||||
<div style="float:left;">{$radio_delivery_customer_type1} <i class="gray_text">{$label_delivery_customer_type1}</i></div>
|
|
||||||
|
|
||||||
<div style="float:left;">{$radio_delivery_customer_type2} <i class="gray_text">{$label_delivery_customer_type2}</i></div>
|
|
||||||
<div class="clear"></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="company_delivery_fields">
|
|
||||||
<div class="st_row row_company">
|
|
||||||
<div class="error_tooltip">
|
|
||||||
{if $error_delivery_company!=""}
|
|
||||||
<img src="{image_path image='exclamation.png'}" title="{$error_delivery_company}" alt="{$error_delivery_company}">
|
|
||||||
{/if}
|
|
||||||
</div>
|
|
||||||
<div class="st_field">
|
|
||||||
{$label_delivery_company}
|
|
||||||
{$input_delivery_company}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="st_row row_full_name">
|
|
||||||
<div class="error_tooltip">
|
|
||||||
{if $error_delivery_full_name!=""}
|
|
||||||
<img src="{image_path image='exclamation.png'}" title="{$error_delivery_full_name}" alt="{$error_delivery_full_name}">
|
|
||||||
{/if}
|
|
||||||
</div>
|
|
||||||
<div class="st_field">
|
|
||||||
{$label_delivery_full_name}
|
|
||||||
{$input_delivery_full_name}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="st_row row_address">
|
|
||||||
<div class="error_tooltip">
|
|
||||||
{if $error_delivery_address!=""}
|
|
||||||
<img src="{image_path image='exclamation.png'}" title="{$error_delivery_address}" alt="{$error_delivery_address}">
|
|
||||||
{/if}
|
|
||||||
</div>
|
|
||||||
<div class="st_field">
|
|
||||||
{$label_delivery_address}
|
|
||||||
{$input_delivery_address}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{if $show_address_more==1}
|
|
||||||
<div class="st_row row_address_more">
|
|
||||||
<div class="st_field">
|
|
||||||
{$label_delivery_address_more}
|
|
||||||
{$input_delivery_address_more}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{/if}
|
|
||||||
|
|
||||||
{if $show_region==1}
|
|
||||||
<div class="st_row row_region">
|
|
||||||
<div class="st_field">
|
|
||||||
{$label_delivery_region}
|
|
||||||
{$input_delivery_region}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{/if}
|
|
||||||
|
|
||||||
<div class="st_row row_code_town">
|
|
||||||
<div class="error_tooltip">
|
|
||||||
{if $error_delivery_code_town!=""}
|
|
||||||
<img src="{image_path image='exclamation.png'}" title="{$error_delivery_code_town}" alt="{$error_delivery_code_town}">
|
|
||||||
{/if}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="st_field left">
|
|
||||||
{$label_delivery_code}
|
|
||||||
{$input_delivery_code}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="st_field left" style="margin-left:4px;">
|
|
||||||
{$label_delivery_town}
|
|
||||||
{$input_delivery_town}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="clear"></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="st_row row_country">
|
|
||||||
<div class="st_field">
|
|
||||||
{$select_delivery_country}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="st_row row_phone" style="margin-bottom:15px;">
|
|
||||||
<div class="error_tooltip">
|
|
||||||
{if $error_delivery_phone!=""}
|
|
||||||
<img src="{image_path image='exclamation.png'}" title="{$error_delivery_phone}" alt="{$error_delivery_phone}">
|
|
||||||
{/if}
|
|
||||||
</div>
|
|
||||||
<div class="st_field">
|
|
||||||
{$label_delivery_phone}
|
|
||||||
{$input_delivery_phone}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</fieldset>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="footer_form">
|
|
||||||
<fieldset>
|
|
||||||
{$description}
|
|
||||||
{$under_basket_socket}
|
|
||||||
|
|
||||||
<div class="st_row">
|
|
||||||
<div class="st_field vertical-align-middle {if $error_billing_privacy==1} red {/if}">
|
|
||||||
{$checkbox_privacy}
|
|
||||||
{$link_to_privacy}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{if isset($captcha_on)}
|
|
||||||
<div id="captcha_form" class="st_row">
|
|
||||||
|
|
||||||
|
|
||||||
<div style="margin-bottom: 2px;">
|
|
||||||
{$get_captcha}
|
|
||||||
</div>
|
|
||||||
<div class="error_tooltip">
|
|
||||||
{if $error_captcha!=""}
|
|
||||||
<img src="{image_path image='exclamation.png'}" title="{$error_captcha}" alt="{$error_captcha}">
|
|
||||||
{/if}
|
|
||||||
</div>
|
|
||||||
<div class="st_field">
|
|
||||||
{$label_captcha}
|
|
||||||
{$input_captcha}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
{/if}
|
|
||||||
|
|
||||||
<div class="st_row">
|
|
||||||
<div class="st_field gray_text vertical-align-middle">
|
|
||||||
<span> * {__ text="Pola wymagane"}</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</fieldset>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{$hidden_is_authenticated}
|
|
||||||
|
|
||||||
|
|
||||||
{literal}
|
|
||||||
<script type="text/javascript">
|
|
||||||
jQuery(function ($)
|
|
||||||
{
|
|
||||||
$(document).ready(function()
|
|
||||||
{
|
|
||||||
$(".error_tooltip img[title]").tooltip({
|
|
||||||
effect: 'slide',
|
|
||||||
opacity: 1,
|
|
||||||
position: 'bottom right',
|
|
||||||
offset: [15,4],
|
|
||||||
tipClass: 'alert_tooltip'
|
|
||||||
});
|
|
||||||
|
|
||||||
$("#password1_billing").pstrength();
|
|
||||||
|
|
||||||
$("label").inFieldLabels();
|
|
||||||
|
|
||||||
if($('#create_account').attr('checked'))
|
|
||||||
{
|
|
||||||
$("#account_fields").show();
|
|
||||||
}else{
|
|
||||||
$("#account_fields").hide();
|
|
||||||
}
|
|
||||||
|
|
||||||
$('#create_account').click(function(){
|
|
||||||
$("#account_fields").toggle();
|
|
||||||
});
|
|
||||||
|
|
||||||
if($('#different_delivery').attr('checked'))
|
|
||||||
{
|
|
||||||
$("#order_form_delivery").show();
|
|
||||||
}else{
|
|
||||||
$("#order_form_delivery").hide();
|
|
||||||
}
|
|
||||||
|
|
||||||
var countryId = $('#user_data_delivery_country').val();
|
|
||||||
|
|
||||||
stUser.updateAnonymousForms(countryId);
|
|
||||||
|
|
||||||
$('#different_delivery').click(function(){
|
|
||||||
$("#order_form_delivery").toggle();
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
if($('#user_data_billing_customer_type_2').attr('checked'))
|
|
||||||
{
|
|
||||||
$("#company_billing_fields").show();
|
|
||||||
$("#full_name_billing_label").text({/literal}"{$label_billing_full_name_text}"{literal});
|
|
||||||
|
|
||||||
}else{
|
|
||||||
$("#company_billing_fields").hide();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
$('#user_data_billing_customer_type_1').click(function(){
|
|
||||||
$("#company_billing_fields").hide();
|
|
||||||
$("#full_name_billing_label").text({/literal}"* {$label_billing_full_name_text}"{literal});
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#user_data_billing_customer_type_2').click(function(){
|
|
||||||
$("#company_billing_fields").show();
|
|
||||||
$("#full_name_billing_label").text({/literal}"{$label_billing_full_name_text}"{literal});
|
|
||||||
});
|
|
||||||
|
|
||||||
if($('#user_data_delivery_customer_type_2').attr('checked'))
|
|
||||||
{
|
|
||||||
$("#company_delivery_fields").show();
|
|
||||||
$("#full_name_delivery_label").text({/literal}"{$label_delivery_full_name_text}"{literal});
|
|
||||||
}else{
|
|
||||||
$("#company_delivery_fields").hide();
|
|
||||||
}
|
|
||||||
|
|
||||||
$('#user_data_delivery_customer_type_1').click(function(){
|
|
||||||
$("#company_delivery_fields").hide();
|
|
||||||
$("#full_name_delivery_label").text({/literal}"* {$label_delivery_full_name_text}"{literal});
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#user_data_delivery_customer_type_2').click(function(){
|
|
||||||
$("#company_delivery_fields").show();
|
|
||||||
$("#full_name_delivery_label").text({/literal}"{$label_delivery_full_name_text}"{literal});
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#user_data_billing_privacy').click(function(){
|
|
||||||
$("#captcha_form").toggle();
|
|
||||||
});
|
|
||||||
|
|
||||||
if($('#user_data_billing_privacy').attr('checked'))
|
|
||||||
{
|
|
||||||
$("#captcha_form").show()
|
|
||||||
}else{
|
|
||||||
$("#captcha_form").hide();
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#user_data_billing_country').change(function() {
|
|
||||||
$('#delivery_country').change();
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#user_data_delivery_country').change(function() {
|
|
||||||
$('#delivery_country').val($(this).val()).change();
|
|
||||||
});
|
|
||||||
|
|
||||||
$("#order_description_text").change(function () {
|
|
||||||
$("#order_description").val($("#order_description_text").val());
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
</script>
|
|
||||||
{/literal}
|
|
||||||
@@ -1,296 +0,0 @@
|
|||||||
<div class="box_form_content">
|
|
||||||
<fieldset>
|
|
||||||
|
|
||||||
<div class="st_row">
|
|
||||||
<div style="float:left;margin-right: 10px;">{$radio_billing_customer_type1} <i class="gray_text">{$label_billing_customer_type1}</i></div>
|
|
||||||
<div style="float:left;">{$radio_billing_customer_type2} <i class="gray_text">{$label_billing_customer_type2}</i></div>
|
|
||||||
<div class="clear"></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{if $is_authenticated && $external_account}
|
|
||||||
<div id="external_account">
|
|
||||||
<img src="/images/frontend/theme/default2/{$external_account}_icon.png" alt="{$external_account}" />
|
|
||||||
<a href="/user_data/userPanel" name="external_account">{$username}</a>
|
|
||||||
</div>
|
|
||||||
{/if}
|
|
||||||
|
|
||||||
<div id="company_billing_fields">
|
|
||||||
|
|
||||||
<div class="st_row">
|
|
||||||
<div class="error_tooltip">
|
|
||||||
{if $error_billing_company!=""}
|
|
||||||
<img src="{image_path image='exclamation.png'}" title="{$error_billing_company}" alt="{$error_billing_company}">
|
|
||||||
{/if}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="st_field">
|
|
||||||
{$label_billing_company}
|
|
||||||
{$input_billing_company}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="st_row">
|
|
||||||
<div class="error_tooltip">
|
|
||||||
{if $error_billing_vat!=""}
|
|
||||||
<img src="{image_path image='exclamation.png'}" title="{$error_billing_vat}" alt="{$error_billing_vat}">
|
|
||||||
{/if}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="st_field">
|
|
||||||
{$label_billing_nip}
|
|
||||||
{$input_billing_nip}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="st_row">
|
|
||||||
<div class="error_tooltip">
|
|
||||||
{if $error_billing_full_name!=""}
|
|
||||||
<img src="{image_path image='exclamation.png'}" title="{$error_billing_full_name}" alt="{$error_billing_full_name}">
|
|
||||||
{/if}
|
|
||||||
</div>
|
|
||||||
<div class="st_field">
|
|
||||||
{$label_billing_full_name}
|
|
||||||
{$input_billing_full_name}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="st_row">
|
|
||||||
<div class="error_tooltip">
|
|
||||||
{if $error_billing_address!=""}
|
|
||||||
<img src="{image_path image='exclamation.png'}" title="{$error_billing_address}" alt="{$error_billing_address}">
|
|
||||||
{/if}
|
|
||||||
</div>
|
|
||||||
<div class="st_field">
|
|
||||||
{$label_billing_address}
|
|
||||||
{$input_billing_address}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{if $show_address_more==1}
|
|
||||||
<div class="st_row">
|
|
||||||
<div class="st_field">
|
|
||||||
{$label_billing_address_more}
|
|
||||||
{$input_billing_address_more}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{/if}
|
|
||||||
|
|
||||||
{if $show_region==1}
|
|
||||||
<div class="st_row">
|
|
||||||
<div class="st_field">
|
|
||||||
{$label_billing_region}
|
|
||||||
{$input_billing_region}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{/if}
|
|
||||||
|
|
||||||
<div class="st_row">
|
|
||||||
<div class="error_tooltip">
|
|
||||||
{if $error_billing_code_town!=""}
|
|
||||||
<img src="{image_path image='exclamation.png'}" title="{$error_billing_code_town}" alt="{$error_billing_code_town}">
|
|
||||||
{/if}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="st_field left">
|
|
||||||
{$label_billing_code}
|
|
||||||
{$input_billing_code}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="st_field left" style="margin-left:4px;">
|
|
||||||
{$label_billing_town}
|
|
||||||
{$input_billing_town}
|
|
||||||
</div>
|
|
||||||
<div class="clear"></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="st_row">
|
|
||||||
<div class="st_field">
|
|
||||||
{$select_billing_country}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{if $show_pesel==1}
|
|
||||||
<div class="st_row">
|
|
||||||
<div class="st_field">
|
|
||||||
{$label_billing_pesel}
|
|
||||||
{$input_billing_pesel}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{/if}
|
|
||||||
|
|
||||||
<div class="st_row">
|
|
||||||
<div class="error_tooltip">
|
|
||||||
{if $error_billing_phone!=""}
|
|
||||||
<img src="{image_path image='exclamation.png'}" title="{$error_billing_phone}" alt="{$error_billing_phone}">
|
|
||||||
{/if}
|
|
||||||
</div>
|
|
||||||
<div class="st_field">
|
|
||||||
{$label_billing_phone}
|
|
||||||
{$input_billing_phone}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{$description}
|
|
||||||
{$under_basket_socket}
|
|
||||||
|
|
||||||
|
|
||||||
</fieldset>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
{literal}
|
|
||||||
<script type="text/javascript">
|
|
||||||
jQuery(function ($) {
|
|
||||||
$(document).ready(function () {
|
|
||||||
|
|
||||||
$(".error_tooltip img[title]").tooltip({
|
|
||||||
effect: 'slide',
|
|
||||||
opacity: 1,
|
|
||||||
position: 'bottom right',
|
|
||||||
offset: [15, 4],
|
|
||||||
tipClass: 'alert_tooltip'
|
|
||||||
});
|
|
||||||
|
|
||||||
$("label").inFieldLabels();
|
|
||||||
|
|
||||||
function equalHeight(group) {
|
|
||||||
tallest = 0;
|
|
||||||
group.each(function () {
|
|
||||||
$(this).css("height", "auto");
|
|
||||||
thisHeight = $(this).height();
|
|
||||||
if (thisHeight > tallest) {
|
|
||||||
tallest = thisHeight;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
group.height(tallest);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($('#user_data_billing_customer_type_2').attr('checked')) {
|
|
||||||
$("#company_billing_fields").show();
|
|
||||||
$("#full_name_billing_label").text({/ literal} "{$label_billing_full_name_text}"{ literal });
|
|
||||||
}else {
|
|
||||||
$("#company_billing_fields").hide();
|
|
||||||
}
|
|
||||||
|
|
||||||
$('#user_data_billing_customer_type_1').click(function () {
|
|
||||||
$("#company_billing_fields").hide();
|
|
||||||
$("#full_name_billing_label").text({/ literal}"* {$label_billing_full_name_text}"{ literal });
|
|
||||||
equalHeight($(".data_frame"));
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#user_data_billing_customer_type_2').click(function () {
|
|
||||||
$("#company_billing_fields").show();
|
|
||||||
$("#full_name_billing_label").text({/ literal}"{$label_billing_full_name_text}"{ literal });
|
|
||||||
equalHeight($(".data_frame"));
|
|
||||||
});
|
|
||||||
|
|
||||||
equalHeight($(".data_frame"));
|
|
||||||
|
|
||||||
$("#billing-company").change(function () {
|
|
||||||
var word_billing = $(this).get(0).defaultValue;
|
|
||||||
var word_delivery = $("#company").val();
|
|
||||||
$(".row_company label").hide();
|
|
||||||
|
|
||||||
|
|
||||||
if (word_billing == word_delivery) {
|
|
||||||
$("#company").val($(this).val());
|
|
||||||
$(this).get(0).defaultValue = $(this).val();
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
$("#billing-full_name").change(function () {
|
|
||||||
var word_billing = $(this).get(0).defaultValue;
|
|
||||||
var word_delivery = $("#full_name").val();
|
|
||||||
$(".row_full_name label").hide();
|
|
||||||
|
|
||||||
if (word_billing == word_delivery) {
|
|
||||||
$("#full_name").val($(this).val());
|
|
||||||
$(this).get(0).defaultValue = $(this).val();
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
$("#billing-address").change(function () {
|
|
||||||
var word_billing = $(this).get(0).defaultValue;
|
|
||||||
var word_delivery = $("#address").val();
|
|
||||||
$(".row_address label").hide();
|
|
||||||
|
|
||||||
if (word_billing == word_delivery) {
|
|
||||||
$("#address").val($(this).val());
|
|
||||||
$(this).get(0).defaultValue = $(this).val();
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
$("#billing-address-more").change(function () {
|
|
||||||
var word_billing = $(this).get(0).defaultValue;
|
|
||||||
var word_delivery = $("#address-more").val();
|
|
||||||
$(".row_address-more label").hide();
|
|
||||||
|
|
||||||
if (word_billing == word_delivery) {
|
|
||||||
$("#address-more").val($(this).val());
|
|
||||||
$(this).get(0).defaultValue = $(this).val();
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
$("#billing-code").change(function () {
|
|
||||||
var word_billing = $(this).get(0).defaultValue;
|
|
||||||
var word_delivery = $("#code").val();
|
|
||||||
$("#label_code").hide();
|
|
||||||
|
|
||||||
if (word_billing == word_delivery) {
|
|
||||||
$("#code").val($(this).val());
|
|
||||||
$(this).get(0).defaultValue = $(this).val();
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
$("#billing-town").change(function () {
|
|
||||||
var word_billing = $(this).get(0).defaultValue;
|
|
||||||
var word_delivery = $("#town").val();
|
|
||||||
$("#label_town").hide();
|
|
||||||
|
|
||||||
if (word_billing == word_delivery) {
|
|
||||||
$("#town").val($(this).val());
|
|
||||||
$(this).get(0).defaultValue = $(this).val();
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
$("#billing-phone").change(function () {
|
|
||||||
var word_billing = $(this).get(0).defaultValue;
|
|
||||||
var word_delivery = $("#phone").val();
|
|
||||||
$(".row_phone label").hide();
|
|
||||||
|
|
||||||
if (word_billing == word_delivery) {
|
|
||||||
$("#phone").val($(this).val());
|
|
||||||
$(this).get(0).defaultValue = $(this).val();
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#user_data_billing_country').change(function () {
|
|
||||||
$('#delivery_country').change();
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
$("#order_description_text").change(function () {
|
|
||||||
$("#order_description").val($("#order_description_text").val());
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
{/literal}
|
|
||||||
@@ -66,14 +66,14 @@
|
|||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
<div class="col-sm-6 col-lg-4">
|
<div class="col-sm-6 col-lg-5">
|
||||||
<div class="form-group {if $error_billing_code!=''}has-error{/if}">
|
<div class="form-group {if $error_billing_code!=''}has-error{/if}">
|
||||||
{if $error_billing_code!=""}<label class="control-label" for="code_billing">{$error_billing_code}</label>{/if}
|
{if $error_billing_code!=""}<label class="control-label" for="code_billing">{$error_billing_code}</label>{/if}
|
||||||
{$input_billing_code}
|
{$input_billing_code}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-sm-6 col-lg-8">
|
<div class="col-sm-6 col-lg-7">
|
||||||
<div class="form-group {if $error_billing_town!=''}has-error{/if}">
|
<div class="form-group {if $error_billing_town!=''}has-error{/if}">
|
||||||
{if $error_billing_town!=""}<label class="control-label" for="town_billing">{$error_billing_town}</label>{/if}
|
{if $error_billing_town!=""}<label class="control-label" for="town_billing">{$error_billing_town}</label>{/if}
|
||||||
{$input_billing_town}
|
{$input_billing_town}
|
||||||
@@ -407,5 +407,18 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$(document).ready(function () {
|
||||||
|
$('#code_billing').on('input', function () {
|
||||||
|
let value = $(this).val().replace(/[^\d]/g, ''); // usuń wszystkie niedozwolone znaki
|
||||||
|
if (value.length > 5) value = value.substring(0, 5);
|
||||||
|
|
||||||
|
if (value.length > 2) {
|
||||||
|
value = value.substring(0, 2) + '-' + value.substring(2);
|
||||||
|
}
|
||||||
|
|
||||||
|
$(this).val(value);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
{/literal}
|
{/literal}
|
||||||
Reference in New Issue
Block a user