Перейти до вмісту
Пошук в
  • Детальніше...
Шукати результати, які ...
Шукати результати в ...

pckedisi

Новачок
  
  • Публікації

    6
  • З нами

  • Відвідування

pckedisi's Achievements

Newbie

Newbie (1/14)

  • First Post
  • Week One Done
  • One Month Later
  • One Year In

Recent Badges

0

Репутація

  1. really need, seo_url.php to using. Is it possible to. is a similar structure of the link. Let the query id. the name of theEuropean model is sufficient. within a single folder. or 2 in folders .. If you help I'm happy. thanks one of them acts .com/DELL-DELL-XPS-15Z-G64P87-Intel-Sandy-Bridg_c20c603p340.html .com/DELL-DELL-XPS-15Z-G64P87-Intel-Sandy-Bridg/c20c603p340.html .com/DELL-DELL-XPS-15Z-G64P87-Intel-Sandy-Bridg/c20-c603-p340.html
  2. example of a link or a similar structure. id with a quick query and seo. .com/f093f51664nf603c2/DELL-DELL-XPS-15Z-G64P87-Intel-Sandy-Bridge-Core-i7-2640M-2.80GHz-Notebook.html or the like .com/DELL-DELL-XPS-15Z-G64P87-Intel-Sandy-Bridg_f093f51664nf603c2.html f093 f5166428ee7c4e38 f60189ed9c22/ categoriy id categoriy id product id
  3. How do I make links in this way. id like to do with 220 queries. categori_name with faster query id and seo. thanks defines the c = categoriy id p = product id v1.5.3.1 www.domain.com/categori_name-c220.html www.domain.com/categori_name-c220_c15.html www.domain.com/product_name-p234.html www.domain.com/product_name-c220_c15-p234.html
  4. Как быть введен по ссылкам на этом пути. Чтобы ускорить запросы должны быть сделаны в соответствии с птицей, идентификатор. edermi один из экспертов помочь, пожалуйста. поблагодарить Просто все, что вы, русские, v1.5.3.1 www.domain.com/categori_name-c220.html www.domain.com/categori_name-c220_c15.html www.domain.com/product_name-p234.html www.domain.com/product_name-c220_c15-p234.html <?php class ControllerCommonSeoUrl extends Controller { /* SEO Custom URL */ private $url_list = array ( 'common/home' => 'home', 'checkout/cart' => 'cart', 'account/register' => 'register', 'account/wishlist' => 'wishlist', 'checkout/checkout' => 'checkout', 'account/login' => 'login', 'product/special' => 'special', 'affiliate/account' => 'affiliate', 'checkout/voucher' => 'voucher', 'product/manufacturer' => 'brand', 'account/newsletter' => 'newsletter', 'account/order' => 'order', 'account/account' => 'account', 'information/contact' => 'contact', 'account/return/insert' => 'return/insert', 'information/sitemap' => 'sitemap', ); /* SEO Custom URL */ public function index() { // Add rewrite to url class if ($this->config->get('config_seo_url')) { $this->url->addRewrite($this); } // Decode URL if (isset($this->request->get['_route_'])) { $parts = explode('/', $this->request->get['_route_']); if ( count($parts) > 1 ) { if ($parts[1] == 'category'){ $this->request->get['path'] = $parts[2]; for ( $i = 3 ; $i < count($parts); $i++) { $this->request->get['path'] .= '_' . $parts[$i]; } }elseif( $parts[1] == 'item' ) { $this->request->get['product_id'] = $parts[2]; } } foreach ($parts as $part) { $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "url_alias WHERE keyword = '" . $this->db->escape($part) . "'"); if ($query->num_rows) { $url = explode('=', $query->row['query']); if ($url[0] == 'product_id') { $this->request->get['product_id'] = $url[1]; } if ($url[0] == 'category_id') { if (!isset($this->request->get['path'])) { $this->request->get['path'] = $url[1]; } else { $this->request->get['path'] .= '_' . $url[1]; } } if ($url[0] == 'manufacturer_id') { $this->request->get['manufacturer_id'] = $url[1]; } if ($url[0] == 'information_id') { $this->request->get['information_id'] = $url[1]; } } else { $this->request->get['route'] = 'error/not_found'; } } /* SEO Custom URL */ if ( $_s = $this->setURL($this->request->get['_route_']) ) { $this->request->get['route'] = $_s; }/* SEO Custom URL */ if (isset($this->request->get['product_id'])) { $this->request->get['route'] = 'product/product'; } elseif (isset($this->request->get['path'])) { $this->request->get['route'] = 'product/category'; } elseif (isset($this->request->get['manufacturer_id'])) { $this->request->get['route'] = 'product/manufacturer/product'; } elseif (isset($this->request->get['information_id'])) { $this->request->get['route'] = 'information/information'; } if (isset($this->request->get['route'])) { return $this->forward($this->request->get['route']); } } } public function rewrite($link) { if ($this->config->get('config_seo_url')) { $url_data = parse_url(str_replace('&', '&', $link)); $url = ''; $data = array(); parse_str($url_data['query'], $data); foreach ($data as $key => $value) { if (isset($data['route'])) { if ( (($data['route'] == 'product/manufacturer/product' || $data['route'] == 'product/product') && $key == 'manufacturer_id') || ($data['route'] == 'information/information' && $key == 'information_id')) { $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "url_alias WHERE `query` = '" . $this->db->escape($key . '=' . (int)$value) . "'"); if ($query->num_rows) { $url .= '/' . $query->row['keyword']; unset($data[$key]); } } elseif( $key == 'product_id' ) { $url = '/shop/item/'.$value; unset($data[$key]); }elseif ($key == 'path') { $categories = explode('_', $value); $url = '/shop/category'; foreach ($categories as $category) { $url .= '/'.$category; } unset($data[$key]); }// /* SEO Custom URL */ if( $_u = $this->getURL($data['route']) ){ $url .= $_u; unset($data[$key]); }/* SEO Custom URL */ } } if ($url) { unset($data['route']); $query = ''; if ($data) { foreach ($data as $key => $value) { $query .= '&' . $key . '=' . $value; } if ($query) { $query = '?' . trim($query, '&'); } } return $url_data['scheme'] . '://' . $url_data['host'] . (isset($url_data['port']) ? ':' . $url_data['port'] : '') . str_replace('/index.php', '', $url_data['path']) . $url . $query; } else { return $link; } } else { return $link; } } /* SEO Custom URL */ public function getURL($route) { if( count($this->url_list) > 0) { foreach ($this->url_list as $key => $value) { if($route == $key) { return '/'.$value; } } } return false; } public function setURL($_route) { if( count($this->url_list) > 0 ){ foreach ($this->url_list as $key => $value) { if($_route == $value) { return $key; } } } return false; }/* SEO Custom URL */ } ?>
×
×
  • Створити...

Important Information

На нашому сайті використовуються файли cookie і відбувається обробка деяких персональних даних користувачів, щоб поліпшити користувальницький інтерфейс. Щоб дізнатися для чого і які персональні дані ми обробляємо перейдіть за посиланням . Якщо Ви натиснете «Я даю згоду», це означає, що Ви розумієте і приймаєте всі умови, зазначені в цьому Повідомленні про конфіденційність.