Okay
  Public Ticket #3664512
Sorting Products
Closed

Comments

  • Halit started the conversation

    Hi, I'm really considering to purchase this plugin but before I do so, I need to know If this is possible what I want.

    What I need is for example a User named " Alex " will have access to modify the product information, but what is important for " Alex " is that when he searches the product with code it is required for him to show up the first one in this case the LOCATION - ALBI, but if another user named example " Halit " for him it should show his location in this case Location " Tirane " first. 

    Is this type of sorting possible for different users as there will be users from all of those locations but is required to show to them their own location.

    Please let me know soon as possible as I'm ready to purchase the plugin

    8855036770.png
  •  1,846
    Miloš replied

    Hi Halit,

    I am sorry, but I am not fully understanding all the details about this sorting logic.

    Is there going to be some hidden field in this Data which stores the usernames - so then the table can 'know' to compare the currently logged 'username' with the 'username' field from the table?


    For example, we have these dynamic Placeholders, which can be used for filtering.

    A useful one for your use-case ( if we were to filter on usernames) can be the %CURRENT_USER_LOGIN% – this placeholder will be replaced with the currently logged-in username (if the user is logged in).

    Let's say as an example, if I have this table with "Orders" and I want to filter for each Customer to only see their own order rows.

    My currently logged username is 'root' so if I add the placeholder %CURRENT_USER_LOGIN%  on this Column as the predefined filter value, the table is going to show only the rows for the orders my customer made.

    Here is how the full table looks/unfiltered :

    6367746152.png

    And here is how it looks when I add this placeholder to filter by currently logged user on "Customer" field :

    4492238605.png
    9291518360.png

    There is also a workaround with CSS if we need to hide this field from filtering, if we don't wish to allow front-end users to 'clear the filter' in order to see 'other user's' rows.


    But it seems to me you need something else here, a custom sorting way, which somehow looks for which user is doing the search - I am just not understanding it, so can you please try to elaborate and clarify the use-case more, if you can show some more examples, etc?

    It can help if you add more screenshots or a Video if possible.

    If you show any sensitive data, just make sure to send it as a PRIVATE reply, for security, then only we can see it.


    And i just wanted to point out that you can try wpDataTables before purchasing

     on our sandbox Demo sites ( you can find links for the main plugin Demo,  

    as well as add-on Demos, in my signature),

    and there is a 15-day money-back guarantee period, 

    so if you purchase the plugin, you can safely fully test it out, and if it doesn't fit your needs you can request and receive a refund in that period. ( same goes for all plugins and add-ons)

    Let me know if you have any additional questions. smile.png




    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables