Commit af0eaa160117809626fa1a5160d0cce4aa5dcdba
Merge branch 'fasovki' into 'master'
Fasovki => master price fix See merge request !5
Showing
1 changed file
with
15 additions
and
13 deletions
Show diff stats
src/app/frontend/controllers/PageController.php
... | ... | @@ -1034,22 +1034,22 @@ |
1034 | 1034 | $item = $this->models->getItems()->getOneItem( $this->lang_id, $item_id ); |
1035 | 1035 | $filters = $this->models->getFilters()->getFiltersByItemId( $this->lang_id, $item_id ); |
1036 | 1036 | $colors_info = $this->models->getItems()->getColorsInfoByColorId( $this->lang_id, $item['0']['color_id'] ); |
1037 | - | |
1037 | + | |
1038 | 1038 | $item['0']['color_title'] = NULL; |
1039 | 1039 | $item['0']['absolute_color'] = NULL; |
1040 | 1040 | $item['0']['color'] = NULL; |
1041 | - | |
1041 | + | |
1042 | 1042 | if( !empty( $colors_info ) ) |
1043 | 1043 | { |
1044 | 1044 | $item['0']['color_title'] = $colors_info['0']['color_title']; |
1045 | 1045 | $item['0']['absolute_color'] = $colors_info['0']['absolute_color']; |
1046 | - | |
1047 | - | |
1046 | + | |
1047 | + | |
1048 | 1048 | $item['0']['color'] = |
1049 | 1049 | '<div class="float properties">'.$this->languages->getTranslation()->_("choose_color").': </div>'. |
1050 | 1050 | '<div class="float properties" style="color:'.$colors_info['0']['absolute_color'].'">'.$colors_info['0']['color_title'].'</div>'; |
1051 | 1051 | } |
1052 | - | |
1052 | + | |
1053 | 1053 | $item['0']['explode'] = explode( '/', $item['0']['full_alias'] ); |
1054 | 1054 | $item['0']['type_alias'] = $item['0']['explode']['1']; |
1055 | 1055 | $item['0']['subtype_alias'] = $item['0']['explode']['2']; |
... | ... | @@ -1060,29 +1060,29 @@ |
1060 | 1060 | $item['0']['status_real'] = $item['0']['status']; |
1061 | 1061 | $item['0']['status'] = $item['0']['status'] == 1 ? '<div data-stock="'.$item['0']['status'].'" id="stock" class="properties properties_presence ">'.$this->languages->getTranslation()->_("in_stock").'</div>' : ($item['0']['status'] == 2 ? '<div data-stock="'.$item['0']['status'].'" id="stock" class="properties properties_absent">'.$this->languages->getTranslation()->_("znyt").'</div>' : '<div data-stock="'.$item['0']['status'].'" id="stock" class="properties properties_absent">'.$this->languages->getTranslation()->_("missing").'</div>'); |
1062 | 1062 | $item['0']['image'] = ''; |
1063 | - | |
1064 | - | |
1063 | + | |
1064 | + | |
1065 | 1065 | $item['0']['image'] .= |
1066 | 1066 | '<li class="float width_400">'. |
1067 | 1067 | '<a href="'.$this->storage->getPhotoUrl( $item['0']['cover'], 'avatar', '400x' ).'" title="'.$item['0']['title'].'" data-options="thumbnail: \''.$this->storage->getPhotoUrl( $item['0']['cover'], 'avatar', '800x' ).'\'" class="thumbnail">'. |
1068 | 1068 | '<img src="'.$this->storage->getPhotoUrl( $item['0']['cover'], 'avatar', '400x' ).'" alt="'.$item['0']['title'].'" class="image_400">'. |
1069 | 1069 | '</a>'. |
1070 | 1070 | '</li>'; |
1071 | - | |
1071 | + | |
1072 | 1072 | if( !empty( $item['0']['images'] ) && !empty( $item['0']['cover'] ) ) |
1073 | 1073 | { |
1074 | 1074 | foreach( $item['0']['images'] as $k => $i ) |
1075 | 1075 | { |
1076 | - | |
1076 | + | |
1077 | 1077 | $item['0']['image'] .= |
1078 | 1078 | '<li class="float width_128 '.($k%3==0 ? 'last' : '').'">'. |
1079 | 1079 | '<a href="'.$this->storage->getPhotoUrl( $i, 'group', '800x' ).'" title="'.$item['0']['title'].'" data-options="thumbnail: \''.$this->storage->getPhotoUrl( $i, 'group', '128x128' ).'\'" class="thumbnail">'. |
1080 | 1080 | '<img src="'.$this->storage->getPhotoUrl( $i, 'group', '128x128' ).'" alt="'.$item['0']['title'].'" class="image_128">'. |
1081 | 1081 | '</a>'. |
1082 | 1082 | '</li>'; |
1083 | - | |
1083 | + | |
1084 | 1084 | } |
1085 | - | |
1085 | + | |
1086 | 1086 | $item['0']['image'] .= |
1087 | 1087 | '<li class="float width_128 '.(count($item['0']['images'])%3==0 ? 'last' : '').'">'. |
1088 | 1088 | '<a href="'.$this->storage->getPhotoUrl( $item['0']['cover'], 'avatar', '800x' ).'" title="'.$item['0']['title'].'" data-options="thumbnail: \''.$this->storage->getPhotoUrl( $item['0']['cover'], 'avatar', '128x' ).'\'" class="thumbnail">'. |
... | ... | @@ -1090,9 +1090,9 @@ |
1090 | 1090 | '</a>'. |
1091 | 1091 | '</li>'; |
1092 | 1092 | } |
1093 | - | |
1093 | + | |
1094 | 1094 | } |
1095 | - | |
1095 | + | |
1096 | 1096 | if($this->session->get('special_users_id') != null) { |
1097 | 1097 | $special_users_id = $this->session->get('special_users_id'); |
1098 | 1098 | |
... | ... | @@ -1119,6 +1119,8 @@ |
1119 | 1119 | else { |
1120 | 1120 | $discount = 0; |
1121 | 1121 | } |
1122 | + } else { | |
1123 | + $discount = 0; | |
1122 | 1124 | } |
1123 | 1125 | |
1124 | 1126 | $this->view->pick('page/changeWithSize'); | ... | ... |