User Tools

Site Tools


tutorials:zencartmods:pids.html

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
tutorials:zencartmods:pids.html [2011/06/15 20:02]
daigo
tutorials:zencartmods:pids.html [2011/06/15 20:09]
daigo
Line 1: Line 1:
-Zen Cart automatically adds product numbers to each of your products. Here'​s ​how to make the product IDs a little ​more useful.+Zen Cart automatically adds product numbers to each of your products. Here'​s ​some super easy ways to make those numbers ​more visible. 
 + 
 +{{:​tutorials:​zencartmods:​id.jpg|}} 
 + 
  
 ==== Add the product ID to the product page ==== ==== Add the product ID to the product page ====
Line 22: Line 26:
 </​code>​ </​code>​
  
-==== Make IDs Searchable ==== 
- 
-in **includes/​modules/​pages/​advanced_search_results/​header_php.php** \\ 
-Insert right after (line 58) 
-<code php> 
-if (isset($_GET['​keyword'​]) && $_GET['​keyword'​] != HEADER_SEARCH_DEFAULT_TEXT ​ && $_GET['​keyword'​] != KEYWORD_FORMAT_STRING) { 
-    $keywords = $_GET['​keyword'​];​ 
-  } 
-</​code>​ 
-this code 
-<code php> 
-  if (strpos($keywords,​ ' ') === FALSE && is_numeric($keywords) && ​ (int)$keywords == $keywords) 
-    { 
-      $exists = $db->​Execute("​SELECT products_id FROM products WHERE products_id = " . (int)$keywords . " AND products_status = 1"); 
-      if( !$exists->​EOF) 
-        { 
-          zen_redirect(zen_href_link('​product_info'​ , '​products_id='​ . (int)$keywords , '​NONSSL',​ false)); 
-        } 
-    } 
-</​code>​ 
- 
-This will make searches for a product number jump straight to that page. It will also make numbers that are product ID unsearchable! ​ 
/home/ladyada/public_html/wiki/data/pages/tutorials/zencartmods/pids.html.txt · Last modified: 2016/01/28 18:05 (external edit)