Demo - Categorieslist

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
dantanie
User
Posts: 70

Demo - Categorieslist

Post by dantanie »

Please, I have realized before you log in to the demo application.
When I click OTHER TABLES - Categories.

I realize these Fields. PRODUCT | Category ID | Category Name
In that way when you click on products button, it filters out all products within the category of that row say "Beverages"

Please, can anyone how to implement the same technique on my table.
I looked through the demo project and can't find exactly what creating that effect.

Thank you.


kirondedshem
User
Posts: 642

Post by kirondedshem »

They are using Master/detail relationship between categories(as master) and products (as detail).

I looked through the demo project and can't find exactly what creating that effect.
Go to demo project->select categories->select table settings->
LOOK CAREFULLY AT THE BOTTOM RIGHT you wil see a panel named "master/detail", click "modify", It will open a popup and you will see the master.detail relationship between the two tables category and product where they linked categoryID form categorys to CategoryId in products table.

Read about TUtorials->Master detial in help menu they show you how they setup the master/detail in orders, it even has some screen shots.


dantanie
User
Posts: 70

Post by dantanie »

Please, I have set up the same thing. But What am talking about is when you open the demo project in the browser, before you login. When you click on other tables -> categories.

You will notice a button captioned "products" when you click on that, It filters out all products with Category name next to the product button.
That's what am asking how to set up not setting up master/detail table.

Thank you.


kirondedshem
User
Posts: 642

Post by kirondedshem »

Please, I have set up the same thing
If you REALLY have set it up corectly, you should see a button called "products" on your category list.
So what do you see on your category list page (your master page), coz if you have set up a detail table for a give master table then by default such a button should appear on the master page unless:
-you are hidding it in some custom code
-you are accessing the master list page using an account which has no rights to list records for the detail page.

So first confirm that you have really setup master detail rpoperly

before you login
If you mean you would also like it to be accessible minus aperson loggin in, then go to advanced security or userlevel eprmissions and set category to be accessible by anonymous user


dantanie
User
Posts: 70

Post by dantanie »

My details page is showing the same way when you log in as administrator on the demo app.

Instead of showing Product as a button. Its rather showing the options button.
How do I make it show the products button not the options button

Thank you.


mobhar
User
Posts: 11660

Post by mobhar »

dantanie wrote:
How do I make it show the products button not the options button

Just like in the demo project, make sure you have already enabled "Preview" extension from "Tools" -> "Extensions", afterwards regenerate ALL the script files again.


kirondedshem
User
Posts: 642

Post by kirondedshem »

How do I make it show the products button not the options button
Ok, i get it. The options the buttom dispaly should be master/detail edit OR master/detail view, depending on what is avilable or both. These options are caused by the table settings in the detail atble
If you mean you want it to be just a button minus it showing any of the two options in the drop down button then.

Go to the detail table(s)->table settings, scroll to list section and Untick "Master/detail Edit (as detail)" and also untick "Master/detail View (as detail)".
Now regenerate all files then it should be only one button.

BUT ALternatively if you still need the links these show for some other users, then just ensure the users who dont need to see it dont have edit & view permissions to the detail page, then you can even leave them ticked


dantanie
User
Posts: 70

Post by dantanie »

Go to the detail table(s)->table settings, scroll to list section and Untick "Master/detail Edit (as detail)" and also untick "Master/detail View (as detail)".
Now regenerate all files then it should be only one button.

Please, I have done exactly as stated above but, it does not work still.

My URL on the page is showing
localhost/stkcontrol/loadoutlist.php?cmd=resetall

I thought it should be
localhost/stkcontrol/loadoutlist.php

Please, can the URL be a factor of why it is not working?
If so please how do I fix that?

Thank you.


kirondedshem
User
Posts: 642

Post by kirondedshem »

Please, can the URL be a factor of why it is not working?
No it has nothing to do with it.

Please, I have done exactly as stated above but, it does not work still.
If I assume "loadout" is the master table and you have unticked the options I indicated in all the detail tables related to this table, AND also regenerated ALL files, and you are sure all files related to the master and detail tables have all changed in the destination folder. Then it should work.

As ann exemple try to tick and untick these options in demo project for product table, then regenerate all files, then log in as admin user, you should see for both cases that the button changes to what ive told you and if you tick them back those options should come back.

Try to redo this step again, you can even use other tables and create amaster/detail relationship and see if the problem is with these specific tables.


dantanie
User
Posts: 70

Post by dantanie »

I just edited the demo project.
I realized that when you log in as administrator, it shows the options button.
When you log in as anonymous or other levels with only list ticked, it shows the products button.

So I guess default, administrator level shows the options button by default.
That you so far for the help.


kirondedshem
User
Posts: 642

Post by kirondedshem »

So I guess default, administrator level shows the options button by default.
I dont know if you've really understood it, its co of userlevel permissions currenlty set in system
The options disappear coz anonymous user was not given permission to edit/ view the master record or detail records according to the master/ detail relationship.
BUT ALternatively if you still need the links these show for some other users, then just ensure the users who dont need to see it dont have edit & view permissions to the detail page, then you can even leave them ticked


dantanie
User
Posts: 70

Post by dantanie »

Please, it works fine when I untick view, edit.

But nowhere is the problem the button that says "add loadout/loadoutdetails" is completely gone.
I tried ticking "Add" from the user level settings and the table settings and yet cannot seems to enable "Add loadout/LoadoutDetails"

Thank you


kirondedshem
User
Posts: 642

Post by kirondedshem »

But nowhere is the problem the button that says "add loadout/loadoutdetails" is completely gone.
Dont just tick and untick anything with hope that it work, Know what your ticking and what i does. Read about master detail in help file they will explain what every tick means.

BUt in a summary you must TICK "Master/ detail Add (as detail)" in table settinsg of loadoutdetails table. This waht enables a detail table to appear on master/detail add form, focourse user maust have add permission for both master and detail table to see the button.


dantanie
User
Posts: 70

Post by dantanie »

Yes, this is working now. Thank you a lot.
All this while, I was complaining about not working. It was related to my chrome browser.
After testing this on Microsoft Edge. Everything was fine.
So I cleared Cache from Chrome and software is back for business.

Thank you for every bit of your time taken to assist me.


Post Reply