php - Joomla 3.3 Cart not emptying after purchase when sef enabled, can someone check my router file please? -


i'm having problem joomla 3 mijoshop cart not emptying after purchases when sef enabled, if turn sef off works fine. after searching around believe problem carts router.php file, wondering if me out this. have pasted current router.php files code below.

defined('_jexec') or die ('restricted access');  require_once(jpath_root . '/components/com_mijoshop/mijoshop/mijoshop.php');  if (!class_exists('miwisoftcomponentrouterbase')) { if (class_exists('jcomponentrouterbase')) {     abstract class miwisoftcomponentrouterbase extends jcomponentrouterbase {} } else {     class miwisoftcomponentrouterbase {} } }  class mijoshoprouter extends miwisoftcomponentrouterbase {  static $cats = array(); static $path = array();  public function build(&$query) {     return $this->buildroute($query); }  public function parse(&$segments) {     return $this->parseroute($segments); }  public function buildroute(&$query) {     $itemid = null;     $segments = array();      $menu = $this->getmenu();      $_get_itemid = 0;     if($menu->getactive()){         $_get_itemid = $menu->getactive()->id;     }     $_get_route = jrequest::getvar('route', '');      if( isset($query['itemid']) , $_get_itemid != $query['itemid'] , $_get_route == 'product/category' , isset($query['route']) , $query['route'] == 'product/product' ){         $query['itemid'] = $_get_itemid;     }      if (!empty($query['itemid'])) {         $itemid = $query['itemid'];     } else {         $itemid = $this->getitemid();     }      if (empty($itemid)) {         $a_menu = $menu->getactive();     } else {         $a_menu = $menu->getitem($itemid);     }      if (isset($query['view'])) {         if ($query['view'] == 'admin') {             unset($query['view']);              return $segments;         }         $_route = $this->getroute($query['view'], false);         if (!empty($_route)) {             $query['route'] = $_route;             unset($query['view']);         }         else {             $segments[] = $query['view'];             unset($query['view']);         }     }      if (isset($query['route'])) {         switch ($query['route']) {             case 'product/product':                 if (is_object($a_menu) , $a_menu->query['view'] == 'product' , $a_menu->query['product_id'] == @$query['product_id']) {                     unset($query['path']);                     unset($query['product_id']);                     unset($query['manufacturer_id']);                     break;                 }                  $segments[] = 'product';                  if (isset($query['product_id'])) {                     $id = $query['product_id'];                     $name = mijoshop::get('db')->getrecordalias($id);                      if (!empty($name)) {                         $segments[] = $id . ':' . $name;                     } else {                         $segments[] = $id;                     }                      unset($query['path']);                     unset($query['product_id']);                     unset($query['manufacturer_id']);                     unset($query['sort']);                     unset($query['order']);                     unset($query['filter_name']);                     unset($query['filter_tag']);                     unset($query['limit']);                     unset($query['page']);                  }                  break;             case 'product/category':                 $_path = explode('_', @$query['path']);                 $m_id = end($_path);                  if (is_object($a_menu) , $a_menu->query['view'] == 'category' , $a_menu->query['path'] == $m_id) {                     unset($query['path']);                     break;                 }                  $segments[] = 'category';                  if (isset($query['path'])) {                     $id = $query['path'];                      if (strpos($id, '_')) {                         $old_id = $id;                         $_id = explode('_', $id);                         $id = end($_id);                          self::$cats[$id] = $old_id;                     } else {                         self::$cats[$id] = $id;                     }                      $name = mijoshop::get('db')->getrecordalias($id, 'category');                      if (!empty($name)) {                         $segments[] = $id . ':' . $name;                     } else {                         $segments[] = $id;                     }                      unset($query['path']);                 }                  break;             case 'product/manufacturer/info':                 if (is_object($a_menu) , $a_menu->query['view'] == 'manufacturer' , $a_menu->query['manufacturer_id'] == @$query['manufacturer_id']) {                     unset($query['manufacturer_id']);                     break;                 }                  $segments[] = 'manufacturer';                  if (isset($query['manufacturer_id'])) {                     $id = $query['manufacturer_id'];                     $name = mijoshop::get('db')->getrecordalias($id, 'manufacturer');                      if (!empty($name)) {                         $segments[] = $id . ':' . $name;                     } else {                         $segments[] = $id;                     }                      unset($query['manufacturer_id']);                 }                  break;             case 'information/information':                 if (is_object($a_menu) , $a_menu->query['view'] == 'information' , $a_menu->query['information_id'] == @$query['information_id']) {                     unset($query['information_id']);                     break;                 }                  $segments[] = 'information';                  if (isset($query['information_id'])) {                     $id = $query['information_id'];                     $name = mijoshop::get('db')->getrecordalias($id, 'information');                      if (!empty($name)) {                         $segments[] = $id . ':' . $name;                     } else {                         $segments[] = $id;                     }                      unset($query['information_id']);                 } 

thanks in advance can :)

the problem has nothing router.php file, has checkout process since cart items stored in database.

when add items cart, added table in database, once checkout, items added order_item table, , order table populated order information, , cart emptied.

i check controller/model files see checkout code - bug there.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -