Product catalog organization Option property or attribute of products

Mar 23, 2009 at 3:41 PM
Very nice module... i intend to use this for my web sites.

I need to organize a product catalogue but i need to add some attributes (divided on Attributes group) to each product.
At leatst i need to make a search engine where i can to select the attribute and after search and show the right the result....

I have download the source for make this modify... can you help me with some suggestion for start this work.

Other 2 question
Is there a template for the category menu?
Do you think is possible to hide a user manager all the "shop" tab and show only category and product... in this way i can to use the same module for a simple product catalogue

thanks
rmartin
Coordinator
Mar 23, 2009 at 4:54 PM
Hi rmartin,

1 - For the first question, I'm a bit unsure of what exactly you required?  But I'll presume that you want a module with certain dropdown lists that match attribute criteria, after selecting the client hits the search button and you get a list of products matching the selections.

Off the top of my head I would say use the search module as a basic starting point, It's fairly simple and justs has a SPROC linked to the DNN search index.  You could create a ascx the same as the search with all the needed dropdowns in.  Also create a SPROC to handle the select (linking to the NB_Store_OptionValue table).  After that you can link it to the productlist to get your results, the same as the search module does.

2 - If your using version 01.01.05 beta, have a look at the menu xml control files, "mainmenu.xml" and "MainMenuLite.xml" the first is used when a normal manager is logon the second is used when the user role is managerlite.  You can configure the menus as you wish. Although to get different menus for a manager you'll probably have to change some code, Extra roles and test for manager, manager2, etc.. and pickup a specific xml for each.

Hope this helps,

Regards,
Dave.

Mar 24, 2009 at 9:42 AM
I Dave thanks for your Replay...
1) Yes Is what I need
I need to ad some attributes to the product (ex: technical characteristics (car: diesel)).
In the search module the client must have the possibility to specify a value (from dropdown list) for the attribute and make the search.

How do you think to store this data in the DB ( two other tables?!?)

Can you suggest me the best approche to implement this feature...
Thanks
Ramrtin
Coordinator
Mar 24, 2009 at 2:27 PM
Edited Mar 24, 2009 at 2:29 PM
In this case I think you've got two choices:
 1 - Easiest and most static is to simply create the dropdown lists in the ascx and hardcode the required selection. (obviously this doesn't allow for change, but it would be the quick solution)
 2 - The better solution, but more work, would be to dymanically create the dropdown lists based on what options exists in the products.  If it's just options you need to select on the you need to look at the "NB_Store_Option","NB_Store_OptionLang" "NB_Store_OptionValue" and "NB_Store_OptionValueLang" tables.  If you also need to select on product models then the "NB_Store_Model" and "NB_Store_ModelLang" will also need to be looked at.  You could create a function which selects (SQL using distinct, so you don't over load memory on large stores) all the options possible and builds up a colletion of values that need to be created in dropdown lists at runtime.  I would strongly think about caching the collection, server side, so you don't have to build it on every page load. (Or at least have a seperate page for it, like an advance search page)

If it was me I think I'd look into implementing this as a bolt on module. (i.e. an independant module from the store which simply references it ), however this would mean recreating the productlist modules as well, unfortunatly I've not designed the productlist ascx to be very extendable (i.e. allow product lists to be passed to it, if I was creating the product list ascx again I think I'd look into how I could do this, so I wouldn't have to copy any code).  It all depends if you intend to upgrade the store in future or has it got all the functionality you will need?

Hope this gives some food for thought?