PDA

View Full Version : Explain this category mapping serialization


Raid
27-06-09, 12:20
Can someone explain to me in English what this bit of code is doing, taken from constants.inc.php of the ShopWindow Client software:

// rename categories or leave name blank to remove them
define('CATEGORY_MAPPINGS', serialize( array(230 => "Books",
97 => "Fashion",
61 => "Pc's & Software",
347 => "Phones & Mobiles",
493 => "Motoring") ) );

Thanks :)

infocraze
28-06-09, 00:25
This enables you to assign custom names to the toolset categories...for instance, 97 => "Fashion", can be changed to 97 => "Clothing", so you get the category named as clothing in the toolset.

Additionally, you my leave the name blank to remove certain cateogires from the toolset. Example, 493 => "" would remove the motoring category from your shopwindow toolset.

Hope this helps.

Raid
28-06-09, 18:39
Thanks for your response.

Rgds