Author Topic: HACK: AutoGen Metadata Metatag. Product, Category. Title, Description, Keywords  (Read 315867 times)

stonebug

  • Beginner
  • *
  • Posts: 3
As I understood I think there was an issue with local Apache & PHP.
I tried this addon locally in Xampp and I had an issue with Greek.
I tried it online and Greek worked!!! maybe something with ereg (php).

In order for this hack to work with greek characters you should replace on shop.product.details.php the function
strtolower with mb_strtolower. The problem is with the multibyte greek characters that the codes try to convert to lowercase and it turns it to "?".
I tried it and it works.
Well there is another bug with the stopwords, dont use greek stopwords because it deletes characters from words, because of the multibyte utf8 greek characters.
If the code was written again with full support for utf8 characters then it would be perfect for worldwide websites in any language.
Until then .... it works great anyway!

enzoibanez

  • Beginner
  • *
  • Posts: 7
hi guys..i've a problem..this is a gooooood hack..t i've a problem..i can't write on category description..the description don't save.
i have virtuemart sef,acesef 1.1.9 virtuemart
can i resolve it?
the description product can save but category description don't save
hi at all from italy
i have the problem that i can't create no new category and no new proudutct..sorry!!!can anyone hal me??
joomla 1.5.23
wm 1.9

dl_2011

  • Beginner
  • *
  • Posts: 2
Hi There,

I am a first time user for this hack, can any help with how i can install this hack to work. Dont know where to start.

Is there an instruction manual in how to set this up. If there is where could i find it?

vladast

  • Beginner
  • *
  • Posts: 41
@stonebug
that's work for me... for any case I have saved files under UTF-8
if someone have to replace some characters with other characters there is my post here:
http://forum.virtuemart.net/index.php?topic=65697.msg327910#msg327910  ;)

@enzoibanez
I have j 1.5.23, and updated 1.5.25 and VM 1.1.9 and evertything works fine... adding categories, products...

@dl_2011
you just have to replace files from install folder in zip archive from first page of this topic to your joomla folder
after that you need to import SQL file also from install folder to your SQL database...
and that's it :)

mbit

  • Jr. Member
  • **
  • Posts: 323
hello, i am working on this hack with Joomfish and i stacked at the last part before my update :/
i managed to get the category page meta & the product page meta work but i miss the parent pategory translation at the title. What i mean is..
My subcategory title looks like :
Cat_title - Parent_Cat_title - Sitename .
So when i choose to translate, everything seems to change well except the parent_cat_title that stays the same at the default lang.  I search the code, and i end up on shop.browse.php file, line 202:
Code: [Select]
$document->setTitle(str_replace('"', '', strip_tags( $db->f('category_title').' - '.$category_has_parent_name.' - '.$general_append_end_title)));
$category_has_parent_name doesnt seem to communicate with joomfish :/
I tried to make a custom hack here.. 
Code: [Select]
if( $category_has_parent_name ) {
$dbbc = new ps_DB;
$dbbc->query( "SELECT category_parent_id FROM #__{vm}_category_xref WHERE category_child_id='$category_id'");
$dbbc->next_record();
$get_category = ucwords(strip_tags( $dbbc->f('category_parent_id')));
}
so if i replace $get_category with $category_has_parent_name at line 202, now i get the parent_category_id at the title.

Its easy to find the category_title of that category_id but how will i check which language title should be called ?? Can i set an if of url parameters somehow?

Any help welcome :)

Forrest

  • Full Member
  • ***
  • Posts: 1972
  • Me and my baby
    • Web Developer
Well this is more of a Joomfish specific question.

I would search their forums for a snippet of code to query the active language, if it is not pass in the url parameters. Maybe there is a setting as well in Joomfish to place the language in the url... but likely this is not necessary, the the fore-mentioned otpion is the way to go.

sodego

  • Beginner
  • *
  • Posts: 18
    • iturist.eu
There is still a problem with language settings
semewhere in script , I use polish UTF-8 language charset
and script shred words metatags when the polish special character is
used (for one word we receive 2 words divided).
For exapmle instead of one word który we recive two words kt , ry
without polish cut out character.

vladast

  • Beginner
  • *
  • Posts: 41
me again...
on my another site, which is with cell phones and equipment, where is a phone models, like Nokia 6680, or Nokia 5560, or something with numbers,
my meta keywords won't show up with that numbers...

I need to be... keywords example... battery,compatible, with, nokia, 5510, 5600, 5500...

how to do that?
thnx

Forrest

  • Full Member
  • ***
  • Posts: 1972
  • Me and my baby
    • Web Developer
You can turn on manual edit and add as you need for each product/category.

servlet

  • Jr. Member
  • **
  • Posts: 348
  • Business optimization
    • Фототапети
  • VirtueMart Version: 3.2.2
Which pack must I use?
I am with VM 1.1.9 and J1.5.25
I am using: Joomla 3.7.2 VM 3.2.2
Он-лайн магазин за фототапети http://mishelfoster.com

Forrest

  • Full Member
  • ***
  • Posts: 1972
  • Me and my baby
    • Web Developer
This one:
http://forum.virtuemart.net/index.php?action=dlattach;topic=65697.0;attach=18128

However, it is not updated to the latest VM, so you will need to manually copy the code (which is well commented) into your later version files, rather than just overwriting.

vladast

  • Beginner
  • *
  • Posts: 41
@Forrest?

I know for manual turning on, but I need to write words, or in my case numbers... It's not automatically process like for other words!
Is it possible to do it automatically??

This is my print screen?


thnx

Forrest

  • Full Member
  • ***
  • Posts: 1972
  • Me and my baby
    • Web Developer
Frankly I don't remember off top of head what I am stripping and what I am not. You can look thu my code to see find where numbers are being stripped is shop.product_details.

vladast

  • Beginner
  • *
  • Posts: 41
I have looked, and only line where numbers are show up is
Quote
$numbers = array("1", "2", "3", "4", "5", "6", "7", "8", "9", "0");
     $string_words = str_replace($numbers, '', $end_keywords);

what to do, what to replace, erase or something? I don'n know, I have tried everything, but nothing works...

please...

Forrest

  • Full Member
  • ***
  • Posts: 1972
  • Me and my baby
    • Web Developer
erase that if you want to keep numbers.

then put below in it's place.

$string_words = $end_keywords;