Jump to content

Greens44

Members
  • Content count

    19
  • Joined

  • Last visited

  1. Greens44

    SEO URLS by CHEMO question..

    Already posted in that thread three times with no reply or help whatsoever so I felt the need to make this a separate thread. Besides there is a separate thread for the manufacturers contribution but I can't find it at the moment. All I need is some simple sql fix.
  2. Greens44

    Show Categories Name in index.php

    This is very similar to the issue I'm having found here: http://forums.oscommerce.com/index.php?showtopic=330402 If we can fix mine or yours both issues will be fixed. I know all its got to do something with sql but I'm no sql expert.
  3. Greens44

    SEO URLS by CHEMO question..

    Well after some elaborate testing I've got the following sql to pull the data as intended.. however the only question now is how to make it pull each product as the following sql you need to set this product_id: $proid = 2; $sql = tep_db_query("SELECT p.products_id as id, pd.products_name as name, cd.categories_name as cname FROM ".TABLE_CATEGORIES." c, ".TABLE_CATEGORIES_DESCRIPTION." cd, ".TABLE_PRODUCTS." p, ".TABLE_PRODUCTS_DESCRIPTION." pd, ".TABLE_PRODUCTS_TO_CATEGORIES." ptc WHERE p.products_id='" . $proid . "' and pd.products_id='" . $proid . "' and ptc.products_id = '" . $proid . "' and c.categories_id=ptc.categories_id and c.categories_id = cd.categories_id and p.products_status='1'"); If anyone can fix this code please help me. Once all the bugs are worked out we can make a full version of this and add it to new releases of SEO URL's. Thanks again!
  4. I tried to ask this question in the contributions main thread however after three posts all I get is the cold shoulder. No support at all for me. Here is the quest.. lets see how many people can fix this simple code. Here is my question: Well after some coding I've came up with the following code to the manufacturer to product url that will add the category name to the url. So far this is what I have: the SQL: $sql = "SELECT p.products_id as id, pd.products_name as name, c.categories_id as id, cd.categories_name as cname FROM ".TABLE_CATEGORIES." c, ".TABLE_CATEGORIES_DESCRIPTION." cd, ".TABLE_PRODUCTS." p, ".TABLE_PRODUCTS_DESCRIPTION." pd, ".TABLE_PRODUCTS_TO_CATEGORIES." ptc WHERE p.products_id=ptc.products_id and c.categories_id=ptc.categories_id and c.categories_id = cd.categories_id and p.products_status='1'"; and the below portion: while ($product = $this->DB->FetchArray($product_query)) { $define = 'define(\'PRODUCT_NAME_' . $product['id'] . '\', \'' . $this->strip($product['cname']) . '/' . $this->strip($product['name']) . '\');'; $prod_cache .= $define . "\n"; eval("$define"); The only problem with the code above is it pulls the category as the product id. So in otherwords.. if product 3 is in category 1 it will still display category 3 for product 3. Im not an SQL programmer but I know thats where we need to look at. Maybe do something with the PRODUCTS_TO_CATEGORIES table. If anyone can fix my code above to display the proper category I will release alot of my mods to oscommerce including a completely converted version from tables to a div/css version. Thanks!
  5. You guys manage to code massive code segments and fix issues. I think someone here can fix the simple sql statement above.
  6. I've been trying many different things to add the category to the url. I've successfully coded my own version on a separate page that drops all urls from the cache and than remakes them. I suppose I could make a script that compares the current url with the url in the cache and update as needed. I would however like to see if anyone could fix the code above as that wouldn't only help me but alot of others. Thanks!
  7. Well after some coding I've came up with the following code to the manufacturer to product url that will add the category name to the url. So far this is what I have: the SQL: $sql = "SELECT p.products_id as id, pd.products_name as name, c.categories_id as id, cd.categories_name as cname FROM ".TABLE_CATEGORIES." c, ".TABLE_CATEGORIES_DESCRIPTION." cd, ".TABLE_PRODUCTS." p, ".TABLE_PRODUCTS_DESCRIPTION." pd, ".TABLE_PRODUCTS_TO_CATEGORIES." ptc WHERE p.products_id=ptc.products_id and c.categories_id=ptc.categories_id and c.categories_id = cd.categories_id and p.products_status='1'"; and the below portion: while ($product = $this->DB->FetchArray($product_query)) { $define = 'define(\'PRODUCT_NAME_' . $product['id'] . '\', \'' . $this->strip($product['cname']) . '/' . $this->strip($product['name']) . '\');'; $prod_cache .= $define . "\n"; eval("$define"); The only problem with the code above is it pulls the category as the product id. So in otherwords.. if product 3 is in category 1 it will still display category 3 for product 3. Im not an SQL programmer but I know thats where we need to look at. Maybe do something with the PRODUCTS_TO_CATEGORIES table. If anyone can fix my code above to display the proper category I will release alot of my mods to oscommerce including a completely converted version from tables to a div/css version. Thanks!
  8. Ok, let me know what you come up with as I have no clue all this coding stuff. Thanks!
  9. I'm with the guy above... anyone here have a simple modification to have the product url this: example.com/category/subcategory/product-p-1-.html I'm sure this is an extremely easy modification so please help us out. Thanks!
  10. Alright I will try that and let you know how it worked out. Also could you point me in the direction of a contribution that prevents ?sort=x etc from being indexed by Google.. Thanks again!
  11. Whats the difference between 2.1d and 2.6? All I would have to do is replace the seo.class.php file correct?
  12. Hello I am using this in my oscommerce setup with version 2.6 of SEO URL's and RC 2.1 oscommerce. Currently with your script and seo urls I also added what every website has these days and that is a 301 redirect from non-www version (example.com) to a www version (www.example.com). The problem with this is whether the url is correct or not if you type the domain name as this: example.com/correct-name-p-566.html it throws up a http 400 error. Is there anyway to fix this as I want to keep the redirect from non-www to www. Thanks!
×