Primary Table As Navigation

Hello. I am new to the Yii framework (and PHP frameworks in general)

Suppose I have two tables:

  • Manufacturer(id, name)

  • Product(id, productName, manufacturerId)

I want to show a list of Manufacturers on one pane, and the Products on the content pane of the same page. If the user clicks on a manufacturer, the content pane shows products build by that manufacturer.

This should be pretty easy when not using frameworks but I’ve never gotten around to learning how to do it in Yii.

Related question:

How do I do the same using a many-to-many type such as:

  • Product(id, productName)

  • ProductCategory(productId, categoryId)

  • Category(id, categoryName)

This would have categories on the one pane.

TIA all.

It’s not quite clear what this question is about.

How to load related data?

How to display related data?

How to write JS code to make items selectable?

Something else?..

I want to do something like OpenCart or similar e-commerce applications.

How do i display the categories as clickable links? How do i display products under that category when that category is clicked?

Adu La Admin

if you can do it with php I am sure you can do it with yii its pretty simple

I would suggest you to read the blog tutorials