Commit 597512107dc6efefc20500e2b5b935eb00085516

Authored by Yarik
1 parent cd0acb45

Import returned back

common/models/FilterCache.php 100644 → 100755
common/modules/comment/readme 100644 → 100755
common/modules/product/models/Export.php 100644 → 100755
... ... @@ -114,7 +114,7 @@
114 114 $fittersArray = [];
115 115 foreach($filters as $filter) {
116 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 642 $filters_options = explode(',', $filter[ 2 ][ 0 ]);
643 643  
644 644 foreach ($filters_options as $filter_options) {
645   - $parsed_filter = $this->parseFilter($filter_options);
  645 +// $parsed_filter = $this->parseFilter($filter_options);
646 646 $value = null;
647   - if ($parsed_filter !== false) {
  647 +// if ($parsed_filter !== false) {
648 648 $value = TaxValueString::find()
649 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 652 ->andWhere([ 'tax_option.tax_group_id' => $taxGroup->tax_group_id ])
652 653 ->one();
653   - }
  654 +// }
654 655  
655 656 if (!$value instanceof TaxValueString) {
656 657 // Create option
657 658 $option = new TaxOption();
658 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 664 $option->name = $filter_options;
664   - }
  665 +// }
665 666 $option->save();
666 667  
667 668 $value = new TaxValueString();
668 669 $value->tax_option_id = $option->tax_option_id;
669   - $value->value = $option->name;
  670 + $value->value = $filter_options;
670 671 $value->save();
671 672  
672 673 $option->default_value = $value->tax_value_id;
673 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 676 $options[] = $value->tax_option_id;
685 677  
... ... @@ -690,13 +682,13 @@
690 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 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/controllers/FilterController.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/web/images/new_img/ico-1.png 100644 → 100755

132 Bytes | W: | H:

132 Bytes | W: | H:

  • 2-up
  • Swipe
  • Onion skin
frontend/web/images/new_img/ico/ico-19.png 100644 → 100755

1.05 KB | W: | H:

1.05 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
frontend/web/js/filter.js 100644 → 100755
frontend/web/sitemap_back.xml 100644 → 100755
frontend/widgets/FilterList.php 100644 → 100755