diff --git a/src/app/frontend/controllers/PageController.php b/src/app/frontend/controllers/PageController.php index 975c70c..b1bb6e6 100644 --- a/src/app/frontend/controllers/PageController.php +++ b/src/app/frontend/controllers/PageController.php @@ -1027,72 +1027,72 @@ public function changeWithSizeAction() { -// if( $this->request->isAjax() && $this->request->isPost() ) -// { -// $item_id = $this->request->getPost( 'item_id', 'int', '' ); -// $group_alias = $this->request->getPost( 'group_alias', 'string', '' ); -// $item = $this->models->getItems()->getOneItem( $this->lang_id, $item_id ); -// $filters = $this->models->getFilters()->getFiltersByItemId( $this->lang_id, $item_id ); -// $colors_info = $this->models->getItems()->getColorsInfoByColorId( $this->lang_id, $item['0']['color_id'] ); -// -// $item['0']['color_title'] = NULL; -// $item['0']['absolute_color'] = NULL; -// $item['0']['color'] = NULL; -// -// if( !empty( $colors_info ) ) -// { -// $item['0']['color_title'] = $colors_info['0']['color_title']; -// $item['0']['absolute_color'] = $colors_info['0']['absolute_color']; -// -// -// $item['0']['color'] = -// '
'.$this->languages->getTranslation()->_("choose_color").':
'. -// '
'.$colors_info['0']['color_title'].'
'; -// } -// -// $item['0']['explode'] = explode( '/', $item['0']['full_alias'] ); -// $item['0']['type_alias'] = $item['0']['explode']['1']; -// $item['0']['subtype_alias'] = $item['0']['explode']['2']; -// unset( $item['0']['explode'] ); -// $item['0']['alias'] = $this->url->get([ 'for' => 'item', 'type' => $item['0']['type_alias'], 'subtype' => $item['0']['subtype_alias'], 'group_alias' => $group_alias, 'item_id' => $item_id ]); -// $item['0']['filters'] = $filters; -// $item['0']['images'] = $this->etc->int2arr( $item['0']['photogallery'] ); -// $item['0']['status_real'] = $item['0']['status']; -// $item['0']['status'] = $item['0']['status'] == 1 ? '
'.$this->languages->getTranslation()->_("in_stock").'
' : ($item['0']['status'] == 2 ? '
'.$this->languages->getTranslation()->_("znyt").'
' : '
'.$this->languages->getTranslation()->_("missing").'
'); -// $item['0']['image'] = ''; -// -// -// $item['0']['image'] .= -// '
  • '. -// ''. -// ''.$item['0']['title'].''. -// ''. -// '
  • '; -// -// if( !empty( $item['0']['images'] ) && !empty( $item['0']['cover'] ) ) -// { -// foreach( $item['0']['images'] as $k => $i ) -// { -// -// $item['0']['image'] .= -// '
  • '. -// ''. -// ''.$item['0']['title'].''. -// ''. -// '
  • '; -// -// } -// -// $item['0']['image'] .= -// '
  • '. -// ''. -// ''.$item['0']['title'].''. -// ''. -// '
  • '; -// } -// -// } -// + if( $this->request->isAjax() && $this->request->isPost() ) + { + $item_id = $this->request->getPost( 'item_id', 'int', '' ); + $group_alias = $this->request->getPost( 'group_alias', 'string', '' ); + $item = $this->models->getItems()->getOneItem( $this->lang_id, $item_id ); + $filters = $this->models->getFilters()->getFiltersByItemId( $this->lang_id, $item_id ); + $colors_info = $this->models->getItems()->getColorsInfoByColorId( $this->lang_id, $item['0']['color_id'] ); + + $item['0']['color_title'] = NULL; + $item['0']['absolute_color'] = NULL; + $item['0']['color'] = NULL; + + if( !empty( $colors_info ) ) + { + $item['0']['color_title'] = $colors_info['0']['color_title']; + $item['0']['absolute_color'] = $colors_info['0']['absolute_color']; + + + $item['0']['color'] = + '
    '.$this->languages->getTranslation()->_("choose_color").':
    '. + '
    '.$colors_info['0']['color_title'].'
    '; + } + + $item['0']['explode'] = explode( '/', $item['0']['full_alias'] ); + $item['0']['type_alias'] = $item['0']['explode']['1']; + $item['0']['subtype_alias'] = $item['0']['explode']['2']; + unset( $item['0']['explode'] ); + $item['0']['alias'] = $this->url->get([ 'for' => 'item', 'type' => $item['0']['type_alias'], 'subtype' => $item['0']['subtype_alias'], 'group_alias' => $group_alias, 'item_id' => $item_id ]); + $item['0']['filters'] = $filters; + $item['0']['images'] = $this->etc->int2arr( $item['0']['photogallery'] ); + $item['0']['status_real'] = $item['0']['status']; + $item['0']['status'] = $item['0']['status'] == 1 ? '
    '.$this->languages->getTranslation()->_("in_stock").'
    ' : ($item['0']['status'] == 2 ? '
    '.$this->languages->getTranslation()->_("znyt").'
    ' : '
    '.$this->languages->getTranslation()->_("missing").'
    '); + $item['0']['image'] = ''; + + + $item['0']['image'] .= + '
  • '. + ''. + ''.$item['0']['title'].''. + ''. + '
  • '; + + if( !empty( $item['0']['images'] ) && !empty( $item['0']['cover'] ) ) + { + foreach( $item['0']['images'] as $k => $i ) + { + + $item['0']['image'] .= + '
  • '. + ''. + ''.$item['0']['title'].''. + ''. + '
  • '; + + } + + $item['0']['image'] .= + '
  • '. + ''. + ''.$item['0']['title'].''. + ''. + '
  • '; + } + + } + if($this->session->get('special_users_id') != null) { $special_users_id = $this->session->get('special_users_id'); -- libgit2 0.21.4