Commit 0e1d5865172104b8eb935250693b285a941a60db
Merge remote-tracking branch 'origin/master'
# Conflicts: # frontend/views/layouts/main.php
Showing
18 changed files
with
21 additions
and
32 deletions
Show diff stats
@@ -114,7 +114,7 @@ | @@ -114,7 +114,7 @@ | ||
114 | $fittersArray = []; | 114 | $fittersArray = []; |
115 | foreach($filters as $filter) { | 115 | foreach($filters as $filter) { |
116 | if($filter->taxGroup instanceof TaxGroup){ | 116 | if($filter->taxGroup instanceof TaxGroup){ |
117 | - $fittersArray[ $filter->taxGroup->alias ][] = $filter->value . '(#' . $filter->alias . '#)'; | 117 | + $fittersArray[ $filter->taxGroup->alias ][] = $filter->value; |
118 | } | 118 | } |
119 | 119 | ||
120 | } | 120 | } |
common/modules/product/models/Import.php
@@ -642,44 +642,36 @@ | @@ -642,44 +642,36 @@ | ||
642 | $filters_options = explode(',', $filter[ 2 ][ 0 ]); | 642 | $filters_options = explode(',', $filter[ 2 ][ 0 ]); |
643 | 643 | ||
644 | foreach ($filters_options as $filter_options) { | 644 | foreach ($filters_options as $filter_options) { |
645 | - $parsed_filter = $this->parseFilter($filter_options); | 645 | +// $parsed_filter = $this->parseFilter($filter_options); |
646 | $value = null; | 646 | $value = null; |
647 | - if ($parsed_filter !== false) { | 647 | +// if ($parsed_filter !== false) { |
648 | $value = TaxValueString::find() | 648 | $value = TaxValueString::find() |
649 | ->innerJoinWith('taxOption') | 649 | ->innerJoinWith('taxOption') |
650 | - ->andWhere([ 'tax_option.alias' => $parsed_filter[ 2 ] ]) | 650 | +// ->andWhere([ 'tax_option.alias' => $parsed_filter[ 2 ] ]) |
651 | + ->andWhere([ 'value' => $filter_options ]) | ||
651 | ->andWhere([ 'tax_option.tax_group_id' => $taxGroup->tax_group_id ]) | 652 | ->andWhere([ 'tax_option.tax_group_id' => $taxGroup->tax_group_id ]) |
652 | ->one(); | 653 | ->one(); |
653 | - } | 654 | +// } |
654 | 655 | ||
655 | if (!$value instanceof TaxValueString) { | 656 | if (!$value instanceof TaxValueString) { |
656 | // Create option | 657 | // Create option |
657 | $option = new TaxOption(); | 658 | $option = new TaxOption(); |
658 | $option->tax_group_id = $taxGroup->tax_group_id; | 659 | $option->tax_group_id = $taxGroup->tax_group_id; |
659 | - if($parsed_filter !== false) { | ||
660 | - $option->name = $parsed_filter[1]; | ||
661 | - $option->alias = $parsed_filter[2]; | ||
662 | - } else { | 660 | +// if($parsed_filter !== false) { |
661 | +// $option->name = $parsed_filter[1]; | ||
662 | +// $option->alias = $parsed_filter[2]; | ||
663 | +// } else { | ||
663 | $option->name = $filter_options; | 664 | $option->name = $filter_options; |
664 | - } | 665 | +// } |
665 | $option->save(); | 666 | $option->save(); |
666 | 667 | ||
667 | $value = new TaxValueString(); | 668 | $value = new TaxValueString(); |
668 | $value->tax_option_id = $option->tax_option_id; | 669 | $value->tax_option_id = $option->tax_option_id; |
669 | - $value->value = $option->name; | 670 | + $value->value = $filter_options; |
670 | $value->save(); | 671 | $value->save(); |
671 | 672 | ||
672 | $option->default_value = $value->tax_value_id; | 673 | $option->default_value = $value->tax_value_id; |
673 | $option->save(); | 674 | $option->save(); |
674 | - } else { | ||
675 | - if($parsed_filter !== false) { | ||
676 | - $value->value = $parsed_filter[1]; | ||
677 | - $value->taxOption->name = $parsed_filter[1]; | ||
678 | - } else { | ||
679 | - $value->value = $filter_options; | ||
680 | - $value->taxOption->name = $filter_options; | ||
681 | - } | ||
682 | - $value->save(); | ||
683 | } | 675 | } |
684 | $options[] = $value->tax_option_id; | 676 | $options[] = $value->tax_option_id; |
685 | 677 | ||
@@ -690,13 +682,13 @@ | @@ -690,13 +682,13 @@ | ||
690 | return $options; | 682 | return $options; |
691 | } | 683 | } |
692 | 684 | ||
693 | - private function parseFilter($filter) | ||
694 | - { | ||
695 | - $regex = '/^(.+)\(#(.+)#\)$/'; | ||
696 | - if (preg_match($regex, $filter, $result)) { | ||
697 | - return $result; | ||
698 | - } else { | ||
699 | - return false; | ||
700 | - } | ||
701 | - } | 685 | +// private function parseFilter($filter) |
686 | +// { | ||
687 | +// $regex = '/^(.+)\(#(.+)#\)$/'; | ||
688 | +// if (preg_match($regex, $filter, $result)) { | ||
689 | +// return $result; | ||
690 | +// } else { | ||
691 | +// return false; | ||
692 | +// } | ||
693 | +// } | ||
702 | } | 694 | } |
703 | \ No newline at end of file | 695 | \ No newline at end of file |
common/modules/product/views/manage/export-process.php
100644 → 100755
common/modules/product/views/manage/export.php
100644 → 100755
console/migrations/m161020_145858_product_variant_add_status.php
100644 → 100755
console/migrations/m161104_094427_filter_cache.php
100644 → 100755
console/migrations/m170202_140836_add_description_column_to_brand_table.php
100644 → 100755
console/migrations/yarik/m170302_170344_add_synonym_and_use_in_menu.php
100644 → 100755
console/migrations/yarik/m170302_173310_add_category_synonym_column.php
100644 → 100755
frontend/views/layouts/main.php
@@ -423,9 +423,6 @@ | @@ -423,9 +423,6 @@ | ||
423 | <li> | 423 | <li> |
424 | <a href="https://www.facebook.com/linija.svitla" class="facebook" target="_blank" rel="nofollow"></a> | 424 | <a href="https://www.facebook.com/linija.svitla" class="facebook" target="_blank" rel="nofollow"></a> |
425 | </li> | 425 | </li> |
426 | -<!-- <li>--> | ||
427 | -<!-- <a href="http://vk.com/linija_svitla" class="vkontakte" target="_blank" rel="nofollow"></a>--> | ||
428 | -<!-- </li>--> | ||
429 | <li> | 426 | <li> |
430 | <a href="#" class="twitter" target="_blank" rel="nofollow"></a> | 427 | <a href="#" class="twitter" target="_blank" rel="nofollow"></a> |
431 | </li> | 428 | </li> |