Jump to content

simmen

Members
  • Content count

    15
  • Joined

  • Last visited

1 Follower

Profile Information

  • Real Name
    Ryan
  1. simmen

    Populate Cart

    I'm having the same problem and I'm using the latest version. -Ryan
  2. simmen

    YASU

    I've arrived at a solution to the bug: :D When clicking on a product in the new products box the links are: http://www.domain.com/catalog/Speed instead of http://www.domain.com/catalog/DVD+Movies/Action/Speed This fix was borrowed from Seach Engine Friendly URL at: http://www.oscommerce.com/community/contri...engine+friendly I'm using YASU instead of Seach Engine Friendly URL because YASU doesn't require cache or force cookies. Cache and force cookies are not compatible with other contributions I'm using in my shop. And now for the fix! Edit: /catalog/includes/functions/html_output.php in the tep_href_link function. After this code: case 'products_id': $product_name_query = tep_db_query("select products_name from products_description where products_id='" . (int)$pair_array[1] . "' and language_id='" . (int)$languages_id . "'"); if ($product_name_array = tep_db_fetch_array($product_name_query)) { $product_name = $product_name_array['products_name']; } Add this code: //ADD CATEGORY NAME MODIFICATION - BB 2005-11-08 //If cPath isn't in the URL, category names aren't added to the URL //This fixes that if (strpos($parameters, 'cPath') === false) { $cat_array = array(); $cat_query = tep_db_query("SELECT cd.categories_name as name, c.parent_id FROM categories c LEFT JOIN categories_description cd ON (c.categories_id = cd.categories_id) LEFT JOIN products_to_categories p2c ON (p2c.categories_id = c.categories_id) WHERE p2c.products_id = '" . (int)$pair_array[1] . "' AND p2c.categories_id = c.categories_id AND cd.language_id = '" . (int)$languages_id . "'"); $cat_val = tep_db_fetch_array($cat_query); $cat_array[] = $cat_val['name']; //If this category has a parent, get the name if (is_numeric($cat_val['parent_id']) && $cat_val['parent_id'] != '0') { $parent_id = $cat_val['parent_id']; while ($parent_id != '0') { $cat_query = tep_db_query("SELECT cd.categories_name as name, c.parent_id FROM categories c LEFT JOIN categories_description cd ON (c.categories_id = cd.categories_id) WHERE cd.categories_id = '" . (int)$parent_id . "' AND cd.language_id = '" . (int)$languages_id . "'"); $cat_val = tep_db_fetch_array($cat_query); $cat_array[] = $cat_val['name']; $parent_id = $cat_val['parent_id']; } } //Reverse array order $cat_array = array_reverse($cat_array); for ($x = 0; $x <= sizeof($cat_array) - 1; $x++) { $cPath_list[]=urlencode($cat_array[$x]); } } //END MODIFICATION - BB Cheers, Ryan
  3. simmen

    YASU

    I found a bug. When clicking on a product in the new products box the links are: http://www.domain.com/catalog/Speed instead of http://www.domain.com/catalog/DVD+Movies/Action/Speed How do i fix this problem? -Ryan PS: Here is some code that may help, but i don't know what to do with it //ADD CATEGORY NAME MODIFICATION - BB 2005-11-08 //If cPath isn't in the URL, category names aren't added to the URL //This fixes that if (strpos($url, 'cPath') === false) { $cat_array = array(); $cat_query = tep_db_query("SELECT cd.categories_name as name, c.parent_id FROM categories c LEFT JOIN categories_description cd ON (c.categories_id = cd.categories_id) LEFT JOIN products_to_categories p2c ON (p2c.categories_id = c.categories_id) WHERE p2c.products_id = '" . (int)$url_array[$i] . "' AND p2c.categories_id = c.categories_id AND cd.language_id = '" . (int)$languages_id . "'"); $cat_val = tep_db_fetch_array($cat_query); $cat_array[] = $cat_val['name']; //If this category has a parent, get the name if (is_numeric($cat_val['parent_id']) && $cat_val['parent_id'] != '0') { $parent_id = $cat_val['parent_id']; while ($parent_id != '0') { $cat_query = tep_db_query("SELECT cd.categories_name as name, c.parent_id FROM categories c LEFT JOIN categories_description cd ON (c.categories_id = cd.categories_id) WHERE cd.categories_id = '" . (int)$parent_id . "' AND cd.language_id = '" . (int)$languages_id . "'"); $cat_val = tep_db_fetch_array($cat_query); $cat_array[] = $cat_val['name']; $parent_id = $cat_val['parent_id']; } } //Reverse array order $cat_array = array_reverse($cat_array); for ($x = 0; $x <= sizeof($cat_array); $x++) { $url_parts['path'] .= '/' . $this->prepare_url($cat_array[$x]); } } //END MODIFICATION - BB
×