Is this possible?

dkl

New Member
Hi,

I build a small database with companies and products. Every company has one or more products. Products and companies were in two tables with own fields.

What i will do is following:

When i click on "detailed view" in the table with companies there should be a page with some information about the company (address, logo, contact infos, short descriptions etc.). Also there should be a field of all products, that will be made by this company ... BUT ... if the users clicks on one of the product he should get the detailed view of the product. The products are stored in another table, there is also a field with the name of the company which will produce this product.

How is it possible to link from one detailed view to another? Is it possible to fill in the products automatically (SELECT product FROM products WHERE company = ?) ... ?

Hope you understand what i want to do, Thanks for help ...
Dan
 
hi Daniel

(Im presuming you have the lastest patch for 1.0.4b taken from the downloads section)

i think you can do this by:

Im presuming your "products" table has a field called "company_id" which contains a referece to the id in the company table.

create a link to your products table, lets say its "http://mysite.com/index.php?option=com_fabrik&Itemid=1

Edit your company viewonly template and add this to the html:

<a href="http://mysite.com/index.php?option=com_fabrik&Itemid=1&products___company_id[value]=<?php echo $row->company___id;?>">Products</a>

This link should take you to the products page, filtered on the company id.

Cheers
Rob
 
thanks for this solution ... i will try it this weekend and tell you about my progress.

have a nice weekend,
dan
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top