This topic is locked

Changing the default _list filter

9/6/2005 3:36:58 PM
PHPRunner General questions
C
crono999 author

Okay, got a new one for ya. I've been unsuccessfully fiddling with this for a while, but hopefully you'll know a quick fix.
Here is the structure of my ordering system::
Main menu [click on "products"] -->
products_list (filtered by products available to customer via cust_ID) [click on "order"] -->
order_list (filtered by product_ID) [click "add product"] -->
order_add ...etc...
The problem is that I would like the customer to see all of their current orders on the order_list page, no matter what product they have currently selected. It needs to be filtered by cust_IDinstead of product_ID, which is the default due to the relationships.
I've worked with the security settings for the order table, but it still seems to only show orders that have the same product_ID, rather than cust_ID.
Thanks in advance once again for any help...

Sergey Kornilov admin 9/7/2005

Hi,
to disable filtering on master key you can find and remove following two lines in your orders_list.php file

$where = AddFieldWrappers("product_ID")."=".make_db_value(RemoveFieldWrappers("product_ID"),$masterkey);

$strSQL = AddWhere($strSQL,$where);
C
crono999 author 9/7/2005

oh man... now I wish I'd asked sooner. I didn't think about the security settings already filtering by company and only needing to remove the existing filter by product. so easy! thank you!