Passing event @id to $params
This is an open discussion with 3 replies, filed under General.
Search
I would not like to put the System ID in the Url, any suggestion?
I understand you concern, but right now you have 2 options and one will require this...
- Redirect to a url with the id in it. On that page, create a custom event that will look into the database to find the hash and issue a
redirect()
call. - Or, in your current event.php file, add a line like this one
Frontend::Page()->_param['my-hash'] = 'hash value from SQL query';
Make sure to not edit the file with the Event editor from now on. Removing those line would help
What about using SymQL query in your event.php file after the results are returned from the event trigger to grab the hash value based on the ID that is returned..?? a chained event sort of idea?
We do this quite regularly with Event registration forms that require hash Id's in the URL which resolve to the actual order ID as well.
Good solution too @moonoo2
Create an account or sign in to comment.
Hello,
I have a
save-order
event where a Members user creates an item. The result is this code:The order has a Hash_id field attached, whose value is created at insert time. I need to publish on the page that hash, but I cannot find it in the
save-order
event.I tried to create a DS filtering the System ID by
/data/events/save-order/@id
to no avail.I would not like to put the System ID in the Url, any suggestion?
Thanks