You are here:  » UPDATE! Previous problem with Category Mapping solved! - Please chech this out!


UPDATE! Previous problem with Category Mapping solved! - Please chech this out!

Submitted by fotisman01 on Sun, 2015-02-22 16:22 in

I had a problem with category mapping with some of the procucts!

In the previous post I thought it had something to do with Greek Characters!!!

I noticed that the category name is automaticly cropped to 33 characters. So when I try to map a cropped name of a category or product, it doesn't get mapped!!!

Can you please help me increse the number of the characters shown in the search in category and product mapping, so I get all the product/category name when I try to map?

Thank you David.

Please don't mind answering the previous topic for greek letters because it has nothing to do with it!

Submitted by support on Mon, 2015-02-23 09:19

Hi,

The length of the index fields was reduced when I worked on optimising search performance some time ago, but in fact, they can be increased to around 100 characters safely (depending on collation but should be fine with utf8_general_ci that I know you are using from a previous email;

The following dbmod.php script will apply the change, create the file and run once from the Price Tapestry installation folder;

<?php
  
require("includes/common.php");
  
$sql "ALTER TABLE `".$config_databaseTablePrefix."products`
            CHANGE `category` `category` VARCHAR(100) NOT NULL default ''"
;
  
database_queryModify($sql,$result);
  print 
"Done.";
?>

...and finally re-import all feeds to apply the change.

Hope this helps!

Cheers,
David.
--
PriceTapestry.com

Submitted by fotisman01 on Tue, 2015-02-24 13:21

Tryed that, but the categories are still being cropped in 32 letters.

Take a look at this link, look at the filters on the left. ( {link saved} ) The category names are still cropped. Can you please help me out.

The Scriped displayed the Done. sign, and then I re-empored the feeds, but when I look at the database, the category field is still varchar(32).

When I run the script again, the varchar(32) in category field in the database doesn't seem to change!

I don't want to mess everything up myself and try to change the code above, so I'm waiting for your responce.!!!!

Thank you David.

Submitted by support on Tue, 2015-02-24 13:43

Hi,

That probably indicates that the maximum key length was exceeded using a new length of 100, running the same script with database debug mode enabled will confirm:

<?php
  
require("includes/common.php");
  
$config_databaseDebugMode TRUE;
  
$sql "ALTER TABLE `".$config_databaseTablePrefix."products`
            CHANGE `category` `category` VARCHAR(100) NOT NULL default ''"
;
  
database_queryModify($sql,$result);
  print 
"Done.";
?>

If that's the case, decrease the value of 100 in VARCHAR(100), say by 10 at a time until the script runs without error. If you find the new limit is still too restrictive give your data source let me know and I'll check it out further with you...

Cheers,
David.
--
PriceTapestry.com

Submitted by fotisman01 on Tue, 2015-02-24 14:14

Worked Perfectly! Thank you DAVID!!!

Apparently there was a limit of 1000 bytes for my sql. I used 75 characters, which seems prety good and totally solves my problem!!!

One again thank you for your time!!!!

Cheers

Submitted by support on Tue, 2015-02-24 14:45

Hi,

If you could email me your modified pto_search.php as an attachment I'll apply the changes for you - that would be the easiest way...

Thanks!
David.
--
PriceTapestry.com