Hello. I need a recommendation. I'm making a Product Catalog.
Major categories (classes) are in cms_module_product_categories (name and id, that's all)
Next: product families in hierarchies. Everything works perfect. Seeking hierarchies N products of the category, eg But I have a third classification, what if I want to search:
Products categ 1 / belong to the family (hier) Xs / Y are the brand (manufacturer) / then show the Product List
I need to get from the family of products, which are manufacturers and pressing on each show then the Product List
I made a custom field called BRAND_MANUFACTURER and there you enter the name of the brand (GE Siemmens etc ...): This is the best practice for this type of classification?. How I can do a search cat 1 / categ 2 / categ 3 / product?
I would appreciate if I share some method to this, any recommendation, if I'm right or wrong in the process. I'm a little lost
Module products search through three categories
Re: Module products search through three categories
A bit more ....
I've done this and it works well:
load content with ajax >> loadajax
First view: present category, I click on any of them
{Products action = "categorylist"}
loadajax >> Second view: introduce hierarchies that belong to that category
{Products action = "hierarchy" hierarchy = "$ hier_name"}, for this use a UDT that returns a string "hier1, hier, 2, hier, N ..." hierarchies that are in categ1
Here I stopped:
If I press hier1, immediately sends me a list of products, but what I want is to go to category 3, and then click on any brand and then yes, submit Product List
I've done this and it works well:
load content with ajax >> loadajax
First view: present category, I click on any of them
{Products action = "categorylist"}
loadajax >> Second view: introduce hierarchies that belong to that category
{Products action = "hierarchy" hierarchy = "$ hier_name"}, for this use a UDT that returns a string "hier1, hier, 2, hier, N ..." hierarchies that are in categ1
Here I stopped:
If I press hier1, immediately sends me a list of products, but what I want is to go to category 3, and then click on any brand and then yes, submit Product List
Re: Module products search through three categories
Well, I think I'm coming with solution of this issue
Have major categ:
(table categories)
categ 1
categ 2
categ 3
Have classes or families:
(table hierarchies)
hier 1
hier 2
- hier 2.1
hier 3
and so on...
Have third kind of classification MANUFACTURERS:
(table fieldefs:fielvalue:manufacturer)
logo 1
logo 2
logo 3, ...
Users navigate through this three categories to arrive to the list of products
They choose at first the category name, followed by the hierarchy that belongs to, and finally who is the manufacturer, the third, after that, shows the list of the products
I'm using an udt and ajaxload-template to iterate with the Product module and depending the get variables been recieved then call an action to this module
First udt, this query returns a string (comma separated) of list of hierarchy that belong to some category (p.e. 11):
SELECT (SELECT value from cms_module_products_fieldvals WHERE ph.hierarchy_id = product_id) name
FROM cms_module_products_prodtohier ph
INNER JOIN cms_module_products_product_categories pc
ON ph.product_id = pc.product_id
AND pc.category_id = 11 group by ph.hierarchy_id
Second udt a query that search fielddef values that belongs to such category, also belongs to selected hierarchy(ies)
SELECT pf.value FROM cms_module_products_fieldvals pf
INNER JOIN cms_module_products_product_categories pc
ON pf.product_id = pc.product_id
INNER JOIN cms_module_products_prodtohier ph
ON ph.product_id = pc.product_id
AND ph.hierarchy_id = 13
AND pc.category_id = 11
AND pf.fielddef_id = 7 group by pf.value
Mmmm ... I need to see an example of a site that handles three levels category selection
Well, is under construction but left a while how my development is being
http://www.agoiesa.com.mx/index.php?page=productos
(all of this is in the first tab)
any suggestions please
Have major categ:
(table categories)
categ 1
categ 2
categ 3
Have classes or families:
(table hierarchies)
hier 1
hier 2
- hier 2.1
hier 3
and so on...
Have third kind of classification MANUFACTURERS:
(table fieldefs:fielvalue:manufacturer)
logo 1
logo 2
logo 3, ...
Users navigate through this three categories to arrive to the list of products
They choose at first the category name, followed by the hierarchy that belongs to, and finally who is the manufacturer, the third, after that, shows the list of the products
I'm using an udt and ajaxload-template to iterate with the Product module and depending the get variables been recieved then call an action to this module
First udt, this query returns a string (comma separated) of list of hierarchy that belong to some category (p.e. 11):
SELECT (SELECT value from cms_module_products_fieldvals WHERE ph.hierarchy_id = product_id) name
FROM cms_module_products_prodtohier ph
INNER JOIN cms_module_products_product_categories pc
ON ph.product_id = pc.product_id
AND pc.category_id = 11 group by ph.hierarchy_id
Second udt a query that search fielddef values that belongs to such category, also belongs to selected hierarchy(ies)
SELECT pf.value FROM cms_module_products_fieldvals pf
INNER JOIN cms_module_products_product_categories pc
ON pf.product_id = pc.product_id
INNER JOIN cms_module_products_prodtohier ph
ON ph.product_id = pc.product_id
AND ph.hierarchy_id = 13
AND pc.category_id = 11
AND pf.fielddef_id = 7 group by pf.value
Mmmm ... I need to see an example of a site that handles three levels category selection
Well, is under construction but left a while how my development is being
http://www.agoiesa.com.mx/index.php?page=productos
(all of this is in the first tab)
any suggestions please