Thank you Forrest for that great hack.
I have found a few problems.
D. The system comes with a word filter (like a bad word filter) so you can exclude words you know you do not want in your keywords (like, the, of, for, if). I have included a fairly extensive set already.
That filter doesn't want to remove first word from product short description. If I have a word in my product short description which I don't want to have with my keywords that filter can't do it. I tried to fix that but I couldn't. But I used a hack.
$get_words = ucwords(strip_tags($desc.' '.$category_has_parent_description.' '.$product_names_list));
$get_words = ucwords(strip_tags("xx" . $desc.' '.$category_has_parent_description.' xx '.$product_names_list));
So first word in get_words array will be "xx" and the script will remove that anyway because it is too short so I don't have to worry and filter will exclude the first word from product description.
Second problem is $general_append_keys. If I have a phrases (2 or 3 words) that script will split all of them to single keywords. I think it could be better if I have not just single keywords but also some phrases. So this is what I changed:
$end_result = strtolower($trimmed_title.', '.$trimmed_words.', '.$general_append_keys);
$end_result = strtolower($trimmed_title.', '.$trimmed_words);
And added extra line after
$unique = str_replace(' ', ', ', $unique);
$unique = str_replace(',,', ',', $unique);
$unique = $unique . ", " .$general_append_keys; //an extra line
Now I have some keywords created from my product description + some phrases which I have added to database manually.
I also removed $general_append_end from title because it creates too long title.
Same changes for both files (shop.browse.php and shop.product_details.php).
I would like to fix the first problem.