Questions about using Chronoforms & Connectivity v5

anne1979 15 Apr, 2016
Hi,
I am trying hard to find out how to construct something using Connectivity (and perhaps Chronoforms) v5 to implement a search in our vehicle database.

Use cases:
- show a listing of vehicles matching certain filter params (make, model, mileage, color, price range etc.)
- open a single listing entry to display more data about the selected vehicle

Here are my questions so far:

1) Is it possible to call the Connectivity menu item and pass over predefined filter values (GET or POST)?
e.g. if I call www.mysite.de/index.php/sucheFahrzeuge (=menu item connected to my connectivity action) I want to use several links inside our webpage pointing to this menu item and passing over params like "make=Skoda&model=Rapid" to be used as filter parameters before the listing is built up. How can I do this?

2) Is it possible to use a certain Chronoform v5 as the search and filter field form above the connectivity listing? How can I connect those together? I will not need to use a form as an edit view, because I do not change the data.

3) Unfortunately my vehicle data is coming from 4 different tables that are related together via a certain field (foreign key).
The main table data is displayed correctly now, I am able to filter and search within those fields.

Main model: "Vehicles"
Depending tables / models "Specification", "Features" and "Images" (I am adding a screenshot)
Each of the depending tables has (`id`, `lagernummer` (the foreign key), `key`, `value`) with n entries belonging to 1 entry of the main table...

But I am not able to figure out how to write the correct JOIN condition for the hasMany relations... Could you please provide an example?

And on top of this: How could I add functionality to search and filter inside those related tables? e.g. search for all vehicles that have a certain feature...

4) Is it possible to display another version of the above listing in a module position: e.g. I want to display 3 certain cars as a special offer on the front page - and only mark them selected in the backend (no problem) using a custom display. Each of them should then link again to the vehicle detail view mentioned in the top of this post.

Sorry for so many words😉 I would like to setup our search using your mighty tools, but I am a bit struggling to put it all together.
Your help is highly appreciated - I have read through most of the forum topics but i have no clue how to take the next step.

Thanks in advance,
Anne
calculus00 15 Apr, 2016
Hello anne.hartmann@autohaus-siemon.de,
I'm not a Chrono professional, but after checking your new post, I think that the following links may help:
Basic Connectivity v5 listing
P.S: I'm just an automated service😉
GreyHead 15 Apr, 2016
Hi Anne,

You can do all of this, the most complicated part will be building the table joins correctly.

The CCv5 FAQs are a good start, Prof Calculus linked to one of them.

CC and CF both capture variables from the current URL so they can be used in filters in the Conditions box. There is another FAQ on building conditions.

I'm traveling this week and currently replying from my iPod touch. I can give more detail when I am back at my desk.

Bob
anne1979 15 Apr, 2016
Hi GreyHead,
I am glad to hear that it can be build up with CC and CF v5 - I am looking forward to your next enlightening post😉
Have a safe journey.

Anne
anne1979 18 Apr, 2016
So, I already found out about how to pass params and use them inside the conditions box of the model - 1) works for me, but (question 3) above) I don't get the joins together. Whatever I change in the model of the related table, in the debug output cc is always logging
[4] => SELECT `Spezifikation`.`id` AS `Spezifikation.id`, `Spezifikation`.`lagernummer` AS `Spezifikation.lagernummer`, `Spezifikation`.`key` AS `Spezifikation.key`, `Spezifikation`.`bezeichnung` AS `Spezifikation.bezeichnung` FROM `j348_fahrzeugspezifikation` AS `Spezifikation` WHERE `Spezifikation`.`lagernummer` IN ('1', '4', '3') GROUP BY `Spezifikation`.`lagernummer`
--> the numbers after "IN" are definetely row ids but not the lagernummer which cc should use as foreign key / connection between table data... What is wrong here?

If I need to provide more information about table structure or use case let me know.

Thanks in advance,
Anne
This topic is locked and no more replies can be posted.