Add user data templates for responsive design and pagination

- Created new templates for user data management including address list, product list, and order forms.
- Implemented responsive design for user panel breadcrumbs and address management.
- Added pagination functionality for product listings.
- Integrated Smarty template engine for dynamic content rendering.
- Ensured compatibility with existing user data structures and configurations.
This commit is contained in:
2025-06-18 10:13:34 +02:00
parent 426a128c97
commit 21e2bc6412
31 changed files with 3453 additions and 1719 deletions

View File

@@ -8,6 +8,96 @@
"modules": {
"stUserData": {
"templates": {
"addressListSuccess.php": {
"type": "-",
"size": 613,
"lmtime": 0,
"modified": false
},
"_ajaxEditProfile.php": {
"type": "-",
"size": 6086,
"lmtime": 0,
"modified": false
},
"createFirstUserDataSuccess.php": {
"type": "-",
"size": 18496,
"lmtime": 1750194435516,
"modified": false
},
"_deliveryCountriesSelect.php": {
"type": "-",
"size": 859,
"lmtime": 0,
"modified": false
},
"_editProfileForm.php": {
"type": "-",
"size": 12844,
"lmtime": 0,
"modified": false
},
"_editProfileList.php": {
"type": "-",
"size": 3384,
"lmtime": 0,
"modified": false
},
"editProfileSuccess.php": {
"type": "-",
"size": 1284,
"lmtime": 0,
"modified": false
},
"_orderFormBilling.php": {
"type": "-",
"size": 12010,
"lmtime": 1750194457389,
"modified": false
},
"_orderFormDelivery.php": {
"type": "-",
"size": 9269,
"lmtime": 0,
"modified": false
},
"_orderForm.php": {
"type": "-",
"size": 26794,
"lmtime": 1750194486390,
"modified": false
},
"_pager.php": {
"type": "-",
"size": 1228,
"lmtime": 0,
"modified": false
},
"productListSuccess.php": {
"type": "-",
"size": 7739,
"lmtime": 0,
"modified": false
},
"_profileList.php": {
"type": "-",
"size": 55,
"lmtime": 0,
"modified": false
},
"_responsiveUserPanelBreadcrumbs.php": {
"type": "-",
"size": 207,
"lmtime": 0,
"modified": false
},
"_responsiveUserPanelMenu.php": {
"type": "-",
"size": 512,
"lmtime": 0,
"modified": false
},
"theme": {
"default2": {
"user_form.html": {
@@ -86,11 +176,37 @@
"mojszablon": {
"userdata_order_form.html": {
"type": "-",
"size": 13527,
"lmtime": 1697623526231,
"size": 14194,
"lmtime": 1750194519328,
"modified": false
}
}
},
"_user_form.php": {
"type": "-",
"size": 1155,
"lmtime": 0,
"modified": false
},
"_userPanelMenu.php": {
"type": "-",
"size": 1189,
"lmtime": 0,
"modified": false
},
"userPanelSuccess.php": {
"type": "-",
"size": 10489,
"lmtime": 0,
"modified": false
}
},
"actions": {
"actions.class.php": {
"type": "-",
"size": 55099,
"lmtime": 1750193995402,
"modified": false
}
}
},

File diff suppressed because it is too large Load Diff

View File

@@ -197,6 +197,8 @@ class stUserDataComponents extends sfComponents
$this->panel_navigator = stTabNavigator::getInstance($this->getContext(), null, null, false);
$this->panel_navigator->addTab('Moje konto', 'stUserData', 'userPanel', null, 'userPanel');
$this->panel_navigator->addTab('Moje dane', 'stUser', 'editAccount', null, 'editAccount');
$this->panel_navigator->addTab('Lista produktow', 'stUserData', 'productList', null, 'productList');
$this->panel_navigator->setTab(isset($this->action)? $this->action : $this->getActionName());
$this->getDispatcher()->notify(new sfEvent($this, 'stUserDataComponents.postExecuteUserPanelMenu'));
@@ -208,6 +210,11 @@ class stUserDataComponents extends sfComponents
$this->smarty = new stSmarty('stUserData');
}
public function executeResponsiveUserPanelBreadcrumbs()
{
$this->smarty = new stSmarty('stUserData');
}
public function updateUserLoginForm($user_data, $request_parameter)
@@ -275,7 +282,6 @@ class stUserDataComponents extends sfComponents
*/
public function executeOrderFormBilling()
{
$delivery = stDeliveryFrontend::getInstance(stBasket::getInstance($this->getUser()));
$this->smarty = new stSmarty('stUserData');
$user_config = stConfig::getInstance(sfContext::getInstance(), 'stUser');
@@ -294,37 +300,55 @@ class stUserDataComponents extends sfComponents
$this->show_region = $user_config->get('show_region');
$this->show_pesel = $user_config->get('show_pesel');
$this->show_address_more = $user_config->get('show_address_more');
$this->show_address_more = $user_config->get('show_address_more');
$user_data_billing = $this->getRequestParameter('user_data_billing', []);
$userDataBilling = new UserData();
if ($this->getUser()->isAuthenticated() && !$this->getRequestParameter('user_data_billing'))
if ($this->getUser()->isAuthenticated())
{
/**
* @var UserData|null $userDataDefaultBilling
*/
$userDataDefaultBilling = isset($this->profile_id) ? UserDataPeer::retrieveByPK($this->profile_id) : $this->getUser()->getUserDataDefaultbilling();
$user = new stUser();
if(!$userDataDefaultBilling)
{
$userDataDefaultBilling = stUser::addEmptyUserData(1,1);
}
};
$user_data_billing['company'] = $userDataDefaultBilling->getCompany();
$user_data_billing['vat_number'] = $userDataDefaultBilling->getVatNumber();
$user_data_billing['customer_type'] = $user_data_billing['company'] ? 2 : 1;
$user_data_billing['full_name'] = $userDataDefaultBilling->getFullName();
$user_data_billing['address'] = $userDataDefaultBilling->getAddress();
$user_data_billing['address_more'] = $userDataDefaultBilling->getAddressMore();
$user_data_billing['code'] = $userDataDefaultBilling->getCode();
$user_data_billing['town'] = $userDataDefaultBilling->getTown();
$user_data_billing['phone'] = $userDataDefaultBilling->getPhone();
$userDataBilling->setCountriesId($userDataDefaultBilling->getCountriesId());
$user_data_billing['country'] = $userDataDefaultBilling->getCountriesId();
$user_data_billing['pesel'] = $userDataDefaultBilling->getPesel();
$fields = [
'company',
'vat_number',
'customer_type',
'full_name',
'address',
'address_more',
'region',
'code',
'town',
'phone',
'country',
'pesel',
'customer_type',
];
$userDataDefaulBillingFields = $userDataDefaultBilling->toArray(BasePeer::TYPE_FIELDNAME);
$userDataDefaulBillingFields['customer_type'] = $userDataDefaultBilling->getCustomerType();
foreach ($fields as $field)
{
if (!isset($user_data_billing[$field]) || $this->getVar('force_default'))
{
$defaultField = $field === 'country' ? 'countries_id' : $field;
$user_data_billing[$field] = $userDataDefaulBillingFields[$defaultField];
}
}
$user_data_billing['description'] = "";
}
else
if (!isset($user_data_billing['customer_type']))
{
$user_data_billing = $this->getRequestParameter('user_data_billing');
$userDataBilling->setCountriesId($user_data_billing['country']);
$user_data_billing['customer_type'] = 1;
}
if ($this->getUser()->hasVatEu())
@@ -333,8 +357,6 @@ class stUserDataComponents extends sfComponents
}
$this->user_data_billing = $user_data_billing;
$this->userDataBilling = $userDataBilling;
}
/**
@@ -342,10 +364,8 @@ class stUserDataComponents extends sfComponents
*/
public function executeOrderFormDelivery()
{
$this->smarty = new stSmarty('stUserData');
$basket = stBasket::getInstance($this->getUser());
$this->smarty = new stSmarty('stUserData');
$this->delivery = stDeliveryFrontend::getInstance($basket);
$user_config = stConfig::getInstance(sfContext::getInstance(), 'stUser');
@@ -353,30 +373,48 @@ class stUserDataComponents extends sfComponents
$this->show_region = $user_config->get('show_region');
$this->show_pesel = $user_config->get('show_pesel');
$this->show_address_more = $user_config->get('show_address_more');
$user_data_delivery = $this->getRequestParameter('user_data_delivery');
if ($this->getUser()->isAuthenticated() && !$this->getRequestParameter('user_data_delivery'))
if ($this->getUser()->isAuthenticated())
{
/**
* @var UserData|null $userDataDefaultDelivery
*/
$userDataDefaultDelivery = isset($this->profile_id) ? UserDataPeer::retrieveByPK($this->profile_id) : $this->getUser()->getUserDataDefaultDelivery();
$user = new stUser();
if(!$userDataDefaultDelivery)
{
$userDataDefaultDelivery = stUser::addEmptyUserData(0,1);
}
$user_data_delivery['company'] = $userDataDefaultDelivery->getCompany();
$user_data_delivery['customer_type'] = $user_data_delivery['company'] ? 2 : 1;
$user_data_delivery['full_name'] = $userDataDefaultDelivery->getFullName();
$user_data_delivery['address'] = $userDataDefaultDelivery->getAddress();
$user_data_delivery['address_more'] = $userDataDefaultDelivery->getAddressMore();
$user_data_delivery['region'] = $userDataDefaultDelivery->getRegion();
$user_data_delivery['code'] = $userDataDefaultDelivery->getCode();
$user_data_delivery['town'] = $userDataDefaultDelivery->getTown();
$user_data_delivery['phone'] = $userDataDefaultDelivery->getPhone();
$fields = [
'company',
'customer_type',
'full_name',
'address',
'address_more',
'region',
'code',
'town',
'phone',
];
$userDataDefaultDeliveryFields = $userDataDefaultDelivery->toArray(BasePeer::TYPE_FIELDNAME);
$userDataDefaultDeliveryFields['customer_type'] = $userDataDefaultDelivery->getCustomerType();
foreach ($fields as $field)
{
if (!isset($user_data_delivery[$field]) || $this->getVar('force_default'))
{
$defaultField = $field === 'country' ? 'countries_id' : $field;
$user_data_delivery[$field] = $userDataDefaultDeliveryFields[$defaultField];
}
}
}
else
if (!isset($user_data_delivery['customer_type']))
{
$user_data_delivery = $this->getRequestParameter('user_data_delivery');
$user_data_delivery['customer_type'] = 1;
}
$this->user_data_delivery = $user_data_delivery;
@@ -389,69 +427,17 @@ class stUserDataComponents extends sfComponents
*/
public function executeOrderForm()
{
$this->smarty = new stSmarty('stUserData');
$smarty = new stSmarty('stUserData');
$basket = stBasket::getInstance($this->getUser());
$this->delivery = stDeliveryFrontend::getInstance($basket);
$this->config = stConfig::getInstance($this->getContext(), 'stSecurityBackend');
$invoice_config = stConfig::getInstance($this->getContext(), 'stInvoiceBackend');
if($invoice_config->get('invoice_on')==1)
{
$this->show_invoice_request = 1;
if($invoice_config->get('auto_invoice_on')==1)
{
$this->auto_invoice_request = 1;
}
}
$user_config = stConfig::getInstance(sfContext::getInstance(), 'stUser');
$this->show_region = $user_config->get('show_region');
$this->show_pesel = $user_config->get('show_pesel');
$this->show_address_more = $user_config->get('show_address_more');
$user_data_billing = $this->getRequestParameter('user_data_billing', array());
$user_data_delivery = $this->getRequestParameter('user_data_delivery', array());
if (!$user_data_billing && !$user_data_delivery)
{
if (!isset($user_data_billing['customer_type']))
{
$user_data_billing['customer_type'] = 1;
}
if (!isset($user_data_delivery['customer_type']))
{
$user_data_delivery['customer_type'] = 1;
}
if($user_config->get('change_default_user'))
{
$user_data_billing['customer_type'] = 2;
$user_data_delivery['customer_type'] = 2;
}
if ($this->getUser()->hasVatEu())
{
$user_data_billing['customer_type'] = 2;
}
}
$this->user_data_billing = $user_data_billing;
$this->user_data_delivery = $user_data_delivery;
if ($this->getRequest()->getMethod() == sfRequest::POST && $this->hasRequestParameter('submit_save'))
{
$this->user_basket_form_error = $this->hasRequestParameter('submit_save');
}
$this->delivery_country_id = $this->delivery->getDefaultDeliveryCountry() ? $this->delivery->getDefaultDeliveryCountry()->getId() : null;
$this->setVar('delivery', stDeliveryFrontend::getInstance($basket));
$this->setVar('config', stConfig::getInstance('stSecurityBackend'));
$this->setVar('user_config', stConfig::getInstance('stUser'));
$this->setVar('smarty', $smarty);
$this->setVar('user_data_billing', $this->getUserDataBilling());
$this->setVar('user_data_delivery', $this->getUserDataDelivery());
$this->setVar('user_basket_form_error', $this->getRequest()->getMethod() == sfRequest::POST && $this->hasRequestParameter('submit_save'));
$this->setVar('delivery_country_id', $this->delivery->getDefaultDeliveryCountry() ? $this->delivery->getDefaultDeliveryCountry()->getId() : null);
}
/**
@@ -669,7 +655,58 @@ class stUserDataComponents extends sfComponents
$this->user_data = $user_data;
$this->userData = $userDataDefault;
}
protected function getUserDataBilling(): array
{
$userConfig = stConfig::getInstance('stUser');
$data = $this->getRequestParameter('user_data_billing', []);
return array_replace([
'company' => null,
'vat_number' => null,
'full_name' => null,
'address' => null,
'region' => null,
'code' => null,
'town' => null,
'phone' => null,
'email' => null,
'email_exist' => null,
'password1' => null,
'password2' => null,
'password_parse' => null,
'privacy' => null,
'terms' => null,
'country' => null,
'create_account' => null,
'address_more' => null,
'pesel' => null,
'customer_type' => $userConfig->get('change_default_user') || $this->getUser()->hasVatEu() ? UserData::COMPANY_TYPE : UserData::CUSTOMER_TYPE,
'different_delivery' => null,
'description' => null,
'not_professional_purchase' => null,
], $data);
}
protected function getUserDataDelivery(): array
{
$userConfig = stConfig::getInstance('stUser');
$data = $this->getRequestParameter('user_data_delivery', []);
return array_replace([
'company' => null,
'vat_number' => null,
'full_name' => null,
'address' => null,
'region' => null,
'code' => null,
'town' => null,
'phone' => null,
'country' => null,
'address_more' => null,
'customer_type' => $userConfig->get('change_default_user') ? UserData::COMPANY_TYPE : UserData::CUSTOMER_TYPE,
], $data);
}
}

View File

@@ -32,16 +32,16 @@ if($user_config->get('validate_phone')==1){
<?php $user_config->get('validate_phone')==1 ? $phone_label = "* ".__('Telefon') : $phone_label = __('Telefon'); ?>
<!-- billing -->
<?php $smarty->assign('input_company', input_tag('user_data[company]', $userData->getCompany(), array('id'=>'company', 'placeholder'=> '* '.__("Firma"), 'maxlength'=>'255', 'class'=>'form-control'))); ?>
<?php $smarty->assign('input_nip', input_tag('user_data[vat_number]', $userData->getVatNumber(), array('id'=>'nip','placeholder'=> "* ".__($sf_user->hasVatEu() ? "Numer VAT UE" : "NIP"), 'maxlength'=>'255', 'class'=>'form-control'))) ?>
<?php $smarty->assign('input_full_name', input_tag('user_data[full_name]', $userData->getFullName(), array('id'=>'full_name', 'placeholder'=> "* ".__('Imię i nazwisko'), 'maxlength'=>'255', 'class'=>'form-control'))); ?>
<?php $smarty->assign('input_address', input_tag('user_data[address]', $userData->getAddress(), array('id'=>'address', 'placeholder'=> '* '.__("Adres"), 'maxlength'=>'255', 'class'=>'form-control'))); ?>
<?php $smarty->assign('input_address_more', input_tag('user_data[address_more]', $userData->getAddressMore(), array('id'=>'address_more', 'placeholder'=>__("Adres ciąg dalszy"), 'maxlength'=>'255', 'class'=>'form-control'))); ?>
<?php $smarty->assign('input_region', input_tag('user_data[region]', $userData->getRegion(), array('id'=>'region', 'placeholder'=>__("Województwo"), 'maxlength'=>'255', 'class'=>'form-control'))); ?>
<?php $smarty->assign('input_code', input_tag('user_data[code]', $userData->getCode(), array('id'=>'code', 'placeholder'=> '* '.__("Kod"), 'maxlength'=>'255', 'class'=>'form-control'))); ?>
<?php $smarty->assign('input_town', input_tag('user_data[town]', $userData->getTown(), array('id'=>'town', 'placeholder'=> '* '.__("Miasto"), 'maxlength'=>'255', 'class'=>'form-control'))); ?>
<?php $smarty->assign('input_phone', input_tag('user_data[phone]', $userData->getPhone(), array('id'=>'phone', 'placeholder'=> $phone_label, 'maxlength'=>'255', 'class'=>'form-control'))); ?>
<?php $smarty->assign('input_pesel', input_tag('user_data[pesel]', $userData->getPesel(), array('id'=>'billing-pesel', 'placeholder'=>__('PESEL'), 'maxlength'=>'255', 'class'=>'form-control'))); ?>
<?php $smarty->assign('input_company', input_tag('user_data[company]', $userData->getCompany(), array('id'=>'company', 'placeholder'=> '* '.__("Firma"), 'aria-label'=> __("Firma"), 'maxlength'=>'255', 'class'=>'form-control'))); ?>
<?php $smarty->assign('input_nip', input_tag('user_data[vat_number]', $userData->getVatNumber(), array('id'=>'nip','placeholder'=> "* ".__($sf_user->hasVatEu() ? "Numer VAT UE" : "NIP"), 'aria-label'=> __($sf_user->hasVatEu() ? "Numer VAT UE" : "NIP"), 'maxlength'=>'255', 'class'=>'form-control'))) ?>
<?php $smarty->assign('input_full_name', input_tag('user_data[full_name]', $userData->getFullName(), array('id'=>'full_name', 'placeholder'=> "* ".__('Imię i nazwisko'), 'aria-label'=> __('Imię i nazwisko'), 'maxlength'=>'255', 'class'=>'form-control'))); ?>
<?php $smarty->assign('input_address', input_tag('user_data[address]', $userData->getAddress(), array('id'=>'address', 'placeholder'=> '* '.__("Adres"), 'aria-label'=> __("Adres"), 'maxlength'=>'255', 'class'=>'form-control'))); ?>
<?php $smarty->assign('input_address_more', input_tag('user_data[address_more]', $userData->getAddressMore(), array('id'=>'address_more', 'placeholder'=>__("Adres ciąg dalszy"), 'aria-label'=>__("Adres ciąg dalszy"), 'maxlength'=>'255', 'class'=>'form-control'))); ?>
<?php $smarty->assign('input_region', input_tag('user_data[region]', $userData->getRegion(), array('id'=>'region', 'placeholder'=>__("Województwo"), 'aria-label'=>__("Województwo"), 'maxlength'=>'255', 'class'=>'form-control'))); ?>
<?php $smarty->assign('input_code', input_tag('user_data[code]', $userData->getCode(), array('id'=>'code', 'placeholder'=> '* '.__("Kod"), 'aria-label'=> __("Kod"), 'maxlength'=>'255', 'class'=>'form-control'))); ?>
<?php $smarty->assign('input_town', input_tag('user_data[town]', $userData->getTown(), array('id'=>'town', 'placeholder'=> '* '.__("Miasto"), 'aria-label'=> __("Miasto"), 'maxlength'=>'255', 'class'=>'form-control'))); ?>
<?php $smarty->assign('input_phone', input_tag('user_data[phone]', $userData->getPhone(), array('id'=>'phone', 'placeholder'=> $phone_label, 'aria-label'=> __('Telefon'), 'maxlength'=>'255', 'class'=>'form-control'))); ?>
<?php $smarty->assign('input_pesel', input_tag('user_data[pesel]', $userData->getPesel(), array('id'=>'billing-pesel', 'placeholder'=>__('PESEL'), 'aria-label'=>__('PESEL'), 'maxlength'=>'255', 'class'=>'form-control'))); ?>
<?php $smarty->assign('is_default', $userData->getIsDefault()) ?>

View File

@@ -1,167 +1,140 @@
<?php use_helper('Validation', 'Object') ?>
<?php st_theme_use_stylesheet('stUser.css') ?>
<?php use_javascript('jquery.infieldlabel.js', 'last') ?>
<?php $user_config = stConfig::getInstance(sfContext::getInstance(), 'stUser'); ?>
<?php $smarty->assign('show_region', $show_region);?>
<?php $smarty->assign('show_pesel', $show_pesel);?>
<?php $smarty->assign('show_address_more', $show_address_more);?>
<?php $smarty->assign('form_start', form_tag('stUserData/saveProfile', array('class' => 'st_form_ver6', 'name'=>'register'))) ?>
<?php $smarty->assign('error_message', form_error('user_data[message]', array('suffix'=>'', 'prefix'=>'', 'class'=>'st_error'))) ?>
<?php $smarty->assign('error_company', form_error('user_data[company]', array('suffix'=>'', 'prefix'=>'', 'class'=>'st_error'))) ?>
<?php $smarty->assign('error_full_name', form_error('user_data[full_name]', array('suffix'=>'', 'prefix'=>'', 'class'=>'st_error'))) ?>
<?php $smarty->assign('error_address', form_error('user_data[address]', array('suffix'=>'', 'prefix'=>'', 'class'=>'st_error'))) ?>
<?php $smarty->assign('error_address_more', form_error('user_data[address_more]', array('suffix'=>'', 'prefix'=>'', 'class'=>'st_error'))) ?>
<?php $smarty->assign('error_region', form_error('user_data[region]', array('suffix'=>'', 'prefix'=>'', 'class'=>'st_error'))) ?>
<?php $smarty->assign('error_code', form_error('user_data[code]', array('suffix'=>'', 'prefix'=>'', 'class'=>'st_error'))) ?>
<?php $smarty->assign('error_town', form_error('user_data[town]', array('suffix'=>'', 'prefix'=>'', 'class'=>'st_error'))) ?>
<?php $smarty->assign('error_phone', form_error('user_data[phone]', array('suffix'=>'', 'prefix'=>'', 'class'=>'st_error'))) ?>
<?php $smarty->assign('error_vat', form_error('user_data[vat_number]', array('suffix'=>'', 'prefix'=>'', 'class'=>'st_error'))) ?>
<?php $smarty->assign('error_company', $sf_request->getError('user_data{company}')); ?>
<?php $smarty->assign('error_nip', $sf_request->getError('user_data{vat_number}')); ?>
<?php $smarty->assign('error_full_name', $sf_request->getError('user_data{full_name}')); ?>
<?php $smarty->assign('error_address', $sf_request->getError('user_data{address}')); ?>
<?php $smarty->assign('error_region', $sf_request->getError('user_data{region}')); ?>
<?php $smarty->assign('error_code_town', $sf_request->getError('user_data{code}').$sf_request->getError('user_data{town}')); ?>
<?php $smarty->assign('error_code', $sf_request->getError('user_data{code}')); ?>
<?php $smarty->assign('error_town', $sf_request->getError('user_data{town}')); ?>
<?php $smarty->assign('error_phone', $sf_request->getError('user_data{phone}')); ?>
<?php if ($userData->getIsBilling()==1): ?>
<?php $smarty->assign('billing_data', $userData->getIsBilling()==1) ?>
<?php endif; ?>
<?php $smarty->assign('label_customer_type1', __('Klient indywidualny')) ?>
<?php $smarty->assign('radio_customer_type1', radiobutton_tag('user_data[customer_type]', 1, $type1_checker)) ?>
<?php $smarty->assign('label_customer_type2', __('Firma')) ?>
<?php $smarty->assign('radio_customer_type2', radiobutton_tag('user_data[customer_type]', 2, $type2_checker)) ?>
<?php $smarty->assign('label_company', label_for('company',"* ".__('Firma'))) ?>
<?php $smarty->assign('input_company', input_tag('user_data[company]', $userData->getCompany(), array('id'=>'company', 'maxlength'=>'255', 'class'=>form_has_error('user_data{company}') ? 'st_form-error' : ''))) ?>
<?php $smarty->assign('label_full_name', label_for('full_name',"* ".__('Imię i nazwisko'), array('id'=>'full_name_label'))) ?>
<?php $smarty->assign('label_full_name_text', __('Imię i nazwisko')); ?>
<?php $smarty->assign('input_full_name', input_tag('user_data[full_name]', $userData->getFullName(), array('id'=>'full_name', 'maxlength'=>'255', 'class'=>form_has_error('user_data{full_name}') ? 'st_form-error' : ''))) ?>
<?php $smarty->assign('label_address', label_for('address',"* ".__('Ulica nr domu / nr lokalu'))) ?>
<?php $smarty->assign('input_address', input_tag('user_data[address]', $userData->getAddress(), array('id'=>'address', 'maxlength'=>'255', 'class'=>form_has_error('user_data{address}') ? 'st_form-error' : ''))) ?>
<?php $smarty->assign('label_address_more', label_for('address_more',__('Adres ciąg dalszy'))) ?>
<?php $smarty->assign('input_address_more', input_tag('user_data[address_more]', $userData->getAddressMore(), array('id'=>'address_more', 'maxlength'=>'255', 'class'=>form_has_error('user_data{address_more}') ? 'st_form-error' : ''))) ?>
<?php $smarty->assign('label_region', label_for('region',__('Województwo'))) ?>
<?php $smarty->assign('input_region', input_tag('user_data[region]', $userData->getRegion(), array('id'=>'region', 'maxlength'=>'255'))) ?>
<?php $smarty->assign('label_pesel', label_for('pesel',__('PESEL'))) ?>
<?php $smarty->assign('input_pesel', input_tag('user_data[pesel]', $userData->getPesel(), array('id'=>'pesel', 'maxlength'=>'255'))) ?>
<?php $smarty->assign('label_code', label_for('code',"* ".__('Kod'))) ?>
<?php $smarty->assign('input_code', input_tag('user_data[code]', $userData->getCode(), array('id'=>'code', 'maxlength'=>'255', 'class'=>form_has_error('user_data{code}') ? 'st_form-error code' : 'code'))) ?>
<?php $smarty->assign('label_town', label_for('town',"* ".__('Miasto'))) ?>
<?php $smarty->assign('input_town', input_tag('user_data[town]', $userData->getTown(), array('id'=>'town', 'maxlength'=>'255', 'class'=>form_has_error('user_data{town}') ? 'st_form-error town' : 'town'))) ?>
<?php $smarty->assign('label_country', label_for('st_form-userData-field6',__('Kraj'))) ?>
<?php if ($userData->getIsBilling()!=1): ?>
<?php if ($userData->getAddress()==""): ?>
<?php $smarty->assign('select_country', st_get_component('stUserData', 'deliveryCountriesSelect', array('id'=>'user_data_country','force_default_country_id' => $userData->getCountriesId()))) ?>
<?php else: ?>
<?php $smarty->assign('select_country', object_select_tag($userData->getCountriesId(), 'getId', array('id'=>'user_data_country', 'related_class' => 'Countries', 'peer_method'=>"doSelectActive", 'control_name' => 'user_data[country]'))) ?>
<?php endif; ?>
<?php else: ?>
<?php $smarty->assign('select_country', object_select_tag($userData->getCountriesId(), 'getId', array('id'=>'user_data_country', 'related_class' => 'Countries', 'peer_method'=>"doSelectActive", 'control_name' => 'user_data[country]'))) ?>
<?php endif; ?>
<?php
if($user_config->get('validate_phone')==1){
$smarty->assign('label_phone', label_for('phone',"* ".__('Telefon')));
}else{
$smarty->assign('label_phone', label_for('phone',__('Telefon')));
}
?>
use_helper('Validation', 'Object');
st_theme_use_stylesheet('stUser.css');
use_javascript('jquery.infieldlabel.js', 'last');
$user_config = stConfig::getInstance(sfContext::getInstance(), 'stUser');
<?php $smarty->assign('input_phone', input_tag('user_data[phone]', $userData->getPhone(), array('id'=>'phone', 'maxlength'=>'255', 'class'=>form_has_error('user_data{phone}') ? 'st_form-error' : ''))) ?>
$smarty->assign('show_region', $show_region);
$smarty->assign('show_pesel', $show_pesel);
$smarty->assign('show_address_more', $show_address_more);
$smarty->assign('form_start', form_tag('stUserData/saveProfile', array('class' => 'st_form_ver6', 'name'=>'register')));
$smarty->assign('error_message', form_error('user_data[message]', array('suffix'=>'', 'prefix'=>'', 'class'=>'st_error')));
$smarty->assign('error_address_more', form_error('user_data[address_more]', array('suffix'=>'', 'prefix'=>'', 'class'=>'st_error')));;
$smarty->assign('error_vat', form_error('user_data[vat_number]', array('suffix'=>'', 'prefix'=>'', 'class'=>'st_error')));
$smarty->assign('error_company', $sf_request->getError('user_data{company}'));
$smarty->assign('error_nip', $sf_request->getError('user_data{vat_number}'));
$smarty->assign('error_full_name', $sf_request->getError('user_data{full_name}'));
$smarty->assign('error_address', $sf_request->getError('user_data{address}'));
$smarty->assign('error_code_town', $sf_request->getError('user_data{code}').$sf_request->getError('user_data{town}'));
$smarty->assign('error_code', $sf_request->getError('user_data{code}'));
$smarty->assign('error_town', $sf_request->getError('user_data{town}'));
$smarty->assign('error_phone', $sf_request->getError('user_data{phone}'));
if ($userData->getIsBilling()==1):
$smarty->assign('billing_data', $userData->getIsBilling()==1);
endif;
$smarty->assign('label_customer_type1', __('Klient indywidualny'));
$smarty->assign('radio_customer_type1', radiobutton_tag('user_data[customer_type]', 1, $type1_checker, array('style'=>'margin-left: 0px;')));
$smarty->assign('label_customer_type2', __('Firma'));
$smarty->assign('radio_customer_type2', radiobutton_tag('user_data[customer_type]', 2, $type2_checker, array('style'=>'margin-left: 0px;')));
<?php $smarty->assign('label_nip', label_for('nip',"* ".__($sf_user->hasVatEu() ? 'VAT UE' : 'NIP'))) ?>
<?php $smarty->assign('input_nip', input_tag('user_data[vat_number]', $userData->getVatNumber(), array('id'=>'nip', 'maxlength'=>'255', 'class'=>form_has_error('user_data{vat_number}') ? 'st_form-error' : ''))) ?>
$smarty->assign('hidden_is_default', input_hidden_tag('user_data[isDefault]', $userData->getIsDefault()));
<?php $smarty->assign('hidden_is_default', input_hidden_tag('user_data[isDefault]', $userData->getIsDefault())) ?>
if(stTheme::is_responsive()):
<?php if(stTheme::is_responsive()): ?>
if ($userData->getIsBilling()==1){
$smarty->assignComponent('edit_profiles', 'stUserData', 'profileList', array('type' => 'user_edit_profile_billing', 'selected' => $sf_request->getParameter('user_billing_profile')));
}else{
$smarty->assignComponent('edit_profiles', 'stUserData', 'profileList', array('type' => 'user_edit_profile_delivery', 'selected' => $sf_request->getParameter('user_delivery_profile')));
}
<?php if ($userData->getIsBilling()==1): ?>
<?php $smarty->assignComponent('edit_profiles', 'stUserData', 'profileList', array('type' => 'user_edit_profile_billing', 'selected' => $sf_request->getParameter('user_billing_profile'))); ?>
<?php else: ?>
<?php $smarty->assignComponent('edit_profiles', 'stUserData', 'profileList', array('type' => 'user_edit_profile_delivery', 'selected' => $sf_request->getParameter('user_delivery_profile'))); ?>
<?php endif; ?>
$show_message = '';
if($showMessage == true){
$show_message = true;
}
$smarty->assign('show_message', $show_message);
<?php if($showMessage == true): ?>
<?php $smarty->assign('show_message', $showMessage) ?>
<?php endif; ?>
$user_config->get('validate_phone')==1 ? $phone_label = "* ".__('Telefon') : $phone_label = __('Telefon');
// company
$user_data_company_array = array('id'=>'company', 'maxlength'=>'255', 'class'=>'form-control', 'aria-required'=>"true");
if($sf_request->getError('user_data{company}')){
$user_data_company_array += array('aria-describedby'=>"error_company", 'aria-invalid'=>"true");
}
$smarty->assign('input_company', input_tag('user_data[company]', $userData->getCompany(), $user_data_company_array));
<?php $user_config->get('validate_phone')==1 ? $phone_label = "* ".__('Telefon') : $phone_label = __('Telefon'); ?>
// nip
$smarty->assign("nip_label", __($sf_user->hasVatEu() ? "Numer VAT UE" : "NIP"));
$user_data_nip_array = array('id'=>'nip', 'maxlength'=>'255', 'class'=>'form-control', 'aria-required'=>"true");
if($sf_request->getError('user_data{vat_number}')){
$user_data_nip_array += array('aria-describedby'=>"error_nip", 'aria-invalid'=>"true");
}
$smarty->assign('input_nip', input_tag('user_data[vat_number]', $userData->getVatNumber(), $user_data_nip_array));
<!-- billing -->
<?php $smarty->assign('input_company', input_tag('user_data[company]', $userData->getCompany(), array('id'=>'company', 'placeholder'=> '* '.__("Firma"), 'maxlength'=>'255', 'class'=>'form-control'))); ?>
<?php $smarty->assign('input_nip', input_tag('user_data[vat_number]', $userData->getVatNumber(), array('id'=>'nip','placeholder'=> "* ".__($sf_user->hasVatEu() ? "Numer VAT UE" : "NIP"), 'maxlength'=>'255', 'class'=>'form-control'))) ?>
<?php $smarty->assign('input_full_name', input_tag('user_data[full_name]', $userData->getFullName(), array('id'=>'full_name', 'placeholder'=> "* ".__('Imię i nazwisko'), 'maxlength'=>'255', 'class'=>'form-control'))); ?>
<?php $smarty->assign('input_address', input_tag('user_data[address]', $userData->getAddress(), array('id'=>'address', 'placeholder'=> '* '.__("Ulica nr domu / nr lokalu"), 'maxlength'=>'255', 'class'=>'form-control'))); ?>
<?php $smarty->assign('input_address_more', input_tag('user_data[address_more]', $userData->getAddressMore(), array('id'=>'address_more', 'placeholder'=>__("Adres ciąg dalszy"), 'maxlength'=>'255', 'class'=>'form-control'))); ?>
<?php $smarty->assign('input_region', input_tag('user_data[region]', $userData->getRegion(), array('id'=>'region', 'placeholder'=>__("Województwo"), 'maxlength'=>'255', 'class'=>'form-control'))); ?>
<?php $smarty->assign('input_code', input_tag('user_data[code]', $userData->getCode(), array('id'=>'code', 'placeholder'=> '* '.__("Kod"), 'maxlength'=>'255', 'class'=>'form-control'))); ?>
<?php $smarty->assign('input_town', input_tag('user_data[town]', $userData->getTown(), array('id'=>'town', 'placeholder'=> '* '.__("Miasto"), 'maxlength'=>'255', 'class'=>'form-control'))); ?>
<?php $smarty->assign('input_phone', input_tag('user_data[phone]', $userData->getPhone(), array('id'=>'phone', 'placeholder'=> $phone_label, 'maxlength'=>'255', 'class'=>'form-control'))); ?>
<?php $smarty->assign('input_pesel', input_tag('user_data[pesel]', $userData->getPesel(), array('id'=>'billing-pesel', 'placeholder'=>__('PESEL'), 'maxlength'=>'255', 'class'=>'form-control'))); ?>
// full name
$user_data_full_name_array = array('id'=>'full_name', 'maxlength'=>'255', 'class'=>'form-control', 'aria-required'=>"true");
if($sf_request->getError('user_data{full_name}')){
$user_data_full_name_array += array('aria-describedby'=>"error_full_name", 'aria-invalid'=>"true");
}
$smarty->assign('input_full_name', input_tag('user_data[full_name]', $userData->getFullName(), $user_data_full_name_array));
<?php $smarty->assign('show_add', $userData->getAddress()); ?>
// address
$user_data_address_array = array('id'=>'address', 'maxlength'=>'255', 'class'=>'form-control', 'aria-required'=>"true");
if($sf_request->getError('user_data{address}')){
$user_data_address_array += array('aria-describedby'=>"error_address", 'aria-invalid'=>"true");
}
$smarty->assign('input_address', input_tag('user_data[address]', $userData->getAddress(), $user_data_address_array));
$smarty->assign('input_address_more', input_tag('user_data[address_more]', $userData->getAddressMore(), array('id'=>'address_more', 'maxlength'=>'255', 'class'=>'form-control')));
// region
$smarty->assign('input_region', input_tag('user_data[region]', $userData->getRegion(), array('id'=>'region', 'maxlength'=>'255', 'class'=>'form-control')));
<?php if ($userData->getIsBilling()!=1): ?>
// code
$user_data_code_array = array('id'=>'code', 'maxlength'=>'255', 'class'=>'form-control', 'aria-required'=>"true");
if($sf_request->getError('user_data{code}')){
$user_data_code_array += array('aria-describedby'=>"error_code", 'aria-invalid'=>"true");
}
$smarty->assign('input_code', input_tag('user_data[code]', $userData->getCode(), $user_data_code_array));
<?php if ($userData->getAddress()==""): ?>
// town
$user_data_town_array = array('id'=>'town', 'maxlength'=>'255', 'class'=>'form-control', 'aria-required'=>"true");
if($sf_request->getError('user_data{town}')){
$user_data_town_array += array('aria-describedby'=>"error_town", 'aria-invalid'=>"true");
}
$smarty->assign('input_town', input_tag('user_data[town]', $userData->getTown(), $user_data_town_array));
<?php $smarty->assign('select_country', st_get_component('stUserData', 'deliveryCountriesSelect', array('id'=>'user_data_country','force_default_country_id' => $userData->getCountriesId()))) ?>
// phone
$user_data_phone_array = array('id'=>'phone', 'maxlength'=>'255', 'class'=>'form-control');
$smarty->assign('validate_phone',0);
if($user_config->get('validate_phone') == 1){
$smarty->assign('validate_phone',1);
$user_data_phone_array += array('aria-required'=>"true");
if ($sf_request->getError('user_data{phone}')){
$user_data_phone_array += array('aria-describedby'=>"error_phone", 'aria-invalid'=>"true");
}
}
$smarty->assign('input_phone', input_tag('user_data[phone]', $userData->getPhone(), $user_data_phone_array));
<?php else: ?>
// pesel
$smarty->assign('input_pesel', input_tag('user_data[pesel]', $userData->getPesel(), array('id'=>'billing-pesel', 'maxlength'=>'255', 'class'=>'form-control')));
<?php $smarty->assign('select_country', object_select_tag($userData->getCountriesId(), 'getId', array('id'=>'user_data_country', 'class' => 'form-control', 'related_class' => 'Countries', 'peer_method'=>"doSelectActive", 'control_name' => 'user_data[country]'))) ?>
<?php endif; ?>
<?php else: ?>
<?php $smarty->assign('select_country', object_select_tag($userData->getCountriesId(), 'getId', array('id'=>'user_data_country', 'class' => 'form-control', 'related_class' => 'Countries', 'peer_method'=>"doSelectActive", 'control_name' => 'user_data[country]'))) ?>
<?php endif; ?>
$smarty->assign('show_add', $userData->getAddress());
<?php endif; ?>
if ($userData->getIsBilling()!=1):
if ($userData->getAddress()==""):
$smarty->assign('select_country', st_get_component('stUserData', 'deliveryCountriesSelect', array('id'=>'user_data_country','force_default_country_id' => $userData->getCountriesId())));
else:
$smarty->assign('select_country', object_select_tag($userData->getCountriesId(), 'getId', array('id'=>'user_data_country', 'class' => 'form-control', 'related_class' => 'Countries', 'peer_method'=>"doSelectActive", 'control_name' => 'user_data[country]')));
endif;
else:
$smarty->assign('select_country', object_select_tag($userData->getCountriesId(), 'getId', array('id'=>'user_data_country', 'class' => 'form-control', 'related_class' => 'Countries', 'peer_method'=>"doSelectActive", 'control_name' => 'user_data[country]')));
endif;
endif;
$smarty->assign('is_default', $userData->getIsDefault());
$smarty->assign('checkbox_set_as_default', checkbox_tag('user_data[isDefault]', 1, $userData->getIsDefault(), array('id'=>'st_form-user-default')));
$smarty->assign('delete_url', 'stUserData/deleteProfile?userDataType='.$userDataType.'&userDataId='.$userData->getId());
$smarty->assign('save_submit', submit_tag(__('Zapisz'),array('name'=>'submit_save')));
$smarty->assign('hidden_show_edit_profile_form', input_hidden_tag('showEditProfileForm', $showEditProfileForm));
$smarty->assign('hidden_uderdata_type', input_hidden_tag('userDataType', $userDataType));
$smarty->assign('hidden_user_data_id', input_hidden_tag('user_data[id]', $userData->getId()));
$smarty->assign('hidden_user_data_is_billing', input_hidden_tag('user_data[isBilling]', $userData->getIsBilling()));
$smarty->assign('hidden_userdata_id', input_hidden_tag('userDataId', $userData->getId()));
<?php $smarty->assign('is_default', $userData->getIsDefault()) ?>
<?php $smarty->assign('checkbox_set_as_default', checkbox_tag('user_data[isDefault]', 1, $userData->getIsDefault(), array('id'=>'st_form-user-default'))) ?>
<?php $smarty->assign('delete_url', 'stUserData/deleteProfile?userDataType='.$userDataType.'&userDataId='.$userData->getId()) ?>
<?php $smarty->assign('save_submit', submit_tag(__('Zapisz'),array('name'=>'submit_save'))) ?>
<?php $smarty->assign('hidden_show_edit_profile_form', input_hidden_tag('showEditProfileForm', $showEditProfileForm)) ?>
<?php $smarty->assign('hidden_uderdata_type', input_hidden_tag('userDataType', $userDataType)) ?>
<?php $smarty->assign('hidden_user_data_id', input_hidden_tag('user_data[id]', $userData->getId())) ?>
<?php $smarty->assign('hidden_user_data_is_billing', input_hidden_tag('user_data[isBilling]', $userData->getIsBilling())) ?>
<?php $smarty->assign('hidden_userdata_id', input_hidden_tag('userDataId', $userData->getId())) ?>
<?php $smarty->display('userdata_edit_profile_form.html') ?>
$smarty->display('userdata_edit_profile_form.html');

View File

@@ -1,9 +1,18 @@
<?php
use_helper('Validation', 'Object', 'stCaptchaGD', 'stUrl', 'stUserPassValidation', 'stDelivery');
use_helper('Validation', 'Object', 'stCaptchaGD', 'stUrl', 'stUserPassValidation', 'stDelivery', 'Countries');
st_theme_use_stylesheet('stUser.css');
use_javascript('stUser.js', 'last');
use_javascript('jquery.infieldlabel.js', 'last');
$user_config = stConfig::getInstance(sfContext::getInstance(), 'stUser');
$invoiceConfig = stConfig::getInstance('stInvoiceBackend');
$smarty->assign('show_invoice_request', $invoiceConfig->getBool('invoice_on'));
$smarty->assign('additional_billing_fields', null);
$smarty->assign('additional_delivery_fields', null);
$smarty->assign('show_region', $user_config->get('show_region'));
$smarty->assign('show_address_more', $user_config->get('show_address_more'));
$smarty->assign('show_pesel', $user_config->get('show_pesel'));
$smarty->assign('error_billing_company', form_error('user_data_billing[company]', array('suffix' => '', 'prefix' => '', 'class' => 'st_error error_label')));
$smarty->assign('error_billing_vat', form_error('user_data_billing[vat_number]', array('suffix' => '', 'prefix' => '', 'class' => 'st_error error_label')));
@@ -61,15 +70,11 @@ if ($sf_request->getErrors() && $user_basket_form_error) {
$smarty->assign('errors', __('Uzupełnij zaznaczone pola.'));
}
$smarty->assign('show_region', $show_region);
$smarty->assign('show_address_more', $show_address_more);
$smarty->assign('show_pesel', $show_pesel);
$smarty->assign('label_billing_customer_type1', __('Klient indywidualny'));
$smarty->assign('radio_billing_customer_type1', radiobutton_tag('user_data_billing[customer_type]', 1, $user_data_billing['customer_type'] == 1, array('disabled' => $sf_user->hasVatEu())));
$smarty->assign('radio_billing_customer_type1', radiobutton_tag('user_data_billing[customer_type]', 1, $user_data_billing['customer_type'] == 1, array('style'=>'margin-left: 0px;','disabled' => $sf_user->hasVatEu())));
$smarty->assign('label_billing_customer_type2', __('Firma'));
$smarty->assign('radio_billing_customer_type2', radiobutton_tag('user_data_billing[customer_type]', 2, $user_data_billing['customer_type'] == 2));
$smarty->assign('radio_billing_customer_type2', radiobutton_tag('user_data_billing[customer_type]', 2, $user_data_billing['customer_type'] == 2, array('style'=>'margin-left: 0px;')));
$smarty->assign('label_billing_company', label_for('company_billing', "* " . __('Firma')));
$smarty->assign('input_billing_company', input_tag('user_data_billing[company]', $user_data_billing['company'], array('id' => 'company_billing', 'maxlength' => '255', 'class' => form_has_error('user_data_billing{company}') ? 'st_form-error' : '')));
@@ -80,7 +85,13 @@ $smarty->assign('input_billing_nip', input_tag('user_data_billing[vat_number]',
$smarty->assign('label_billing_email', label_for('email_billing', "* " . __('E-mail')));
$smarty->assign('input_billing_email', input_tag('user_data_billing[email]', $user_data_billing['email'], array('id' => 'email_billing', 'maxlength' => '255', 'class' => form_has_error('user_data_billing{email}') ? 'st_form-error' : '')));
$smarty->assign('checkbox_create_account', checkbox_tag('user_data_billing[create_account]', 1, $user_data_billing['create_account'], array('id' => 'create_account', 'class' => 'checkobox')));
if (!empty($user_data_billing['create_account']) && $user_data_billing['create_account'] != 0) {
$create_account = 1;
}else{
$create_account = 0;
}
$smarty->assign('checkbox_create_account', checkbox_tag('user_data_billing[create_account]', 1, $create_account, array('id' => 'create_account', 'class' => 'checkobox')));
$smarty->assign('label_billing_password1', label_for('password1_billing', "* " . __('Hasło'), array('id' => 'label-password1')));
$smarty->assign('input_billing_password1', input_password_tag('user_data_billing[password1]', $user_data_billing['password1'], array('id' => 'password1_billing', 'maxlength' => '255', 'autocomplete' => 'off', 'class' => form_has_error('user_data_billing{password1}') ? 'st_form-error' : '')));
@@ -96,20 +107,19 @@ $smarty->assign('label_billing_address', label_for('address_billing', "* " . __(
$smarty->assign('input_billing_address', input_tag('user_data_billing[address]', $user_data_billing['address'], array('id' => 'address_billing', 'maxlength' => '255', 'class' => form_has_error('user_data_billing{address}') ? 'st_form-error' : '')));
$smarty->assign('label_billing_address_more', label_for('address_more_billing', __('Adres ciąg dalszy')));
$smarty->assign('input_billing_address_more', input_tag('user_data_billing[address_more]', $user_data_billing['address_more'], array('id' => 'address_more_billing', 'maxlength' => '255', 'class' => form_has_error('user_data_billing{address_more}') ? 'st_form-error' : '')));
$smarty->assign('input_billing_address_more', input_tag('user_data_billing[address_more]', isset($user_data_billing['address_more']) ? $user_data_billing['address_more'] : null, array('id' => 'address_more_billing', 'maxlength' => '255', 'class' => form_has_error('user_data_billing{address_more}') ? 'st_form-error' : '')));
$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]', isset($user_data_billing['region']) ? $user_data_billing['region'] : null, 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 pocztowy')));
$smarty->assign('label_billing_code', label_for('code_billing', "* " . __('Kod')));
$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('input_billing_town', input_tag('user_data_billing[town]', $user_data_billing['town'], array('id' => 'town_billing', 'maxlength' => '255', 'class' => form_has_error('user_data_billing{town}') ? 'st_form-error' : '')));
$smarty->assign('label_billing_country', label_for('country_billing', __('Kraj')));
$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', st_countries_select_tag('user_data_billing[country]', isset($user_data_billing['country']) ? $user_data_billing['country'] : $delivery_country_id, array('class' => 'form-control', 'group' => false)));
if ($user_config->get('validate_phone') == 1) {
$smarty->assign('label_billing_phone', label_for('phone_billing', "* " . __('Telefon')));
@@ -120,17 +130,22 @@ if ($user_config->get('validate_phone') == 1) {
$smarty->assign('input_billing_phone', input_tag('user_data_billing[phone]', $user_data_billing['phone'], array('id' => 'phone_billing', 'maxlength' => '255', 'class' => form_has_error('user_data_billing{phone}') ? 'st_form-error' : '')));
$smarty->assign('label_billing_pesel', label_for('billing-pesel', __('PESEL')));
$smarty->assign('input_billing_pesel', input_tag('user_data_billing[pesel]', $user_data_billing['pesel'], array('id' => 'billing-pesel', 'maxlength' => '255', 'class' => form_has_error('user_data_billing{pesel}') ? 'st_form-error' : '')));
$smarty->assign('input_billing_pesel', input_tag('user_data_billing[pesel]', isset($user_data_billing['pesel']) ? $user_data_billing['pesel'] : null, array('id' => 'billing-pesel', 'maxlength' => '255', 'class' => form_has_error('user_data_billing{pesel}') ? 'st_form-error' : '')));
$smarty->assign('checkbox_different_delivery', checkbox_tag('user_data_billing[different_delivery]', 1, $user_data_billing['different_delivery'], array('id' => 'different_delivery', 'class' => 'checkobox')));
if (!empty($user_data_billing['different_delivery']) && $user_data_billing['different_delivery'] != 0) {
$different_delivery = 1;
}else{
$different_delivery = 0;
}
$smarty->assign('checkbox_different_delivery', checkbox_tag('user_data_billing[different_delivery]', 1, $different_delivery, array('id' => 'different_delivery', 'class' => 'checkobox')));
$smarty->assign('label_delivery_customer_type1', __('Klient indywidualny'));
$smarty->assign('label_delivery_customer_type1', __('Klient indywidualny'));
$smarty->assign('radio_delivery_customer_type1', radiobutton_tag('user_data_delivery[customer_type]', 1, $user_data_delivery['customer_type'] == 1));
$smarty->assign('radio_delivery_customer_type1', radiobutton_tag('user_data_delivery[customer_type]', 1, $user_data_delivery['customer_type'] == 1, array('style'=>'margin-left: 0px;')));
$smarty->assign('label_delivery_customer_type2', __('Firma'));
$smarty->assign('radio_delivery_customer_type2', radiobutton_tag('user_data_delivery[customer_type]', 2, $user_data_delivery['customer_type'] == 2));
$smarty->assign('radio_delivery_customer_type2', radiobutton_tag('user_data_delivery[customer_type]', 2, $user_data_delivery['customer_type'] == 2, array('style'=>'margin-left: 0px;')));
$smarty->assign('label_delivery_company', label_for('company_delivery', "* " . __('Firma')));
$smarty->assign('input_delivery_company', input_tag('user_data_delivery[company]', $user_data_delivery['company'], array('id' => 'company_delivery', 'maxlength' => '255', 'class' => form_has_error('user_data_delivery{company}') ? 'st_form-error' : '')));
@@ -143,10 +158,10 @@ $smarty->assign('label_delivery_address', label_for('address_delivery', "* " . _
$smarty->assign('input_delivery_address', input_tag('user_data_delivery[address]', $user_data_delivery['address'], array('id' => 'address_delivery', 'maxlength' => '255', 'class' => form_has_error('user_data_delivery{address}') ? 'st_form-error' : '')));
$smarty->assign('label_delivery_address_more', label_for('address_more_delivery', __('Adres ciąg dalszy')));
$smarty->assign('input_delivery_address_more', input_tag('user_data_delivery[address_more]', $user_data_delivery['address_more'], array('id' => 'address_more_delivery', 'maxlength' => '255', 'class' => form_has_error('user_data_delivery{address_more}') ? 'st_form-error' : '')));
$smarty->assign('input_delivery_address_more', input_tag('user_data_delivery[address_more]', isset($user_data_delivery['address_more']) ? $user_data_delivery['address_more'] : null, array('id' => 'address_more_delivery', 'maxlength' => '255', 'class' => form_has_error('user_data_delivery{address_more}') ? 'st_form-error' : '')));
$smarty->assign('label_delivery_region', label_for('region_delivery', __('Województwo')));
$smarty->assign('input_delivery_region', input_tag('user_data_delivery[region]', $user_data_delivery['region'], array('id' => 'region_delivery', 'maxlength' => '255', 'class' => form_has_error('user_data_delivery{region}') ? 'st_form-error' : '')));
$smarty->assign('input_delivery_region', input_tag('user_data_delivery[region]', isset($user_data_delivery['region']) ? $user_data_delivery['region'] : null, array('id' => 'region_delivery', 'maxlength' => '255', 'class' => form_has_error('user_data_delivery{region}') ? 'st_form-error' : '')));
$smarty->assign('label_delivery_code', label_for('code_delivery', "* " . __('Kod')));
$smarty->assign('input_delivery_code', input_tag('user_data_delivery[code]', $user_data_delivery['code'], array('id' => 'code_delivery', 'maxlength' => '255', 'class' => form_has_error('user_data_delivery{code}') ? 'st_form-error' : '')));
@@ -165,14 +180,11 @@ if ($user_config->get('validate_phone') == 1) {
$smarty->assign('input_delivery_phone', input_tag('user_data_delivery[phone]', $user_data_delivery['phone'], array('id' => 'phone_delivery', 'maxlength' => '255', 'class' => form_has_error('user_data_delivery{phone}') ? 'st_form-error' : '')));
$smarty->assign('checkbox_privacy', checkbox_tag('user_data_billing[privacy]', 1, $user_data_billing['privacy'], array('id' => 'user_data_billing_privacy', 'class' => 'checkobox')));
$smarty->assign('checkbox_privacy', checkbox_tag('user_data_billing[privacy]', 1, isset($user_data_billing['privacy']), array('id' => 'user_data_billing_privacy', 'class' => 'checkobox')));
$smarty->assign('checkbox_terms', checkbox_tag('user_data_billing[terms]', 1, $user_data_billing['terms'], array('id' => 'user_data_billing_terms', 'class' => 'checkobox')));
$smarty->assign('checkbox_terms', checkbox_tag('user_data_billing[terms]', 1, isset($user_data_billing['terms']), array('id' => 'user_data_billing_terms', 'class' => 'checkobox')));
if (stConfig::getInstance('stOrder')->get('show_not_professional_purchase'))
{
$smarty->assign('not_professional_purchase_checkbox', checkbox_tag('user_data_billing[not_professional_purchase]', 1, $user_data_billing['not_professional_purchase']));
}
$smarty->assign('not_professional_purchase_checkbox', stConfig::getInstance('stOrder')->getBool('show_not_professional_purchase') ? checkbox_tag('user_data_billing[not_professional_purchase]', 1, isset($user_data_billing['not_professional_purchase'])) : null);
$smarty->assignPartial('link_to_privacy', 'stUser', 'privacy');
@@ -216,9 +228,9 @@ foreach ($tmp_string as $value) {
$smarty->assign("terms_shop_text", $string);
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_on', $config->get('captcha_on', stConfig::INT) == 1);
$smarty->assign('error_captcha', form_error('captcha', array('suffix' => '', 'prefix' => '', 'class' => 'st_error red')));
@@ -230,15 +242,15 @@ if ($config->get('captcha_on', stConfig::INT) == 1 && sfContext::getInstance()-
$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' : '')));
if($config->get('captcha_mod')=="recaptcha3")
{
$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_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'));
}
}
@@ -250,31 +262,145 @@ if (stTheme::is_responsive()) {
$user_config->get('validate_phone') == 1 ? $phone_label = "* " . __('Telefon') : $phone_label = __('Telefon');
$smarty->assign('input_billing_email', input_tag('user_data_billing[email]', $user_data_billing['email'], array('id' => 'email_billing', 'placeholder' => '* ' . __("E-mail"), 'maxlength' => '255', 'class' => 'form-control')));
$smarty->assign('input_billing_password1', input_password_tag('user_data_billing[password1]', $user_data_billing['password1'], array('id' => 'password1_billing', 'maxlength' => '255', 'placeholder' => '* ' . __("Hasło"), 'autocomplete' => 'off', 'class' => 'form-control')));
$smarty->assign('input_billing_password2', input_password_tag('user_data_billing[password2]', $user_data_billing['password2'], array('id' => 'password2_billing', 'maxlength' => '255', 'placeholder' => '* ' . __("Powtórz hasło"), 'autocomplete' => 'off', 'class' => 'form-control')));
// email
$user_data_billing_email_array = array('id' => 'email_billing', 'aria-required'=>"true", 'maxlength' => '255', 'class' => 'form-control');
if($sf_request->getError('user_data_billing{email}') || $sf_request->getError('user_data_billing{email_exist}')){
$user_data_billing_email_array += array('aria-describedby'=>"error_email_billing", 'aria-invalid'=>"true");
}
$smarty->assign('input_billing_email', input_tag('user_data_billing[email]', $user_data_billing['email'], $user_data_billing_email_array));
// password 1
$user_data_billing_password1_array = array('id' => 'password1_billing', 'maxlength' => '255', 'autocomplete' => 'off', 'class' => 'form-control', 'aria-required'=>"true");
if($sf_request->getError('user_data_billing{password1}')){
$user_data_billing_password1_array += array('aria-describedby'=>"error_password1_billing", 'aria-invalid'=>"true");
}
$smarty->assign('input_billing_password1', input_password_tag('user_data_billing[password1]', $user_data_billing['password1'], $user_data_billing_password1_array));
// password 2
$user_data_billing_password2_array = array('id' => 'password2_billing', 'maxlength' => '255', 'autocomplete' => 'off', 'class' => 'form-control', 'aria-required'=>"true");
if($sf_request->getError('user_data_billing{password2}')){
$user_data_billing_password2_array += array('aria-describedby'=>"error_password2_billing", 'aria-invalid'=>"true");
}
$smarty->assign('input_billing_password2', input_password_tag('user_data_billing[password2]', $user_data_billing['password2'], $user_data_billing_password2_array));
$smarty->assign('input_captcha', input_tag('captcha', '', array('id' => 'captcha_img', 'placeholder' => '* ' . __("Cyfry z obrazka"), 'class' => 'form-control')));
// company
$user_data_billing_company_array = array('id' => 'company_billing', 'aria-required'=>"true", 'maxlength' => '255', 'class' => 'form-control');
if($sf_request->getError('user_data_billing{company}')){
$user_data_billing_company_array += array('aria-describedby'=>"error_company_billing", 'aria-invalid'=>"true");
}
$smarty->assign('input_billing_company', input_tag('user_data_billing[company]', $user_data_billing['company'], $user_data_billing_company_array));
$smarty->assign('input_billing_company', input_tag('user_data_billing[company]', $user_data_billing['company'], array('id' => 'company_billing', 'placeholder' => '* ' . __("Firma"), 'maxlength' => '255', 'class' => 'form-control')));
$smarty->assign('input_billing_nip', input_tag('user_data_billing[vat_number]', $user_data_billing['vat_number'], array('id' => 'nip_billing', 'placeholder' => "* " . __($sf_user->hasVatEu() ? "Numer VAT UE" : "NIP"), 'maxlength' => '255', 'class' => 'form-control')));
$smarty->assign('input_billing_full_name', input_tag('user_data_billing[full_name]', $user_data_billing['full_name'], array('id' => 'full_name_billing', 'placeholder' => "* " . __('Imię i nazwisko'), 'maxlength' => '255', 'class' => $user_config->get('require_billing_fullname') ? 'form-control required' : '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_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 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')));
// nip
$smarty->assign("nip_billing_label", __($sf_user->hasVatEu() ? "Numer VAT UE" : "NIP"));
$user_data_billing_vat_number_array = array('id' => 'nip_billing', 'maxlength' => '255', 'aria-required'=>"true", 'class' => 'form-control');
if ($sf_request->getError('user_data_billing{vat_number}')){
$user_data_billing_vat_number_array += array('aria-describedby'=>"error_vat_billing", 'aria-invalid'=>"true");
}
$smarty->assign('input_billing_nip', input_tag('user_data_billing[vat_number]', $user_data_billing['vat_number'], $user_data_billing_vat_number_array));
// full name
$user_data_billing_full_name_array = array('id' => 'full_name_billing', 'aria-required'=>"true", 'maxlength' => '255', 'class' => 'form-control');
if($sf_request->getError('user_data_billing{full_name}')){
$user_data_billing_full_name_array += array('aria-describedby'=>"error_full_name_billing", 'aria-invalid'=>"true");
}
$smarty->assign('input_billing_full_name', input_tag('user_data_billing[full_name]', $user_data_billing['full_name'], $user_data_billing_full_name_array));
// adress
$user_data_billing_address_array = array('id' => 'address_billing', 'aria-required'=>"true", 'maxlength' => '255', 'class' => 'form-control');
if($sf_request->getError('user_data_billing{address}')){
$user_data_billing_address_array += array('aria-describedby'=>"error_address_billing", 'aria-invalid'=>"true");
}
$smarty->assign('input_billing_address', input_tag('user_data_billing[address]', $user_data_billing['address'], $user_data_billing_address_array));
$smarty->assign('input_billing_address_more', input_tag('user_data_billing[address_more]', isset($user_data_billing['address_more']) ? $user_data_billing['address_more'] : null, array('id' => 'address_more_billing', 'maxlength' => '255', 'class' => 'form-control')));
// region
$smarty->assign('input_billing_region', input_tag('user_data_billing[region]', isset($user_data_billing['region']) ? $user_data_billing['region'] : null, array('id' => 'region_billing', 'maxlength' => '255', 'class' => 'form-control')));
// code
$user_data_billing_code_array = array('id' => 'code_billing', 'maxlength' => '255', 'class' => 'form-control', 'aria-required'=>"true");
if($sf_request->getError('user_data_billing{code}')){
$user_data_billing_code_array += array('aria-describedby'=>"error_code_billing", 'aria-invalid'=>"true");
}
$smarty->assign('input_billing_code', input_tag('user_data_billing[code]', $user_data_billing['code'], $user_data_billing_code_array));
// town
$user_data_billing_town_array = array('id' => 'town_billing', 'maxlength' => '255', 'class' => 'form-control', 'aria-required'=>"true");
if($sf_request->getError('user_data_billing{town}')){
$user_data_billing_town_array += array('aria-describedby'=>"error_town_billing", 'aria-invalid'=>"true");
}
$smarty->assign('input_billing_town', input_tag('user_data_billing[town]', $user_data_billing['town'], $user_data_billing_town_array));
// country
$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_pesel', input_tag('user_data_billing[pesel]', $user_data_billing['pesel'], array('id' => 'billing-pesel', 'placeholder' => __('PESEL'), 'maxlength' => '255', 'class' => 'form-control')));
$smarty->assign('input_delivery_company', input_tag('user_data_delivery[company]', $user_data_delivery['company'], array('id' => 'company_delivery', 'placeholder' => '* ' . __("Firma"), 'maxlength' => '255', 'class' => 'form-control')));
$smarty->assign('input_delivery_full_name', input_tag('user_data_delivery[full_name]', $user_data_delivery['full_name'], array('id' => 'full_name_delivery', 'placeholder' => "* " . __('Imię i nazwisko'), '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_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 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_phone', input_tag('user_data_delivery[phone]', $user_data_delivery['phone'], array('id' => 'phone_delivery', 'placeholder' => $phone_label, 'maxlength' => '255', 'class' => 'form-control')));
// phone
$user_data_billing_phone_array = array('id' => 'phone_billing', 'maxlength' => '255', 'class' => 'form-control');
$smarty->assign('validate_phone',0);
if($user_config->get('validate_phone') == 1){
$smarty->assign('validate_phone',1);
$user_data_billing_phone_array += array('aria-required'=>"true");
if ($sf_request->getError('user_data_billing{phone}')){
$user_data_billing_phone_array += array('aria-describedby'=>"error_phone_billing", 'aria-invalid'=>"true");
}
}
$smarty->assign('input_billing_phone', input_tag('user_data_billing[phone]', $user_data_billing['phone'], $user_data_billing_phone_array));
// pesel
$smarty->assign('input_billing_pesel', input_tag('user_data_billing[pesel]', isset($user_data_billing['pesel']) ? $user_data_billing['pesel'] : null, array('id' => 'billing-pesel', 'maxlength' => '255', 'class' => 'form-control')));
// delivery company
$user_data_delivery_company_array = array('id' => 'company_delivery', 'maxlength' => '255', 'class' => 'form-control', 'aria-required'=>"true");
if($sf_request->getError('user_data_delivery{company}')){
$user_data_delivery_company_array += array('aria-describedby'=>"error_company_delivery", 'aria-invalid'=>"true");
}
$smarty->assign('input_delivery_company', input_tag('user_data_delivery[company]', $user_data_delivery['company'], $user_data_delivery_company_array));
// delivery full name
$user_data_delivery_full_name_array = array('id' => 'full_name_delivery', 'maxlength' => '255', 'class' => 'form-control', 'aria-required'=>"true");
if($sf_request->getError('user_data_delivery{full_name}')){
$user_data_delivery_full_name_array += array('aria-describedby'=>"error_full_name_delivery", 'aria-invalid'=>"true");
}
$smarty->assign('input_delivery_full_name', input_tag('user_data_delivery[full_name]', $user_data_delivery['full_name'], $user_data_delivery_full_name_array));
// delivery address
$user_data_delivery_address_array = array('id' => 'address_delivery', 'maxlength' => '255', 'class' => 'form-control', 'aria-required'=>"true");
if($sf_request->getError('user_data_delivery{address}')){
$user_data_delivery_address_array += array('aria-describedby'=>"error_address_delivery", 'aria-invalid'=>"true");
}
$smarty->assign('input_delivery_address', input_tag('user_data_delivery[address]', $user_data_delivery['address'], $user_data_delivery_address_array ));
$smarty->assign('input_delivery_address_more', input_tag('user_data_delivery[address_more]', isset($user_data_delivery['address_more']) ? $user_data_delivery['address_more'] : null, array('id' => 'address_more_delivery','maxlength' => '255', 'class' => 'form-control')));
// delivery region
$smarty->assign('input_delivery_region', input_tag('user_data_delivery[region]', isset($user_data_delivery['region']) ? $user_data_delivery['region'] : null, array('id' => 'region_delivery', 'maxlength' => '255', 'class' => 'form-control')));
// delivery code
$user_data_delivery_code_array = array('id' => 'code_delivery', 'maxlength' => '255', 'class' => 'form-control', 'aria-required'=>"true");
if($sf_request->getError('user_data_delivery{code}')){
$user_data_delivery_code_array += array('aria-describedby'=>"error_code_delivery", 'aria-invalid'=>"true");
}
$smarty->assign('input_delivery_code', input_tag('user_data_delivery[code]', $user_data_delivery['code'], $user_data_delivery_code_array));
// delivery town
$user_data_delivery_town_array = array('id' => 'town_delivery', 'maxlength' => '255', 'class' => 'form-control', 'aria-required'=>"true");
if($sf_request->getError('user_data_delivery{town}')){
$user_data_delivery_town_array += array('aria-describedby'=>"error_town_delivery", 'aria-invalid'=>"true");
}
$smarty->assign('input_delivery_town', input_tag('user_data_delivery[town]', $user_data_delivery['town'], $user_data_delivery_town_array));
// delivery phone
$user_data_delivery_phone_array = array('id' => 'phone_delivery', 'maxlength' => '255', 'class' => 'form-control');
if($user_config->get('validate_phone') == 1){
$user_data_delivery_phone_array += array('aria-required'=>"true");
if ($sf_request->getError('user_data_delivery{phone}')){
$user_data_delivery_phone_array += array('aria-describedby'=>"error_phone_billing", 'aria-invalid'=>"true");
}
}
$smarty->assign('input_delivery_phone', input_tag('user_data_delivery[phone]', $user_data_delivery['phone'], $user_data_delivery_phone_array));
}
$smarty->assign('under_basket_socket', stSocketView::openComponents('under_basket_socket') . stSocketView::openPartials('under_basket_socket'));
@@ -284,12 +410,12 @@ $delivery = stDeliveryFrontend::getInstance($sf_context->getUser()->getBasket())
$defaultDelivery = $delivery->getDefaultDelivery();
$hidden_fields = [
'delivery_pickup_point' => $sf_request->getParameter('delivery_pickup_point') ? htmlspecialchars($sf_request->getParameter('delivery_pickup_point')) : null,
'payment_channel' => $sf_request->getParameter('payment_channel') ? htmlspecialchars($sf_request->getParameter('payment_channel')) : null,
'payment_id' => $defaultDelivery ? $defaultDelivery->getDefaultPayment()->getId() : null,
'payment_id' => $defaultDelivery && $defaultDelivery->getDefaultPayment() ? $defaultDelivery->getDefaultPayment()->getId() : null,
'delivery_id' => $defaultDelivery ? $defaultDelivery->getId() : null,
'delivery_country_id' => $delivery->getDefaultDeliveryCountry() ? $delivery->getDefaultDeliveryCountry()->getId() : null,
];
$smarty->assign('hidden_fields', $hidden_fields);
$smarty->display('userdata_order_form.html');

View File

@@ -1,5 +1,5 @@
<?php
use_helper('Validation', 'Object');
use_helper('Validation', 'Object', 'Countries');
st_theme_use_stylesheet('stUser.css');
use_javascript('jquery.infieldlabel.js', 'last');
$user_config = stConfig::getInstance(sfContext::getInstance(), 'stUser');
@@ -28,10 +28,10 @@ $smarty->assign('error_billing_vat', $sf_request->getError('user_data_billing{va
$smarty->assign('error_billing_country', $sf_request->getError('user_data_billing{country}'));
$smarty->assign('label_billing_customer_type1', __('Klient indywidualny'));
$smarty->assign('radio_billing_customer_type1', radiobutton_tag('user_data_billing[customer_type]', 1, $user_data_billing['customer_type'] == 1, array('disabled' => $sf_user->hasVatEu())));
$smarty->assign('radio_billing_customer_type1', radiobutton_tag('user_data_billing[customer_type]', 1, $user_data_billing['customer_type'] == 1, array('style'=>'margin-left: 0px;','disabled' => $sf_user->hasVatEu())));
$smarty->assign('label_billing_customer_type2', __('Firma'));
$smarty->assign('radio_billing_customer_type2', radiobutton_tag('user_data_billing[customer_type]', 2, $user_data_billing['customer_type'] == 2));
$smarty->assign('radio_billing_customer_type2', radiobutton_tag('user_data_billing[customer_type]', 2, $user_data_billing['customer_type'] == 2, array('style'=>'margin-left: 0px;')));
$smarty->assign('label_billing_company', label_for('billing-company', "* " . __('Firma')));
$smarty->assign('input_billing_company', input_tag('user_data_billing[company]', $user_data_billing['company'], array('id' => 'billing-company', 'maxlength' => '255', 'class' => form_has_error('user_data_billing{company}') ? 'st_form-error billing-company' : 'billing-company')));
@@ -49,19 +49,23 @@ $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('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 pocztowy')));
$smarty->assign('label_billing_code', label_for('billing-code', "* " . __('Kod')));
$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('input_billing_town', input_tag('user_data_billing[town]', $user_data_billing['town'], array('id' => 'billing-town', 'maxlength' => '255', 'class' => form_has_error('user_data_billing{town}') ? 'st_form-error billing-town' : 'billing-town')));
$smarty->assign('label_billing_country', label_for('billing-country', __('Kraj')));
$smarty->assign('select_billing_country', object_select_tag($userDataBilling->getCountriesId(), 'getId', array('id' => 'billing-country', 'related_class' => 'Countries', 'control_name' => 'user_data_billing[country]')));
$smarty->assign('select_billing_country', st_countries_select_tag('user_data_billing[country]', $user_data_billing['country'], array('id' => 'billing-country', 'class' => 'form-control', 'group' => false)));
if (stConfig::getInstance('stOrder')->get('show_not_professional_purchase'))
{
$smarty->assign('not_professional_purchase_checkbox', checkbox_tag('user_data_billing[not_professional_purchase]', 1, $user_data_billing['not_professional_purchase']));
}
else
{
$smarty->assign('not_professional_purchase_checkbox', "");
}
if ($user_config->get('validate_phone') == 1) {
$smarty->assign('label_billing_phone', label_for('billing-phone', "* " . __('Telefon')));
@@ -86,6 +90,7 @@ $delivery = stDeliveryFrontend::getInstance($sf_context->getUser()->getBasket())
$defaultDelivery = $delivery->getDefaultDelivery();
$hidden_fields = [
'delivery_pickup_point' => $sf_request->getParameter('delivery_pickup_point') ? htmlspecialchars($sf_request->getParameter('delivery_pickup_point')) : null,
'payment_channel' => $sf_request->getParameter('payment_channel') ? htmlspecialchars($sf_request->getParameter('payment_channel')) : null,
'payment_id' => $defaultDelivery ? $defaultDelivery->getDefaultPayment()->getId() : null,
'delivery_id' => $defaultDelivery ? $defaultDelivery->getId() : null,
@@ -97,21 +102,71 @@ $smarty->assign('hidden_fields', $hidden_fields);
if (stTheme::is_responsive()) {
$user_config->get('validate_phone') == 1 ? $phone_label = "* " . __('Telefon') : $phone_label = __('Telefon');
$smarty->assign('input_billing_company', input_tag('user_data_billing[company]', $user_data_billing['company'], array('id' => 'company_billing', 'placeholder' => '* ' . __("Firma"), 'maxlength' => '255', 'class' => 'form-control')));
$smarty->assign('input_billing_nip', input_tag('user_data_billing[vat_number]', $user_data_billing['vat_number'], array('id' => 'nip_billing', 'placeholder' => "* " . __($sf_user->hasVatEu() ? "Numer VAT UE" : "NIP"), 'maxlength' => '255', 'class' => 'form-control')));
$smarty->assign('input_billing_full_name', input_tag('user_data_billing[full_name]', $user_data_billing['full_name'], array('id' => 'full_name_billing', 'placeholder' => "* " . __('Imię i nazwisko'), '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_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_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', object_select_tag($userDataBilling->getCountriesId(), 'getId', array('id' => 'billing-country', 'class' => 'form-control', 'related_class' => 'Countries', 'control_name' => 'user_data_billing[country]')));
$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_pesel', input_tag('user_data_billing[pesel]', $user_data_billing['pesel'], array('id' => 'billing-pesel', 'placeholder' => __('PESEL'), 'maxlength' => '255', 'class' => 'form-control')));
// company
$user_data_billing_company_array = array('id' => 'company_billing', 'aria-required'=>"true", 'maxlength' => '255', 'class' => 'form-control');
if($sf_request->getError('user_data_billing{company}')){
$user_data_billing_company_array += array('aria-describedby'=>"error_company_billing", 'aria-invalid'=>"true");
}
$smarty->assign('input_billing_company', input_tag('user_data_billing[company]', $user_data_billing['company'], $user_data_billing_company_array));
// nip
$smarty->assign("nip_billing_label", __($sf_user->hasVatEu() ? "Numer VAT UE" : "NIP"));
$user_data_billing_vat_number_array = array('id' => 'nip_billing', 'maxlength' => '255', 'aria-required'=>"true", 'class' => 'form-control');
if ($sf_request->getError('user_data_billing{vat_number}')){
$user_data_billing_vat_number_array += array('aria-describedby'=>"error_vat_billing", 'aria-invalid'=>"true");
}
$smarty->assign('input_billing_nip', input_tag('user_data_billing[vat_number]', $user_data_billing['vat_number'], $user_data_billing_vat_number_array));
// full name
$user_data_billing_full_name_array = array('id' => 'full_name_billing', 'aria-required'=>"true", 'maxlength' => '255', 'class' => 'form-control');
if($sf_request->getError('user_data_billing{full_name}')){
$user_data_billing_full_name_array += array('aria-describedby'=>"error_full_name_billing", 'aria-invalid'=>"true");
}
$smarty->assign('input_billing_full_name', input_tag('user_data_billing[full_name]', $user_data_billing['full_name'], $user_data_billing_full_name_array));
// adress
$user_data_billing_address_array = array('id' => 'address_billing', 'aria-required'=>"true", 'maxlength' => '255', 'class' => 'form-control');
if($sf_request->getError('user_data_billing{address}')){
$user_data_billing_address_array += array('aria-describedby'=>"error_address_billing", 'aria-invalid'=>"true");
}
$smarty->assign('input_billing_address', input_tag('user_data_billing[address]', $user_data_billing['address'], $user_data_billing_address_array));
$smarty->assign('input_billing_address_more', input_tag('user_data_billing[address_more]', isset($user_data_billing['address_more']) ? $user_data_billing['address_more'] : null, array('id' => 'address_more_billing', 'maxlength' => '255', 'class' => 'form-control')));
// region
$smarty->assign('input_billing_region', input_tag('user_data_billing[region]', isset($user_data_billing['region']) ? $user_data_billing['region'] : null, array('id' => 'region_billing', 'maxlength' => '255', 'class' => 'form-control')));
// code
$user_data_billing_code_array = array('id' => 'code_billing', 'maxlength' => '255', 'class' => 'form-control', 'aria-required'=>"true");
if($sf_request->getError('user_data_billing{code}')){
$user_data_billing_code_array += array('aria-describedby'=>"error_code_billing", 'aria-invalid'=>"true");
}
$smarty->assign('input_billing_code', input_tag('user_data_billing[code]', $user_data_billing['code'], $user_data_billing_code_array));
// town
$user_data_billing_town_array = array('id' => 'town_billing', 'maxlength' => '255', 'class' => 'form-control', 'aria-required'=>"true");
if($sf_request->getError('user_data_billing{town}')){
$user_data_billing_town_array += array('aria-describedby'=>"error_town_billing", 'aria-invalid'=>"true");
}
$smarty->assign('input_billing_town', input_tag('user_data_billing[town]', $user_data_billing['town'], $user_data_billing_town_array));
// phone
$user_data_billing_phone_array = array('id' => 'phone_billing', 'maxlength' => '255', 'class' => 'form-control');
$smarty->assign('validate_phone',0);
if($user_config->get('validate_phone') == 1){
$smarty->assign('validate_phone',1);
$user_data_billing_phone_array += array('aria-required'=>"true");
if ($sf_request->getError('user_data_billing{phone}')){
$user_data_billing_phone_array += array('aria-describedby'=>"error_phone_billing", 'aria-invalid'=>"true");
}
}
$smarty->assign('input_billing_phone', input_tag('user_data_billing[phone]', $user_data_billing['phone'], $user_data_billing_phone_array));
// pesel
$smarty->assign('input_billing_pesel', input_tag('user_data_billing[pesel]', isset($user_data_billing['pesel']) ? $user_data_billing['pesel'] : null, array('id' => 'billing-pesel', 'maxlength' => '255', 'class' => 'form-control')));
$smarty->assign('is_authenticated', $sf_user->isAuthenticated());
$smarty->assign('username', $sf_user->isAuthenticated() ? $sf_user->getGuardUser()->getUsername() : "");
$smarty->assign('external_account', $sf_user->isAuthenticated() ? $sf_user->getGuardUser()->getExternalAccount() : "");
}
$smarty->assign('is_authenticated', $sf_user->isAuthenticated());

View File

@@ -1,95 +1,135 @@
<?php use_helper('Validation', 'Object', 'stCaptchaGD', 'stUrl', 'stUserPassValidation', 'stDelivery') ?>
<?php st_theme_use_stylesheet('stUser.css') ?>
<?php use_javascript('stUser.js', 'last') ?>
<?php use_javascript('jquery.infieldlabel.js', 'last') ?>
<?php $user_config = stConfig::getInstance(sfContext::getInstance(), 'stUser'); ?>
<?php
use_helper('Validation', 'Object', 'stCaptchaGD', 'stUrl', 'stUserPassValidation', 'stDelivery');
st_theme_use_stylesheet('stUser.css');
use_javascript('stUser.js', 'last');
use_javascript('jquery.infieldlabel.js', 'last');
$user_config = stConfig::getInstance(sfContext::getInstance(), 'stUser');
<?php $smarty->assign('error_company', form_error('user_data_delivery[company]', array('suffix'=>'', 'prefix'=>'', 'class'=>'st_error error_label'))) ?>
<?php $smarty->assign('error_full_name', form_error('user_data_delivery[full_name]', array('suffix'=>'', 'prefix'=>'', 'class'=>'st_error error_label'))) ?>
<?php $smarty->assign('error_address', form_error('user_data_delivery[address]', array('suffix'=>'', 'prefix'=>'', 'class'=>'st_error error_label'))) ?>
<?php $smarty->assign('error_region', form_error('user_data_delivery[region]', array('suffix'=>'', 'prefix'=>'', 'class'=>'st_error error_label'))) ?>
<?php $smarty->assign('error_code', form_error('user_data_delivery[code]', array('suffix'=>'', 'prefix'=>'', 'class'=>'st_error error_label'))) ?>
<?php $smarty->assign('error_town', form_error('user_data_delivery[town]', array('suffix'=>'', 'prefix'=>'', 'class'=>'st_error error_label'))) ?>
<?php $smarty->assign('error_phone', form_error('user_data_delivery[phone]', array('suffix'=>'', 'prefix'=>'', 'class'=>'st_error error_label'))) ?>
$smarty->assign('error_company', form_error('user_data_delivery[company]', array('suffix'=>'', 'prefix'=>'', 'class'=>'st_error error_label')));
$smarty->assign('error_full_name', form_error('user_data_delivery[full_name]', array('suffix'=>'', 'prefix'=>'', 'class'=>'st_error error_label')));
$smarty->assign('error_address', form_error('user_data_delivery[address]', array('suffix'=>'', 'prefix'=>'', 'class'=>'st_error error_label')));
$smarty->assign('error_region', form_error('user_data_delivery[region]', array('suffix'=>'', 'prefix'=>'', 'class'=>'st_error error_label')));
$smarty->assign('error_code', form_error('user_data_delivery[code]', array('suffix'=>'', 'prefix'=>'', 'class'=>'st_error error_label')));
$smarty->assign('error_town', form_error('user_data_delivery[town]', array('suffix'=>'', 'prefix'=>'', 'class'=>'st_error error_label')));
$smarty->assign('error_phone', form_error('user_data_delivery[phone]', array('suffix'=>'', 'prefix'=>'', 'class'=>'st_error error_label')));
$smarty->assign('error_delivery_company', $sf_request->getError('user_data_delivery{company}'));
$smarty->assign('error_delivery_full_name', $sf_request->getError('user_data_delivery{full_name}'));
$smarty->assign('error_delivery_address', $sf_request->getError('user_data_delivery{address}'));
$smarty->assign('error_delivery_region', $sf_request->getError('user_data_delivery{region}'));
$smarty->assign('error_delivery_code_town', $sf_request->getError('user_data_delivery{code}').$sf_request->getError('user_data_delivery{town}'));
$smarty->assign('error_delivery_code', $sf_request->getError('user_data_delivery{code}'));
$smarty->assign('error_delivery_town', $sf_request->getError('user_data_delivery{town}'));
$smarty->assign('error_delivery_phone', $sf_request->getError('user_data_delivery{phone}'));
$smarty->assign('error_delivery_vat', $sf_request->getError('user_data_delivery{vat_number}'));
$smarty->assign('error_delivery_country', $sf_request->getError('user_data_delivery{country}'));
<?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_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_code_town', $sf_request->getError('user_data_delivery{code}').$sf_request->getError('user_data_delivery{town}')); ?>
<?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_phone', $sf_request->getError('user_data_delivery{phone}')); ?>
<?php $smarty->assign('error_delivery_vat', $sf_request->getError('user_data_delivery{vat_number}')); ?>
<?php $smarty->assign('error_delivery_country', $sf_request->getError('user_data_delivery{country}')); ?>
<?php
if ($sf_request->getErrors() && $user_basket_form_error):
$smarty->assign('errors', __('Uzupełnij zaznaczone pola.'));
endif;
?>
<?php $smarty->assign('show_region', $show_region);?>
<?php $smarty->assign('show_address_more', $show_address_more);?>
<?php $smarty->assign('label_delivery_customer_type1', __('Klient indywidualny')) ?>
<?php $smarty->assign('radio_delivery_customer_type1', radiobutton_tag('user_data_delivery[customer_type]', 1, $user_data_delivery['customer_type'] == 1)) ?>
$smarty->assign('show_region', $show_region);
$smarty->assign('show_address_more', $show_address_more);
<?php $smarty->assign('label_delivery_customer_type2', __('Firma')) ?>
<?php $smarty->assign('radio_delivery_customer_type2', radiobutton_tag('user_data_delivery[customer_type]', 2, $user_data_delivery['customer_type'] == 2)) ?>
$smarty->assign('label_delivery_customer_type1', __('Klient indywidualny'));
$smarty->assign('radio_delivery_customer_type1', radiobutton_tag('user_data_delivery[customer_type]', 1, $user_data_delivery['customer_type'] == 1, array('style'=>'margin-left: 0px;')));
<?php $smarty->assign('label_delivery_company', label_for('company',"* ".__('Firma'))) ?>
<?php $smarty->assign('input_delivery_company', input_tag('user_data_delivery[company]', $user_data_delivery['company'], array('id'=>'company', 'maxlength'=>'255', 'class'=>form_has_error('user_data_delivery{company}') ? 'st_form-error' : ''))) ?>
$smarty->assign('label_delivery_customer_type2', __('Firma'));
$smarty->assign('radio_delivery_customer_type2', radiobutton_tag('user_data_delivery[customer_type]', 2, $user_data_delivery['customer_type'] == 2, array('style'=>'margin-left: 0px;')));
<?php $smarty->assign('label_delivery_full_name', label_for('full_name',"* ".__('Imię i nazwisko'), array('id'=>'full_name_delivery_label'))) ?>
<?php $smarty->assign('label_delivery_full_name_text', __('Imię i nazwisko')); ?>
<?php $smarty->assign('input_delivery_full_name', input_tag('user_data_delivery[full_name]', $user_data_delivery['full_name'], array('id'=>'full_name', 'maxlength'=>'255', 'class'=>form_has_error('user_data_delivery{full_name}') ? 'st_form-error' : ''))) ?>
$smarty->assign('label_delivery_company', label_for('company',"* ".__('Firma')));
$smarty->assign('input_delivery_company', input_tag('user_data_delivery[company]', $user_data_delivery['company'], array('id'=>'company', 'maxlength'=>'255', 'class'=>form_has_error('user_data_delivery{company}') ? 'st_form-error' : '')));
<?php $smarty->assign('label_delivery_address', label_for('address',"* ".__('Ulica nr domu / nr lokalu'))) ?>
<?php $smarty->assign('input_delivery_address', input_tag('user_data_delivery[address]', $user_data_delivery['address'], array('id'=>'address', 'maxlength'=>'255', 'class'=>form_has_error('user_data_delivery{address}') ? 'st_form-error' : ''))) ?>
$smarty->assign('label_delivery_full_name', label_for('full_name',"* ".__('Imię i nazwisko'), array('id'=>'full_name_delivery_label')));
$smarty->assign('label_delivery_full_name_text', __('Imię i nazwisko'));
$smarty->assign('input_delivery_full_name', input_tag('user_data_delivery[full_name]', $user_data_delivery['full_name'], array('id'=>'full_name', 'maxlength'=>'255', 'class'=>form_has_error('user_data_delivery{full_name}') ? 'st_form-error' : '')));
<?php $smarty->assign('label_delivery_address_more', label_for('address_more',__('Adres ciąg dalszy'))) ?>
<?php $smarty->assign('input_delivery_address_more', input_tag('user_data_delivery[address_more]', $user_data_delivery['address_more'], array('id'=>'address_more', 'maxlength'=>'255', 'class'=>form_has_error('user_data_delivery{address_more}') ? 'st_form-error' : ''))) ?>
$smarty->assign('label_delivery_address', label_for('address',"* ".__('Ulica nr domu / nr lokalu')));
$smarty->assign('input_delivery_address', input_tag('user_data_delivery[address]', $user_data_delivery['address'], array('id'=>'address', 'maxlength'=>'255', 'class'=>form_has_error('user_data_delivery{address}') ? 'st_form-error' : '')));
<?php $smarty->assign('label_delivery_region', label_for('region',__('Województwo'))) ?>
<?php $smarty->assign('input_delivery_region', input_tag('user_data_delivery[region]', $user_data_delivery['region'], array('id'=>'region', 'maxlength'=>'255', 'class'=>form_has_error('user_data_delivery{region}') ? 'st_form-error' : ''))) ?>
$smarty->assign('label_delivery_address_more', label_for('address_more',__('Adres ciąg dalszy')));
$smarty->assign('input_delivery_address_more', input_tag('user_data_delivery[address_more]', $user_data_delivery['address_more'], array('id'=>'address_more', 'maxlength'=>'255', 'class'=>form_has_error('user_data_delivery{address_more}') ? 'st_form-error' : '')));
<?php $smarty->assign('label_delivery_code', label_for('code',"* ".__('Kod'), array('id'=>'label_code'))) ?>
<?php $smarty->assign('input_delivery_code', input_tag('user_data_delivery[code]', $user_data_delivery['code'], array('id'=>'code', 'maxlength'=>'255', 'class'=>form_has_error('user_data_delivery{code}') ? 'st_form-error' : ''))) ?>
$smarty->assign('label_delivery_region', label_for('region',__('Województwo')));
$smarty->assign('input_delivery_region', input_tag('user_data_delivery[region]', $user_data_delivery['region'], array('id'=>'region', 'maxlength'=>'255', 'class'=>form_has_error('user_data_delivery{region}') ? 'st_form-error' : '')));
<?php $smarty->assign('label_delivery_town', label_for('town',"* ".__('Miasto'), array('id'=>'label_town'))) ?>
<?php $smarty->assign('input_delivery_town', input_tag('user_data_delivery[town]', $user_data_delivery['town'], array('id'=>'town', 'maxlength'=>'255', 'class'=>form_has_error('user_data_delivery{town}') ? 'st_form-error' : ''))) ?>
$smarty->assign('label_delivery_code', label_for('code',"* ".__('Kod'), array('id'=>'label_code')));
$smarty->assign('input_delivery_code', input_tag('user_data_delivery[code]', $user_data_delivery['code'], array('id'=>'code', 'maxlength'=>'255', 'class'=>form_has_error('user_data_delivery{code}') ? 'st_form-error' : '')));
<?php $smarty->assign('label_delivery_country', label_for('country',__('Kraj'))) ?>
<?php $smarty->assign('select_delivery_country', delivery_countries_select_tag('user_data_delivery[country]', $delivery_country_id)) ?>
$smarty->assign('label_delivery_town', label_for('town',"* ".__('Miasto'), array('id'=>'label_town')));
$smarty->assign('input_delivery_town', input_tag('user_data_delivery[town]', $user_data_delivery['town'], array('id'=>'town', 'maxlength'=>'255', 'class'=>form_has_error('user_data_delivery{town}') ? 'st_form-error' : '')));
$smarty->assign('label_delivery_country', label_for('country',__('Kraj')));
$smarty->assign('select_delivery_country', delivery_countries_select_tag('user_data_delivery[country]', $delivery_country_id));
<?php
if($user_config->get('validate_phone')==1){
$smarty->assign('label_delivery_phone', label_for('phone',"* ".__('Telefon')));
}else{
$smarty->assign('label_delivery_phone', label_for('phone',__('Telefon')));
}
?>
<?php $smarty->assign('input_delivery_phone', input_tag('user_data_delivery[phone]', $user_data_delivery['phone'], array('id'=>'phone', 'maxlength'=>'255', 'class'=>form_has_error('user_data_delivery{phone}') ? 'st_form-error' : ''))) ?>
<?php if(stTheme::is_responsive()): ?>
$smarty->assign('input_delivery_phone', input_tag('user_data_delivery[phone]', $user_data_delivery['phone'], array('id'=>'phone', 'maxlength'=>'255', 'class'=>form_has_error('user_data_delivery{phone}') ? 'st_form-error' : '')));
<?php $user_config->get('validate_phone')==1 ? $phone_label = "* ".__('Telefon') : $phone_label = __('Telefon'); ?>
<!-- delivery -->
<?php $smarty->assign('input_delivery_company', input_tag('user_data_delivery[company]', $user_data_delivery['company'], 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]', $user_data_delivery['full_name'], 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]', $user_data_delivery['address'], array('id'=>'address_delivery', 'placeholder'=> '* '.__("Ulica nr domu / nr lokalu"), 'maxlength'=>'255', 'class'=>'form-control'))); ?>
<?php $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'))); ?>
<?php $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'))); ?>
<?php $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'))); ?>
<?php $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'))); ?>
<?php $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'))); ?>
if(stTheme::is_responsive()){
<?php endif; ?>
$user_config->get('validate_phone')==1 ? $phone_label = "* ".__('Telefon') : $phone_label = __('Telefon');
<?php $smarty->assign('is_authenticated', $sf_user->isAuthenticated()); ?>
<?php $smarty->assign('hidden_is_authenticated', input_hidden_tag('user_data_delivery[is_authenticated]', $sf_user->isAuthenticated())); ?>
// delivery company
$user_data_delivery_company_array = array('id' => 'company_delivery', 'maxlength' => '255', 'class' => 'form-control', 'aria-required'=>"true");
if($sf_request->getError('user_data_delivery{company}')){
$user_data_delivery_company_array += array('aria-describedby'=>"error_company_delivery", 'aria-invalid'=>"true");
}
$smarty->assign('input_delivery_company', input_tag('user_data_delivery[company]', $user_data_delivery['company'], $user_data_delivery_company_array));
<?php $smarty->display('userdata_order_form_delivery.html') ?>
// delivery full name
$user_data_delivery_full_name_array = array('id' => 'full_name_delivery', 'maxlength' => '255', 'class' => 'form-control', 'aria-required'=>"true");
if($sf_request->getError('user_data_delivery{full_name}')){
$user_data_delivery_full_name_array += array('aria-describedby'=>"error_full_name_delivery", 'aria-invalid'=>"true");
}
$smarty->assign('input_delivery_full_name', input_tag('user_data_delivery[full_name]', $user_data_delivery['full_name'], $user_data_delivery_full_name_array));
// delivery address
$user_data_delivery_address_array = array('id' => 'address_delivery', 'maxlength' => '255', 'class' => 'form-control', 'aria-required'=>"true");
if($sf_request->getError('user_data_delivery{address}')){
$user_data_delivery_address_array += array('aria-describedby'=>"error_address_delivery", 'aria-invalid'=>"true");
}
$smarty->assign('input_delivery_address', input_tag('user_data_delivery[address]', $user_data_delivery['address'], $user_data_delivery_address_array ));
$smarty->assign('input_delivery_address_more', input_tag('user_data_delivery[address_more]', isset($user_data_delivery['address_more']) ? $user_data_delivery['address_more'] : null, array('id' => 'address_more_delivery','maxlength' => '255', 'class' => 'form-control')));
// delivery region
$smarty->assign('input_delivery_region', input_tag('user_data_delivery[region]', isset($user_data_delivery['region']) ? $user_data_delivery['region'] : null, array('id' => 'region_delivery', 'maxlength' => '255', 'class' => 'form-control')));
// delivery code
$user_data_delivery_code_array = array('id' => 'code_delivery', 'maxlength' => '255', 'class' => 'form-control', 'aria-required'=>"true");
if($sf_request->getError('user_data_delivery{code}')){
$user_data_delivery_code_array += array('aria-describedby'=>"error_code_delivery", 'aria-invalid'=>"true");
}
$smarty->assign('input_delivery_code', input_tag('user_data_delivery[code]', $user_data_delivery['code'], $user_data_delivery_code_array));
// delivery town
$user_data_delivery_town_array = array('id' => 'town_delivery', 'maxlength' => '255', 'class' => 'form-control', 'aria-required'=>"true");
if($sf_request->getError('user_data_delivery{town}')){
$user_data_delivery_town_array += array('aria-describedby'=>"error_town_delivery", 'aria-invalid'=>"true");
}
$smarty->assign('input_delivery_town', input_tag('user_data_delivery[town]', $user_data_delivery['town'], $user_data_delivery_town_array));
// delivery phone
$user_data_delivery_phone_array = array('id' => 'phone_delivery', 'maxlength' => '255', 'class' => 'form-control');
$smarty->assign('validate_phone',0);
if($user_config->get('validate_phone') == 1){
$smarty->assign('validate_phone',1);
$user_data_delivery_phone_array += array('aria-required'=>"true");
if ($sf_request->getError('user_data_delivery{phone}')){
$user_data_delivery_phone_array += array('aria-describedby'=>"error_phone_billing", 'aria-invalid'=>"true");
}
}
$smarty->assign('input_delivery_phone', input_tag('user_data_delivery[phone]', $user_data_delivery['phone'], $user_data_delivery_phone_array));
}
$smarty->assign('is_authenticated', $sf_user->isAuthenticated());
$smarty->assign('hidden_is_authenticated', input_hidden_tag('user_data_delivery[is_authenticated]', $sf_user->isAuthenticated()));
$smarty->display('userdata_order_form_delivery.html');

View File

@@ -0,0 +1,54 @@
<?php
use_helper('stUrl');
$smarty = new stSmarty('stUserData');
st_theme_use_stylesheet('stProduct.css');
$url_params = array(
'module' => 'stUserData',
'action' => $action,
);
if ($type)
{
$url_params['type'] = $type;
}
if ($product_pager->haveToPaginate())
{
$smarty->assign('current_page', $product_pager->getPage());
$smarty->assign('last_page', $product_pager->getLastPage());
$links = array();
foreach ($product_pager->getLinks() as $page)
{
$url_params['page'] = $page;
$links[] = array(
'page' => $page,
'url' => st_url_for($url_params),
);
}
$smarty->assign('first_page', 1);
$url_params['page'] = $product_pager->getPreviousPage();
$smarty->assign('previous_page_url', st_url_for($url_params));
$url_params['page'] = $product_pager->getNextPage();
$smarty->assign('next_page_url', st_url_for($url_params));
$url_params['page'] = $product_pager->getLastPage();
$smarty->assign('last_page_url', st_url_for($url_params));
$smarty->assign('current', $product_pager->getPage());
$smarty->assign("links", $links);
$smarty->display('userdata_product_pager.html');
}

View File

@@ -0,0 +1,7 @@
<?php
$smarty->assign('user_email', sfContext::getInstance()->getUser()->getUsername());
$smarty->assign('active_tab', $active_tab);
$smarty->display('userdata_responsive_user_panel_breadcrumbs.html');
?>

View File

@@ -2,14 +2,13 @@
st_theme_use_stylesheet('stUser.css');
$smarty->assign('user_email', sfContext::getInstance()->getUser()->getUsername());
$smarty->assign('active_tab', $active_tab);
$smarty->assign('order_number', $order_number);
$newsletter_config = stConfig::getInstance(sfContext::getInstance(), 'stNewsletterBackend');
if($newsletter_config->get('newsletter_enabled')==1){
$smarty->assign('newsletter_enabled', 0);
$smarty->assign('newsletter_enabled', 1);
}else{
$smarty->assign('newsletter_enabled', 1);
$smarty->assign('newsletter_enabled', 0);
}

View File

@@ -0,0 +1,20 @@
<?php use_helper('Validation'); ?>
<?php st_theme_use_stylesheet('stUser.css') ?>
<?php
/*echo "<pre>";
print_r($userDataBillingDefault);
print_r($userDataBilling);
print_r($userDataDeliveryDefault);
print_r($userDataDelivery);
echo "</pre>";*/
?>
<?php $smarty->assign('userDataBillingDefault',$userDataBillingDefault); ?>
<?php $smarty->assign('userDataBilling',$userDataBilling); ?>
<?php $smarty->assign('userDataDeliveryDefault',$userDataDeliveryDefault); ?>
<?php $smarty->assign('userDataDelivery',$userDataDelivery); ?>
<?php $smarty->display('userdata_address_list.html') ?>

View File

@@ -1,185 +1,180 @@
<?php use_helper('Validation', 'Object') ?>
<?php st_theme_use_stylesheet('stUser.css') ?>
<?php use_javascript('jquery.infieldlabel.js', 'last') ?>
<?php $smarty->assign('show_region', $show_region);?>
<?php $smarty->assign('show_pesel', $show_pesel);?>
<?php $smarty->assign('show_address_more', $show_address_more);?>
<?php $user_config = stConfig::getInstance(sfContext::getInstance(), 'stUser'); ?>
<?php
if ($sf_request->getErrors()):
$smarty->assign('errors', __('Uzupełnij zaznaczone pola.'));
endif;
?>
use_helper('Validation', 'Object');
st_theme_use_stylesheet('stUser.css');
use_javascript('jquery.infieldlabel.js', 'last');
<?php $smarty->assign('form_start', form_tag('stUserData/createFirstUserData', array('class' => 'st_form_ver6', 'name'=>'register'))) ?>
$smarty->assign('show_region', $show_region);
$smarty->assign('show_pesel', $show_pesel);
$smarty->assign('show_address_more', $show_address_more);
<?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_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_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_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'))) ?>
$user_config = stConfig::getInstance(sfContext::getInstance(), 'stUser');
<?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_full_name', $sf_request->getError('user_data_billing{full_name}')); ?>
<?php $smarty->assign('error_address', $sf_request->getError('user_data_billing{address}')); ?>
<?php $smarty->assign('error_code_town', $sf_request->getError('user_data_billing{code}').$sf_request->getError('user_data_billing{town}')); ?>
<?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_phone', $sf_request->getError('user_data_billing{phone}')); ?>
<?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('label_billing_customer_type2', __('Firma')) ?>
<?php $smarty->assign('radio_billing_customer_type2', radiobutton_tag('user_data_billing[customer_type]', 2, $type2_billing_checker)) ?>
<?php $smarty->assign('label_company', label_for('billing_company',"* ".__('Firma'))) ?>
<?php $smarty->assign('input_company', input_tag('user_data_billing[company]', $userDataBilling->getCompany(), array('id'=>'billing_company', 'maxlength'=>'255', 'class'=>form_has_error('user_data_billing{company}') ? 'st_form-error' : ''))) ?>
<?php $smarty->assign('label_full_name', label_for('billing_full_name',"* ".__('Imię i nazwisko'), array('id'=>'full_name_label'))) ?>
<?php $smarty->assign('label_full_name_text', __('Imię i nazwisko')); ?>
<?php $smarty->assign('input_full_name', input_tag('user_data_billing[full_name]', $userDataBilling->getFullName(), array('id'=>'billing_full_name', 'maxlength'=>'255', 'class'=>form_has_error('user_data_billing{full_name}') ? 'st_form-error' : ''))) ?>
<?php $smarty->assign('label_address', label_for('billing_address',"* ".__('Ulica nr domu / nr lokalu'))) ?>
<?php $smarty->assign('input_address', input_tag('user_data_billing[address]', $userDataBilling->getAddress(), array('id'=>'billing_address', 'maxlength'=>'255', 'class'=>form_has_error('user_data_billing{address}') ? 'st_form-error' : ''))) ?>
<?php $smarty->assign('label_address_more', label_for('billing_address_more',__('Adres ciąg dalszy'))) ?>
<?php $smarty->assign('input_address_more', input_tag('user_data_billing[address_more]', $userDataBilling->getAddressMore(), array('id'=>'billing_address_more', 'maxlength'=>'255', 'class'=>form_has_error('user_data_billing{address_more}') ? 'st_form-error' : ''))) ?>
<?php $smarty->assign('label_region', label_for('billing_region',__('Województwo'))) ?>
<?php $smarty->assign('input_region', input_tag('user_data_billing[region]', $userDataBilling->getRegion(), array('id'=>'billing_region', 'maxlength'=>'255', 'class'=>form_has_error('user_data_billing{region}') ? 'st_form-error' : ''))) ?>
<?php $smarty->assign('label_code', label_for('billing_code',"* ".__('Kod'))) ?>
<?php $smarty->assign('input_code', input_tag('user_data_billing[code]', $userDataBilling->getCode(), array('id'=>'billing_code', 'maxlength'=>'255', 'class'=>form_has_error('user_data_billing{code}') ? 'st_form-error' : ''))) ?>
<?php $smarty->assign('label_town', label_for('billing_town',"* ".__('Miasto'))) ?>
<?php $smarty->assign('input_town', input_tag('user_data_billing[town]', $userDataBilling->getTown(), array('id'=>'billing_town', 'maxlength'=>'255', 'class'=>form_has_error('user_data_billing{town}') ? 'st_form-error' : ''))) ?>
<?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
if($user_config->get('validate_phone')==1){
$smarty->assign('label_phone', label_for('billing_phone',"* ".__('Telefon')));
}else{
$smarty->assign('label_phone', label_for('billing_phone',__('Telefon')));
if ($sf_request->getErrors()){
$smarty->assign('errors', __('Uzupełnij zaznaczone pola.'));
}
?>
<?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' : ''))) ?>
$smarty->assign('form_start', form_tag('stUserData/createFirstUserData', array('class' => 'st_form_ver6', 'name'=>'register')));
<?php $smarty->assign('label_nip', label_for('billing_nip',"* ".__('NIP'))) ?>
<?php $smarty->assign('input_nip', input_tag('user_data_billing[vat_number]', $userDataBilling->getVatNumber(), array('id'=>'billing_nip', 'maxlength'=>'255', 'class'=>form_has_error('user_data_billing{vat_number}') ? 'st_form-error' : ''))) ?>
$smarty->assign('error_company', $sf_request->getError('user_data_billing{company}'));
$smarty->assign('error_nip', $sf_request->getError('user_data_billing{vat_number}'));
$smarty->assign('error_full_name', $sf_request->getError('user_data_billing{full_name}'));
$smarty->assign('error_address', $sf_request->getError('user_data_billing{address}'));
$smarty->assign('error_code_town', $sf_request->getError('user_data_billing{code}').$sf_request->getError('user_data_billing{town}'));
$smarty->assign('error_code', $sf_request->getError('user_data_billing{code}'));
$smarty->assign('error_town', $sf_request->getError('user_data_billing{town}'));
$smarty->assign('error_phone', $sf_request->getError('user_data_billing{phone}'));
<?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('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_full_name',form_error('user_data_delivery[full_name]', 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_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_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_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_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_region', $sf_request->getError('user_data_delivery{region}')) ?>
<?php $smarty->assign('error_delivery_code_town', $sf_request->getError('user_data_delivery{code}').$sf_request->getError('user_data_delivery{town}')); ?>
<?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_phone', $sf_request->getError('user_data_delivery{phone}')) ?>
$smarty->assign('label_billing_customer_type1', __('Klient indywidualny'));
$smarty->assign('radio_billing_customer_type1', radiobutton_tag('user_data_billing[customer_type]', 1, $type1_billing_checker, array('style'=>'margin-left: 0px;')));
$smarty->assign('label_billing_customer_type2', __('Firma'));
$smarty->assign('radio_billing_customer_type2', radiobutton_tag('user_data_billing[customer_type]', 2, $type2_billing_checker, array('style'=>'margin-left: 0px;')));
<?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)) ?>
$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]')));
$smarty->assign('checkbox_delivery', checkbox_tag('different_delivery', 1, $different_delivery, array('id'=>'different_delivery', 'class'=>'checkobox')));
$smarty->assign('error_delivery_company', $sf_request->getError('user_data_delivery{company}'));
$smarty->assign('error_delivery_full_name', $sf_request->getError('user_data_delivery{full_name}'));
$smarty->assign('error_delivery_address', $sf_request->getError('user_data_delivery{address}'));
$smarty->assign('error_delivery_code_town', $sf_request->getError('user_data_delivery{code}').$sf_request->getError('user_data_delivery{town}'));
$smarty->assign('error_delivery_code', $sf_request->getError('user_data_delivery{code}'));
$smarty->assign('error_delivery_town', $sf_request->getError('user_data_delivery{town}'));
$smarty->assign('error_delivery_phone', $sf_request->getError('user_data_delivery{phone}'));
<?php $smarty->assign('label_delivery_customer_type2', __('Firma')) ?>
<?php $smarty->assign('radio_delivery_customer_type2', radiobutton_tag('user_data_delivery[customer_type]', 2, $type2_delivery_checker)) ?>
$smarty->assign('label_delivery_customer_type1', __('Klient indywidualny'));
$smarty->assign('radio_delivery_customer_type1', radiobutton_tag('user_data_delivery[customer_type]', 1, $type1_delivery_checker, array('style'=>'margin-left: 0px;')));
$smarty->assign('label_delivery_customer_type2', __('Firma'));
$smarty->assign('radio_delivery_customer_type2', radiobutton_tag('user_data_delivery[customer_type]', 2, $type2_delivery_checker, array('style'=>'margin-left: 0px;')));
$smarty->assign('select_delivery_country', st_get_component('stUserData', 'deliveryCountriesSelect', array('id' => 'user_data_delivery_country', 'force_default_country_id' => $userDataDelivery->getCountriesId())));
$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('label_delivery_company', label_for('delivery_company',"* ".__('Firma'))) ?>
<?php $smarty->assign('input_delivery_company', input_tag('user_data_delivery[company]', $userDataDelivery->getCompany(), array('id'=>'delivery_company', 'maxlength'=>'255', 'class'=>form_has_error('user_data_delivery{company}') ? 'st_form-error' : ''))) ?>
if(stTheme::is_responsive()){
<?php $smarty->assign('label_delivery_full_name', label_for('delivery_full_name',"* ".__('Imię i nazwisko'), array('id'=>'full_name_delivery_label'))) ?>
<?php $smarty->assign('label_delivery_full_name_text', __('Imię i nazwisko')); ?>
<?php $smarty->assign('input_delivery_full_name', input_tag('user_data_delivery[full_name]', $userDataDelivery->getFullName(), array('id'=>'delivery_full_name', 'maxlength'=>'255', 'class'=>form_has_error('user_data_delivery{full_name}') ? 'st_form-error' : ''))) ?>
$user_config->get('validate_phone')==1 ? $phone_label = "* ".__('Telefon') : $phone_label = __('Telefon');
<?php $smarty->assign('label_delivery_address', label_for('delivery_address',"* ".__('Ulica nr domu / nr lokalu'))) ?>
<?php $smarty->assign('input_delivery_address', input_tag('user_data_delivery[address]', $userDataDelivery->getAddress(), array('id'=>'delivery_address', 'maxlength'=>'255', 'class'=>form_has_error('user_data_delivery{address}') ? 'st_form-error' : ''))) ?>
<?php $smarty->assign('label_delivery_address_more', label_for('delivery_address_more',"* ".__('Adres ciąg dalszy'))) ?>
<?php $smarty->assign('input_delivery_address_more', input_tag('user_data_delivery[address_more]', $userDataDelivery->getAddressMore(), array('id'=>'delivery_address_more', 'maxlength'=>'255', 'class'=>form_has_error('user_data_delivery{address_more}') ? 'st_form-error' : ''))) ?>
<?php $smarty->assign('label_delivery_region', label_for('delivery_region',__('Województwo'))) ?>
<?php $smarty->assign('input_delivery_region', input_tag('user_data_delivery[region]', $userDataDelivery->getRegion(), array('id'=>'delivery_region', 'maxlength'=>'255'))) ?>
<?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('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('select_delivery_country', st_get_component('stUserData', 'deliveryCountriesSelect', array('force_default_country_id' => $userDataDelivery->getCountriesId()))) ?>
<?php
if($user_config->get('validate_phone')==1){
$smarty->assign('label_delivery_phone', label_for('delivery_phone',"* ".__('Telefon')));
}else{
$smarty->assign('label_delivery_phone', label_for('delivery_phone',__('Telefon')));
// company
$user_data_company_array = array('id'=>'company_billing', 'aria-required'=>"true", 'maxlength'=>'255', 'class'=>'form-control');
if($sf_request->getError('user_data_billing{company}')){
$user_data_company_array += array('aria-describedby'=>"error_company", 'aria-invalid'=>"true");
}
?>
$smarty->assign('input_company', input_tag('user_data_billing[company]', $userDataBilling->getCompany(), $user_data_company_array));
<?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' : ''))) ?>
// nip
$smarty->assign("nip_label", __($sf_user->hasVatEu() ? "Numer VAT UE" : "NIP"));
$user_data_vat_number_array = array('id'=>'nip_billing', 'aria-required'=>"true", 'maxlength'=>'255', 'class'=>'form-control');
if ($sf_request->getError('user_data_billing{vat_number}')){
$user_data_vat_number_array += array('aria-describedby'=>"error_vat", 'aria-invalid'=>"true");
}
$smarty->assign('input_nip', input_tag('user_data_billing[vat_number]', $userDataBilling->getVatNumber(), $user_data_vat_number_array));
// full name
$user_data_full_name_array = array('id'=>'full_name_billing', 'aria-required'=>"true", 'maxlength'=>'255', 'class'=>'form-control');
if ($sf_request->getError('user_data_billing{full_name}')){
$user_data_full_name_array += array('aria-describedby'=>"error_full_name", 'aria-invalid'=>"true");
}
$smarty->assign('input_full_name', input_tag('user_data_billing[full_name]', $userDataBilling->getFullName(), $user_data_full_name_array));
// adress
$user_data_address_array = array('id'=>'address_billing', 'aria-required'=>"true", 'maxlength'=>'255', 'class'=>'form-control');
if ($sf_request->getError('user_data_billing{address}')){
$user_data_address_array += array('aria-describedby'=>"error_adress", 'aria-invalid'=>"true");
}
$smarty->assign('input_address', input_tag('user_data_billing[address]', $userDataBilling->getAddress(), $user_data_address_array));
$smarty->assign('input_address_more', input_tag('user_data_billing[address_more]', $userDataBilling->getAddressMore(), array('id'=>'address_more_billing', 'maxlength'=>'255', 'class'=>'form-control')));
// region
$smarty->assign('input_region', input_tag('user_data_billing[region]', $userDataBilling->getRegion(), array('id'=>'region_billing', 'maxlength'=>'255', 'class'=>'form-control')));
// code
$user_data_code_array = array('id'=>'code_billing', 'aria-required'=>"true", 'maxlength'=>'255', 'class'=>'form-control');
if ($sf_request->getError('user_data_billing{code}')){
$user_data_code_array += array('aria-describedby'=>"error_code", 'aria-invalid'=>"true");
}
$smarty->assign('input_code', input_tag('user_data_billing[code]', $userDataBilling->getCode(), $user_data_code_array));
// town
$user_data_town_array = array('id'=>'town_billing', 'aria-required'=>"true", 'maxlength'=>'255', 'class'=>'form-control');
if ($sf_request->getError('user_data_billing{town}')){
$user_data_town_array += array('aria-describedby'=>"error_town", 'aria-invalid'=>"true");
}
$smarty->assign('input_town', input_tag('user_data_billing[town]', $userDataBilling->getTown(), $user_data_town_array));
// country
$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]')));
// phone
$user_data_phone_array = array('id'=>'phone_billing', 'maxlength'=>'255', 'class'=>'form-control');
$smarty->assign('validate_phone',0);
if($user_config->get('validate_phone') == 1){
$smarty->assign('validate_phone',1);
$user_data_phone_array += array('aria-required'=>"true");
if ($sf_request->getError('user_data_billing{phone}')){
$user_data_phone_array += array('aria-describedby'=>"error_phone", 'aria-invalid'=>"true");
}
}
$smarty->assign('input_phone', input_tag('user_data_billing[phone]', $userDataBilling->getPhone(), $user_data_phone_array));
// pesel
$smarty->assign('input_pesel', input_tag('user_data_billing[pesel]', $userDataBilling->getPesel(), array('id'=>'billing-pesel', 'maxlength'=>'255', 'class'=>'form-control')));
// delivery company
$user_data_delivery_company_array = array('id' => 'company_delivery', 'maxlength' => '255', 'class' => 'form-control', 'aria-required'=>"true");
if($sf_request->getError('user_data_delivery{company}')){
$user_data_delivery_company_array += array('aria-describedby'=>"error_company_delivery", 'aria-invalid'=>"true");
}
$smarty->assign('input_delivery_company', input_tag('user_data_delivery[company]', $userDataDelivery->getCompany(), $user_data_delivery_company_array));
<?php if(stTheme::is_responsive()): ?>
<?php $user_config->get('validate_phone')==1 ? $phone_label = "* ".__('Telefon') : $phone_label = __('Telefon'); ?>
// delivery full name
$user_data_delivery_full_name_array = array('id' => 'full_name_delivery', 'maxlength' => '255', 'class' => 'form-control', 'aria-required'=>"true");
if($sf_request->getError('user_data_delivery{full_name}')){
$user_data_delivery_full_name_array += array('aria-describedby'=>"error_full_name_delivery", 'aria-invalid'=>"true");
}
$smarty->assign('input_delivery_full_name', input_tag('user_data_delivery[full_name]', $userDataDelivery->getFullName(), $user_data_delivery_full_name_array));
<!-- 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_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_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_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 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('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_pesel', input_tag('user_data_billing[pesel]', $userDataBilling->getPesel(), array('id'=>'billing-pesel', 'placeholder'=>__('PESEL'), 'maxlength'=>'255', 'class'=>'form-control'))); ?>
// delivery address
$user_data_delivery_address_array = array('id' => 'address_delivery', 'maxlength' => '255', 'class' => 'form-control', 'aria-required'=>"true");
if($sf_request->getError('user_data_delivery{address}')){
$user_data_delivery_address_array += array('aria-describedby'=>"error_address_delivery", 'aria-invalid'=>"true");
}
$smarty->assign('input_delivery_address', input_tag('user_data_delivery[address]', $userDataDelivery->getAddress(), $user_data_delivery_address_array ));
<!-- 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_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_more', input_tag('user_data_delivery[address_more]', $userDataDelivery->getAddressMore(), array('id'=>'address_more_delivery', 'placeholder'=>__("Adres ciąg dalszy"), 'maxlength'=>'255', 'class'=>'form-control'))); ?>
<?php $smarty->assign('input_delivery_region', input_tag('user_data_delivery[region]', $userDataDelivery->getRegion(), array('id'=>'region_delivery', 'placeholder'=>__("Województwo"), 'maxlength'=>'255', 'class'=>'form-control'))); ?>
<?php $smarty->assign('input_delivery_code', input_tag('user_data_delivery[code]', $userDataDelivery->getCode(), array('id'=>'code_delivery', 'placeholder'=> '* '.__("Kod"), 'maxlength'=>'255', 'class'=>'form-control'))); ?>
<?php $smarty->assign('input_delivery_town', input_tag('user_data_delivery[town]', $userDataDelivery->getTown(), array('id'=>'town_delivery', 'placeholder'=> '* '.__("Miasto"), 'maxlength'=>'255', 'class'=>'form-control'))); ?>
<?php $smarty->assign('input_delivery_phone', input_tag('user_data_delivery[phone]', $userDataDelivery->getPhone(), array('id'=>'phone_delivery', 'placeholder'=> $phone_label, 'maxlength'=>'255', 'class'=>'form-control'))); ?>
$smarty->assign('input_delivery_address_more', input_tag('user_data_delivery[address_more]', $userDataDelivery->getAddressMore(), array('id' => 'address_more_delivery','maxlength' => '255', 'class' => 'form-control')));
<?php endif; ?>
// delivery region
$smarty->assign('input_delivery_region', input_tag('user_data_delivery[region]', $userDataDelivery->getRegion(), array('id' => 'region_delivery', 'maxlength' => '255', 'class' => 'form-control')));
<?php $smarty->assign('save_submit',submit_tag(__('Zapisz'),array('name'=>'submit_save'))) ?>
// delivery code
$user_data_delivery_code_array = array('id' => 'code_delivery', 'maxlength' => '255', 'class' => 'form-control', 'aria-required'=>"true");
if($sf_request->getError('user_data_delivery{code}')){
$user_data_delivery_code_array += array('aria-describedby'=>"error_code_delivery", 'aria-invalid'=>"true");
}
$smarty->assign('input_delivery_code', input_tag('user_data_delivery[code]', $userDataDelivery->getCode(), $user_data_delivery_code_array));
// delivery town
$user_data_delivery_town_array = array('id' => 'town_delivery', 'maxlength' => '255', 'class' => 'form-control', 'aria-required'=>"true");
if($sf_request->getError('user_data_delivery{town}')){
$user_data_delivery_town_array += array('aria-describedby'=>"error_town_delivery", 'aria-invalid'=>"true");
}
$smarty->assign('input_delivery_town', input_tag('user_data_delivery[town]', $userDataDelivery->getTown(), $user_data_delivery_town_array));
<?php $smarty->assign('hidden_delivery_id', input_hidden_tag('user_data_delivery[id]', $userDataDelivery->getId())) ?>
<?php $smarty->assign('hidden_billing_id', input_hidden_tag('user_data_billing[id]', $userDataBilling->getId())) ?>
<?php $smarty->display('userdata_create_first_user_data.html') ?>
// delivery phone
$user_data_delivery_phone_array = array('id' => 'phone_delivery', 'maxlength' => '255', 'class' => 'form-control');
if($user_config->get('validate_phone') == 1){
$user_data_delivery_phone_array += array('aria-required'=>"true");
if ($sf_request->getError('user_data_delivery{phone}')){
$user_data_delivery_phone_array += array('aria-describedby'=>"error_phone_billing", 'aria-invalid'=>"true");
}
}
$smarty->assign('input_delivery_phone', input_tag('user_data_delivery[phone]', $userDataDelivery->getPhone(), $user_data_delivery_phone_array));
}
$smarty->assign('save_submit',submit_tag(__('Zapisz'),array('name'=>'submit_save')));
$smarty->assign('hidden_delivery_id', input_hidden_tag('user_data_delivery[id]', $userDataDelivery->getId()));
$smarty->assign('hidden_billing_id', input_hidden_tag('user_data_billing[id]', $userDataBilling->getId()));
$smarty->display('userdata_create_first_user_data.html');
?>

View File

@@ -0,0 +1,235 @@
<?php
use_helper('stCurrency', 'stText', 'stProductImage', 'stUrl', 'stProductOptions', 'stAvailability');
sfLoader::loadHelpers('stProduct', 'stProduct');
?>
<?php st_theme_use_stylesheet('stUser.css') ?>
<?php
$smarty->assign('tab', $tab);
$smarty->assign('is_authenticated', $is_authenticated);
$results = array();
if (isset($product_pager))
{
$config = stConfig::getInstance('stProduct');
foreach ($product_pager->getResults() as $product)
{
$photo_max_height = st_asset_thumbnail_setting('height', 'small');
$photo_max_width = st_asset_thumbnail_setting('width', 'small');
$description_type = $config->get('description_type_long');
$cut_description = $config->get('cut_description_long');
$max_desc_length = $config->get('cut_description_num_long');
$cut_name = $config->get('cut_name_long');
$max_name_length = $config->get('cut_name_num_long');
$cut_code = $config->get('cut_code_long');
$max_code_length = $config->get('cut_code_num_long');
$weight_unit = $config->get('weight_unit');
$url_params = array(
'module' => 'stProduct',
'action' => 'show',
);
$url_params['url'] = $product->getUrl();
$product_url = st_url_for($url_params);
$product_name = $product->getName();
$row['instance'] = $product;
if ($cut_name && st_check_strlen($product_name) > $max_name_length + 1)
{
$row['name'] = '<span title="'.$product_name.'" class="hint">' . content_tag('a', st_truncate_text($product_name, $max_name_length, '...'), array('href' => $product_url, 'class' => 'product_name')) . '</span>';
}
else
{
$row['name'] = content_tag('a', $product_name, array('href' => $product_url, 'class' => 'product_name'));
}
if ($cut_code && st_check_strlen($product->getCode()) > $max_code_length)
{
$row['code'] = '<span title="'.$product->getCode().'" class="hint">' . content_tag('a', st_truncate_text($product->getCode(), $max_code_length, '...'), array('href' => $product_url, 'class' => 'product_name')) . '</span>';
}
else
{
$row['code'] = content_tag('a', $product->getCode(), array('href' => $product_url));
}
$row['id'] = $product->getId();
$row['photo'] = content_tag('a', st_product_image_tag($product, 'small'), array('href' => $product_url));
$row['photo_max_height'] = $photo_max_height;
$row['colors'] = st_get_component('stProductOptionsFrontend', 'colors', array('product' => $product));
$row['uom'] = st_product_uom($product);
$row['stock'] = $product->getStock();
if ($product->isPriceVisible())
{
if ($config->get('show_uom_long') && $product->getUom())
{
$uom = " / ".$row['uom'];
}else{
$uom = "";
}
$row['price'] = st_currency_format($product->getPriceBrutto(true)).$uom;
$row['price_net'] = st_currency_format($product->getPriceNetto(true)).$uom;
$row['price_brutto_pure'] = $product->getPriceBrutto(true).$uom;
$row['price_netto_pure'] = $product->getPriceNetto(true).$uom;
$currency = stCurrency::getInstance(sfContext::getInstance());
if ($currency->getFrontSymbol())
{
$row['currency'] = $currency->getFrontSymbol();
}
else
{
$row['currency'] = $currency->getBackSymbol();
}
$old_price_brutto = $product->getOldPriceBrutto(true);
$row['check_old_price'] = $old_price_brutto != 0;
$row['old_price'] = st_currency_format($old_price_brutto);
$row['old_price_net'] = st_currency_format($product->getOldPriceNetto(true));
$row['discount'] = $product->getDiscountInPercent();
$row['check_price'] = false;
if ($config->get('show_basic_price_long') && $product->hasBasicPrice() && $product->getBasicPriceBrutto()!=0)
{
$row['basic_price'] = array(
'netto' => st_currency_format($product->getBasicPriceNetto(true)),
'brutto' => st_currency_format($product->getBasicPriceBrutto(true)),
'quantity' => st_product_basic_price_quantity($product),
'for_quantity' => st_product_basic_price_for_quantity($product),
);
}
else
{
$row['basic_price'] = null;
}
}
else
{
$row['check_price'] = true;
}
$row['points_value'] = $product->getPointsValue();
$row['points_earn'] = $product->getPointsEarn();
$row['points_only'] = $product->getPointsOnly();
// 7
if ($description_type == 'short')
{
if ($cut_description && st_check_strlen($product->getShortDescription()) > $max_desc_length)
{
$row['description'] = st_truncate_text($product->getShortDescription(), $max_desc_length, '...');
}
else
{
$row['description'] = strip_tags($product->getShortDescription());
}
}
elseif ($description_type == 'full')
{
if ($cut_description && st_check_strlen($product->getDescription()) > $max_desc_length)
{
$row['description'] = st_truncate_text($product->getDescription(), $max_desc_length, '...');
}
else
{
$row['description'] = strip_tags($product->getDescription());
}
}
$row['availability'] = st_availability_show($product);
$row['name_without_link'] = $product_name;
$row['link'] = $product_url;
$row['my_groups'] = st_product_group_labels($product, $product_url, sfContext::getInstance()->getUser()->getCulture());
$row['weight'] = $config->get('show_weight_long') && $product->getWeight() ? $product->getWeight().' '.$weight_unit : '';
$row['name'] = $product->getName();
$results[] = $row;
}
$smarty->assign("show_name", $config->get('show_name_long'));
$smarty->assign("show_image", $config->get('show_image_long'));
$smarty->assign("show_code", $config->get('show_code_long'));
$smarty->assign("show_price", $config->get('show_price_long'));
$smarty->assign("show_old_price", $config->get('show_old_price_long'));
$smarty->assign("show_discount", $config->get('show_discount_long'));
$smarty->assign("show_basket", $config->get('show_basket_long'));
$smarty->assign("price_view", $config->get('price_view_long'));
$smarty->assign("show_description", $config->get('show_description_long'));
$smarty->assign('show_weight', $config->get('show_weight_long'));
$smarty->assign('button_type', $config->get('button_type_long'));
$smarty->assign('show_stock', $config->get('show_depository_long'));
$smarty->assign('show_availability', $config->get('show_availability_long'));
$config_observe = stConfig::getInstance(sfContext::getInstance(), 'stProductObserveBackend');
$smarty->assign('is_observe_enabled', $config_observe->get('enabled'));
$smarty->assignPartial('pager', 'stUserData', 'pager', array('product_pager' => $product_pager, 'type' => $type, 'action' => 'productList'));
}
$smarty->assign('results', $results);
$smarty->display('userdata_product_list.html')
?>

View File

@@ -0,0 +1,296 @@
<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}

View File

@@ -285,6 +285,19 @@
<script type="text/javascript">
jQuery(function ($) {
$('#st_form-user-compatibility-opinion, #user_data_billing_terms').attr('required', 'required');
$( '#address_billing' ).attr( 'placeholder', 'Ulica i numer budynku' );
// code_billing
$('#code_billing').attr('placeholder', 'Kod pocztowy');
// town_billing
$('#town_billing').attr('placeholder', 'Miejscowość');
// phone_billing
$('#phone_billing').attr('placeholder', 'Telefon kontaktowy');
// email_billing
$('#email_billing').attr('placeholder', 'Adres e-mail');
// company_billing
$('#company_billing').attr('placeholder', 'Nazwa firmy');
// nip_billing
$('#nip_billing').attr('placeholder', 'NIP firmy');
$(document).ready(function () {
$("#password1_billing").pstrength();
@@ -309,6 +322,7 @@
$("#order_form_delivery").toggle();
});
$("#full_name_billing").attr("placeholder", "Imię i nazwisko" );
var star_placeholder_billing = $("#full_name_billing").attr("placeholder");
var no_star_placeholder_billing = star_placeholder_billing.substring(2);
@@ -337,6 +351,7 @@
$('#full_name_billing' ).hide().removeAttr('required');
});
$("#full_name_delivery").attr("placeholder", "Imię i nazwisko" );
var star_placeholder_delivery = $("#full_name_delivery").attr("placeholder");
var no_star_placeholder_delivery = star_placeholder_delivery.substring(2);
@@ -421,4 +436,9 @@ $(document).ready(function () {
});
</script>
<style>
#shopping-cart input, #shopping-cart select {
position: static !important;
}
</style>
{/literal}

View File

@@ -25,9 +25,9 @@
<div class="col-sm-6">
<div id="order_form_billing" class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">
<div class="panel-title h3">
{__ text="Dane płatnika"}
</h3>
</div>
</div>
<div class="panel-body ">
{if $is_authenticated && $external_account}
@@ -38,7 +38,7 @@
</div>
{/if}
{$billing_profiles}
<div id="user_billing_profile_container">{$billing_profiles}</div>
<div id="user_billing_form_content">
{st_get_component module="stUserData" component="orderFormBilling"}
</div>
@@ -49,12 +49,12 @@
<div class="col-sm-6">
<div id="order_form_delivery" class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">
<div class="panel-title h3">
{__ text="Dane wysyłkowe"}
</h3>
</div>
</div>
<div class="panel-body">
{$delivery_profiles}
<div id="user_delivery_profile_container">{$delivery_profiles}</div>
<div id="user_delivery_form_content">
{st_get_component module="stUserData" component="orderFormDelivery"}
</div>
@@ -71,5 +71,4 @@
</div>
<br />
</form>
{/if}

View File

@@ -0,0 +1,330 @@
{set layout="one_column"}
<div id="user-dashobord-address" class="user-dashobord">
<div class="row">
<div class="col-sm-12 col-md-12">
{st_get_component module="stUserData" component="responsiveUserPanelBreadcrumbs" active_tab="7"}
</div>
</div>
<div class="row">
<div class="col-sm-3 col-md-3 sidebar">
{st_get_component module="stUserData" component="responsiveUserPanelMenu" active_tab="7"}
</div>
<div class="col-sm-9 col-md-9">
<div class="dashobord-info">
<h1>{__ text="Moje adresy"}</h1>
<p>{__ text="Zarządzaj swoimi adresami do wysyłki. Możesz dodawać nowe, edytować istniejące lub ustawić domyślny adres dla swoich zamówień."}</p>
</div>
<div class="h3">{__ text="Dane billingowe"}</div>
{foreach item=userData from=$userDataBillingDefault}
<div class="row" style="padding: 30px 0px; border-top: 1px solid #ccc;">
<div class="col-sm-3 col-md-3">
{if $userData->getCompany() neq ""}
<span>{__ text="Firma"}:</span><br>
<b>{$userData->getCompany()}</b>
<br />
{if $userData->getVatNumber() neq ""}
{$userData->getVatNumber()}
<br />
{/if}
{else}
<span>{__ text="Imię i nazwisko"}:</span><br>
<b>{$userData->getFullName()}</b>
<br />
{if $userData->getPesel() neq ""}
{__ text="PESEL"}&nbsp;{$userData->getPesel()}
<br />
{/if}
{/if}
</div>
<div class="col-sm-3 col-md-3">
<span>{__ text="Adres"}:</span><br>
<b>
{if $userData->getAddress() neq ""}
{$userData->getAddress()}
<br />
{/if}
{if $userData->getAddressMore() neq ""}
{$userData->getAddressMore()}
<br />
{/if}
{if $userData->getRegion() neq ""}
{$userData->getRegion()}
<br />
{/if}
{if $userData->getCode() neq "" && $userData->getTown() neq ""}
{$userData->getCode()} {$userData->getTown()}
<br />
{/if}
{if $userData->getCountries() neq ""}
{$userData->getCountries()}
<br />
{/if}
</b>
</div>
<div class="col-sm-2 col-md-2">
<span>{__ text="Telefon"}:</span><br>
{if $userData->getPhone() neq ""}
<b>{$userData->getPhone()}</b>
{/if}
</div>
<div class="col-sm-4 col-md-4 text-right">
<span style="margin-top: 10px; display: inline-block; margin-right: 10px;">{__ text="Domyślny adres"}</span> <a href="{$userData->url_edit}" class="btn btn-default pull-right">{__ text="Edytuj"}</a>
</div>
</div>
{/foreach}
{foreach item=userData from=$userDataBilling}
{if $userData->getIsDefault() != 1}
<div class="row" style="padding: 30px 0px; border-top: 1px solid #ccc;">
<div class="col-sm-3 col-md-3">
{if $userData->getCompany() neq ""}
<span>{__ text="Firma"}:</span><br>
<b>{$userData->getCompany()}</b>
<br />
{if $userData->getVatNumber() neq ""}
{$userData->getVatNumber()}
<br />
{/if}
{else}
<span>{__ text="Imię i nazwisko"}:</span><br>
<b>{$userData->getFullName()}</b>
<br />
{if $userData->getPesel() neq ""}
{__ text="PESEL"}&nbsp;{$userData->getPesel()}
<br />
{/if}
{/if}
</div>
<div class="col-sm-3 col-md-3">
<span>{__ text="Adres"}:</span><br>
<b>
{if $userData->getAddress() neq ""}
{$userData->getAddress()}
<br />
{/if}
{if $userData->getAddressMore() neq ""}
{$userData->getAddressMore()}
<br />
{/if}
{if $userData->getRegion() neq ""}
{$userData->getRegion()}
<br />
{/if}
{if $userData->getCode() neq "" && $userData->getTown() neq ""}
{$userData->getCode()} {$userData->getTown()}
<br />
{/if}
{if $userData->getCountries() neq ""}
{$userData->getCountries()}
<br />
{/if}
</b>
</div>
<div class="col-sm-2 col-md-2">
<span>{__ text="Telefon"}:</span><br>
{if $userData->getPhone() neq ""}
<b>{$userData->getPhone()}</b>
{/if}
</div>
<div class="col-sm-4 col-md-4">
<a href="{$userData->url_delete}" class="btn btn-default pull-right"><span class="glyphicon glyphicon-trash"></span></a>
<a href="{$userData->url_edit}" class="btn btn-default pull-right" style="margin-right: 10px;">{__ text="Edytuj"}</a>
</div>
</div>
{/if}
{/foreach}
<div class="row" style="padding: 30px 0px; border-top: 1px solid #ccc;">
<a href="/user_data/createProfile/userDataType/billing" class="btn btn-default pull-right">{__ text="Dodaj nowy adres"}</a>
</div>
<div class="h3">{__ text="Dane dostawy"}</div>
{foreach item=userData from=$userDataDeliveryDefault}
<div class="row" style="padding: 30px 0px; border-top: 1px solid #ccc;">
<div class="col-sm-3 col-md-3">
{if $userData->getCompany() neq ""}
<span>{__ text="Firma"}:</span><br>
<b>{$userData->getCompany()}</b>
<br />
{if $userData->getVatNumber() neq ""}
{$userData->getVatNumber()}
<br />
{/if}
{else}
<span>{__ text="Imię i nazwisko"}:</span><br>
<b>{$userData->getFullName()}</b>
<br />
{/if}
</div>
<div class="col-sm-3 col-md-3">
<span>{__ text="Adres"}:</span><br>
<b>
{if $userData->getAddress() neq ""}
{$userData->getAddress()}
<br />
{/if}
{if $userData->getAddressMore() neq ""}
{$userData->getAddressMore()}
<br />
{/if}
{if $userData->getRegion() neq ""}
{$userData->getRegion()}
<br />
{/if}
{if $userData->getCode() neq "" && $userData->getTown() neq ""}
{$userData->getCode()} {$userData->getTown()}
<br />
{/if}
{if $userData->getCountries() neq ""}
{$userData->getCountries()}
<br />
{/if}
</b>
</div>
<div class="col-sm-2 col-md-2">
<span>{__ text="Telefon"}:</span><br>
{if $userData->getPhone() neq ""}
<b>{$userData->getPhone()}</b>
{/if}
</div>
<div class="col-sm-4 col-md-4 text-right">
<span style="margin-top: 10px; display: inline-block; margin-right: 10px;">{__ text="Domyślny adres"}</span><a href="{$userData->url_edit}" class="btn btn-default pull-right">{__ text="Edytuj"}</a>
</div>
</div>
{/foreach}
{foreach item=userData from=$userDataDelivery}
{if $userData->getIsDefault() != 1}
<div class="row" style="padding: 30px 0px; border-top: 1px solid #ccc;">
<div class="col-sm-3 col-md-3">
{if $userData->getCompany() neq ""}
<span>{__ text="Firma"}:</span><br>
<b>{$userData->getCompany()}</b>
<br />
{if $userData->getVatNumber() neq ""}
{$userData->getVatNumber()}
<br />
{/if}
{else}
<span>{__ text="Imię i nazwisko"}:</span><br>
<b>{$userData->getFullName()}</b>
<br />
{/if}
</div>
<div class="col-sm-3 col-md-3">
<span>{__ text="Adres"}:</span><br>
<b>
{if $userData->getAddress() neq ""}
{$userData->getAddress()}
<br />
{/if}
{if $userData->getAddressMore() neq ""}
{$userData->getAddressMore()}
<br />
{/if}
{if $userData->getRegion() neq ""}
{$userData->getRegion()}
<br />
{/if}
{if $userData->getCode() neq "" && $userData->getTown() neq ""}
{$userData->getCode()} {$userData->getTown()}
<br />
{/if}
{if $userData->getCountries() neq ""}
{$userData->getCountries()}
<br />
{/if}
</b>
</div>
<div class="col-sm-2 col-md-2">
<span>{__ text="Telefon"}:</span><br>
{if $userData->getPhone() neq ""}
<b>{$userData->getPhone()}</b>
{/if}
</div>
<div class="col-sm-4 col-md-4">
<a href="{$userData->url_delete}" class="btn btn-default pull-right"><span class="glyphicon glyphicon-trash"></span></a>
<a href="{$userData->url_edit}" class="btn btn-default pull-right" style="margin-right: 10px;">{__ text="Edytuj"}</a>
</div>
</div>
{/if}
{/foreach}
<div class="row" style="padding: 30px 0px; border-top: 1px solid #ccc;">
<a href="/user_data/createProfile/userDataType/delivery" class="btn btn-default pull-right">{__ text="Dodaj nowy adres"}</a>
</div>
</div>
</div>
</div>

View File

@@ -1,226 +1,274 @@
{set layout="one_column"}
{st_get_component module="stUserData" component="responsiveUserPanelMenu" active_tab="1"}
<div id="create-first-user-data" >
{$form_start}
<div class="panel panel-default center-block">
<div class="panel-heading">
<h3 class="panel-title">
{__ text="Dane płatnika"}
</h3>
<div id="user-dashobord-home" class="user-dashobord">
<div class="row">
<div class="col-sm-12 col-md-12">
{st_get_component module="stUserData" component="responsiveUserPanelBreadcrumbs" active_tab="1"}
</div>
</div>
<div class="panel-body">
<div class="row">
<div class="col-sm-6 col-lg-6">
<div class="radio">
<label>
{$radio_billing_customer_type1}
{$label_billing_customer_type1}
</label>
</div>
</div>
<div class="col-sm-6 col-lg-6">
<div class="radio">
<label> {$radio_billing_customer_type2}
{$label_billing_customer_type2} </label>
</div>
</div>
</div>
<div id="company_fields">
<div class="form-group {if $error_company!=''}has-error{/if}">
{if $error_company!=""}<label class="control-label" for="company">{$error_company}</label>{/if}
{$input_company}
</div>
<div class="form-group {if $error_nip!=''}has-error{/if}">
{if $error_nip!=""}<label class="control-label" for="company">{$error_nip}</label>{/if}
{$input_nip}
</div>
</div>
<div class="form-group {if $error_full_name!=''}has-error{/if}">
{if $error_full_name!=""}<label class="control-label" for="full_name">{$error_full_name}</label>{/if}
{$input_full_name}
</div>
<div class="form-group {if $error_address!=''}has-error{/if}">
{if $error_address!=""}<label class="control-label" for="address">{$error_address}</label>{/if}
{$input_address}
</div>
{if $show_address_more==1}
<div class="form-group">
{$input_address_more}
</div>
{/if}
{if $show_region==1}
<div class="form-group">
{$input_region}
</div>
{/if}
<div class="row">
<div class="col-sm-6 col-lg-4">
<div class="form-group {if $error_code!=''}has-error{/if}">
{if $error_code!=""}<label class="control-label" for="code">{$error_code}</label>{/if}
{$input_code}
</div>
</div>
<div class="col-sm-6 col-lg-8">
<div class="form-group {if $error_town!=''}has-error{/if}">
{if $error_town!=""}<label class="control-label" for="town">{$error_town}</label>{/if}
{$input_town}
</div>
</div>
</div>
<div class="form-group">
{$select_country}
</div>
{if $show_pesel==1}
<div class="form-group">
{$input_pesel}
</div>
{/if}
<div class="form-group {if $error_phone!=''}has-error{/if}">
{if $error_phone!=""}<label class="control-label" for="phone">{$error_phone}</label>{/if}
{$input_phone}
</div>
<div class="checkbox">
<label> {$checkbox_delivery} {__ text="Inne dane wysyłkowe"} </label>
</div>
<div class="row">
<div class="col-sm-3 col-md-3 sidebar">
{st_get_component module="stUserData" component="responsiveUserPanelMenu" active_tab="1"}
</div>
<div class="col-sm-9 col-md-9">
<h1>{__ text="Dodaj dane klienta"}</h1>
<div id="billing-submit" class="panel-body">
<button type="submit" class="btn btn-primary pull-right" >
{__ text="Zapisz"}
</button>
</div>
</div>
<div id="create_user_delivery" class="panel-default">
<div class="panel panel-default center-block" style="margin-top: 10px;">
<div class="panel-heading">
<h3 class="panel-title">
{__ text="Dane wysyłkowe"}
</h3>
</div>
<div id="create-first-user-data" >
{$form_start}
<div class="panel panel-default center-block">
<div class="panel-body">
<div class="row">
<div class="col-sm-6 col-lg-6">
<div class="radio">
{$radio_billing_customer_type1}
<label for="user_data_billing_customer_type_1">{$label_billing_customer_type1}</label>
</div>
</div>
<div class="col-sm-6 col-lg-6">
<div class="radio">
{$radio_billing_customer_type2}
<label for="user_data_billing_customer_type_2" class="radio-inline">{$label_billing_customer_type2}</label>
</div>
</div>
</div>
<div id="company_fields">
<div class="form-group">
<label class="control-label" for="company_billing">{__ text="Firma"}</label>
<span class="required-mark" aria-hidden="true">*</span>
<div class="form-group-input{if $error_company!=''} has-error{/if}">
{$input_company}
{if $error_company!=""}<div class="control-label" id="error_company">{$error_company}</div>{/if}
</div>
</div>
<div class="panel-body">
<div class="row">
<div class="col-sm-6 col-lg-6">
<div class="radio">
<label> {$radio_delivery_customer_type1}
{$label_delivery_customer_type1} </label>
</div>
</div>
<div class="col-sm-6 col-lg-6">
<div class="radio">
<label> {$radio_delivery_customer_type2}
{$label_delivery_customer_type2} </label>
</div>
</div>
</div>
<div class="form-group">
<label class="control-label" for="nip_billing">{$nip_label}</label>
<span class="required-mark" aria-hidden="true">*</span>
<div class="form-group-input{if $error_nip!=''} has-error{/if}">
{$input_nip}
{if $error_nip!=""}<div class="control-label" id="error_vat">{$error_nip}</div>{/if}
</div>
</div>
</div>
<div id="company_delivery_fields">
<div class="form-group {if $error_delivery_company!=''}has-error{/if}">
{if $error_delivery_company!=""}<label class="control-label" for="company_delivery">{$error_delivery_company}</label>{/if}
{$input_delivery_company}
</div>
<div class="form-group">
<label class="control-label" for="full_name_billing">{__ text="Imię i nazwisko"}</label>
<span id="required-mark-full-name-billing" class="required-mark" aria-hidden="true">*</span>
<div class="form-group-input{if $error_full_name!=''} has-error{/if}">
{$input_full_name}
{if $error_full_name!=''}<div class="control-label" id="error_full_name">{$error_full_name}</div>{/if}
</div>
</div>
</div>
<div class="form-group {if $error_delivery_full_name!=''}has-error{/if}">
{if $error_delivery_full_name!=""}<label class="control-label" for="full_name_delivery">{$error_delivery_full_name}</label>{/if}
{$input_delivery_full_name}
</div>
<div class="form-group">
<label class="control-label" for="address_billing">{__ text="Ulica nr domu / nr lokalu"}</label>
<span class="required-mark" aria-hidden="true">*</span>
<div class="form-group-input{if $error_address!=''} has-error{/if}">
{$input_address}
{if $error_address!=""}<div class="control-label" id="error_address">{$error_address}</div>{/if}
</div>
</div>
<div class="form-group {if $error_delivery_address!=''}has-error{/if}">
{if $error_delivery_address!=""}<label class="control-label" for="address_delivery">{$error_delivery_address}</label>{/if}
{$input_delivery_address}
</div>
{if $show_address_more==1}
<div class="form-group">
<label class="control-label" for="address_more_billing">{__ text="Adres ciąg dalszy"}</label>
<div class="form-group-input">{$input_address_more}</div>
</div>
{/if}
{if $show_region==1}
<div class="form-group">
<label class="control-label" for="region_billing">{__ text="Województwo"}</label>
<div class="form-group-input">{$input_region}</div>
</div>
{/if}
{if $show_address_more==1}
<div class="form-group">
{$input_delivery_address_more}
</div>
{/if}
{if $show_region==1}
<div class="form-group">
{$input_delivery_region}
</div>
{/if}
<div class="row">
<div class="col-sm-6 col-lg-4">
<div class="form-group">
<label class="control-label" for="code_billing">{__ text="Kod"}</label>
<span class="required-mark" aria-hidden="true">*</span>
<div class="form-group-input{if $error_code!=''} has-error{/if}">
{$input_code}
{if $error_code!=""}<div class="control-label" id="error_code">{$error_code}</div>{/if}
</div>
</div>
</div>
<div class="col-sm-6 col-lg-8">
<div class="form-group">
<label class="control-label" for="town_billing">{__ text="Miasto"}</label>
<span class="required-mark" aria-hidden="true">*</span>
<div class="form-group-input{if $error_town!=''} has-error{/if}">
{$input_town}
{if $error_town!=""}<div class="control-label" id="error_town">{$error_town}</div>{/if}
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6 col-lg-4">
<div class="form-group">
<label class="control-label" for="billing_country">{__ text="Kraj"}</label>
<span class="required-mark" aria-hidden="true">*</span>
<div class="form-group-input">{$select_country}</div>
</div>
<div class="form-group {if $error_delivery_code!=''}has-error{/if}">
{if $error_delivery_code!=""}<label class="control-label" for="code_delivery">{$error_delivery_code}</label>{/if}
{$input_delivery_code}
</div>
{if $show_pesel==1}
<div class="form-group">
<label class="control-label" for="billing-pesel">{__ text="PESEL"}</label>
<div class="form-group-input">{$input_pesel}</div>
</div>
{/if}
<div class="form-group">
<label class="control-label" for="phone_billing">{__ text="Telefon"}</label>
{if $validate_phone==1}<span class="required-mark" aria-hidden="true">*</span>{/if}
<div class="form-group-input{if $error_phone!=''} has-error{/if}">
{$input_phone}
{if $error_phone!=''}<div class="control-label" id="error_phone">{$error_phone}</div>{/if}
</div>
</div>
<div class="checkbox">
<label>{$checkbox_delivery} {__ text="Inne dane wysyłkowe"} </label>
</div>
</div>
<div class="col-sm-6 col-lg-8">
<div class="form-group {if $error_delivery_town!=''}has-error{/if}">
{if $error_delivery_town!=""}<label class="control-label" for="town_delivery">{$error_delivery_town}</label>{/if}
{$input_delivery_town}
<div id="billing-submit" class="panel-body">
<button type="submit" class="btn btn-primary pull-right" >{__ text="Zapisz"}</button>
</div>
</div>
<div id="create_user_delivery" class="panel-default">
<div class="panel panel-default center-block" style="margin-top: 10px;">
<div class="panel-heading">
<div class="panel-title h3">
{__ text="Dane wysyłkowe"}
</div>
</div>
<div class="panel-body">
<div class="row">
<div class="col-sm-6 col-lg-6">
<div class="radio">
{$radio_delivery_customer_type1}
<label for="user_data_delivery_customer_type_1">{$label_delivery_customer_type1}</label>
</div>
</div>
<div class="col-sm-6 col-lg-6">
<div class="radio">
{$radio_delivery_customer_type2}
<label for="user_data_delivery_customer_type_2" class="radio-inline">{$label_delivery_customer_type2}</label>
</div>
</div>
</div>
<div id="company_delivery_fields">
<div class="form-group">
<label class="control-label" for="company_delivery">{__ text="Firma"}</label>
<span class="required-mark" aria-hidden="true">*</span>
<div class="form-group-input{if $error_delivery_company!=''} has-error{/if}">
{$input_delivery_company}
{if $error_delivery_company!=""}<div class="control-label" id="error_company_delivery">{$error_delivery_company}</div>{/if}
</div>
</div>
</div>
<div class="form-group">
<label class="control-label" for="full_name_delivery">{__ text="Imię i nazwisko"}</label>
<span id="required-mark-full-name-delivery" class="required-mark" aria-hidden="true">*</span>
<div class="form-group-input{if $error_delivery_full_name!=''} has-error{/if}">
{$input_delivery_full_name}
{if $error_delivery_full_name!=""}<div class="control-label" id="error_full_name_delivery">{$error_delivery_full_name}</div>{/if}
</div>
</div>
<div class="form-group">
<label class="control-label" for="address_delivery">{__ text="Ulica nr domu / nr lokalu"}</label>
<span class="required-mark" aria-hidden="true">*</span>
<div class="form-group-input{if $error_delivery_address!=''} has-error{/if}">
{$input_delivery_address}
{if $error_delivery_address!=""}<div class="control-label" id="error_address_delivery">{$error_delivery_address}</div>{/if}
</div>
</div>
{if $show_address_more==1}
<div class="form-group">
<label class="control-label" for="address_more_delivery">{__ text="Adres ciąg dalszy"}</label>
<div class="form-group-input">{$input_delivery_address_more}</div>
</div>
{/if}
{if $show_region==1}
<div class="form-group">
<label class="control-label" for="region_delivery">{__ text="Województwo"}</label>
<div class="form-group-input">{$input_delivery_region}</div>
</div>
{/if}
<div class="row">
<div class="col-sm-6 col-lg-4">
<div class="form-group">
<label class="control-label" for="code_delivery">{__ text="Kod"}</label>
<span class="required-mark" aria-hidden="true">*</span>
<div class="form-group-input{if $error_delivery_code!=''} has-error{/if}">
{$input_delivery_code}
{if $error_delivery_code!=""}<div class="control-label" id="error_code_delivery">{$error_delivery_code}</div>{/if}
</div>
</div>
</div>
<div class="col-sm-6 col-lg-8">
<div class="form-group">
<label class="control-label" for="town_delivery">{__ text="Miasto"}</label>
<span class="required-mark" aria-hidden="true">*</span>
<div class="form-group-input{if $error_delivery_town!=''} has-error{/if}">
{$input_delivery_town}
{if $error_delivery_town!=""}<div class="control-label" id="error_town_delivery">{$error_delivery_town}</div>{/if}
</div>
</div>
</div>
</div>
<div class="form-group">
<label class="control-label" for="user_data_delivery_country">{__ text="Kraj"}</label>
<span class="required-mark" aria-hidden="true">*</span>
<div class="form-group-input">
{$select_delivery_country}
</div>
</div>
<div class="form-group">
<label class="control-label" for="phone_delivery">{__ text="Telefon"}</label>
{if $validate_phone==1}<span class="required-mark" aria-hidden="true">*</span>{/if}
<div class="form-group-input{if $error_delivery_phone!=''} has-error{/if}">
{$input_delivery_phone}
{if $error_delivery_phone!=""}<div class="control-label" id="error_phone_delivery">{$error_delivery_phone}</div>{/if}
</div>
</div>
</div>
<div id="delivery-submit" class="panel-body">
<button type="submit" class="btn btn-primary pull-right" >{__ text="Zapisz"}</button>
</div>
</div>
</div>
<div class="form-group">
{$select_delivery_country}
</div>
{$hidden_delivery_id}
{$hidden_billing_id}
{if $show_pesel==1}
<div class="form-group">
{$input_delivery_pesel}
</div>
{/if}
<div class="form-group {if $error_delivery_phone!=''}has-error{/if}">
{if $error_delivery_phone!=""}<label class="control-label" for="phone_delivery">{$error_delivery_phone}</label>{/if}
{$input_delivery_phone}
</div>
</form>
</div>
</div>
<div id="delivery-submit" class="panel-body">
<button type="submit" class="btn btn-primary pull-right" >
{__ text="Zapisz"}
</button>
</div>
</div>
</div>
{$hidden_delivery_id}
{$hidden_billing_id}
</form>
</div>
{literal}
@@ -277,49 +325,42 @@
});
var star_placeholder_billing = $("#full_name_billing").attr("placeholder");
var no_star_placeholder_billing = star_placeholder_billing.substring(2);
if ($('#user_data_billing_customer_type_2').attr('checked')) {
$("#company_fields").show();
$("#full_name_billing").attr("placeholder", no_star_placeholder_billing);
} else {
$("#company_fields").hide();
$("#full_name_billing").attr("placeholder", star_placeholder_billing);
}
$('#user_data_billing_customer_type_1').click(function() {
$("#company_fields").hide();
$("#full_name_billing").attr("placeholder", star_placeholder_billing);
});
$('#user_data_billing_customer_type_2').click(function() {
$("#company_fields").show();
$("#full_name_billing").attr("placeholder", no_star_placeholder_billing);
});
var star_placeholder_delivery = $("#full_name_delivery").attr("placeholder");
var no_star_placeholder_delivery = star_placeholder_delivery.substring(2);
if ($('#user_data_delivery_customer_type_2').attr('checked')) {
$("#company_delivery_fields").show();
$("#full_name_delivery").attr("placeholder", no_star_placeholder_delivery);
} else {
$("#company_delivery_fields").hide();
$("#full_name_delivery").attr("placeholder", star_placeholder_delivery);
}
const billingFullName = $("#full_name_billing");
const billingFullNameSpan = $("#required-mark-full-name-billing");
$('#user_data_delivery_customer_type_1').click(function() {
$("#company_delivery_fields").hide();
$("#full_name_delivery").attr("placeholder", star_placeholder_delivery);
});
$('#user_data_delivery_customer_type_2').click(function() {
$("#company_delivery_fields").show();
$("#full_name_delivery").attr("placeholder", no_star_placeholder_delivery);
});
$('#user_data_billing_customer_type_2, #user_data_billing_customer_type_1').click(function() {
var radio = $(this);
if (radio.val() == 1) {
$("#company_fields").hide();
billingFullName.attr("aria-required", "true");
billingFullNameSpan.css("display", "inline");
} else {
$("#company_fields").show();
billingFullName.removeAttr("aria-required");
billingFullNameSpan.css("display", "none");
}
}).filter(':checked').click();
const deliveryFullName = $("#full_name_delivery");
const deliveryFullNameSpan = $("#required-mark-full-name-delivery");
$('#user_data_delivery_customer_type_2, #user_data_delivery_customer_type_1').click(function() {
var radio = $(this);
if (radio.val() == 1) {
$("#company_delivery_fields").hide();
deliveryFullName.attr("aria-required", "true");
deliveryFullNameSpan.css("display", "inline");
} else {
$("#company_delivery_fields").show();
deliveryFullName.removeAttr("aria-required");
deliveryFullNameSpan.css("display", "none");
}
}).filter(':checked').click();
});

View File

@@ -1,10 +1,25 @@
{set layout="one_column"}
<div class="user-control">
{st_get_component module="stUserData" component="responsiveUserPanelMenu" active_tab="51"}
<div id="user-dashobord-address" class="user-dashobord">
<div class="row">
<div class="col-sm-12 col-md-12">
{st_get_component module="stUserData" component="responsiveUserPanelBreadcrumbs" active_tab="7"}
</div>
</div>
<div id="edit-profile">
{$edit_profile_form}
</div>
<div class="row">
<div class="col-sm-3 col-md-3 sidebar">
{st_get_component module="stUserData" component="responsiveUserPanelMenu" active_tab="7"}
</div>
<div class="col-sm-9 col-md-9">
<h1>Edytuj dane klienta</h1>
<div id="edit-profile">
{$edit_profile_form}
</div>
</div>
</div>
</div>

View File

@@ -1,12 +1,12 @@
<div id="edit-profile-form" class="panel panel-default center-block">
<div class="panel-heading">
<h3 class="panel-title">
<div class="panel-title h3">
{if isset($billing_data)}
{__ text="Dane płatnika"}
{else}
{__ text="Dane wysyłkowe"}
{/if}
</h3>
</div>
</div>
<div class="panel-body">
@@ -14,10 +14,6 @@
{if $show_message}
<div class="alert alert-success" role="alert">{__ text="Dane zostały zaktualizowane."}</div>
{/if}
{if $show_add!=""}
{$edit_profiles}
{/if}
{$form_start}
@@ -25,99 +21,127 @@
<div id="user_edit_profile_content">
<div class="row">
<div class="col-sm-6 col-lg-6">
<div class="radio">
<label>
<div class="col-sm-6 col-lg-6">
<div class="radio">
{$radio_customer_type1}
{$label_customer_type1}
</label>
</div>
</div>
<div class="col-sm-6 col-lg-6">
<div class="radio">
<label>
{$radio_customer_type2}
{$label_customer_type2}
</label>
</div>
</div>
</div>
<label for="user_data_customer_type_1">{$label_customer_type1}</label>
</div>
</div>
<div class="col-sm-6 col-lg-6">
<div class="radio">
{$radio_customer_type2}
<label for="user_data_customer_type_2" class="radio-inline">{$label_customer_type2}</label>
</div>
</div>
</div>
<div id="company_fields">
<div class="form-group {if $error_company!=''}has-error{/if}">
{if $error_company!=""}<label class="control-label" for="company">{$error_company}</label>{/if}
{$input_company}
<div class="form-group">
<label class="control-label" for="company">{__ text="Firma"}</label>
<span class="required-mark" aria-hidden="true">*</span>
<div class="form-group-input{if $error_company!=''} has-error{/if}">
{$input_company}
{if $error_company!=""}<div class="control-label" id="error_company">{$error_company}</div>{/if}
</div>
</div>
{if isset($billing_data)}
<div class="form-group {if $error_nip!=''}has-error{/if}">
{if $error_nip!=""}<label class="control-label" for="nip">{$error_nip}</label>{/if}
{$input_nip}
<div class="form-group">
<label class="control-label" for="nip">{$nip_label}</label>
<span class="required-mark" aria-hidden="true">*</span>
<div class="form-group-input{if $error_nip!=''} has-error{/if}">
{$input_nip}
{if $error_nip!=""}<div class="control-label" id="error_nip">{$error_nip}</div>{/if}
</div>
</div>
{/if}
</div>
<div class="form-group {if $error_full_name!=''}has-error{/if}">
{if $error_full_name!=""}<label class="control-label" for="full_name">{$error_full_name}</label>{/if}
<div class="form-group">
<label class="control-label" for="full_name">{__ text="Imię i nazwisko"}</label>
<span id="required-mark-full-name" class="required-mark" aria-hidden="true">*</span>
<div class="form-group-input{if $error_full_name!=''} has-error{/if}">
{$input_full_name}
{if $error_full_name!=''}<div class="control-label" id="error_full_name">{$error_full_name}</div>{/if}
</div>
</div>
<div class="form-group {if $error_address!=''}has-error{/if}">
{if $error_address!=""}<label class="control-label" for="address">{$error_address}</label>{/if}
{$input_address}
<div class="form-group">
<label class="control-label" for="address">{__ text="Ulica nr domu / nr lokalu"}</label>
<span class="required-mark" aria-hidden="true">*</span>
<div class="form-group-input{if $error_address!=''} has-error{/if}">
{$input_address}
{if $error_address!=""}<div class="control-label" id="error_address">{$error_address}</div>{/if}
</div>
</div>
{if $show_address_more==1}
<div class="form-group">
{$input_address_more}
<label class="control-label" for="address_more">{__ text="Adres ciąg dalszy"}</label>
<div class="form-group-input">{$input_address_more}</div>
</div>
{/if}
{if $show_region==1}
<div class="form-group">
{$input_region}
<label class="control-label" for="region">{__ text="Województwo"}</label>
<div class="form-group-input">{$input_region}</div>
</div>
{/if}
<div class="row">
<div class="col-sm-6 col-lg-4">
<div class="form-group {if $error_code!=''}has-error{/if}">
{if $error_code!=""}<label class="control-label" for="code">{$error_code}</label>{/if}
{$input_code}
<div class="form-group">
<label class="control-label" for="code">{__ text="Kod"}</label>
<span class="required-mark" aria-hidden="true">*</span>
<div class="form-group-input{if $error_code!=''} has-error{/if}">
{$input_code}
{if $error_code!=""}<div class="control-label" id="error_code">{$error_code}</div>{/if}
</div>
</div>
</div>
</div>
<div class="col-sm-6 col-lg-8">
<div class="form-group {if $error_town!=''}has-error{/if}">
{if $error_town!=""}<label class="control-label" for="town">{$error_town}</label>{/if}
{$input_town}
<div class="form-group">
<label class="control-label" for="town">{__ text="Miasto"}</label>
<span class="required-mark" aria-hidden="true">*</span>
<div class="form-group-input{if $error_town!=''} has-error{/if}">
{$input_town}
{if $error_town!=""}<div class="control-label" id="error_town">{$error_town}</div>{/if}
</div>
</div>
</div>
</div>
</div>
<div class="form-group">
<div class="form-group">
<label class="control-label" for="user_data_country">{__ text="Kraj"}</label>
<span class="required-mark" aria-hidden="true">*</span>
<div class="form-group-input">
{$select_country}
</div>
</div>
{if $show_pesel==1}
<div class="form-group">
{$input_pesel}
<label class="control-label" for="pesel">{__ text="PESEL"}</label>
<div class="form-group-input">{$input_pesel}</div>
</div>
{/if}
<div class="form-group {if $error_phone!=''}has-error{/if}">
{if $error_phone!=""}<label class="control-label" for="phone">{$error_phone}</label>{/if}
{$input_phone}
<div class="form-group">
<label class="control-label" for="phone">{__ text="Telefon"}</label>
{if $validate_phone==1}<span class="required-mark" aria-hidden="true">*</span>{/if}
<div class="form-group-input{if $error_phone!=''} has-error{/if}">
{$input_phone}
{if $error_phone!=''}<div class="control-label" id="error_phone">{$error_phone}</div>{/if}
</div>
</div>
{if $is_default!=1}
{if $show_add==""}
<input id="st_form-user-default" type="hidden" value="1" name="user_data[isDefault]">
{else}
<div class="form-group">
<div class="checkbox">
@@ -126,15 +150,8 @@
</label>
</div>
</div>
{/if}
{if $show_add!=""}
<a class="btn btn-default pull-left" href="{$delete_url}">{__ text="Usuń"}</a>
{/if}
{else}
{else}
<div class="form-group">
<div class="checkbox">
<label>
@@ -158,48 +175,33 @@
{$hidden_userdata_id}
</div>
</form>
</form>
</div>
</div>
<div id="add-user-profile" class="center-block">
{if $show_add!=""}
{if isset($billing_data)}
<a href="/user_data/createProfile/userDataType/billing" class="btn btn-default pull-left">{__ text="Dodaj nowy adres"}</a>
{else}
<a href="/user_data/createProfile/userDataType/delivery" class="btn btn-default pull-left">{__ text="Dodaj nowy adres"}</a>
{/if}
{/if}
</div>
{literal}
<script type="text/javascript">
jQuery(function ($)
{
$(document).ready(function()
{
jQuery(function ($){
$(document).ready(function(){
var star_placeholder = $("#full_name").attr("placeholder");
var no_star_placeholder = star_placeholder.substring(2);
if($('#user_data_customer_type_2').attr('checked'))
{
$("#company_fields").show();
$("#full_name").attr("placeholder",no_star_placeholder);
}else{
$("#company_fields").hide();
$("#full_name").attr("placeholder",star_placeholder);
}
$('#user_data_customer_type_1').click(function(){
$("#company_fields").hide();
$("#full_name").attr("placeholder",star_placeholder);
});
$('#user_data_customer_type_2').click(function(){
$("#company_fields").show();
$("#full_name").attr("placeholder",no_star_placeholder);
});
const FullName = $("#full_name");
const FullNameSpan = $("#required-mark-full-name");
$('#user_data_customer_type_2, #user_data_customer_type_1').click(function() {
var radio = $(this);
if (radio.val() == 1) {
$("#company_fields").hide();
FullName.attr("aria-required", "true");
FullNameSpan.css("display", "inline");
} else {
$("#company_fields").show();
FullName.removeAttr("aria-required");
FullNameSpan.css("display", "none");
}
}).filter(':checked').click();
$( ".alert" ).addClass( "opacity_alert" );

View File

@@ -1,120 +1,157 @@
<div id="order_form_billing">
<div class="panel panel-default">
<div class="panel-heading"><h3 class="panel-title">{__ text="Dane płatnika"} / {__ text="Zamówienie bez logowania"}</h3></div>
<div class="panel-heading"><div class="panel-title h3">{__ text="Dane płatnika"} / {__ text="Zamówienie bez logowania"}</div></div>
<div id="panel-billing" class="panel-body">
<div class="row">
<div class="col-sm-6 col-lg-6">
<div class="radio">
<label>
{$radio_billing_customer_type1}
{$label_billing_customer_type1}
</label>
{$radio_billing_customer_type1}
<label for="user_data_billing_customer_type_1">{$label_billing_customer_type1}</label>
</div>
</div>
<div class="col-sm-6 col-lg-6">
<div class="radio">
<label>
{$radio_billing_customer_type2}
{$label_billing_customer_type2}
</label>
<div class="radio">
{$radio_billing_customer_type2}
<label for="user_data_billing_customer_type_2" class="radio-inline">{$label_billing_customer_type2}</label>
</div>
</div>
</div>
<div id="company_billing_fields" class="company_billing_fields">
<div class="form-group {if $error_billing_company!=''}has-error{/if}">
{if $error_billing_company!=""}<label class="control-label" for="company_billing">{$error_billing_company}</label>{/if}
{$input_billing_company}
<div class="form-group">
<label class="control-label" for="company_billing">{__ text="Firma"}</label>
<span class="required-mark" aria-hidden="true">*</span>
<div class="form-group-input{if $error_billing_company!=''} has-error{/if}">
{$input_billing_company}
{if $error_billing_company!=""}<div class="control-label" id="error_company_billing">{$error_billing_company}</div>{/if}
</div>
</div>
<div class="form-group {if $error_billing_vat!=''}has-error{/if}">
{if $error_billing_vat!=""}<label class="control-label" for="company_billing">{$error_billing_vat}</label>{/if}
{$input_billing_nip}
<div class="form-group">
<label class="control-label" for="nip_billing">{$nip_billing_label}</label>
<span class="required-mark" aria-hidden="true">*</span>
<div class="form-group-input{if $error_billing_vat!=''} has-error{/if}">
{$input_billing_nip}
{if $error_billing_vat!=""}<div class="control-label" id="error_vat_billing">{$error_billing_vat}</div>{/if}
</div>
</div>
</div>
<div class="form-group {if $error_billing_full_name!=''}has-error{/if}">
{if $error_billing_full_name!=""}<label class="control-label" for="full_name_billing">{$error_billing_full_name}</label>{/if}
{$input_billing_full_name}
<div class="form-group">
<label class="control-label" for="full_name_billing">{__ text="Imię i nazwisko"}</label>
<span id="required-mark-full-name-billing" class="required-mark" aria-hidden="true">*</span>
<div class="form-group-input{if $error_billing_full_name!=''} has-error{/if}">
{$input_billing_full_name}
{if $error_billing_full_name!=''}<div class="control-label" id="error_full_name_billing">{$error_billing_full_name}</div>{/if}
</div>
</div>
<div class="form-group {if $error_billing_address!=''}has-error{/if}">
{if $error_billing_address!=""}<label class="control-label" for="address_billing">{$error_billing_address}</label>{/if}
{$input_billing_address}
<div class="form-group">
<label class="control-label" for="address_billing">{__ text="Ulica nr domu / nr lokalu"}</label>
<span class="required-mark" aria-hidden="true">*</span>
<div class="form-group-input{if $error_billing_address!=''} has-error{/if}">
{$input_billing_address}
{if $error_billing_address!=""}<div class="control-label" id="error_address_billing">{$error_billing_address}</div>{/if}
</div>
</div>
{if $show_address_more==1}
<div class="form-group">
{$input_billing_address_more}
<label class="control-label" for="address_more_billing">{__ text="Adres ciąg dalszy"}</label>
<div class="form-group-input">{$input_billing_address_more}</div>
</div>
{/if}
{if $show_region==1}
<div class="form-group">
{$input_billing_region}
<label class="control-label" for="region_billing">{__ text="Województwo"}</label>
<div class="form-group-input">{$input_billing_region}</div>
</div>
{/if}
<div class="row">
<div class="col-sm-6 col-lg-4">
<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}
{$input_billing_code}
<div class="form-group">
<label class="control-label" for="code_billing">{__ text="Kod"}</label>
<span class="required-mark" aria-hidden="true">*</span>
<div class="form-group-input{if $error_billing_code!=''} has-error{/if}">
{$input_billing_code}
{if $error_billing_code!=""}<div class="control-label" id="error_code_billing">{$error_billing_code}</div>{/if}
</div>
</div>
</div>
</div>
<div class="col-sm-6 col-lg-8">
<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}
{$input_billing_town}
<div class="form-group">
<label class="control-label" for="town_billing">{__ text="Miasto"}</label>
<span class="required-mark" aria-hidden="true">*</span>
<div class="form-group-input{if $error_billing_town!=''} has-error{/if}">
{$input_billing_town}
{if $error_billing_town!=""}<div class="control-label" id="error_town_billing">{$error_billing_town}</div>{/if}
</div>
</div>
</div>
</div>
</div>
<div class="form-group {if $error_billing_country!=''}has-error{/if}">
{if $error_billing_country!=""}<label class="control-label" for="country_billing">{$error_billing_country}</label>{/if}
<div class="form-group">
<label class="control-label" for="user_data_billing_country">{__ text="Kraj"}</label>
<span class="required-mark" aria-hidden="true">*</span>
<div class="form-group-input{if $error_billing_country!=''} has-error{/if}">
{$select_billing_country}
{if $error_billing_country!=""}<div class="control-label" id="error_country_billing">{$error_billing_country}</div>{/if}
</div>
</div>
{if $show_pesel==1}
<div class="form-group">
{$input_billing_pesel}
<label class="control-label" for="billing-pesel">{__ text="PESEL"}</label>
<div class="form-group-input">{$input_billing_pesel}</div>
</div>
{/if}
<div class="form-group {if $error_billing_phone!=''}has-error{/if}">
{if $error_billing_phone!=""}<label class="control-label" for="phone_billing">{$error_billing_phone}</label>{/if}
<div class="form-group">
<label class="control-label" for="phone_billing">{__ text="Telefon"}</label>
{if $validate_phone==1}<span class="required-mark" aria-hidden="true">*</span>{/if}
<div class="form-group-input{if $error_billing_phone!=''} has-error{/if}">
{$input_billing_phone}
{if $error_billing_phone!=''}<div class="control-label" id="error_phone_billing">{$error_billing_phone}</div>{/if}
</div>
</div>
<div class="form-group {if $error_billing_email!=''}has-error{/if}">
{if $error_billing_email!=""}<label class="control-label" for="email_billing">{$error_billing_email}</label>{/if}
{$input_billing_email}
<div class="form-group">
<label class="control-label" for="email_billing">{__ text="E-mail"}</label>
<span class="required-mark" aria-hidden="true">*</span>
<div class="form-group-input{if $error_billing_email!=''} has-error{/if}">
{$input_billing_email}
{if $error_billing_email!=""}<div class="control-label" id="error_email_billing">{$error_billing_email}</div>{/if}
</div>
</div>
<div class="checkbox">
<label>
{$checkbox_create_account} {__ text="Załóż konto"}
</label>
<label>{$checkbox_create_account} {__ text="Załóż konto"}</label>
</div>
<div id="account_fields">
<div class="form-group {if $error_billing_password1!=''}has-error{/if}">
{if $error_billing_password1!=""}<label class="control-label" for="password1_billing">{$error_billing_password1}</label>{/if}
{$input_billing_password1}
</div>
<div id="account_fields">
<div class="form-group">
<label class="control-label" for="password1_billing">{__ text="Hasło"}</label>
<span class="required-mark" aria-hidden="true">*</span>
<div class="form-group-input{if $error_billing_password1!=''} has-error{/if}">
{$input_billing_password1}
{if $error_billing_password1!=""}<div class="control-label" id="error_password1_billing">{$error_billing_password1}</div>{/if}
</div>
</div>
<div class="form-group {if $error_billing_password2!=''}has-error{/if}">
{if $error_billing_password2!=""}<label class="control-label" for="password2_billing">{$error_billing_password2}</label>{/if}
{$input_billing_password2}
<div class="form-group">
<label class="control-label" for="password2_billing">{__ text="Powtórz hasło"}</label>
<span class="required-mark" aria-hidden="true">*</span>
<div class="form-group-input{if $error_billing_password2!=''} has-error{/if}">
{$input_billing_password2}
{if $error_billing_password2!=""}<div class="control-label" id="error_password2_billing">{$error_billing_password2}</div>{/if}
</div>
</div>
<div class="checkbox">
<label class="{if $error_billing_privacy==1}checkbox_error{/if}">
@@ -122,13 +159,6 @@
</label>
</div>
</div>
{if $show_invoice_request==1 && $auto_invoice_request!=1}
<div class="checkbox">
<label>
{$checkbox_invoice} {__ text="Chcę otrzymać fakturę vat"}
</label>
</div>
{/if}
<div class="checkbox">
<label>
@@ -141,94 +171,107 @@
<div id="order_form_delivery" class="open panel panel-default">
<div class="panel-heading"><h3 class="panel-title">{__ text="Dane wysyłkowe"}</h3></div>
<div class="panel-heading"><div class="panel-title h3">{__ text="Dane wysyłkowe"}</div></div>
<div id="panel-delivery" class="panel-body">
<div class="row">
<div class="col-sm-6 col-lg-6">
<div class="radio">
<label>
<div class="col-sm-6 col-lg-6">
<div class="radio">
{$radio_delivery_customer_type1}
{$label_delivery_customer_type1}
</label>
<label for="user_data_delivery_customer_type_1">{$label_delivery_customer_type1}</label>
</div>
</div>
</div>
<div class="col-sm-6 col-lg-6">
<div class="radio">
<label>
{$radio_delivery_customer_type2}
{$label_delivery_customer_type2}
</label>
<div class="col-sm-6 col-lg-6">
<div class="radio">
{$radio_delivery_customer_type2}
<label for="user_data_delivery_customer_type_2" class="radio-inline">{$label_delivery_customer_type2}</label>
</div>
</div>
</div>
</div>
</div>
<div id="company_delivery_fields" class="company_delivery_fields">
<div class="form-group {if $error_delivery_company!=''}has-error{/if}">
{if $error_delivery_company!=""}<label class="control-label" for="company_delivery">{$error_delivery_company}</label>{/if}
{$input_delivery_company}
</div>
<div class="form-group">
<label class="control-label" for="company_delivery">{__ text="Firma"}</label>
<span class="required-mark" aria-hidden="true">*</span>
<div class="form-group-input{if $error_delivery_company!=''} has-error{/if}">
{$input_delivery_company}
{if $error_delivery_company!=""}<div class="control-label" id="error_company_delivery">{$error_delivery_company}</div>{/if}
</div>
</div>
</div>
<div class="form-group {if $error_delivery_full_name!=''}has-error{/if}">
{if $error_delivery_full_name!=""}<label class="control-label" for="full_name_delivery">{$error_delivery_full_name}</label>{/if}
{$input_delivery_full_name}
<div class="form-group">
<label class="control-label" for="full_name_delivery">{__ text="Imię i nazwisko"}</label>
<span id="required-mark-full-name-delivery" class="required-mark" aria-hidden="true">*</span>
<div class="form-group-input{if $error_delivery_full_name!=''} has-error{/if}">
{$input_delivery_full_name}
{if $error_delivery_full_name!=""}<div class="control-label" id="error_full_name_delivery">{$error_delivery_full_name}</div>{/if}
</div>
</div>
<div class="form-group {if $error_delivery_address!=''}has-error{/if}">
{if $error_delivery_address!=""}<label class="control-label" for="address_delivery">{$error_delivery_address}</label>{/if}
{$input_delivery_address}
<div class="form-group">
<label class="control-label" for="address_delivery">{__ text="Ulica nr domu / nr lokalu"}</label>
<span class="required-mark" aria-hidden="true">*</span>
<div class="form-group-input{if $error_delivery_address!=''} has-error{/if}">
{$input_delivery_address}
{if $error_delivery_address!=""}<div class="control-label" id="error_address_delivery">{$error_delivery_address}</div>{/if}
</div>
</div>
{if $show_address_more==1}
<div class="form-group">
{$input_delivery_address_more}
<label class="control-label" for="address_more_delivery">{__ text="Adres ciąg dalszy"}</label>
<div class="form-group-input">{$input_delivery_address_more}</div>
</div>
{/if}
{if $show_region==1}
<div class="form-group">
{$input_delivery_region}
<label class="control-label" for="region_delivery">{__ text="Województwo"}</label>
<div class="form-group-input">{$input_delivery_region}</div>
</div>
{/if}
<div class="row">
<div class="col-sm-6 col-lg-4">
<div class="form-group {if $error_delivery_code!=''}has-error{/if}">
{if $error_delivery_code!=""}<label class="control-label" for="code_delivery">{$error_delivery_code}</label>{/if}
{$input_delivery_code}
<div class="form-group">
<label class="control-label" for="code_delivery">{__ text="Kod"}</label>
<span class="required-mark" aria-hidden="true">*</span>
<div class="form-group-input{if $error_delivery_code!=''} has-error{/if}">
{$input_delivery_code}
{if $error_delivery_code!=""}<div class="control-label" id="error_code_delivery">{$error_delivery_code}</div>{/if}
</div>
</div>
</div>
<div class="col-sm-6 col-lg-8">
<div class="form-group {if $error_delivery_town!=''}has-error{/if}">
{if $error_delivery_town!=""}<label class="control-label" for="town_delivery">{$error_delivery_town}</label>{/if}
{$input_delivery_town}
<div class="form-group">
<label class="control-label" for="town_delivery">{__ text="Miasto"}</label>
<span class="required-mark" aria-hidden="true">*</span>
<div class="form-group-input{if $error_delivery_town!=''} has-error{/if}">
{$input_delivery_town}
{if $error_delivery_town!=""}<div class="control-label" id="error_town_delivery">{$error_delivery_town}</div>{/if}
</div>
</div>
</div>
</div>
<div class="form-group {if $error_delivery_country!=''}has-error{/if}">
{if $error_delivery_country!=""}<label class="control-label" for="country_delivery">{$error_delivery_country}</label>{/if}
{$select_delivery_country}
</div>
{if $show_pesel==1}
<div class="form-group">
{$input_delivery_pesel}
<label class="control-label" for="user_data_delivery_country">{__ text="Kraj"}</label>
<span class="required-mark" aria-hidden="true">*</span>
<div class="form-group-input{if $error_delivery_country!=''} has-error{/if}">
{$select_delivery_country}
{if $error_delivery_country!=""}<div class="control-label" id="error_country_delivery">{$error_delivery_country}</div>{/if}
</div>
</div>
{/if}
<div class="form-group {if $error_delivery_phone!=''}has-error{/if}">
{if $error_delivery_phone!=""}<label class="control-label" for="phone_delivery">{$error_delivery_phone}</label>{/if}
<div class="form-group">
<label class="control-label" for="phone_delivery">{__ text="Telefon"}</label>
{if $validate_phone==1}<span class="required-mark" aria-hidden="true">*</span>{/if}
<div class="form-group-input{if $error_delivery_phone!=''} has-error{/if}">
{$input_delivery_phone}
{if $error_delivery_phone!=""}<div class="control-label" id="error_phone_delivery">{$error_delivery_phone}</div>{/if}
</div>
</div>
{$additional_delivery_fields}
@@ -289,8 +332,6 @@
</div>
</div>
{$hidden_is_authenticated}
{foreach from=$hidden_fields item=value key=name}
<input type="hidden" name="{$name}" value="{$value}" id="{$name|id_from_name}">
{/foreach}
@@ -348,33 +389,36 @@ jQuery(function ($) {
}
}).change();
const billingFullName = $("#full_name_billing");
const starPlaceholderBilling = billingFullName.attr("placeholder");
const billingFullNameSpan = $("#required-mark-full-name-billing");
$('#user_data_billing_customer_type_2, #user_data_billing_customer_type_1').click(function() {
var radio = $(this);
if (radio.val() == 1) {
$(".company_billing_fields").hide();
billingFullName.attr("placeholder", starPlaceholderBilling);
billingFullName.attr("aria-required", "true");
billingFullNameSpan.css("display", "inline");
} else {
$(".company_billing_fields").show();
if (!billingFullName.hasClass('required')) {
billingFullName.attr("placeholder", starPlaceholderBilling.substring(2));
}
billingFullName.removeAttr("aria-required");
billingFullNameSpan.css("display", "none");
}
}).filter(':checked').click();
var star_placeholder_delivery = $("#full_name_delivery").attr("placeholder");
const deliveryFullName = $("#full_name_delivery");
const deliveryFullNameSpan = $("#required-mark-full-name-delivery");
$('#user_data_delivery_customer_type_2, #user_data_delivery_customer_type_1').click(function() {
var radio = $(this);
if (radio.val() == 1) {
$(".company_delivery_fields").hide();
$("#full_name_delivery").attr("placeholder", star_placeholder_delivery);
deliveryFullName.attr("aria-required", "true");
deliveryFullNameSpan.css("display", "inline");
} else {
$(".company_delivery_fields").show();
$("#full_name_delivery").attr("placeholder", star_placeholder_delivery.substring(2));
deliveryFullName.removeAttr("aria-required");
deliveryFullNameSpan.css("display", "none");
}
}).filter(':checked').click();

View File

@@ -1,87 +1,118 @@
<div class="row">
<div class="col-sm-6 col-lg-6">
<div class="radio">
<label> {$radio_billing_customer_type1}
{$label_billing_customer_type1} </label>
{$radio_billing_customer_type1}
<label for="user_data_billing_customer_type_1">{$label_billing_customer_type1}</label>
</div>
</div>
<div class="col-sm-6 col-lg-6">
<div class="radio">
<label> {$radio_billing_customer_type2}
{$label_billing_customer_type2} </label>
{$radio_billing_customer_type2}
<label for="user_data_billing_customer_type_2" class="radio-inline">{$label_billing_customer_type2}</label>
</div>
</div>
</div>
<div id="company_billing_fields" class="company_billing_fields">
<div class="form-group">
<label class="control-label" for="company_billing">{__ text="Firma"}</label>
<span class="required-mark" aria-hidden="true">*</span>
<div class="form-group-input{if $error_billing_company!=''} has-error{/if}">
{$input_billing_company}
{if $error_billing_company!=""}<div class="control-label" id="error_company_billing">{$error_billing_company}</div>{/if}
</div>
</div>
<div class="form-group">
<label class="control-label" for="nip_billing">{$nip_billing_label}</label>
<span class="required-mark" aria-hidden="true">*</span>
<div class="form-group-input{if $error_billing_vat!=''} has-error{/if}">
{$input_billing_nip}
{if $error_billing_vat!=""}<div class="control-label" id="error_vat_billing">{$error_billing_vat}</div>{/if}
</div>
</div>
</div>
<div id="company_billing_fields" class="company_billing_fields">
<div class="form-group {if $error_billing_company!=''}has-error{/if}">
{if $error_billing_company!=""}<label class="control-label" for="company_billing">{$error_billing_company}</label>{/if}
{$input_billing_company}
</div>
<div class="form-group {if $error_billing_vat!=''}has-error{/if}">
{if $error_billing_vat!=""}<label class="control-label" for="company_billing">{$error_billing_vat}</label>{/if}
{$input_billing_nip}
<div class="form-group">
<label class="control-label" for="full_name_billing">{__ text="Imię i nazwisko"}</label>
<span id="required-mark-full-name-billing" class="required-mark" aria-hidden="true">*</span>
<div class="form-group-input{if $error_billing_full_name!=''} has-error{/if}">
{$input_billing_full_name}
{if $error_billing_full_name!=''}<div class="control-label" id="error_full_name_billing">{$error_billing_full_name}</div>{/if}
</div>
</div>
<div class="form-group {if $error_billing_full_name!=''}has-error{/if}">
{if $error_billing_full_name!=""}<label class="control-label" for="full_name_billing">{$error_billing_full_name}</label>{/if}
{$input_billing_full_name}
</div>
<div class="form-group {if $error_billing_address!=''}has-error{/if}">
{if $error_billing_address!=""}<label class="control-label" for="address_billing">{$error_billing_address}</label>{/if}
{$input_billing_address}
<div class="form-group">
<label class="control-label" for="address_billing">{__ text="Ulica nr domu / nr lokalu"}</label>
<span class="required-mark" aria-hidden="true">*</span>
<div class="form-group-input{if $error_billing_address!=''} has-error{/if}">
{$input_billing_address}
{if $error_billing_address!=""}<div class="control-label" id="error_address_billing">{$error_billing_address}</div>{/if}
</div>
</div>
{if $show_address_more==1}
<div class="form-group">
{$input_billing_address_more}
</div>
<div class="form-group">
<label class="control-label" for="address_more_billing">{__ text="Adres ciąg dalszy"}</label>
<div class="form-group-input">{$input_billing_address_more}</div>
</div>
{/if}
{if $show_region==1}
<div class="form-group">
{$input_billing_region}
</div>
<div class="form-group">
<label class="control-label" for="region_billing">{__ text="Województwo"}</label>
<div class="form-group-input">{$input_billing_region}</div>
</div>
{/if}
<div class="row">
<div class="col-sm-6 col-lg-4">
<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}
{$input_billing_code}
<div class="form-group">
<label class="control-label" for="code_billing">{__ text="Kod"}</label>
<span class="required-mark" aria-hidden="true">*</span>
<div class="form-group-input{if $error_billing_code!=''} has-error{/if}">
{$input_billing_code}
{if $error_billing_code!=""}<div class="control-label" id="error_code_billing">{$error_billing_code}</div>{/if}
</div>
</div>
</div>
<div class="col-sm-6 col-lg-8">
<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}
{$input_billing_town}
<div class="form-group">
<label class="control-label" for="town_billing">{__ text="Miasto"}</label>
<span class="required-mark" aria-hidden="true">*</span>
<div class="form-group-input{if $error_billing_town!=''} has-error{/if}">
{$input_billing_town}
{if $error_billing_town!=""}<div class="control-label" id="error_town_billing">{$error_billing_town}</div>{/if}
</div>
</div>
</div>
</div>
<div class="form-group {if $error_billing_country!=''}has-error{/if}">
{if $error_billing_country!=""}<label class="control-label" for="country_billing">{$error_billing_country}</label>{/if}
<div class="form-group">
<label class="control-label" for="user_data_billing_country">{__ text="Kraj"}</label>
<span class="required-mark" aria-hidden="true">*</span>
<div class="form-group-input{if $error_billing_country!=''} has-error{/if}">
{$select_billing_country}
{if $error_billing_country!=""}<div class="control-label" id="error_country_billing">{$error_billing_country}</div>{/if}
</div>
</div>
{if $show_pesel==1}
<div class="form-group">
{$input_billing_pesel}
<label class="control-label" for="billing-pesel">{__ text="PESEL"}</label>
<div class="form-group-input">{$input_billing_pesel}</div>
</div>
{/if}
<div class="form-group {if $error_billing_phone!=''}has-error{/if}">
{if $error_billing_phone!=""}<label class="control-label" for="phone_billing">{$error_billing_phone}</label>{/if}
{$input_billing_phone}
<div class="form-group">
<label class="control-label" for="phone_billing">{__ text="Telefon"}</label>
{if $validate_phone==1}<span class="required-mark" aria-hidden="true">*</span>{/if}
<div class="form-group-input{if $error_billing_phone!=''} has-error{/if}">
{$input_billing_phone}
{if $error_billing_phone!=''}<div class="control-label" id="error_phone_billing">{$error_billing_phone}</div>{/if}
</div>
</div>
{$additional_billing_fields}
{$description}
{$under_basket_socket}
@@ -103,22 +134,22 @@
jQuery(function($) {
$(document).ready(function() {
const billingFullName = $("#full_name_billing");
const starPlaceholderBilling = billingFullName.attr("placeholder");
$('#user_data_billing_customer_type_2, #user_data_billing_customer_type_1').click(function() {
var radio = $(this);
const billingFullName = $("#full_name_billing");
const billingFullNameSpan = $("#required-mark-full-name-billing");
$('#user_data_billing_customer_type_2, #user_data_billing_customer_type_1').click(function() {
var radio = $(this);
if (radio.val() == 1) {
$(".company_billing_fields").hide();
billingFullName.attr("placeholder", starPlaceholderBilling);
} else {
$(".company_billing_fields").show();
if (!billingFullName.hasClass('required')) {
billingFullName.attr("placeholder", starPlaceholderBilling.substring(2));
}
}
}).filter(':checked').click();
if (radio.val() == 1) {
$(".company_billing_fields").hide();
billingFullName.attr("aria-required", "true");
billingFullNameSpan.css("display", "inline");
} else {
$(".company_billing_fields").show();
billingFullName.removeAttr("aria-required");
billingFullNameSpan.css("display", "none");
}
}).filter(':checked').click();
$("#company_billing").change(function() {
var word_billing = $(this).get(0).defaultValue;

View File

@@ -1,80 +1,100 @@
<div class="row">
<div class="col-sm-6 col-lg-6">
<div class="radio">
<label> {$radio_delivery_customer_type1}
{$label_delivery_customer_type1} </label>
{$radio_delivery_customer_type1}
<label for="user_data_delivery_customer_type_1">{$label_delivery_customer_type1}</label>
</div>
</div>
<div class="col-sm-6 col-lg-6">
<div class="radio">
<label> {$radio_delivery_customer_type2}
{$label_delivery_customer_type2} </label>
{$radio_delivery_customer_type2}
<label for="user_data_delivery_customer_type_2" class="radio-inline">{$label_delivery_customer_type2}</label>
</div>
</div>
</div>
</div>
<div id="company_delivery_fields" class="company_delivery_fields">
<div class="form-group">
<label class="control-label" for="company_delivery">{__ text="Firma"}</label>
<span class="required-mark" aria-hidden="true">*</span>
<div class="form-group-input{if $error_delivery_company!=''} has-error{/if}">
{$input_delivery_company}
{if $error_delivery_company!=""}<div class="control-label" id="error_company_delivery">{$error_delivery_company}</div>{/if}
</div>
</div>
</div>
<div class="form-group {if $error_delivery_company!=''}has-error{/if}">
{if $error_delivery_company!=""}<label class="control-label" for="company_delivery">{$error_delivery_company}</label>{/if}
{$input_delivery_company}
<div class="form-group">
<label class="control-label" for="full_name_delivery">{__ text="Imię i nazwisko"}</label>
<span id="required-mark-full-name-delivery" class="required-mark" aria-hidden="true">*</span>
<div class="form-group-input{if $error_delivery_full_name!=''} has-error{/if}">
{$input_delivery_full_name}
{if $error_delivery_full_name!=""}<div class="control-label" id="error_full_name_delivery">{$error_delivery_full_name}</div>{/if}
</div>
</div>
<div class="form-group {if $error_delivery_full_name!=''}has-error{/if}">
{if $error_delivery_full_name!=""}<label class="control-label" for="full_name_delivery">{$error_delivery_full_name}</label>{/if}
{$input_delivery_full_name}
</div>
<div class="form-group {if $error_delivery_address!=''}has-error{/if}">
{if $error_delivery_address!=""}<label class="control-label" for="address_delivery">{$error_delivery_address}</label>{/if}
{$input_delivery_address}
<div class="form-group">
<label class="control-label" for="address_delivery">{__ text="Ulica nr domu / nr lokalu"}</label>
<span class="required-mark" aria-hidden="true">*</span>
<div class="form-group-input{if $error_delivery_address!=''} has-error{/if}">
{$input_delivery_address}
{if $error_delivery_address!=""}<div class="control-label" id="error_address_delivery">{$error_delivery_address}</div>{/if}
</div>
</div>
{if $show_address_more==1}
<div class="form-group">
{$input_delivery_address_more}
<label class="control-label" for="address_more_delivery">{__ text="Adres ciąg dalszy"}</label>
<div class="form-group-input">{$input_delivery_address_more}</div>
</div>
{/if}
{if $show_region==1}
<div class="form-group">
{$input_delivery_region}
<label class="control-label" for="region_delivery">{__ text="Województwo"}</label>
<div class="form-group-input">{$input_delivery_region}</div>
</div>
{/if}
<div class="row">
<div class="col-sm-6 col-lg-4">
<div class="form-group {if $error_delivery_code!=''}has-error{/if}">
{if $error_delivery_code!=""}<label class="control-label" for="code_delivery">{$error_delivery_code}</label>{/if}
{$input_delivery_code}
<div class="form-group">
<label class="control-label" for="code_delivery">{__ text="Kod"}</label>
<span class="required-mark" aria-hidden="true">*</span>
<div class="form-group-input{if $error_delivery_code!=''} has-error{/if}">
{$input_delivery_code}
{if $error_delivery_code!=""}<div class="control-label" id="error_code_delivery">{$error_delivery_code}</div>{/if}
</div>
</div>
</div>
</div>
<div class="col-sm-6 col-lg-8">
<div class="form-group {if $error_delivery_town!=''}has-error{/if}">
{if $error_delivery_town!=""}<label class="control-label" for="town_delivery">{$error_delivery_town}</label>{/if}
{$input_delivery_town}
<div class="form-group">
<label class="control-label" for="town_delivery">{__ text="Miasto"}</label>
<span class="required-mark" aria-hidden="true">*</span>
<div class="form-group-input{if $error_delivery_town!=''} has-error{/if}">
{$input_delivery_town}
{if $error_delivery_town!=""}<div class="control-label" id="error_town_delivery">{$error_delivery_town}</div>{/if}
</div>
</div>
</div>
</div>
<div class="form-group {if $error_delivery_country!=''}has-error{/if}">
{if $error_delivery_country!=""}<label class="control-label" for="country_delivery">{$error_delivery_country}</label>{/if}
{$select_delivery_country}
</div>
{if $show_pesel==1}
<div class="form-group">
{$input_delivery_pesel}
<label class="control-label" for="user_data_delivery_country">{__ text="Kraj"}</label>
<span class="required-mark" aria-hidden="true">*</span>
<div class="form-group-input{if $error_delivery_country!=''} has-error{/if}">
{$select_delivery_country}
{if $error_delivery_country!=""}<div class="control-label" id="error_country_delivery">{$error_delivery_country}</div>{/if}
</div>
</div>
{/if}
<div class="form-group {if $error_delivery_phone!=''}has-error{/if}">
{if $error_delivery_phone!=""}<label class="control-label" for="phone_delivery">{$error_delivery_phone}</label>{/if}
<div class="form-group">
<label class="control-label" for="phone_delivery">{__ text="Telefon"}</label>
{if $validate_phone==1}<span class="required-mark" aria-hidden="true">*</span>{/if}
<div class="form-group-input{if $error_delivery_phone!=''} has-error{/if}">
{$input_delivery_phone}
{if $error_delivery_phone!=""}<div class="control-label" id="error_phone_delivery">{$error_delivery_phone}</div>{/if}
</div>
</div>
{$additional_delivery_fields}
@@ -84,20 +104,22 @@
jQuery(function($) {
$(document).ready(function() {
var star_placeholder_delivery = $("#full_name_delivery").attr("placeholder");
const deliveryFullName = $("#full_name_delivery");
const deliveryFullNameSpan = $("#required-mark-full-name-delivery");
$('#user_data_delivery_customer_type_2, #user_data_delivery_customer_type_1').click(function() {
var radio = $(this);
if (radio.val() == 1) {
$(".company_delivery_fields").hide();
$("#full_name_delivery").attr("placeholder", star_placeholder_delivery);
} else {
$(".company_delivery_fields").show();
$("#full_name_delivery").attr("placeholder", star_placeholder_delivery.substring(2));
}
}).filter(':checked').click();
$('#user_data_delivery_customer_type_2, #user_data_delivery_customer_type_1').click(function() {
var radio = $(this);
if (radio.val() == 1) {
$(".company_delivery_fields").hide();
deliveryFullName.attr("aria-required", "true");
deliveryFullNameSpan.css("display", "inline");
} else {
$(".company_delivery_fields").show();
deliveryFullName.removeAttr("aria-required");
deliveryFullNameSpan.css("display", "none");
}
}).filter(':checked').click();
});
$('#user_data_delivery_country').change(function() {

View File

@@ -0,0 +1,173 @@
{assign var='col_xs' value=$theme_config->getConfigParameter('layout_config.products_in_row_mobile')}
{assign var='col_sm' value=$theme_config->getConfigParameter('layout_config.products_in_row_desktop')}
{set layout="one_column"}
<div id="user-dashobord-address" class="user-dashobord" style="min-height: 700px;">
{if $is_authenticated}
<div class="row">
<div class="col-sm-12 col-md-12">
{st_get_component module="stUserData" component="responsiveUserPanelBreadcrumbs" active_tab=$tab}
</div>
</div>
<div class="row">
<div class="col-sm-3 col-md-3 sidebar">
{st_get_component module="stUserData" component="responsiveUserPanelMenu" active_tab=$tab}
</div>
<div class="col-sm-9 col-md-9">
{/if}
<div class="dashobord-info">
{if $tab == 8}
<h1>{__ text="Ostatnio przeglądane produkty"}</h1>
<p>
{__ text="Poniżej znajdziesz produkty, które ostatnio przeglądałeś w naszym sklepie."}
{if !$is_authenticated}
<br><a style="color: inherit;" class="underline" data-action="ajax-login-button" href="#">{__ text="Zaloguj się"}</a>, {__ text="aby zapisać swoje ostatnio przeglądane produkty na koncie i mieć do nich łatwy dostęp w przyszłości."}
{/if}
</p>
{/if}
{if $tab == 9}
<h1>{__ text="Obserwowane produkty"}</h1>
<p>
{__ text="Obserwuj zmiany cen i dostępności swoich ulubionych produktów."}
{if !$is_authenticated}
<br><a style="color: inherit;" class="underline" data-action="ajax-login-button" href="#">{__ text="Zaloguj się"}</a>, {__ text="aby zapisać swoje obserwowane produkty na koncie i mieć do nich łatwy dostęp w przyszłości."}
{/if}
</p>
{/if}
{if $results}
<div id="ai-prdouct-list" class="product-list full-list grid-wrapper grid-xs-{$col_xs} grid-sm-3{if $col_sm == 4} grid-md-4{elseif $col_sm == 5} grid-md-4 grid-lg-5{/if}" data-equalizer>
{foreach key=row item=product from=$results name=prodLoop}
<div class="product thumbnail clearfix">
{if $is_observe_enabled }
<div class="product-observe observe-no" data-product-observe="{$product.id}">
<svg width="23" height="21" viewBox="0 0 23 21" xmlns="http://www.w3.org/2000/svg">
<path d="M6.4592 1C3.44417 1 1 3.81598 1 7.28966C1 7.97227 1.09438 8.62947 1.26893 9.2449C1.71875 10.8309 2.96968 12.0161 4.1733 13.1426L11.5 20L18.8267 13.1426C20.0303 12.0161 21.2813 10.8309 21.7311 9.2449C21.9056 8.62947 22 7.97227 22 7.28966C22 3.81598 19.5558 1 16.5408 1C14.2698 1 12.3227 2.59762 11.5 4.87056C10.6773 2.59762 8.73018 1 6.4592 1Z" stroke-width="2" stroke-linejoin="round"/>
</svg>
</div>
{/if}
<div class="pg_label">
{foreach key=group_id item=group_image from=$product.my_groups}
{$group_image}
{/foreach}
</div>
{if $show_image==1}
<div class="image{if $theme_config->getConfigParameter('layout_config.product_img_space') == 'space'} space{/if}" data-equalizer-watch="image">
{$product.photo}
</div>
{/if}
<div class="caption clearfix {if $theme_config->getConfigParameter('layout_config.product_info_align_desktop') == 'left'}text-left{else}text-center{/if}">
<div data-equalizer-watch="thumb" class="clearfix">
{if $show_name==1}<p class="name">{$product.name}</p>{/if}
{if $show_availability}
<div class="product-availability">
{$product.availability}
{if $show_stock}
({$product.stock} {$product.uom})
{/if}
</div>
{elseif $show_stock}
<div class="product-availability">
{__ text="Dostępność" langCatalogue="stAvailabilityFrontend"}: {$product.stock} {$product.uom}
</div>
{/if}
{if $show_weight}
<div class="weight text-muted">
{if $product.weight}{__ text="Waga"}: {$product.weight}{/if}
</div>
{/if}
{if $show_description==1}
<div class="description tinymce_html">{$product.description}</div>
{/if}
{if $product.colors}
<div class="options-color-on-list">{$product.colors}</div>
{/if}
<div class="box-price">
{if $show_price==1 && $product.check_price!=1}
{if $price_view=='net_gross'}
<div class="price major_price">{__ text="netto"}: <span class="nowrap">{$product.price_net}</span></div>
<div class="price minor_price">({__ text="brutto"}: <span class="nowrap">{$product.price}</span>)</div>
{elseif $price_view=='only_gross'}
<div class="price nowrap">{$product.price}</div>
{elseif $price_view=='only_net'}
<div class="price">{__ text="netto"}: <span class="nowrap">{$product.price_net}</span></div>
{elseif $price_view=='gross_net'}
<div class="price major_price">{__ text="brutto"}: <span class="nowrap">{$product.price}</span></div>
<div class="price minor_price">({__ text="netto"}: <span class="nowrap">{$product.price_net}</span>)</div>
{/if}
{if $product.basic_price}
<div class="text-muted basic_price">
<i>{$product.basic_price.quantity} ( {$product.basic_price.brutto} {__ text="za"} {$product.basic_price.for_quantity} )</i>
</div>
{/if}
{/if}
{if $show_discount==1 && $product.discount!=0 && $product.check_price!=1}
<div class="discount">{__ text="Rabat"}: {$product.discount} %</div>
{elseif ($show_old_price==1 && $product.check_price!=1 && $product.check_old_price==1)}
<div class="price old_price">
{if ($price_view=='net_gross' || $price_view=='only_net')}
{$product.old_price_net}
{else}
{$product.old_price}
{/if}
</div>
{/if}
</div>
</div>
<div class="product-shopping-cart">
{if $button_type == 'basket'}
{if $show_price==1 && $show_basket==1}
{basket_add_link product=$product.instance namespace="product_list"}
{/if}
{else}
<a class="btn btn-shopping-cart" href="{$product.link}">{__ text="Sprawdź"}</a>
{/if}
</div>
</div>
</div>
{/foreach}
</div>
{$pager}
{else}
{if $tab == 8}
{__ text="W tym miejscu pojawią się ostatnio oglądane produkty."}
{/if}
{if $tab == 9}
{__ text="W tym miejscu pojawią się obserwowane produkty."}
{/if}
{/if}
</div>
{if $is_authenticated}
</div>
</div>
{/if}
</div>

View File

@@ -0,0 +1,23 @@
<ul class="pagination">
{if $current_page!=1}
<li><a href="/blog">|&laquo;</a></li>
<li><a href="{$previous_page_url}">&laquo;</a></li>
{else}
<li style="visibility: hidden"><a href="#">&laquo;</a></li>
{/if}
{foreach item=link from=$links}
{if $link.page == $current}
<li class="active"><a href="#">{$link.page}</a></li>
{else}
<li><a href="{$link.url}">{$link.page}</a></li>
{/if}
{/foreach}
{if $current_page!=$last_page}
<li><a href="{$next_page_url}">&raquo;</a></li>
<li><a href="{$last_page_url}">&raquo;|</a></li>
{else}
<li style="visibility: hidden"><a href="#">&raquo;</a></li>
{/if}
</ul>

View File

@@ -0,0 +1,12 @@
<ol class="breadcrumb">
<li><a href="{urlfor internal='@stUserData?action=userPanel'}">{__ text="Start"}</a></li>
{if $active_tab==1}<li class="active">{__ text="Moje konto"}</li>{/if}
{if $active_tab==2}<li class="active">{__ text="Zamówienia"}</li>{/if}
{if $active_tab==21}<li><a href="{urlfor internal='@stOrder?action=list'}">{__ text="Zamówienia"}</a></li>{/if}
{if $active_tab==3}<li class="active">{__ text="Rabaty"}</li>{/if}
{if $active_tab==6}<li class="active">{__ text="Ostatnio oglądane"}</li>{/if}
{if $active_tab==4}<li class="active">{__ text="Newsletter"}</li>{/if}
{if $active_tab==5}<li class="active">{__ text="Moje dane"}</li>{/if}
{if $active_tab==7}<li class="active">{__ text="Adresy"}</li>{/if}
{if $active_tab==51}<li><a href="{urlfor internal='@stUser?action=editAccount'}">{__ text="Moje dane"}</a></li> <li class="active">{__ text="Edycja danych"}</li>{/if}
</ol>

View File

@@ -1,30 +1,21 @@
<div class="row">
<div class="col-sm-12 col-md-12">
<ol class="breadcrumb">
<li><a href="{urlfor internal='@stUserData?action=userPanel'}">{__ text="Start"}</a></li>
{if $active_tab==1}<li class="active">{__ text="Moje konto"}</li>{/if}
{if $active_tab==2}<li class="active">{__ text="Zamówienia"}</li>{/if}
{if $active_tab==21}<li><a href="{urlfor internal='@stOrder?action=list'}">{__ text="Zamówienia"}</a></li> <li class="active">{$order_number}</li>{/if}
{if $active_tab==3}<li class="active">{__ text="Rabaty"}</li>{/if}
{if $active_tab==6}<li class="active">{__ text="Ostatnio oglądane"}</li>{/if}
{if $active_tab==4}<li class="active">{__ text="Newsletter"}</li>{/if}
{if $active_tab==5}<li class="active">{__ text="Moje dane"}</li>{/if}
{if $active_tab==51}<li><a href="{urlfor internal='@stUser?action=editAccount'}">{__ text="Moje dane"}</a></li> <li class="active">{__ text="Edycja danych"}</li>{/if}
</ol>
<div id="user-panel-login">
<a href="{urlfor internal='@stUser?action=editAccount'}">{$user_email}</a>
</div>
</div>
</div>
<div id="user-dashobord-menu">
<div class="h3">{__ text="Moje konto"}</div>
<ul id="user-panel-menu" class="nav nav-tabs" role="tablist">
<li {if $active_tab==1}class="active"{/if}><a href="{urlfor internal='@stUserData?action=userPanel'}"><div class="glyphicon glyphicon-th-large visible-xs"></div><span class="hidden-xs">{__ text="Moje konto"}</span></a></li>
<li {if $active_tab==2 || $active_tab==21 }class="active"{/if}><a href="{urlfor internal='@stOrder?action=list'}" ><div class="glyphicon glyphicon-list-alt visible-xs"></div><span class="hidden-xs">{__ text="Zamówienia"}</span></a></li>
<li {if $active_tab==3}class="active"{/if}><a href="{urlfor internal='@stDiscountPlugin?action=discountInfo'}" ><div class="glyphicon glyphicon-tag visible-xs"></div><span class="hidden-xs">{__ text="Rabaty"}</span></a></li>
{if $newsletter_enabled==1}
<li {if $active_tab==4}class="active"{/if}><a href="{urlfor internal='@stNewsletterPlugin?action=newsletterList'}" ><div class="glyphicon glyphicon-envelope visible-xs"></div><span class="hidden-xs">{__ text="Newsletter"}</span></a></li>
{/if}
<ul>
<li {if $active_tab==1}class="active"{/if}><a href="{urlfor internal='@stUserData?action=userPanel'}"><span>{__ text="Przegląd"}</span></a></li>
<li {if $active_tab==2 || $active_tab==21 }class="active"{/if}><a href="{urlfor internal='@stOrder?action=list'}" ><span>{__ text="Zamówienia"}</span></a></li>
<li {if $active_tab==5 || $active_tab==51 }class="active"{/if}><a href="{urlfor internal='@stUser?action=editAccount'}"><span>{__ text="Moje dane"}</span></a></li>
<li {if $active_tab==7 || $active_tab==21 }class="active"{/if}><a href="{urlfor internal='@stUserData?action=addressList'}" ><span>{__ text="Adresy"}</span></a></li>
<li {if $active_tab==5 || $active_tab==51 }class="active"{/if}><a href="{urlfor internal='@stUser?action=editAccount'}"><div class="glyphicon glyphicon-pencil visible-xs"></div><span class="hidden-xs">{__ text="Moje dane"}</span></a></li>
</ul>
<li {if $active_tab==8}class="active"{/if}><a href="{urlfor internal='@stUserData?action=productList&type=last'}" ><span>{__ text="Ostatnio przeglądane produkty"}</span></a></li>
<li {if $active_tab==9}class="active"{/if}><a href="{urlfor internal='@stUserData?action=productList&type=observe'}" ><span>{__ text="Obserwowane produkty"}</span></a></li>
<li {if $active_tab==3}class="active"{/if}><a href="{urlfor internal='@stDiscountPlugin?action=discountInfo'}" ><span>{__ text="Rabaty"}</span></a></li>
{if $newsletter_enabled==1}
<li {if $active_tab==4}class="active"{/if}><a href="{urlfor internal='@stNewsletterPlugin?action=newsletterList'}" ><span>{__ text="Newsletter"}</span></a></li>
{/if}
</ul>
</div>

View File

@@ -1,256 +1,127 @@
{set layout="one_column"}
<div class="user-control">
{st_get_component module="stUserData" component="responsiveUserPanelMenu" active_tab="1"}
<div id="user-panel">
{if $last_order}
<div id="last-order">
<div class="panel panel-default">
<div class="panel-body">
<h3>{__ text="Ostatnie zamówienie"}</h3>
<ul class="list-unstyled">
<li>{__ text="Status"}: <span class="last-order-status">{$last_order_status}</span></li>
<li>{__ text="Numer zamówienia"}: <b>{$last_order_order_number}</b></li>
<li>{__ text="Data złożenia zamówienia"}: <b>{$last_order_created_at}</b></li>
<li class="space"></li>
<li>{__ text="Wartość koszyka"}: <b>{$last_order_total_product_price}</b></li>
<li>{__ text="Dostawa"}: <b>{$last_order_delivery_name}</b> ({$last_order_delivery_cost})</li>
<li>{__ text="Razem do zapłaty"}: <b>{$last_order_total_amount}</b></li>
<li class="space"></li>
<li>{__ text="Metoda płatności"}: <b>{$payment_name}</b></li>
<li>{__ text="Opłacone"}: <b>{$is_paid}</b></li>
{if $last_show_not_professional_purchase}
<li>
{__ text="Zakup o charakterze zawodowym" catalogue="stUserData"}:
<b>{$last_order_user_data_billing->getNotProfessionalPurchaseLabel()}</b>
</li>
{/if}
{if $last_order_delivery_number}
<li>
{__ text="Numer przesyłki"}: <b>{$last_order_delivery_number}</b>
{if $last_order_delivery_tracking_url}
<a href="{$last_order_delivery_tracking_url}" target="_blank"><u>{__ text="Sprawdź status dostawy" catalogue="stDeliveryFrontend"}</u></a>
{/if}
</li>
{/if}
</ul>
<div class="row product-list" data-equalizer>
{foreach key=row item=order_product from=$results}
<div class="product col-xs-6 col-sm-3">
<div class="thumbnail">
<div class="image" data-equalizer-watch="image">{$order_product.photo}</div>
<div class="caption text-center" data-equalizer-watch="caption">
<h4 class="name">
{if isset($order_product.product_name)}{$order_product.product_name}{else}{if isset($order_product.validate)}{$order_product.name_show}{else}{$order_product.name}{/if}{/if}
</h4>
<div class="text-muted">
({if $show_netto_in_basket}{if $order_product.is_item_by_points} - {else}{$order_product.price}{/if}{/if}
{if $show_tax_in_basket}{if $order_product.is_item_by_points} - {else}{$order_product.vat} % {/if}{/if}
{if $order_product.is_item_by_points} - {else}{$order_product.price_true}{/if}
{if $points_system_is_active}
{if $order_product.is_item_by_points} {$order_product.points_value} {else} - {/if}
{/if}
x
{$order_product.quantity} {$order_product.uom}
)
</div>
<div class="price">
{if $order_product.is_item_by_points} {$order_product.points_sum_value} {$points_shortcut} {else} {$order_product.total_amount}{/if}
</div>
</div>
</div>
</div>
{/foreach}
</div>
<div class="text-right">
{if $last_order_show_payment!=1}
<a href="{$last_order_payment_url}" class="btn btn-primary" rel="noindex, nofollow">
<span class="glyphicon glyphicon-usd"></span>
{__ text="Zapłać" catalogue="stOrder"}
</a>
{/if}
</div>
</div>
</div>
</div>
{else}
{if $billing_edit_url!="" || $delivery_edit_url!=""}
<div class="panel panel-default center-block info-panel">
<div class="panel-body text-center">
<p>{__ text="Aktualnie nie posiadasz nowych zamówień."}</p>
<p class="text-center"><a href="/" class="btn btn-default">{__ text="Wróć do zakupów"}</a></p>
</div>
<div id="user-dashobord-home" class="user-dashobord">
<div class="row">
<div class="col-sm-12 col-md-12">
{st_get_component module="stUserData" component="responsiveUserPanelBreadcrumbs" active_tab="1"}
</div>
{/if}
</div>
{/if}
<div class="row">
{if $recently_viewed}
<h3>{__ text="Ostatnio przeglądane produkty"}</h3>
{st_get_component module='stRecentlyViewedProductsFrontend' component='recentlyViewedProducts'}
{/if}
{if $observe_products}
<h3>{__ text="Obserwowane produkty"}</h3>
{st_get_component module='stProductObserveFrontend' component='listProductObserve'}
{/if}
{if $billing_edit_url=="" || $delivery_edit_url==""}
<div class="col-sm-3 col-md-3 sidebar">
{st_get_component module="stUserData" component="responsiveUserPanelMenu" active_tab="1"}
</div>
<div class="col-sm-9 col-md-9 user-dashobord-content">
<div class="panel panel-default center-block" style="border: 1px solid #e9e9e9;margin-top: 100px;max-width: 50%;">
<div class="panel-body">
<p>{__ text="Witaj w panelu klienta."}<br/>{__ text="Twoje konto jest w pełni aktywne. Wszelkie informacje będą przesyłane na adres"} {$user_email}</p>
<p class="text-center"><a href="/user_data/createFirstUserData" class="btn btn-default">{__ text="Dodaj dane klienta"}</a></p>
</div>
</div>
{else}
<h3>{__ text="Dane klienta"}</h3>
<div class="row row-first" data-equalizer>
<div class="col-sm-4 col-md-4">
<div class="panel panel-default">
<div class="panel-heading">
<span class="panel-trigger" >{__ text="Dane konta"}</span>
</div>
<div class="panel-body" data-equalizer-watch>
<p>{__ text="Twoje konto jest w pełni aktywne wszelkie informacje będą przesyłane na adres"}</p>
<p>{$user_email}</p>
</div>
</div>
</div>
<div class="col-sm-4 col-md-4">
<div class="panel panel-default">
<div class="panel-heading">
<span class="panel-trigger" >{__ text="Dane płatnika"}</span>
</div>
<div class="panel-body" data-equalizer-watch>
{if $billing_edit_url && $billing_address!=""}
<a class="edit-btn pull-right" href="{$billing_edit_url}">
{__ text="zmień"}
</a>
{if $billing_company!=""}
{__ text="Dane do faktury"}
<br/>
{$billing_company}
<br/>
{$billing_vat_number}
<br/>
{/if}
<b>{$billing_full_name}</b>
<br/>
{$billing_address}
<br/>
{if $billing_address_more!=""}
{$billing_address_more}
<br/>
{/if}
{if $billing_region!=""}
{$billing_region}
<br/>
{/if}
{$billing_code}
{$billing_town}
<br/>
{$billing_country}
<br/>
{$billing_phone}
<br/>
{else}
<a class="btn btn-default pull-right" href="/user_data/createFirstUserDataBilling">{__ text="Dodaj dane billingowe"}</a>
{/if}
</div>
</div>
</div>
<div class="col-sm-4 col-md-4">
<div class="panel panel-default">
<div class="panel-heading">
<span class="panel-trigger" >{__ text="Dane wysyłkowe"}</span>
</div>
<div class="panel-body" data-equalizer-watch>
{if $delivery_edit_url && $delivery_address!=""}
<a class="edit-btn pull-right" href="{$delivery_edit_url}">
{__ text="zmień"}
</a>
{if $delivery_company!=""}
{$delivery_company}
<br/>
{/if}
<b>{$delivery_full_name}</b>
<br/>
{$delivery_address}
<br/>
{if $delivery_address_more!=""}
{$delivery_address_more}
<br/>
{/if}
{if $delivery_region!=""}
{$delivery_region}
<br/>
{/if}
{$delivery_code}
{$delivery_town}
<br/>
{$delivery_country}
<br/>
{$delivery_phone}
<br/>
{else}
<a class="btn btn-default pull-right" href="/user_data/createFirstUserDataDelivery">{__ text="Dodaj dane dostawy"}</a>
{/if}
</div>
<div class="dashobord-info">
<h1>{__ text="Twoje konto"}</h1>
<p>
{__ text="Tu możesz zarządzać swoimi zakupami, danymi osobowymi oraz rabatami."}
{if $last_order}
{__ text="Poniżej znajdziesz szczegóły swojego ostatniego zamówienia."}
{/if}
</p>
</div>
</div>
</div>
{if $is_basket}
<div class="dashobord-info" style="margin-bottom: 60px;">
<div class="h3">{__ text="Twój koszyk czeka!"}</div>
<div class="shopping-cart">
<div class="shopping-cart-items">
{foreach key=row item=basket_image from=$basket_product_image}
<div class="item" style="float: left !important;clear: initial; padding: 0px !important;">
<div class="item-image-col">
{$basket_image}
</div>
</div>
{/foreach}
</div>
</div>
<div class="clearfix"></div>
<p>{__ text="Masz już produkty w koszyku, więc to doskonały moment, aby sfinalizować swoje zakupy. Nie czekaj, przejdź do koszyka, sprawdź wszystkie szczegóły swojego zamówienia i dokończ proces składania zamówienia, aby szybko otrzymać wybrane produkty."}</p>
<a href="/basket/index" class="btn btn-default">{__ text="Przejdź do koszyka"}</a>
</div>
{/if}
{if $billing_edit_url=="" || $delivery_edit_url==""}
<div class="dashobord-info">
<div class="h3">{__ text="Uzupełnij swoje dane"}</div>
<p>{__ text="Aby przyspieszyć realizację zamówień i zapewnić ich bezproblemową dostawę, uzupełnij swoje dane bilingowe oraz adresy do wysyłki. To prosty krok, który sprawi, że Twoje zakupy będą jeszcze wygodniejsze."}</p>
<a href="/user_data/createFirstUserData" class="btn btn-default">{__ text="Dodaj dane klienta"}</a>
</div>
{/if}
{/if}
</div>
</div>
{if $last_order}
<div class="h3">{__ text="Ostatnie zamówienie"}</div>
<ul class="list-unstyled">
<li>{__ text="Status"}: <span class="last-order-status">{$last_order_status}</span></li>
<li>{__ text="Numer zamówienia"}: <b>{$last_order_order_number}</b></li>
</ul>
<p><a href="{$link_last_order}" class="btn btn-default">{__ text="Zobacz zamówienie"}</a></p>
<div class="row product-list" data-equalizer>
{foreach key=row item=order_product from=$results}
<div class="product col-xs-6 col-sm-3">
<div class="thumbnail">
<div class="image" data-equalizer-watch="image">{$order_product.photo}</div>
<div class="caption text-center" data-equalizer-watch="caption">
<div class="h4 name">
{if isset($order_product.product_name)}{$order_product.product_name}{else}{if isset($order_product.validate)}{$order_product.name_show}{else}{$order_product.name}{/if}{/if}
</div>
</div>
</div>
</div>
{/foreach}
</div>
<div class="text-right">
{if $last_order_show_payment!=1}
<a href="{$last_order_payment_url}" class="btn btn-primary" rel="noindex, nofollow">
<span class="glyphicon glyphicon-usd"></span>
{__ text="Zapłać" catalogue="stOrder"}
</a>
{/if}
</div>
{else}
{if $billing_edit_url!="" || $delivery_edit_url!=""}
<div class="panel panel-default center-block info-panel">
<div class="panel-body text-center">
<p>{__ text="Aktualnie nie posiadasz nowych zamówień."}</p>
<p class="text-center"><a href="/" class="btn btn-default">{__ text="Wróć do zakupów"}</a></p>
</div>
</div>
{/if}
{/if}
{if $recently_viewed}
<div class="h3">{__ text="Ostatnio przeglądane produkty"}</div>
{st_get_component module='stRecentlyViewedProductsFrontend' component='recentlyViewedProducts'}
{/if}
{if $observe_products}
<div class="h3">{__ text="Obserwowane produkty"}</div>
{st_get_component module='stProductObserveFrontend' component='listProductObserve'}
{/if}
</div>
</div>
</div>

View File

@@ -1,4 +1,4 @@
<div id="st_navigation_bar-user" class="st_navigation_bar_user">
<div>
<ul>
{foreach key=row item=tab from=$results}
{if isset($tab.is_tab)}

View File

@@ -122,6 +122,7 @@ $smarty->assign('results', $results);
if (isset($lastOrder) && $lastOrder) {
$smarty->assign('last_order', $lastOrder);
$smarty->assign('link_last_order', $linkOrder);
$smarty->assign('last_order_order_number', $lastOrder->getNumber());
$smarty->assign('last_order_status', st_order_status_frontend($lastOrder->getOrderStatus()));
$created_at = explode(" ", $lastOrder->getCreatedAt());
@@ -215,14 +216,41 @@ if (isset($lastOrder) && $lastOrder) {
}
if ($sf_user->getBasket()->getItems())
{
$smarty->assign('is_basket', 1);
foreach($sf_user->getBasket()->getItems() as $basket_product)
{
$product = $basket_product->getProduct();
$product_url = st_url_for('stProduct/show?url=' . $product->getFriendlyUrl());
$basket_product_image[] = content_tag('a', st_product_image_tag($product, 'thumb'), array('href' => $product_url));
}
$smarty->assign('basket_product_image', $basket_product_image);
}
else
{
$smarty->assign('is_basket', 0);
}
/*echo "<pre>";
print_r($sf_user->getBasket()->getItems());
echo "</pre>";*/
$config_observe = stConfig::getInstance(sfContext::getInstance(), 'stProductObserveBackend');
if(stProductObservePluginListener::getObserveProducts()){
if(stProductObservePluginListener::getObserveProducts() && $config_observe->get('enabled')==1){
$smarty->assign('observe_products', true);
}
if(stRecentlyViewedProductsPluginListener::getRecentlyViewedProducts()){
$config_recently = stConfig::getInstance(sfContext::getInstance(), 'stRecentlyViewedProductsBackend');
if(stRecentlyViewedProductsPluginListener::getRecentlyViewedProducts() && $config_recently->get('enabled')==1){
$smarty->assign('recently_viewed', true);
}