Closed BenjaminZekavica closed 9 months ago
@dai-eastgate @yeneastgate If possible please investigate as soon as possible for feedback. Otherwise we will have to postpone it to the new cycle/milestone.
Hi, @BenjaminZekavica @fredericalpers We already have the checkbox "Show title in URL" in the plugin's settings. If you want that URL not to include the title, you need to disable that checkbox. Please take a look at my tutorial video. Thanks!
@dai-eastgate Yes, I know about this option. But our customer wants to have a same url with a title, but without redirection. We need to have an option like a filter hook, that we could set and prevent the redirection.
@dai-eastgate sorry for the late reply. If this does not fit into the next cycle its no problem at all. I will talk to Linh and Yen on wednesday.
@dai-eastgate for clarification:
the current URL structure with "speaking-URLs" looks like the following: test.com/detail/221-3-room-apartment-in-berlin onOffice enterprise can not read the speaking-URL "-3-room-apartment-in-berlin" and will only identify the apartment by its ID "221"
Scenario example: After sending an inquiry for an apartment, the automatic response e-mail will include the URL + the necessary timum parameters for booking an appointment: e.g. test.com/detail/221/?parameters
We need to stop the redirection from "test.com/detail/221/?parameters" to "test.com/detail/221-3-room-apartment-in-berlin/?parameters" after opening the link from the e-mail. Maybe we can implement a check if the parameters are included in the URL and then skip the redirection?
@fredericalpers I have found a solution to stop the redirect from "test.com/detail/221/?parameters" to "test.com/detail/221-3-room-apartment-in-berlin/?parameters". It will take me 3 days to implement and test. Thanks!
<?php $pEstateRedirection = apply_filters('oo_is_detailpage_redirection', true ); if( $pEstateRedirection ) { // Wrapping Code here: https://github.com/onOffice-Web-Org/oo-wp-plugin/blob/master/plugin.php#L243 } ?>
@fredericalpers I added the filter hook as above.
@fredericalpers Case 1: if I set the "oo_is_detailpage_redirection" filter to true in the source code, then all URLs will always redirect to url+title.
@fredericalpers Case 2: " We need to stop the redirection from "test.com/detail/221/?parameters" to "test.com/detail/221-3-room-apartment-in-berlin/?parameters" after opening the link from the e-mail. " => To do this you just need to set the "oo_is_detailpage_redirection" filter to false in the source code
@yeneastgate I will let my colleague check this, as soon as he's back from vacation if this is as he wished for. Thank you :)
I need one filter hook to stop redirection like this:
I use this Link:
http://example.de/detail/213
onOffice Plugin Redirect to:http://example.de/detail/213-3-zimmer-wohnung-in-kitzbuehel
One example that I created into the plugin.php Code Link : https://github.com/onOffice-Web-Org/oo-wp-plugin/blob/master/plugin.php#L243
Todo: Need functional filter hook for custom themes - I added into the plugin but it dosn't work. Please check it Reason for the change: For the API "Timum" we add parameters to detail page and validate it, but we need a option to skip this redirection.