Commit c806f56b authored by Яков's avatar Яков
Browse files

test

parent c8fd5491
...@@ -5,6 +5,13 @@ ...@@ -5,6 +5,13 @@
?> ?>
</div> </div>
</div> </div>
<?php
if ($sf_request->hasParameter('url')) {
echo '<div class="overlay_discount overlay_discount_active" onclick="discount.close();"><div class="overlay_discount__item" onclick="event.stopPropagation();">';
include_component('discount','form');
echo '</div></div>';
}
?>
<div id="panel"></div> <div id="panel"></div>
<div class="search_overlay" onclick="search.close();"> <div class="search_overlay" onclick="search.close();">
<div class="search_overlay__line" onclick="event.stopPropagation();"> <div class="search_overlay__line" onclick="event.stopPropagation();">
......
...@@ -24,15 +24,15 @@ ...@@ -24,15 +24,15 @@
<?php <?php
/*<div class="region"><a href="" class="green_link bbs_d">Уфа, Респ. Башкортостан</a></div>*/ /*<div class="region"><a href="" class="green_link bbs_d">Уфа, Респ. Башкортостан</a></div>*/
if (csSettings::get('phone')) { if (csSettings::get('phone')) {
echo '<div class="header__phone">' . __('Телефон') . ':&nbsp;<a href="tel:' . preg_replace('/[^+0-9]/', '', csSettings::get('phone')) . '" onclick="yaCounter48466937.reachGoal(\'PHONE\');">' . csSettings::get('phone') . '</a></div>'; echo '<div class="header__phone">' . __('Телефон') . ':&nbsp;<a href="tel:' . preg_replace('/[^+0-9]/', '', csSettings::get('phone')) . '">' . csSettings::get('phone') . '</a></div>';
} }
if (csSettings::get('email')) { if (csSettings::get('email')) {
echo '<div><nobr>' . __('Эл. почта') . '</nobr>:&nbsp;<a href="mailto:' . csSettings::get('email') . '" onclick="yaCounter48466937.reachGoal(\'POST\'); return true;">' . csSettings::get('email') . '</a></div>'; echo '<div><nobr>' . __('Эл. почта') . '</nobr>:&nbsp;<a href="mailto:' . csSettings::get('email') . '">' . csSettings::get('email') . '</a></div>';
} }
?> ?>
</td> </td>
<td class="top_right"> <td class="top_right">
<a href="" class="callback_open_link green_link bbs_d" onclick="callback.open();yaCounter48466937.reachGoal('CALL');return false;"><?php echo __('Заказать звонок');?></a> <a href="" class="callback_open_link green_link bbs_d" onclick="callback.open();return false;"><?php echo __('Заказать звонок');?></a>
</td> </td>
</tr> </tr>
</table> </table>
...@@ -45,6 +45,9 @@ ...@@ -45,6 +45,9 @@
<table class="second_floor__table" style="width: 100%; height: 100%" cellpadding="0" cellspacing="0"> <table class="second_floor__table" style="width: 100%; height: 100%" cellpadding="0" cellspacing="0">
<tr> <tr>
<?php <?php
if ($sf_user->hasAttribute('active_discount') && $sf_user->getAttribute('active_discount') != false) {
$active_discount = $sf_user->getAttribute('active_discount');
}
$module_action = $sf_request->getParameter('module') . '_' . $sf_request->getParameter('action'); $module_action = $sf_request->getParameter('module') . '_' . $sf_request->getParameter('action');
echo '<td width="100' . ($module_action == 'basket_complete' ? '%' : '') . '" align="center">'; echo '<td width="100' . ($module_action == 'basket_complete' ? '%' : '') . '" align="center">';
$logo = '<img width="100" height="51" src="/i/logo.svg" />'; $logo = '<img width="100" height="51" src="/i/logo.svg" />';
...@@ -54,7 +57,7 @@ ...@@ -54,7 +57,7 @@
echo '<td class="top_menu">'; echo '<td class="top_menu">';
include_component('main', 'menu'); include_component('main', 'menu');
echo '</td>'; echo '</td>';
echo '<td class="top_right">'; echo '<td style="position: relative;" class="top_right ' . ($module_action == 'basket_index' ? (isset($active_discount) ? 'discount_basket' : '') : (isset($active_discount) ? 'discount d' . $active_discount : '') ) . '">';
if($module_action != 'search_search'){ if($module_action != 'search_search'){
echo '<div class="search_btn" onclick="search._show();"></div>'; echo '<div class="search_btn" onclick="search._show();"></div>';
} }
......
<div class="header_mobile mobile"> <?php
if ($sf_user->hasAttribute('active_discount') && $sf_user->getAttribute('active_discount') != false) {
$discount = $sf_user->getAttribute('active_discount');
} else {
$discount = false;
}
?>
<div class="header_mobile mobile <?php echo ($discount ? 'discount d' . $discount : '' )?>">
<table cellspacing="0" cellpadding="0" width="100%"> <table cellspacing="0" cellpadding="0" width="100%">
<tbody align="left" valign="middle"> <tbody align="left" valign="middle">
<tr> <tr>
<td colspan="2"> <td colspan="2">
<?php echo csSettings::get('phone') ? '<a href="tel:'. csSettings::get('phone') .'" class="header_mobile__phone_link" onclick="yaCounter48466937.reachGoal(\'PHONE\');">'. csSettings::get('phone') .'</a>' : ''; ?> <?php echo csSettings::get('phone') ? '<a href="tel:'. csSettings::get('phone') .'" class="header_mobile__phone_link">'. csSettings::get('phone') .'</a>' : ''; ?>
</td> </td>
<td width="1" align="right"> <td width="1" align="right">
...@@ -36,13 +43,13 @@ ...@@ -36,13 +43,13 @@
</ul> </ul>
<div class="burder__contacts"> <div class="burder__contacts">
<?php if (csSettings::get('phone')) { <?php if (csSettings::get('phone')) {
echo __('Телефон') . ':&nbsp;<a href="tel:' . preg_replace('/[^+0-9]/', '', csSettings::get('phone')) . '" class="anb" onclick="yaCounter48466937.reachGoal(\'PHONE\');">' . csSettings::get('phone') . '</a><i class="br10"></i>'; echo __('Телефон') . ':&nbsp;<a href="tel:' . preg_replace('/[^+0-9]/', '', csSettings::get('phone')) . '" class="anb">' . csSettings::get('phone') . '</a><i class="br10"></i>';
} }
if (csSettings::get('email')) { if (csSettings::get('email')) {
echo __('Эл. почта') . '</nobr>:&nbsp;<a href="mailto:' . csSettings::get('email') . '" onclick="yaCounter48466937.reachGoal(\'POST\');return true;">' . csSettings::get('email') . '</a>'; echo __('Эл. почта') . '</nobr>:&nbsp;<a href="mailto:' . csSettings::get('email') . '">' . csSettings::get('email') . '</a>';
} ?> } ?>
</div> </div>
<a href="" class="btn white_b_btn burder__callback_link" onclick="callback.open();yaCounter48466937.reachGoal('CALL');return false;">Заказать звонок</a> <a href="" class="btn white_b_btn burder__callback_link" onclick="callback.open();return false;">Заказать звонок</a>
</div> </div>
......
...@@ -3,7 +3,7 @@ all: ...@@ -3,7 +3,7 @@ all:
arm_title: 'Иди в баню - АРМ' arm_title: 'Иди в баню - АРМ'
seo_header_sepr: ' - ' seo_header_sepr: ' - '
email_order: 'ufaros@gmail.com' email_order: 'ufaros@gmail.com'
email_from: 'noreply@idivbanu.ru' email_from: 'noreply@stone-dev.atmadev.ru'
secret_key: '2R]btNuO%c/L!}}[v"tY!pWX2JZ{03;!' secret_key: '2R]btNuO%c/L!}}[v"tY!pWX2JZ{03;!'
default_culture: ru_RU default_culture: ru_RU
import_auth_user: bath import_auth_user: bath
......
...@@ -2,6 +2,6 @@ all: ...@@ -2,6 +2,6 @@ all:
doctrine: doctrine:
class: sfDoctrineDatabase class: sfDoctrineDatabase
param: param:
dsn: 'mysql:host=127.0.0.1;dbname=idivbanu' dsn: 'mysql:host=127.0.0.1;dbname=stone_dev'
username: root username: root
password: h7!nIay6HUtu password: h7!nIay6HUtu
...@@ -481,6 +481,9 @@ Offer: ...@@ -481,6 +481,9 @@ Offer:
sort: sort:
type: integer type: integer
default: 0 default: 0
discount_available:
type: boolean
default: false
relations: relations:
Product: Product:
onDelete: CASCADE onDelete: CASCADE
...@@ -543,6 +546,11 @@ BasketOrder: ...@@ -543,6 +546,11 @@ BasketOrder:
type: boolean type: boolean
notnull: true notnull: true
default: false default: false
relations:
DiscountPhone:
onDelete: SET NULL
local: id
foreign: order_id
BasketOffer: BasketOffer:
columns: columns:
...@@ -616,4 +624,48 @@ Callback: ...@@ -616,4 +624,48 @@ Callback:
default: false default: false
offer_id: offer_id:
type: text type: text
notnull: false notnull: false
\ No newline at end of file
Discount:
actAs:
Timestampable: ~
columns:
title:
type: string(255)
notnull: true
utm:
type: string(255)
notnull: true
comment:
type: string(1000)
notnull: false
url:
type: string(20)
DiscountPhone:
actAs:
Timestampable: ~
columns:
phone:
type: string(20)
notnull: true
discount_id:
type: integer
notnull: true
order_id:
type: string(255)
notnull: false
default: null
active_discount:
type: integer
notnull: true
default: 3
relations:
BasketOrder:
onDelete: SET NULL
local: order_id
foreign: id
Discount:
onDelete: CASCADE
local: discount_id
foreign: id
\ No newline at end of file
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
host=192.168.2.7 host=192.168.2.7
port=22 port=22
user=root user=root
dir=/www/stone-dev.atmadev.ru/ dir=/www/idivbanu.ru/
type=rsync type=rsync
[stone] [stone]
host=192.168.2.7 host=192.168.2.7
......
...@@ -4,6 +4,21 @@ ...@@ -4,6 +4,21 @@
/.ramcache /.ramcache
/.ramcache/* /.ramcache/*
/config/databases.yml /config/databases.yml
/data/exchange /symfony
/test
/upload
/log /log
/symfony /.ramcache
\ No newline at end of file /.idea
/.git
/config/databases.yml
/config/app.yml
/data
/apps/www/config/factories.yml
/apps/arm/config/factories.yml
/symfony
/web/index.php
/web/a.php
/web/u
/config/properties.ini
/config/rsync_exclude.txt
\ No newline at end of file
...@@ -21,6 +21,7 @@ abstract class BaseOfferFormFilter extends BaseFormFilterDoctrine ...@@ -21,6 +21,7 @@ abstract class BaseOfferFormFilter extends BaseFormFilterDoctrine
'is_delete' => new sfWidgetFormChoice(array('choices' => array('' => 'yes or no', 1 => 'yes', 0 => 'no'))), 'is_delete' => new sfWidgetFormChoice(array('choices' => array('' => 'yes or no', 1 => 'yes', 0 => 'no'))),
'is_wholesale' => new sfWidgetFormChoice(array('choices' => array('' => 'yes or no', 1 => 'yes', 0 => 'no'))), 'is_wholesale' => new sfWidgetFormChoice(array('choices' => array('' => 'yes or no', 1 => 'yes', 0 => 'no'))),
'sort' => new sfWidgetFormFilterInput(), 'sort' => new sfWidgetFormFilterInput(),
'discount_available' => new sfWidgetFormChoice(array('choices' => array('' => 'yes or no', 1 => 'yes', 0 => 'no'))),
'created_at' => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate(), 'with_empty' => false)), 'created_at' => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate(), 'with_empty' => false)),
'updated_at' => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate(), 'with_empty' => false)), 'updated_at' => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate(), 'with_empty' => false)),
)); ));
...@@ -34,6 +35,7 @@ abstract class BaseOfferFormFilter extends BaseFormFilterDoctrine ...@@ -34,6 +35,7 @@ abstract class BaseOfferFormFilter extends BaseFormFilterDoctrine
'is_delete' => new sfValidatorChoice(array('required' => false, 'choices' => array('', 1, 0))), 'is_delete' => new sfValidatorChoice(array('required' => false, 'choices' => array('', 1, 0))),
'is_wholesale' => new sfValidatorChoice(array('required' => false, 'choices' => array('', 1, 0))), 'is_wholesale' => new sfValidatorChoice(array('required' => false, 'choices' => array('', 1, 0))),
'sort' => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))), 'sort' => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
'discount_available' => new sfValidatorChoice(array('required' => false, 'choices' => array('', 1, 0))),
'created_at' => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 00:00:00')), 'to_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 23:59:59')))), 'created_at' => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 00:00:00')), 'to_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 23:59:59')))),
'updated_at' => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 00:00:00')), 'to_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 23:59:59')))), 'updated_at' => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 00:00:00')), 'to_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 23:59:59')))),
)); ));
...@@ -64,6 +66,7 @@ abstract class BaseOfferFormFilter extends BaseFormFilterDoctrine ...@@ -64,6 +66,7 @@ abstract class BaseOfferFormFilter extends BaseFormFilterDoctrine
'is_delete' => 'Boolean', 'is_delete' => 'Boolean',
'is_wholesale' => 'Boolean', 'is_wholesale' => 'Boolean',
'sort' => 'Number', 'sort' => 'Number',
'discount_available' => 'Boolean',
'created_at' => 'Date', 'created_at' => 'Date',
'updated_at' => 'Date', 'updated_at' => 'Date',
); );
......
<?php <?php
/** /**
* OfferTranslation filter form base class. * offerTranslation filter form base class.
* *
* @package sf * @package sf
* @subpackage filter * @subpackage filter
* @author Atma * @author Atma
* @version SVN: $Id: sfDoctrineFormFilterGeneratedTemplate.php 24171 2009-11-19 16:37:50Z Kris.Wallsmith $ * @version SVN: $Id: sfDoctrineFormFilterGeneratedTemplate.php 24171 2009-11-19 16:37:50Z Kris.Wallsmith $
*/ */
abstract class BaseOfferTranslationFormFilter extends BaseFormFilterDoctrine abstract class BaseofferTranslationFormFilter extends BaseFormFilterDoctrine
{ {
public function setup() public function setup()
{ {
$this->setWidgets(array( $this->setWidgets(array(
'title' => new sfWidgetFormFilterInput(array('with_empty' => false)), 'title' => new sfWidgetFormFilterInput(),
'quantity_type' => new sfWidgetFormFilterInput(array('with_empty' => false)),
)); ));
$this->setValidators(array( $this->setValidators(array(
'title' => new sfValidatorPass(array('required' => false)), 'title' => new sfValidatorPass(array('required' => false)),
'quantity_type' => new sfValidatorPass(array('required' => false)),
)); ));
$this->widgetSchema->setNameFormat('offer_translation_filters[%s]'); $this->widgetSchema->setNameFormat('offer_translation_filters[%s]');
...@@ -33,16 +31,15 @@ abstract class BaseOfferTranslationFormFilter extends BaseFormFilterDoctrine ...@@ -33,16 +31,15 @@ abstract class BaseOfferTranslationFormFilter extends BaseFormFilterDoctrine
public function getModelName() public function getModelName()
{ {
return 'OfferTranslation'; return 'offerTranslation';
} }
public function getFields() public function getFields()
{ {
return array( return array(
'id' => 'Number', 'id' => 'Number',
'title' => 'Text', 'title' => 'Text',
'quantity_type' => 'Text', 'lang' => 'Text',
'lang' => 'Text',
); );
} }
} }
<?php <?php
/** /**
* OfferTranslation filter form. * offerTranslation filter form.
* *
* @package sf * @package sf
* @subpackage filter * @subpackage filter
* @author Atma * @author Atma
* @version SVN: $Id: sfDoctrineFormFilterTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $ * @version SVN: $Id: sfDoctrineFormFilterTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
*/ */
class OfferTranslationFormFilter extends BaseOfferTranslationFormFilter class offerTranslationFormFilter extends BaseofferTranslationFormFilter
{ {
public function configure() public function configure()
{ {
......
...@@ -13,7 +13,7 @@ class OfferForm extends BaseOfferForm ...@@ -13,7 +13,7 @@ class OfferForm extends BaseOfferForm
public function configure() public function configure()
{ {
$this->embedI18n(array('ru', 'en')); $this->embedI18n(array('ru', 'en'));
$this->useFields(array('ru', 'en', 'quantity_type_select', 'price', 'sort', 'is_wholesale', 'img', 'product_id')); $this->useFields(array('ru', 'en', 'quantity_type_select', 'price', 'sort', 'discount_available', 'img', 'product_id'));
$parentId = sfContext::getInstance()->getRequest()->getParameter('parentId'); $parentId = sfContext::getInstance()->getRequest()->getParameter('parentId');
if($parentId){ if($parentId){
...@@ -22,7 +22,7 @@ class OfferForm extends BaseOfferForm ...@@ -22,7 +22,7 @@ class OfferForm extends BaseOfferForm
$this->setDefault('product_id', $parentId); $this->setDefault('product_id', $parentId);
} }
} }
$this->widgetSchema['is_wholesale'] = new sfWidgetFormInputCheckbox(array('label' => 'Чужой товар'), array("required" => true)); $this->widgetSchema['discount_available'] = new sfWidgetFormInputCheckbox(array('label' => 'Доступен со скидкой?'), array("required" => true));
$this->widgetSchema['product_id'] = new sfWidgetFormInputHidden(); $this->widgetSchema['product_id'] = new sfWidgetFormInputHidden();
$this->widgetSchema['ru']['title'] = new sfWidgetFormInputText(array("label" => "Название"), array("size" => 64, "maxlength" => 255, "required" => true)); $this->widgetSchema['ru']['title'] = new sfWidgetFormInputText(array("label" => "Название"), array("size" => 64, "maxlength" => 255, "required" => true));
$this->widgetSchema['en']['title'] = new sfWidgetFormInputText(array("label" => "Название"), array("size" => 64, "maxlength" => 255, "required" => true)); $this->widgetSchema['en']['title'] = new sfWidgetFormInputText(array("label" => "Название"), array("size" => 64, "maxlength" => 255, "required" => true));
......
...@@ -24,6 +24,7 @@ abstract class BaseOfferForm extends BaseFormDoctrine ...@@ -24,6 +24,7 @@ abstract class BaseOfferForm extends BaseFormDoctrine
'is_delete' => new sfWidgetFormInputCheckbox(array(), array("required" => true)), 'is_delete' => new sfWidgetFormInputCheckbox(array(), array("required" => true)),
'is_wholesale' => new sfWidgetFormInputCheckbox(array(), array("required" => true)), 'is_wholesale' => new sfWidgetFormInputCheckbox(array(), array("required" => true)),
'sort' => new sfWidgetFormInputText(array(), array("size" => 8, "maxlength" => 8)), 'sort' => new sfWidgetFormInputText(array(), array("size" => 8, "maxlength" => 8)),
'discount_available' => new sfWidgetFormInputCheckbox(array(), array()),
'created_at' => new sfWidgetFormDateTime(array(), array("required" => true)), 'created_at' => new sfWidgetFormDateTime(array(), array("required" => true)),
'updated_at' => new sfWidgetFormDateTime(array(), array("required" => true)), 'updated_at' => new sfWidgetFormDateTime(array(), array("required" => true)),
)); ));
...@@ -38,6 +39,7 @@ abstract class BaseOfferForm extends BaseFormDoctrine ...@@ -38,6 +39,7 @@ abstract class BaseOfferForm extends BaseFormDoctrine
'is_delete' => new sfValidatorBoolean(array('required' => false)), 'is_delete' => new sfValidatorBoolean(array('required' => false)),
'is_wholesale' => new sfValidatorBoolean(array('required' => false)), 'is_wholesale' => new sfValidatorBoolean(array('required' => false)),
'sort' => new sfValidatorInteger(array('required' => false)), 'sort' => new sfValidatorInteger(array('required' => false)),
'discount_available' => new sfValidatorBoolean(array('required' => false)),
'created_at' => new sfValidatorDateTime(), 'created_at' => new sfValidatorDateTime(),
'updated_at' => new sfValidatorDateTime(), 'updated_at' => new sfValidatorDateTime(),
)); ));
......
...@@ -22,9 +22,6 @@ class wwwBasketOrderForm extends BaseBasketOrderForm ...@@ -22,9 +22,6 @@ class wwwBasketOrderForm extends BaseBasketOrderForm
$this->validatorSchema['delivery_type'] = new sfValidatorChoice(array('choices' => array(0 => 'Самовывоз', 1 => 'Доставка по адресу'), 'required' => true)); $this->validatorSchema['delivery_type'] = new sfValidatorChoice(array('choices' => array(0 => 'Самовывоз', 1 => 'Доставка по адресу'), 'required' => true));
$this->validatorSchema['phone'] = new sfValidatorAnd(array( $this->validatorSchema['phone'] = new sfValidatorString(array('max_length' => 24, 'required' => true));
new sfValidatorNumber(array('required' => true)),
new sfValidatorString(array('max_length' => 24, 'required' => true))
));
} }
} }
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
* @property boolean $is_confirm_admin * @property boolean $is_confirm_admin
* @property boolean $is_payed * @property boolean $is_payed
* @property boolean $is_given * @property boolean $is_given
* @property DiscountPhone $DiscountPhone
* @property Doctrine_Collection $Basket * @property Doctrine_Collection $Basket
* *
* @method string getUsername() Returns the current record's "username" value * @method string getUsername() Returns the current record's "username" value
...@@ -31,6 +32,7 @@ ...@@ -31,6 +32,7 @@
* @method boolean getIsConfirmAdmin() Returns the current record's "is_confirm_admin" value * @method boolean getIsConfirmAdmin() Returns the current record's "is_confirm_admin" value
* @method boolean getIsPayed() Returns the current record's "is_payed" value * @method boolean getIsPayed() Returns the current record's "is_payed" value
* @method boolean getIsGiven() Returns the current record's "is_given" value * @method boolean getIsGiven() Returns the current record's "is_given" value
* @method DiscountPhone getDiscountPhone() Returns the current record's "DiscountPhone" value
* @method Doctrine_Collection getBasket() Returns the current record's "Basket" collection * @method Doctrine_Collection getBasket() Returns the current record's "Basket" collection
* @method BasketOrder setUsername() Sets the current record's "username" value * @method BasketOrder setUsername() Sets the current record's "username" value
* @method BasketOrder setPhone() Sets the current record's "phone" value * @method BasketOrder setPhone() Sets the current record's "phone" value
...@@ -44,6 +46,7 @@ ...@@ -44,6 +46,7 @@
* @method BasketOrder setIsConfirmAdmin() Sets the current record's "is_confirm_admin" value * @method BasketOrder setIsConfirmAdmin() Sets the current record's "is_confirm_admin" value
* @method BasketOrder setIsPayed() Sets the current record's "is_payed" value * @method BasketOrder setIsPayed() Sets the current record's "is_payed" value
* @method BasketOrder setIsGiven() Sets the current record's "is_given" value * @method BasketOrder setIsGiven() Sets the current record's "is_given" value
* @method BasketOrder setDiscountPhone() Sets the current record's "DiscountPhone" value
* @method BasketOrder setBasket() Sets the current record's "Basket" collection * @method BasketOrder setBasket() Sets the current record's "Basket" collection
* *
* @package sf * @package sf
...@@ -126,6 +129,11 @@ abstract class BaseBasketOrder extends sfDoctrineRecord ...@@ -126,6 +129,11 @@ abstract class BaseBasketOrder extends sfDoctrineRecord
public function setUp() public function setUp()
{ {
parent::setUp(); parent::setUp();
$this->hasOne('DiscountPhone', array(
'local' => 'id',
'foreign' => 'order_id',
'onDelete' => 'SET NULL'));
$this->hasMany('Basket', array( $this->hasMany('Basket', array(
'local' => 'id', 'local' => 'id',
'foreign' => 'basket_order_id')); 'foreign' => 'basket_order_id'));
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
* @property boolean $is_delete * @property boolean $is_delete
* @property boolean $is_wholesale * @property boolean $is_wholesale
* @property integer $sort * @property integer $sort
* @property boolean $discount_available
* @property Product $Product * @property Product $Product
* @property Doctrine_Collection $BasketOffer * @property Doctrine_Collection $BasketOffer
* *
...@@ -28,6 +29,7 @@ ...@@ -28,6 +29,7 @@
* @method boolean getIsDelete() Returns the current record's "is_delete" value * @method boolean getIsDelete() Returns the current record's "is_delete" value
* @method boolean getIsWholesale() Returns the current record's "is_wholesale" value * @method boolean getIsWholesale() Returns the current record's "is_wholesale" value
* @method integer getSort() Returns the current record's "sort" value * @method integer getSort() Returns the current record's "sort" value
* @method boolean getDiscountAvailable() Returns the current record's "discount_available" value
* @method Product getProduct() Returns the current record's "Product" value * @method Product getProduct() Returns the current record's "Product" value
* @method Doctrine_Collection getBasketOffer() Returns the current record's "BasketOffer" collection * @method Doctrine_Collection getBasketOffer() Returns the current record's "BasketOffer" collection
* @method Offer setInnerId() Sets the current record's "inner_id" value * @method Offer setInnerId() Sets the current record's "inner_id" value
...@@ -40,6 +42,7 @@ ...@@ -40,6 +42,7 @@
* @method Offer setIsDelete() Sets the current record's "is_delete" value * @method Offer setIsDelete() Sets the current record's "is_delete" value
* @method Offer setIsWholesale() Sets the current record's "is_wholesale" value * @method Offer setIsWholesale() Sets the current record's "is_wholesale" value
* @method Offer setSort() Sets the current record's "sort" value * @method Offer setSort() Sets the current record's "sort" value
* @method Offer setDiscountAvailable() Sets the current record's "discount_available" value
* @method Offer setProduct() Sets the current record's "Product" value * @method Offer setProduct() Sets the current record's "Product" value
* @method Offer setBasketOffer() Sets the current record's "BasketOffer" collection * @method Offer setBasketOffer() Sets the current record's "BasketOffer" collection
* *
...@@ -100,6 +103,10 @@ abstract class BaseOffer extends sfDoctrineRecord ...@@ -100,6 +103,10 @@ abstract class BaseOffer extends sfDoctrineRecord
'type' => 'integer', 'type' => 'integer',
'default' => 0, 'default' => 0,
)); ));
$this->hasColumn('discount_available', 'boolean', null, array(
'type' => 'boolean',
'default' => false,
));
} }
public function setUp() public function setUp()
......
...@@ -222,16 +222,19 @@ class exchangeDeleteimageTask extends sfBaseTask ...@@ -222,16 +222,19 @@ class exchangeDeleteimageTask extends sfBaseTask
} }
$error = array(); $error = array();
$countDel = 0; $countDel = 0;
foreach ($allImageInDir as $item) { if (count($allImageInDir) > 0 ) {
if (file_exists($item)) { foreach ($allImageInDir as $item) {
chmod($item, 0777); if (file_exists($item)) {
unlink($item); chmod($item, 0777);
$countDel++; unlink($item);
}else { $countDel++;
$error[] = 'file not found:' . $item; }else {
$error[] = 'file not found:' . $item;
}
} }
} }
print_r($allImageInDir); print_r($allImageInDir);
$this->log('Count delete image: ' . $countDel); $this->log('Count delete image: ' . $countDel);
$this->log('Image delete done: [' . round((microtime(true) - $time_start) * 1000) . ' ms]'); $this->log('Image delete done: [' . round((microtime(true) - $time_start) * 1000) . ' ms]');
......
<?php <?php
require_once(dirname(__FILE__).'/../config/ProjectConfiguration.class.php'); require_once(dirname(__FILE__).'/../config/ProjectConfiguration.class.php');
$configuration = ProjectConfiguration::getApplicationConfiguration('arm', 'prod', false); $configuration = ProjectConfiguration::getApplicationConfiguration('arm', 'dev', true);
sfContext::createInstance($configuration)->dispatch(); sfContext::createInstance($configuration)->dispatch();
...@@ -399,6 +399,41 @@ ...@@ -399,6 +399,41 @@
font-family: 'robotoregular'; font-family: 'robotoregular';
} }
.product_offer table tr.discount::after {
content: '';
position: absolute;
width: 10px;
height: 10px;
left: -5px;
top: 5px;
background-repeat: no-repeat;
background-size: contain;
background-image: url(/i/percent_colored.svg);
}
.header_mobile.mobile.discount::after {
content: '';
width: 61px;
height: 137px;
position: absolute;
background-repeat: no-repeat;
background-size: contain;
right: 6px;
top: 96px;
z-index: -1;
}
.header_mobile.mobile.discount.d3::after {
background-image: url(/i/d3.svg);
}
.header_mobile.mobile.discount.d5::after {
background-image: url(/i/d5.svg);
}
.header_mobile.mobile.discount.d7::after {
background-image: url(/i/d7.svg);
}
.header_mobile.mobile.discount.d10::after {
background-image: url(/i/d10.svg);
}
.product__advantages__info__link { .product__advantages__info__link {
font-size: 20px; font-size: 20px;
} }
...@@ -443,7 +478,7 @@ ...@@ -443,7 +478,7 @@
height: auto; height: auto;
} }
.video { .video {
height: 62vw; height: 62vw !important;
} }
.article_wrap { .article_wrap {
...@@ -674,6 +709,7 @@ ...@@ -674,6 +709,7 @@
} }
.footer_table_main { .footer_table_main {
padding: 20px 0 20px; padding: 20px 0 20px;
border-top: 1px solid #ececec;
} }
.footer_table_main__policy { .footer_table_main__policy {
font-style: normal; font-style: normal;
...@@ -731,8 +767,62 @@ ...@@ -731,8 +767,62 @@
max-height: 10000px; max-height: 10000px;
} }
.overlay_discount__item {
height: 100%;
max-height: 510px;
}
.image_discount {
display: none;
}
.form_discount {
width: 100%;
max-height: 510px;
height: 100%;
}
.discount_available {
left: 13px !important;
}
.discount_available.show .discount_available_desc{
max-height: 100px;
padding: 5px 5px;
width: 100%;
}
.discount_available.show .discount_available_title {
border-radius: 0 0 4px 4px;
}
.discount_available.show:before {
background-image: url(/i/white_angle.svg);
transition: all 0s ease-in-out;
}
.basket_refresh {
position: relative;
overflow: visible;
z-index: 1;
}
.discount_form__title {
font-size: 21px;
}
} }
@media (min-width: 650px){
.catalog_category_child_item:hover .discount_available_desc{
max-height: 100px;
padding: 5px 5px;
width: 100%;
}
.catalog_category_child_item:hover .discount_available_title {
border-radius: 0 0 4px 4px;
}
.catalog_category_child_item:hover .discount_available:before {
background-image: url(/i/white_angle.svg);
transition: all 0s ease-in-out;
}
}
@media (min-width: 1100px) and (max-width: 1200px) { @media (min-width: 1100px) and (max-width: 1200px) {
.top_menu__elem{ .top_menu__elem{
......
...@@ -230,22 +230,56 @@ ...@@ -230,22 +230,56 @@
margin-bottom: 5px; margin-bottom: 5px;
margin-top: 8px; margin-top: 8px;
} }
.basket_btn::before { .basket_btn::before {
content: ''; content: '';
background-image: url(/i/basket.svg); background-image: url(/i/basket.svg);
width: 23px; width: 23px;
height: 25px; height: 25px;
display: inline-block; display: inline-block;
position: absolute;
top: 50%;
left: 20px;
margin-top: -12px;
background-size: cover;
background-position: 100% 0;
transition: background-image 0.1s ease-in-out;
}
.basket_btn:not(.basket_btn_disabled):hover::before {
background-image: url(/i/basket-green.svg);
}
.top_right.discount::after {
width: 65px;
height: 148px;
background-size: contain;
background-repeat: no-repeat;
content: "";
position: absolute; position: absolute;
top: 50%; top: 75px;
left: 20px; right: 0;
margin-top: -12px; z-index: -1;
background-size: cover;
background-position: 100% 0;
transition: background-image 0.1s ease-in-out;
} }
.basket_btn:not(.basket_btn_disabled):hover::before { .top_right.discount.d3::after {
background-image: url(/i/basket-green.svg); background-image: url(/i/d3.svg);
}
.top_right.discount.d5::after {
background-image: url(/i/d5.svg);
}
.top_right.discount.d7::after {
background-image: url(/i/d7.svg);
}
.top_right.discount.d10::after {
background-image: url(/i/d10.svg);
}
.top_right.discount_basket::after {
content: '';
width: 30px;
height: 30px;
background-size: contain;
background-repeat: no-repeat;
position: absolute;
top: 5px;
right: -10px;
background-image: url(/i/percent_white.svg);
} }
.swicher_lang { .swicher_lang {
background-image: url(/i/switch-lang.svg); background-image: url(/i/switch-lang.svg);
...@@ -567,7 +601,18 @@ ...@@ -567,7 +601,18 @@
color: var(--green-color-text); color: var(--green-color-text);
} }
.product_offer table td { .product_offer table td {
padding: 12px 10px 11px; padding: 12px 0 11px 10px;
}
.product_offer table tr.discount::after {
content: '';
position: absolute;
width: 16px;
height: 16px;
left: -20px;
top: 5px;
background-repeat: no-repeat;
background-size: contain;
background-image: url(/i/percent_colored.svg);
} }
.product_offer table td:first-child { .product_offer table td:first-child {
padding-left: 0; padding-left: 0;
...@@ -728,6 +773,58 @@ ...@@ -728,6 +773,58 @@
display: inline-block; display: inline-block;
margin: 0 8px 30px; margin: 0 8px 30px;
} }
.catalog_category_child_item.discount {
}
.catalog_category_child_item .discount_available {
position: absolute;
color: #FFFFFF;
width: 150px;
left: 21px;
top: -5px;
z-index: 100;
}
.discount_available .discount_available_desc {
background-color: #FFFFFF;
color: #6a6a6a;
overflow: hidden;
max-height: 0px;
font-family: 'robotolight';
font-size: 12px;
padding: 0 5px;
box-shadow: 0 0 14px rgba(0,0,0,0.2);
transition: all 0.3s ease-in-out;
}
.discount_available .discount_available_title {
background-color: #fb8100;
color: #FFFFFF;
width: 150px;
border-radius: 0 4px 4px 4px;
padding: 7px 7px 7px 10px;
z-index: 100;
text-transform: uppercase;
font-family: 'robotobold';
font-size: 11px;
}
.catalog_category_child_item .discount_available::before {
content: '';
width: 14px;
height: 6px;
position: absolute;
background-size: contain;
background-repeat: no-repeat;
background-image: url(/i/orange_angle.svg);
left: -12px;
top: 0;
transition: all 0.48s ease-in-out;
}
.lending_product_area .catalog_category_child_item:nth-child(n+9) { .lending_product_area .catalog_category_child_item:nth-child(n+9) {
display: none; display: none;
} }
...@@ -913,6 +1010,7 @@ ...@@ -913,6 +1010,7 @@
background-image: url(/i/combined-shape-minus.svg); background-image: url(/i/combined-shape-minus.svg);
outline: none; outline: none;
padding: 0; padding: 0;
border-radius: 0;
} }
.product_counter_val { .product_counter_val {
width: 45px; width: 45px;
...@@ -933,6 +1031,7 @@ ...@@ -933,6 +1031,7 @@
height: 29px; height: 29px;
vertical-align: top; vertical-align: top;
float: left; float: left;
border-radius: 0px !important;
} }
.product_counter_plus { .product_counter_plus {
width: 23px; width: 23px;
...@@ -963,6 +1062,7 @@ ...@@ -963,6 +1062,7 @@
background-image: url(/i/combined-shape-plus.svg); background-image: url(/i/combined-shape-plus.svg);
outline: none; outline: none;
padding: 0; padding: 0;
border-radius: 0;
} }
.product_price_trigger { .product_price_trigger {
padding: 0; padding: 0;
...@@ -1725,6 +1825,18 @@ label.custom_checkbox input:checked + .after_checkbox { ...@@ -1725,6 +1825,18 @@ label.custom_checkbox input:checked + .after_checkbox {
background-position: center; background-position: center;
border: 1px solid #ececec; border: 1px solid #ececec;
} }
.basket_img.discount::after {
content: '';
position: absolute;
width: 30px;
height: 30px;
top: -10px;
right: -10px;
background-image: url(/i/percent_colored.svg);
background-repeat: no-repeat;
background-size: contain;
z-index: 100;
}
.basket_img__item{ .basket_img__item{
width:100%; width:100%;
height:100%; height:100%;
...@@ -1835,7 +1947,8 @@ label.custom_checkbox input:checked + .after_checkbox { ...@@ -1835,7 +1947,8 @@ label.custom_checkbox input:checked + .after_checkbox {
.basket_get{ .basket_get{
margin-bottom: 40px; margin-bottom: 40px;
} }
.basket_buyer__item{ .basket_buyer__item {
position: relative;
display: inline-block; display: inline-block;
vertical-align: top; vertical-align: top;
} }
...@@ -2160,7 +2273,6 @@ h2{ ...@@ -2160,7 +2273,6 @@ h2{
display: inline-block; display: inline-block;
text-align: center; text-align: center;
vertical-align: middle; vertical-align: middle;
width: calc(100% - 5px);
} }
.review_file_overlay__item{ .review_file_overlay__item{
padding:20px; padding:20px;
...@@ -2240,11 +2352,13 @@ h2{ ...@@ -2240,11 +2352,13 @@ h2{
.search_active .search_overlay{ .search_active .search_overlay{
display: block; display: block;
} }
.search_active .body_wrapper{ .search_active .body_wrapper,
.overlay_discount_active .body_wrapper {
-webkit-filter: blur(10px); -webkit-filter: blur(10px);
-moz-filter: blur(10px); -moz-filter: blur(10px);
filter: blur(10px); filter: blur(10px);
opacity: 0.4; opacity: 0.4;
transition: all 0.3s ease-in-out;
} }
.search_overlay__line__btn{ .search_overlay__line__btn{
margin-bottom: 0; margin-bottom: 0;
...@@ -2687,4 +2801,160 @@ h2{ ...@@ -2687,4 +2801,160 @@ h2{
.fotorama__stage__frame { .fotorama__stage__frame {
border: 1px solid #ececec !important; border: 1px solid #ececec !important;
}
.discount_form__checkbox {
max-width: 325px
}
.discount_form__checkbox label {
text-align: left;
}
.discount_form{
background: #fff;
margin: 0 auto;
border-radius: 0 2px 2px 0;
width: 100%;
max-width:400px;
margin: 0;
}
.discount_form input[type="text"]{
width:100%;
}
.discount_form__inp_wrap{
margin-bottom: 25px;
text-align:left;
}
.discount_form_done__title,
.discount_form_done .discount_form__process{
display:none;
}
.discount_form_done .discount_form_done__title{
display:block;
font-size: 20px;
color: var(--green-color-text);
font-family: 'robotolight';
}
.discount_form_done__title__base{
font-size:30px;
}
.discount_form__title{
font-size: 31px;
padding-bottom: 15px;
color: var(--green-color-text);
font-family: 'robotoregular';
}
.discount_form_head_text {
font-size: 18px;
font-family: 'robotoregular';
color: var(--green-color-text);
text-align: left;
padding: 25px 0 5px 0;
}
.discount_form_text {
font-size: 15px;
font-family: 'robotoregular';
text-align: left;
padding-bottom: 20px;
}
.discount_form__submit{
font-size: 15px;
font-size: 15px;
padding: 9px 23px;
cursor: pointer;
width: 100%;
}
.overlay_discount_active{
position: fixed;
background-image: url(/i/drops.png);
background-repeat: repeat;
background-size: cover;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 1001;
text-align: center;
vertical-align: middle;
overflow-y: scroll;
}
.review_file_overlay{
z-index: 1001;
}
.overlay_discount{
display:none;
z-index:1002;
}
.overlay_discount_active {
display:block;
}
.video_overlay__close:hover{
opacity: 1;
}
.overlay_discount:after{
content: '';
display: inline-block;
height: 100%;
width: 0;
vertical-align: middle;
}
.overlay_discount__item{
display: inline-block;
text-align: center;
vertical-align: middle;
box-shadow: 0 0 35px rgba(0,0,0,0.3);
max-height: 400px;
}
.discount_error {
background-color: #FFFFFF;
padding: 35px 35px;
margin: 0 auto;
border-radius: 2px;
display: inline-block;
max-width: 400px;
width: 100%;
}
.image_discount {
width: 350px;
height: 400px;
background-repeat: no-repeat;
background-size: contain;
background-image: url(/i/discount-image.png);
display: inline-block;
border-radius: 2px 0 0 2px;
vertical-align: top;
}
.form_discount {
padding: 35px 40px;
width: 490px;
height: 100%;
vertical-align: top;
display: inline-block;
background-color: #FFFFFF;
border-radius: 0 2px 2px 0;
vertical-align: top;
max-height: 400px;
}
.phone_info {
position: absolute;
display: inherit;
margin-bottom: 10px;
font-size: 11px;
font-family: 'robotolight', Arial;
font-style: italic;
top: -17px;
left: 0;
}
.basket_discount {
display: block;
color: #979797;
font-size: 15px !important;
text-align: right;
position: absolute;
top: -15px;
right: 0;
}
.basket_item {
display: block;
text-align: right;
color: #074611;
} }
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment