suhy Posted April 15, 2007 Share Posted April 15, 2007 Hi, Contribution link : http://www.oscommerce.com/community/contri...earch,meta+tags I'm having difficulties installing newest - METATags on the Fly - contibution as I can't successfuly make an SQL query .... I get the following mistake : Error SQL query: INSERT INTO `configuration` ( `configuration_title` , `configuration_key` , `configuration_value` , `configuration_description` , `configuration_group_id` , `sort_order` , `date_added` ) VALUES ( '' 'Default Keyword ', 'KEYWORD_TAG', 'Add your Keywords', 'These keywords will display in the meta tag on your main index page and all non-product pages. Seperate words with commas.', '40', '1', now( ) ) INSERT INTO `configuration` ( `configuration_title` , `configuration_key` , `configuration_value` , `configuration_description` , `configuration_group_id` , `sort_order` , `date_added` ) VALUES ( '', 'Default Description', 'DESCRIPTION_TAG', 'Add Store description here.', 'This description will display in the meta tag on the main index page and all non product pages.', '40', '2', now( ) ); MySQL said: Documentation #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INSERT INTO `configuration` (`configuration_title` , `configuration_key` , `conf' at line 6 Server uses My SQL 4.4.4 with PhP My Admin 2.8.2.2 I usualy don't have any problems making SQL quieries, so I believe the problem is in attached sql file .... I'm not quite satisfied with other META contributions and would like to test also this one ... Please help! Quote Link to comment Share on other sites More sharing options...
Guest Posted April 15, 2007 Share Posted April 15, 2007 yes, they are incorrect, try this one: INSERT INTO `configuration_group` ( `configuration_group_id` , `configuration_group_title` , `configuration_group_description` , `sort_order` , `visible` ) VALUES ( '40', 'Meta Tags', 'Default Keyword and Description Tags', '40', '1' ); INSERT INTO `configuration` ( `configuration_title` , `configuration_key` , `configuration_value` , `configuration_description` , `configuration_group_id` , `sort_order` , `date_added` ) VALUES ( 'Default Keyword ', 'KEYWORD_TAG', 'Add your Keywords', 'These keywords will display in the meta tag on your main index page and all non-product pages. Seperate words with commas.', '40', '1', now() ) INSERT INTO `configuration` (`configuration_title` , `configuration_key` , `configuration_value` , `configuration_description` , `configuration_group_id` , `sort_order` , `date_added` ) VALUES ( 'Default Description', 'DESCRIPTION_TAG', 'Add Store description here.', 'This description will display in the meta tag on the main index page and all non product pages.', '40', '2', now() ); I just removed the first field which did not correspond to a value. Backup your dbase before installing to be on the safe side. Quote Link to comment Share on other sites More sharing options...
Guest Posted April 15, 2007 Share Posted April 15, 2007 im getting an error as well SQL query: INSERT INTO `configuration_group` ( `configuration_group_id` , `configuration_group_title` , `configuration_group_description` , `sort_order` , `visible` ) VALUES ( '40', 'Meta Tags', 'Default Keyword and Description Tags', '40', '1' ); MySQL said: #1062 - Duplicate entry '40' for key 1 Quote Link to comment Share on other sites More sharing options...
Guest Posted April 15, 2007 Share Posted April 15, 2007 weird seems to off added some of it will try doing in manualy Quote Link to comment Share on other sites More sharing options...
Guest Posted April 15, 2007 Share Posted April 15, 2007 Ok looka like its gone ok in the admin section, get the meta tag option but no buttons to click to add it? view screen shot here http://www.20uk.net/show.php?file=50163650.jpg Quote Link to comment Share on other sites More sharing options...
suhy Posted April 15, 2007 Author Share Posted April 15, 2007 yes, they are incorrect, try this one: INSERT INTO `configuration_group` ( `configuration_group_id` , `configuration_group_title` , `configuration_group_description` , `sort_order` , `visible` ) VALUES ( '40', 'Meta Tags', 'Default Keyword and Description Tags', '40', '1' ); INSERT INTO `configuration` ( `configuration_title` , `configuration_key` , `configuration_value` , `configuration_description` , `configuration_group_id` , `sort_order` , `date_added` ) VALUES ( 'Default Keyword ', 'KEYWORD_TAG', 'Add your Keywords', 'These keywords will display in the meta tag on your main index page and all non-product pages. Seperate words with commas.', '40', '1', now() ) INSERT INTO `configuration` (`configuration_title` , `configuration_key` , `configuration_value` , `configuration_description` , `configuration_group_id` , `sort_order` , `date_added` ) VALUES ( 'Default Description', 'DESCRIPTION_TAG', 'Add Store description here.', 'This description will display in the meta tag on the main index page and all non product pages.', '40', '2', now() ); I just removed the first field which did not correspond to a value. Backup your dbase before installing to be on the safe side. Tried, but still getting the error ... I think it's the same... Hope to figure this out ... Thanks ! Quote Link to comment Share on other sites More sharing options...
bill110 Posted April 16, 2007 Share Posted April 16, 2007 Be sure in your configuration table in the database you do not already have a group id of 40. If you do change the sql query refrences to something higher than your last group id. Quote My Contributions Stylesheet With Descriptions Glassy Grey Boxtops Our Products Meta Tags On The Fly Password Protect Admin "No matter where you go....There you are" - Buccaroo Bonsai Link to comment Share on other sites More sharing options...
Guest Posted April 16, 2007 Share Posted April 16, 2007 (edited) any idea why im not getting any buttons to press is that an sql prob as well? Edited April 16, 2007 by 20uk.net Quote Link to comment Share on other sites More sharing options...
bill110 Posted April 16, 2007 Share Posted April 16, 2007 That, I am not sure what is happening. I deleted and re-installed and still get the edit button. Quote My Contributions Stylesheet With Descriptions Glassy Grey Boxtops Our Products Meta Tags On The Fly Password Protect Admin "No matter where you go....There you are" - Buccaroo Bonsai Link to comment Share on other sites More sharing options...
bill110 Posted April 16, 2007 Share Posted April 16, 2007 Ok I think this is the problem. There is a colon missing. Here is the sql: INSERT INTO `configuration_group` ( `configuration_group_id` , `configuration_group_title` , `configuration_group_description` , `sort_order` , `visible` ) VALUES ( '40', 'Meta Tags', 'Default Keyword and Description Tags', '40', '1' ); INSERT INTO `configuration` ( `configuration_title` , `configuration_key` , `configuration_value` , `configuration_description` , `configuration_group_id` , `sort_order` , `date_added` ) VALUES ( '' 'Default Keyword ', 'KEYWORD_TAG', 'Add your Keywords', 'These keywords will display in the meta tag on your main index page and all non-product pages. Seperate words with commas.', '40', '1', now() ); INSERT INTO `configuration` (`configuration_title` , `configuration_key` , `configuration_value` , `configuration_description` , `configuration_group_id` , `sort_order` , `date_added` ) VALUES ( '' 'Default Description', 'DESCRIPTION_TAG', 'Add Store description here.', 'This description will display in the meta tag on the main index page and all non product pages.', '40', '2', now() ); If you have already ran the SQL then you will need to delete the first part of the sql so it looks like this: INSERT INTO `configuration` ( `configuration_title` , `configuration_key` , `configuration_value` , `configuration_description` , `configuration_group_id` , `sort_order` , `date_added` ) VALUES ( '' 'Default Keyword ', 'KEYWORD_TAG', 'Add your Keywords', 'These keywords will display in the meta tag on your main index page and all non-product pages. Seperate words with commas.', '40', '1', now() ); INSERT INTO `configuration` (`configuration_title` , `configuration_key` , `configuration_value` , `configuration_description` , `configuration_group_id` , `sort_order` , `date_added` ) VALUES ( '' 'Default Description', 'DESCRIPTION_TAG', 'Add Store description here.', 'This description will display in the meta tag on the main index page and all non product pages.', '40', '2', now() ); I will update the contribution. My local copy had this in it. Not sure what happened with the uploaded copy. Quote My Contributions Stylesheet With Descriptions Glassy Grey Boxtops Our Products Meta Tags On The Fly Password Protect Admin "No matter where you go....There you are" - Buccaroo Bonsai Link to comment Share on other sites More sharing options...
Graveyard666 Posted April 16, 2007 Share Posted April 16, 2007 I installed this contrib today, but its not appearing in my pages. What I mean is, the info I filled into the admin/meta isn't appearing on my pages www.graveyardrecords.com you can VIEW SOURCE to see it any ideas whats wrong? Quote Link to comment Share on other sites More sharing options...
suhy Posted April 16, 2007 Author Share Posted April 16, 2007 Ok I think this is the problem. There is a colon missing. Here is the sql: INSERT INTO `configuration_group` ( `configuration_group_id` , `configuration_group_title` , `configuration_group_description` , `sort_order` , `visible` ) VALUES ( '40', 'Meta Tags', 'Default Keyword and Description Tags', '40', '1' ); INSERT INTO `configuration` ( `configuration_title` , `configuration_key` , `configuration_value` , `configuration_description` , `configuration_group_id` , `sort_order` , `date_added` ) VALUES ( '' 'Default Keyword ', 'KEYWORD_TAG', 'Add your Keywords', 'These keywords will display in the meta tag on your main index page and all non-product pages. Seperate words with commas.', '40', '1', now() ); INSERT INTO `configuration` (`configuration_title` , `configuration_key` , `configuration_value` , `configuration_description` , `configuration_group_id` , `sort_order` , `date_added` ) VALUES ( '' 'Default Description', 'DESCRIPTION_TAG', 'Add Store description here.', 'This description will display in the meta tag on the main index page and all non product pages.', '40', '2', now() ); If you have already ran the SQL then you will need to delete the first part of the sql so it looks like this: INSERT INTO `configuration` ( `configuration_title` , `configuration_key` , `configuration_value` , `configuration_description` , `configuration_group_id` , `sort_order` , `date_added` ) VALUES ( '' 'Default Keyword ', 'KEYWORD_TAG', 'Add your Keywords', 'These keywords will display in the meta tag on your main index page and all non-product pages. Seperate words with commas.', '40', '1', now() ); INSERT INTO `configuration` (`configuration_title` , `configuration_key` , `configuration_value` , `configuration_description` , `configuration_group_id` , `sort_order` , `date_added` ) VALUES ( '' 'Default Description', 'DESCRIPTION_TAG', 'Add Store description here.', 'This description will display in the meta tag on the main index page and all non product pages.', '40', '2', now() ); I will update the contribution. My local copy had this in it. Not sure what happened with the uploaded copy. Hi Bill, Thanks for your reply and effort ... I'll try this one in the evening and will see if it works. Please just correct me if I'm wrong on the following : - Since I always backup my DB before doing anything .... and later if it doesn't work always upload my backeg up DB ! So I have to run first uncutted SQL ?! - How exactly can I check in my DB configuration tables (through PhpMyAdmin) what ID groups do I already have ? - Do the ID groups have to be incremented by 1 (39, 40 ....) or you can choose any number ? Thanks for your help as my current knowlege on SQL is still rather poor ... but hopfully will upgrade in time ! Thanks ! Suhy Quote Link to comment Share on other sites More sharing options...
bill110 Posted April 16, 2007 Share Posted April 16, 2007 If you do a backup then do something that goes wrong just restore from backup and things will be back to the old database. no sql needed. In phpmyadmin select the configuration_group table and then click browse. They should be listed in order, and they do not have to be in sequence. That number is where it falls in the admin side when you click configure. I put 40 on the sql to try and be sure of no duplicate field errors. Quote My Contributions Stylesheet With Descriptions Glassy Grey Boxtops Our Products Meta Tags On The Fly Password Protect Admin "No matter where you go....There you are" - Buccaroo Bonsai Link to comment Share on other sites More sharing options...
Guest Posted April 16, 2007 Share Posted April 16, 2007 Spot on :) am i only supposed to have Keywords and description in the admin section edit? thought there was a title one? Laurence Quote Link to comment Share on other sites More sharing options...
Guest Posted April 16, 2007 Share Posted April 16, 2007 I installed this contrib today, but its not appearing in my pages. What I mean is, the info I filled into the admin/meta isn't appearing on my pages www.graveyardrecords.com you can VIEW SOURCE to see it any ideas whats wrong? <META NAME="Keywords" content="Add your Keywords"> <META NAME="Description" content="Add Store description here."> im seeing that which shows you prob havnt added them via admin section? Quote Link to comment Share on other sites More sharing options...
bill110 Posted April 16, 2007 Share Posted April 16, 2007 (edited) The title comes from the store name and then the code will add the category and product name automatically after it. It also takes your default keywords that you add in the admin and adds the category name and product name to the keyword tag Edited April 16, 2007 by bill110 Quote My Contributions Stylesheet With Descriptions Glassy Grey Boxtops Our Products Meta Tags On The Fly Password Protect Admin "No matter where you go....There you are" - Buccaroo Bonsai Link to comment Share on other sites More sharing options...
suhy Posted April 16, 2007 Author Share Posted April 16, 2007 Helloou, Couldn't wait ... just installed it and it works perfectly. I had to use 2nd part - cutted - of SQL. With the complete SQL I still had an error, but probably forgot to restore DB in one of the previous installations ... Anyway it works now with no errors. "Meta Tags " is added to Configuration as a new option ! Also played a bit with keywords, description ... and it looks it will be OK ! I don't have my catalog filled yet, so I must wait for the final result , but as seen from Bill's page it will be perfect at the end ! You can use page like following to test your META TAGS : http://www.widexl.com/remote/search-engine...g-analyzer.html Thanks for your support ! Suhy Quote Link to comment Share on other sites More sharing options...
bill110 Posted April 21, 2007 Share Posted April 21, 2007 Update for those using this: V2 now available. Includes category description tags instead of default when category is selected. Previous version still had an SQL error. (had to reinstall my text editor) Quote My Contributions Stylesheet With Descriptions Glassy Grey Boxtops Our Products Meta Tags On The Fly Password Protect Admin "No matter where you go....There you are" - Buccaroo Bonsai Link to comment Share on other sites More sharing options...
masstech Posted May 23, 2007 Share Posted May 23, 2007 (edited) As you can see my site has lost its Stylesheet formatting(Click on link)...what I want to know is what could have caused this? I've followed the steps from the install file but not sure where I might have gone wrong. Visit My Website This is the code from the index file. <?php /* $Id: index.php,v 1.1 2003/06/11 17:37:59 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); // the following cPath references come from application_top.php $category_depth = 'top'; if (isset($cPath) && tep_not_null($cPath)) { $categories_products_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'"); $cateqories_products = tep_db_fetch_array($categories_products_query); if ($cateqories_products['total'] > 0) { $category_depth = 'products'; // display products } else { $category_parent_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " where parent_id = '" . (int)$current_category_id . "'"); $category_parent = tep_db_fetch_array($category_parent_query); if ($category_parent['total'] > 0) { $category_depth = 'nested'; // navigate through the categories } else { $category_depth = 'products'; // category has no products, but display the 'no products' message } } } require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_DEFAULT); ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <meta name="verify-v1" content="MOiYSPJ1w4AjxEhA+resPqJWBcxkknh6Msl0mHSa5l4=" > <TITLE><?php echo $titletag; ?></TITLE> <META NAME="Keywords" content="<?php echo $keywordtag; ?>"> <META NAME="Description" content="<?php if (tep_not_null($cat_description['categories_description'])){ echo (strip_tags($cat_description['categories_description'])); } else { echo $description; }?>"> <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> <link rel="stylesheet" type="text/css" href="file:///C|/Documents and Settings/tech-net/Desktop/Mt-website/oscommerce-2.2ms2-060817/catalog/stylesheet.css"> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="3" cellpadding="3"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <!-- body_text //--> <?php if ($category_depth == 'nested') { $category_query = tep_db_query("select cd.categories_name, c.categories_image from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = '" . (int)$current_category_id . "' and cd.categories_id = '" . (int)$current_category_id . "' and cd.language_id = '" . (int)$languages_id . "'"); $category = tep_db_fetch_array($category_query); ?> <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> <td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . $category['categories_image'], $category['categories_name'], HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <?php if (isset($cPath) && strpos('_', $cPath)) { // check to see if there are deeper categories within the current category $category_links = array_reverse($cPath_array); for($i=0, $n=sizeof($category_links); $i<$n; $i++) { $categories_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$category_links[$i] . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "'"); $categories = tep_db_fetch_array($categories_query); if ($categories['total'] < 1) { // do nothing, go through the loop } else { $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$category_links[$i] . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name"); break; // we've found the deepest category the customer is in } } } else { $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$current_category_id . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name"); } $number_of_categories = tep_db_num_rows($categories_query); $rows = 0; while ($categories = tep_db_fetch_array($categories_query)) { $rows++; $cPath_new = tep_get_path($categories['categories_id']); $width = (int)(100 / MAX_DISPLAY_CATEGORIES_PER_ROW) . '%'; echo ' <td align="center" class="smallText" width="' . $width . '" valign="top"><a href="' . tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">' . tep_image(DIR_WS_IMAGES . $categories['categories_image'], $categories['categories_name'], SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT) . '<br>' . $categories['categories_name'] . '</a></td>' . "\n"; if ((($rows / MAX_DISPLAY_CATEGORIES_PER_ROW) == floor($rows / MAX_DISPLAY_CATEGORIES_PER_ROW)) && ($rows != $number_of_categories)) { echo ' </tr>' . "\n"; echo ' <tr>' . "\n"; } } // needed for the new products module shown below $new_products_category_id = $current_category_id; ?> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><?php include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?></td> </tr> </table></td> </tr> </table></td> <?php } elseif ($category_depth == 'products' || isset($HTTP_GET_VARS['manufacturers_id'])) { // create column list $define_list = array('PRODUCT_LIST_MODEL' => PRODUCT_LIST_MODEL, 'PRODUCT_LIST_NAME' => PRODUCT_LIST_NAME, 'PRODUCT_LIST_MANUFACTURER' => PRODUCT_LIST_MANUFACTURER, 'PRODUCT_LIST_PRICE' => PRODUCT_LIST_PRICE, 'PRODUCT_LIST_QUANTITY' => PRODUCT_LIST_QUANTITY, 'PRODUCT_LIST_WEIGHT' => PRODUCT_LIST_WEIGHT, 'PRODUCT_LIST_IMAGE' => PRODUCT_LIST_IMAGE, 'PRODUCT_LIST_BUY_NOW' => PRODUCT_LIST_BUY_NOW); asort($define_list); $column_list = array(); reset($define_list); while (list($key, $value) = each($define_list)) { if ($value > 0) $column_list[] = $key; } $select_column_list = ''; for ($i=0, $n=sizeof($column_list); $i<$n; $i++) { switch ($column_list[$i]) { case 'PRODUCT_LIST_MODEL': $select_column_list .= 'p.products_model, '; break; case 'PRODUCT_LIST_NAME': $select_column_list .= 'pd.products_name, '; break; case 'PRODUCT_LIST_MANUFACTURER': $select_column_list .= 'm.manufacturers_name, '; break; case 'PRODUCT_LIST_QUANTITY': $select_column_list .= 'p.products_quantity, '; break; case 'PRODUCT_LIST_IMAGE': $select_column_list .= 'p.products_image, '; break; case 'PRODUCT_LIST_WEIGHT': $select_column_list .= 'p.products_weight, '; break; } } // show the products of a specified manufacturer if (isset($HTTP_GET_VARS['manufacturers_id'])) { if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) { // We are asked to show only a specific category $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "'"; } else { // We show them all $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m where p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'"; } } else { // show the products in a given categorie if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) { // We are asked to show only specific catgeory $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'"; } else { // We show them all $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'"; } } if ( (!isset($HTTP_GET_VARS['sort'])) || (!ereg('[1-8][ad]', $HTTP_GET_VARS['sort'])) || (substr($HTTP_GET_VARS['sort'], 0, 1) > sizeof($column_list)) ) { for ($i=0, $n=sizeof($column_list); $i<$n; $i++) { if ($column_list[$i] == 'PRODUCT_LIST_NAME') { $HTTP_GET_VARS['sort'] = $i+1 . 'a'; $listing_sql .= " order by pd.products_name"; break; } } } else { $sort_col = substr($HTTP_GET_VARS['sort'], 0 , 1); $sort_order = substr($HTTP_GET_VARS['sort'], 1); $listing_sql .= ' order by '; switch ($column_list[$sort_col-1]) { case 'PRODUCT_LIST_MODEL': $listing_sql .= "p.products_model " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name"; break; case 'PRODUCT_LIST_NAME': $listing_sql .= "pd.products_name " . ($sort_order == 'd' ? 'desc' : ''); break; case 'PRODUCT_LIST_MANUFACTURER': $listing_sql .= "m.manufacturers_name " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name"; break; case 'PRODUCT_LIST_QUANTITY': $listing_sql .= "p.products_quantity " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name"; break; case 'PRODUCT_LIST_IMAGE': $listing_sql .= "pd.products_name"; break; case 'PRODUCT_LIST_WEIGHT': $listing_sql .= "p.products_weight " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name"; break; case 'PRODUCT_LIST_PRICE': $listing_sql .= "final_price " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name"; break; } } ?> <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> <?php // optional Product List Filter if (PRODUCT_LIST_FILTER > 0) { if (isset($HTTP_GET_VARS['manufacturers_id'])) { $filterlist_sql = "select distinct c.categories_id as id, cd.categories_name as name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where p.products_status = '1' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and p2c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' order by cd.categories_name"; } else { $filterlist_sql= "select distinct m.manufacturers_id as id, m.manufacturers_name as name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_MANUFACTURERS . " m where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and p.products_id = p2c.products_id and p2c.categories_id = '" . (int)$current_category_id . "' order by m.manufacturers_name"; } $filterlist_query = tep_db_query($filterlist_sql); if (tep_db_num_rows($filterlist_query) > 1) { echo ' <td align="center" class="main">' . tep_draw_form('filter', FILENAME_DEFAULT, 'get') . TEXT_SHOW . ' '; if (isset($HTTP_GET_VARS['manufacturers_id'])) { echo tep_draw_hidden_field('manufacturers_id', $HTTP_GET_VARS['manufacturers_id']); $options = array(array('id' => '', 'text' => TEXT_ALL_CATEGORIES)); } else { echo tep_draw_hidden_field('cPath', $cPath); $options = array(array('id' => '', 'text' => TEXT_ALL_MANUFACTURERS)); } echo tep_draw_hidden_field('sort', $HTTP_GET_VARS['sort']); while ($filterlist = tep_db_fetch_array($filterlist_query)) { $options[] = array('id' => $filterlist['id'], 'text' => $filterlist['name']); } echo tep_draw_pull_down_menu('filter_id', $options, (isset($HTTP_GET_VARS['filter_id']) ? $HTTP_GET_VARS['filter_id'] : ''), 'onchange="this.form.submit()"'); echo '</form></td>' . "\n"; } } // Get the right image for the top-right $image = DIR_WS_IMAGES . 'table_background_list.gif'; if (isset($HTTP_GET_VARS['manufacturers_id'])) { $image = tep_db_query("select manufacturers_image from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'"); $image = tep_db_fetch_array($image); $image = $image['manufacturers_image']; } elseif ($current_category_id) { $image = tep_db_query("select categories_image from " . TABLE_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'"); $image = tep_db_fetch_array($image); $image = $image['categories_image']; } ?> <td align="right"><?php echo tep_image(DIR_WS_IMAGES . $image, HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><?php include(DIR_WS_MODULES . FILENAME_PRODUCT_LISTING); ?></td> </tr> </table></td> <?php } else { // default page ?> <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> <td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_default.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="main"><?php echo tep_customer_greeting(); ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td class="main"><?php echo TEXT_MAIN; ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><?php include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?></td> </tr> <?php include(DIR_WS_MODULES . FILENAME_UPCOMING_PRODUCTS); ?> </table></td> </tr> </table></td> <?php } ?> <!-- body_text_eof //--> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- right_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_right.php'); ?> <!-- right_navigation_eof //--> </table></td> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> <br> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> Edited May 23, 2007 by masstech Quote Link to comment Share on other sites More sharing options...
masstech Posted May 23, 2007 Share Posted May 23, 2007 Never mind I've got it sorted now. Quote Link to comment Share on other sites More sharing options...
alkhataat Posted May 28, 2007 Share Posted May 28, 2007 Never mind I've got it sorted now. Hello every one, I have installed meta tags on the fly and I got the admin/meta where I have added some keywords and run the test at http://www.widexl.com/remote/search-engine...g-analyzer.html , but the results are terrible !!!! As an example : Title: Title relevancy to page content is terrible. The Title relevancy to page content is 0%. Description: Found no description meta tag. The description meta tag is used by most of the search engines. Consider to add a description meta tag. Keywords: Found no keywords meta tag. The keyword meta tag is still used by some search engines. Consider to add a keyword meta tag. I did not see any error during the installation, surely as a newbie I have missed something. Can some one kindly look at my site and advise me in simple words what I need to add and where ? Just a small example to follow. Appreciate your assistance. Ahmed http://www.qazamart.com Quote Link to comment Share on other sites More sharing options...
bill110 Posted May 30, 2007 Share Posted May 30, 2007 I went to the web site, right clicked and viewed source, I see all three meta tags. your title only shows TITLE Have you named your store in the admin area? Also this line needs to be in catalog/includes/languages/english.php // page title define('TITLE', STORE_NAME); here is from a product page <TITLE>TITLE-E-Books-Keeping Fit-31 Days To Bigger Arms</TITLE> <META NAME="Keywords" content="digital ebook. ebook reader, work at home, affiliate, make money online, home based business, download software, E-Books, Keeping Fit, 31 Days To Bigger Arms"> <META NAME="Description" content="If you want to put Inches on your arms and develop bigger biceps within a month, you must have this! This ebook will give you loads of tips on how to build your arm muscles, including exercise, diet recommendations and much more."> and from your home page <TITLE>TITLE</TITLE> <META NAME="Keywords" content="digital ebook. ebook reader, work at home, affiliate, make money online, home based business, download software"> <META NAME="Description" content="work at home sell ebooks and generate a good revenue with english and arabic ebooks and download free ebooks"> Quote My Contributions Stylesheet With Descriptions Glassy Grey Boxtops Our Products Meta Tags On The Fly Password Protect Admin "No matter where you go....There you are" - Buccaroo Bonsai Link to comment Share on other sites More sharing options...
alkhataat Posted May 30, 2007 Share Posted May 30, 2007 I went to the web site, right clicked and viewed source, I see all three meta tags. your title only shows TITLE Have you named your store in the admin area? Also this line needs to be in catalog/includes/languages/english.php // page title define('TITLE', STORE_NAME); here is from a product page <TITLE>TITLE-E-Books-Keeping Fit-31 Days To Bigger Arms</TITLE> <META NAME="Keywords" content="digital ebook. ebook reader, work at home, affiliate, make money online, home based business, download software, E-Books, Keeping Fit, 31 Days To Bigger Arms"> <META NAME="Description" content="If you want to put Inches on your arms and develop bigger biceps within a month, you must have this! This ebook will give you loads of tips on how to build your arm muscles, including exercise, diet recommendations and much more."> and from your home page <TITLE>TITLE</TITLE> <META NAME="Keywords" content="digital ebook. ebook reader, work at home, affiliate, make money online, home based business, download software"> <META NAME="Description" content="work at home sell ebooks and generate a good revenue with english and arabic ebooks and download free ebooks"> Hello Bill, In the catalog/includes/languages/english.php The following entry is already available // page title define('QazaMart ebooks store', STORE_NAME); The same store name has been entered in the admin area. But if you check thru the following meta tags analyzer, the results are terrible, I don't know what is the problem http://www.widexl.com/remote/search-engine...g-analyzer.html Thanks for your assistance Very kind of you Regards Ahmed Quote Link to comment Share on other sites More sharing options...
bill110 Posted May 31, 2007 Share Posted May 31, 2007 In the catalog/includes/languages/english.php The following entry is already available // page title define('QazaMart ebooks store', STORE_NAME); The same store name has been entered in the admin area. It should read exactly like this: // page title define('TITLE', STORE_NAME); Do not replace STORE_NAME with your store name. This way the code uses the admin entry for the store name to fill in the title tag. Quote My Contributions Stylesheet With Descriptions Glassy Grey Boxtops Our Products Meta Tags On The Fly Password Protect Admin "No matter where you go....There you are" - Buccaroo Bonsai Link to comment Share on other sites More sharing options...
alkhataat Posted June 4, 2007 Share Posted June 4, 2007 It should read exactly like this:// page title define('TITLE', STORE_NAME); Do not replace STORE_NAME with your store name. This way the code uses the admin entry for the store name to fill in the title tag. Hi Bill, Appreciate your support, thank you I did replace back the code as you suggested in both files : catalog/languages/english.php And catalog/admin/languages/english.php now it is // page title define('TITLE', STORE_NAME); Went back to meta tag analyzer http://www.widexl.com/remote/search-engine...g-analyzer.html but the results are the same. Can you kindly have another look at the site http://www.qazamart.com Best regards Ahmed Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.