Jump to content


Corporate Sponsors


Latest News: (loading..)

RMD27

Member Since 16 Oct 2009
Offline Last Active May 19 2012, 23:44
-----

Posts I've Made

In Topic: A big problem. slow (20-30 sec)

19 May 2012, 23:36

View Postezoscommerce, on 30 June 2010, 17:41, said:

We recommend to doing this:

1- install this contribution http://www.oscommerce.com/community/contributions,2561
2- Run this query in your db

ALTER TABLE `products_to_categories` DROP PRIMARY KEY;
ALTER TABLE `products_to_categories` ADD INDEX `idx_p2c_categories_id` ( `categories_id` );
ALTER TABLE `products_to_categories` ADD INDEX `idx_p2c_products_id` ( `products_id` );


Thanks

thank you from me as well!

In Topic: Change product listings from vertical to horizontal

19 May 2012, 16:40

to bring it back from the dead

Be careful with this one. If you have made changed to your configuration table, the "11", "12", "13", and "14" for sort_order will have to change depending on the last item with the configuration_group_id of "8"

set_function is the last thing in my configuration table, number 11.

I have to increase the ref in the sql instructions by 3? ie 8 becomes 11, 11 becomes 14 etc???

INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Display Add Multiples column', 'PRODUCT_LIST_MULTIPLE', '0', 'Do you want to display the Multiple Quantity with Attributes column?', '8', '11', now());
INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Display Add Multiples with Buy Now column', 'PRODUCT_LIST_BUY_NOW_MULTIPLE', '0', 'Do you want to display the Multiple Quantity Buy Now with Attributes column?', '8', '12', now());
INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Number of column per row', 'PRODUCT_LIST_NUMCOL', '3', 'How many columns per row to display?', '8', '13', now());
INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Show actual price in the pull down menu for attributes', 'PRODUCT_LIST_ACTUAL_PRICE_IN_DROPDOWN', 'No', 'Do you want to show the actual price in the pull down menu for attributes or the (+ $10.00) ?', '8', '14', 'tep_cfg_select_option(array(\'Yes\', \'No\'), ', now());
Be careful with this one. If you have made changed to your configuration table, the "11", "12", "13", and "14" for sort_order will have to change depending on the last item with the configuration_group_id of "8"

this is my config table

# Column Type Collation Attributes Null Default Extra Action
  1 configuration_id int(11)   No None AUTO_INCREMENT   Change   Drop  More
  2 configuration_title varchar(255) latin1_swedish_ci  No	 Change   Drop  More
  3 configuration_key varchar(255) latin1_swedish_ci  No	 Change   Drop  More
  4 configuration_value text latin1_swedish_ci  No None    Change   Drop  More
  5 configuration_description varchar(255) latin1_swedish_ci  No	 Change   Drop  More
  6 configuration_group_id int(11)   No 0    Change   Drop  More
  7 sort_order int(5)   Yes NULL    Change   Drop  More
  8 last_modified datetime   Yes NULL    Change   Drop  More
  9 date_added datetime   No 0000-00-00 00:00:00    Change   Drop  More
  10 use_function varchar(255) latin1_swedish_ci  Yes NULL    Change   Drop  More
  11 set_function varchar(255) latin1_swedish_ci  Yes NULL    Change   Drop  More

expert advice welcome!!

In Topic: crossdomain.xml

19 May 2012, 14:17

View Postkymation, on 23 January 2012, 21:16, said:

A crossdomain.xml file is used by Adobe Flash to allow your Flash content to include content from another domain. It's a security hole if not done properly, so this could be an attempt to find a vulnerability to exploit. Or, if you have Flash content on your site, it could be perfectly normal.

Regards
Jim

jim, how do you stop it?

In Topic: Meta Tags For Your osC Shop

15 May 2012, 15:19

okay I pushed the boat out a bit more, replace the above code with this to make the title lower case in the keywords. Will also strip accents/foreign characters like Russian and Greek if you put in what you need.

<?php
// Easy Meta Tags 1.2.5 for osCommerce MS2.2/RC2.2/2.31
//index page metas
if (basename($PHP_SELF) == FILENAME_DEFAULT) {
if (isset($HTTP_GET_VARS['products_id'])){
$product_meta_query = tep_db_query("select products_name, products_description from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and language_id = '" . (int)$languages_id . "'");
$product_meta = tep_db_fetch_array($product_meta_query);
$meta_title_tag = $product_meta['products_name'];
$meta_description = preg_replace('/<[^>]*>/', '', $product_meta['products_description']);
$meta_description = preg_replace('/\s\s+/', ' ',$meta_description);
if (strlen($meta_description) > 200){
$meta_description_tag = substr($meta_description, 0, 200) . '...';
}else {
$meta_description_tag = $meta_description;
}
$meta_keywords_tag = $product_meta['products_name'];
}
if ((isset($_GET['cPath'])) && (!isset($HTTP_GET_VARS['products_id']))) {
$category_name_query = tep_db_query("select cd.categories_name 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_name = tep_db_fetch_array($category_name_query);
define('HEADING_TITLE_NEW', $category_name['categories_name']);
if (isset($HTTP_GET_VARS['page']) && ($HTTP_GET_VARS['page'] != '1')) {
$page = '-' . $HTTP_GET_VARS['page'];
}
$meta_title_tag = $category_name['categories_name'] . (isset($page) ? $page : '');
$meta_description_tag = $category_name['categories_name'] . (isset($page) ? $page : '') . ' : ' . STORE_NAME;
$meta_keywords_tag = $category_name['categories_name']. (isset($page) ? $page : '');
}
if ((isset($HTTP_GET_VARS['manufacturers_id'])) && (!isset($HTTP_GET_VARS['products_id']))) {
$manufacturers_name_query = tep_db_query("select m.manufacturers_name from " . TABLE_MANUFACTURERS . " m where m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'");
$manufacturers_name = tep_db_fetch_array($manufacturers_name_query);

$meta_title_tag = $manufacturers_name['manufacturers_name'];
$meta_description_tag = $manufacturers_name['manufacturers_name'] . ' : ' . STORE_NAME;
$meta_keywords_tag = $manufacturers_name['manufacturers_name'];
}
if ((!isset($_GET['cPath'])) && (!isset($HTTP_GET_VARS['manufacturers_id'])) && (!isset($HTTP_GET_VARS['products_id']))) {
$meta_title_tag = STORE_NAME;
$meta_description_tag = STORE_NAME;
$meta_keywords_tag = STORE_NAME;
}
// product info metas
} elseif  (basename($PHP_SELF) == FILENAME_PRODUCT_INFO) {
$product_meta_query = tep_db_query("select products_name, products_description from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and language_id = '" . (int)$languages_id . "'");
$product_meta = tep_db_fetch_array($product_meta_query);
$meta_title_tag = $product_meta['products_name'];
$meta_description = preg_replace('/<[^>]*>/', '', $product_meta['products_description']);
$meta_description = preg_replace('/\s\s+/', ' ',$meta_description);
if (strlen($meta_description) > 200){
$meta_description_tag = substr($meta_description, 0, 200) . '...';
}else {
$meta_description_tag = $meta_description;
}
$meta_keywords_tag = $product_meta['products_name'];
// product reviews info metas
} elseif  (basename($PHP_SELF) == FILENAME_PRODUCT_REVIEWS_INFO) {
$reviews_meta_query = tep_db_query("select rd.reviews_text, pd.products_name from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd, " . TABLE_PRODUCTS_DESCRIPTION . " pd where r.reviews_id = '" . (int)$HTTP_GET_VARS['reviews_id'] . "' and r.reviews_id = rd.reviews_id and rd.languages_id = '" . (int)$languages_id . "' and r.products_id = pd.products_id and pd.language_id = '". (int)$languages_id . "'");
$reviews_meta = tep_db_fetch_array($reviews_meta_query);
$meta_title_tag = NAVBAR_TITLE . ' :: ' . $reviews_meta['products_name'];
$meta_description = preg_replace('/<[^>]*>/', '', $reviews_meta['reviews_text']);
$meta_description = preg_replace('/\s\s+/', ' ',$meta_description);
if (strlen($meta_description) > 200){
$meta_description_tag = substr($meta_description, 0, 200) . '...';
}else {
$meta_description_tag = $meta_description;
}
$meta_keywords_tag = NAVBAR_TITLE . ' ' . $reviews_meta['products_name'];
} else {
//other pages 
if (HEADING_TITLE != 'HEADING_TITLE') {
$heading_title = HEADING_TITLE;
} else {
$heading_title = basename($PHP_SELF);
$patterns[0] = '/.php/';
$patterns[1] = '/.html/';
$patterns[2] = '/-/';
$patterns[3] = '/_/';
$replacements[0] = '';
$replacements[1] = '';
$replacements[2] = ' ';
$replacements[3] = ' ';
$heading_title = preg_replace($patterns, $replacements, $heading_title);
$heading_title = ucwords($heading_title);
}
$meta_title_tag = $heading_title;
$meta_description_tag = $heading_title . ' : ' . STORE_NAME;
$meta_keywords_tag = $heading_title;
}
function strtolower_utf8($string){
  $convert_to = array(
    "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u",
    "v", "w", "x", "y", "z", "à", "á", "â", "ã", "ä", "å", "æ", "ç", "è", "é", "ê", "ë", "ì", "í", "î", "ï",
    "ð", "ñ", "ò", "ó", "ô", "õ", "ö", "ø", "ù", "ú", "û", "ü", "ý", "а", "б", "в", "г", "д", "е", "ё", "ж",
    "з", "и", "й", "к", "л", "м", "н", "о", "п", "р", "с", "т", "у", "ф", "х", "ц", "ч", "ш", "щ", "ъ", "ы",
    "ь", "э", "ю", "я", "ζ", "α"
  );
  $convert_from = array(
    "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U",
    "V", "W", "X", "Y", "Z", "À", "Á", "Â", "Ã", "Ä", "Å", "Æ", "Ç", "È", "É", "Ê", "Ë", "Ì", "Í", "Î", "Ï",
    "Ð", "Ñ", "Ò", "Ó", "Ô", "Õ", "Ö", "Ø", "Ù", "Ú", "Û", "Ü", "Ý", "А", "Б", "В", "Г", "Д", "Е", "Ё", "Ж",
    "З", "И", "Й", "К", "Л", "М", "Н", "О", "П", "Р", "С", "Т", "У", "Ф", "Х", "Ц", "Ч", "Ш", "Щ", "Ъ", "Ъ",
    "Ь", "Э", "Ю", "Я", "Ζ", "ά"
  );
  return str_replace($convert_from, $convert_to, $string);
}
$meta_keywords_tagL = strtolower_utf8($meta_keywords_tag);
echo '<title>' . $meta_title_tag;
include ('index_meta_title.php');
echo '</title>' . "\n";
echo '<meta name="description" content="' . $meta_description_tag;
include ('index_meta_description.php');
echo '" />' . "\n";
echo '<meta name="keywords" content="' . $meta_keywords_tagL;
include ('index_meta_keywords.php');
echo '" />' . "\n";
?>

100% not my work. I got it from here http://php.net/manual/en/function.strtolower.php

In Topic: Meta Tags For Your osC Shop

15 May 2012, 14:39

View Posttoyicebear, on 15 May 2012, 14:19, said:

if you want to add manual tags you should rather look at the Header Tags SEO add-on.

Okay, I got it

I changed this

echo '<title>' . $meta_title_tag . '</title>' . "\n";
echo '<meta name="description" content="' . $meta_description_tag . '" />' . "\n";
echo '<meta name="keywords" content="' . $meta_keywords_tag . '" />' . "\n";

to this

echo '<title>' . $meta_title_tag;
include ('index_meta_title.php');
echo '</title>' . "\n";
echo '<meta name="description" content="' . $meta_description_tag;
include ('index_meta_description.php');
echo '" />' . "\n";
echo '<meta name="keywords" content="' . $meta_keywords_tag;
include ('index_meta_keywords.php');
echo '" />' . "\n";

About header tags SEO, yeah I have looked at it but unfortunately it does not use the same database tables as Easy Populate so it is not practical.

With your contribution I can manually add meta tags with Easy Populate which is an amazing feature.

About the category bit. Okay, I cant use Easy Populate but your contribution gets 70% of the way there and the extra includes gets it to 85%. Its not perfect but I can live with it.

Basically, the only way manually adding meta tags is feasible is with Easy Populate. Your contribution does use it and I know of know other SEO contribution that does, which in mind mind, makes you a bit of a hero.