-
AuthorPosts
-
December 27, 2020 at 1:02 am #1269841
When i put a link on a Catalogue List Item like this one: mobilepay://send?phone=0045415415&amount=150&comment=2%20timer%20-%201%20stang&lock=1
It changes the url to this: https://send/?phone=0045415415&amount=150&comment=2%20timer%20-%201%20stang&lock=1
How can i prevent this behaviour? I need the url to be as i enter, otherwise the Danish Payment link does not work.
December 27, 2020 at 5:02 pm #1269869Hey VestegnensAutocenter,
This is not one of the WordPress approved protocols and so maybe there is a plugin for it. You might want to check the WordPress forums.
Best regards,
VictoriaDecember 28, 2020 at 12:15 am #1269887If i insert the link in a Content Element -> Text Block the URL is not changed.
If i insert the link on a List Item in Content Element -> Catalogue the URL is changed.
So something is happening when i specifically use Content Element -> Catalogue
December 28, 2020 at 12:28 am #1269888If i insert a link in ‘List Item Description’ on the Content tab, then everything is fine.
But if i go to the Advanced tab and insert a link here as ‘Set Manually’ then it changes my link.So apparently a hrefs are fine, but the code below (thats created by Enfold when creating Catalogues), gets changed.
[av_catalogue_item title='2 timer' price='150,-' id='676' link='manually,mobilepay://send?phone=415415&amount=150&comment=2%20timer%20-%201%20stang&lock=1' target='_blank']
When saved gets changed into
[av_catalogue_item title='2 timer' price='150,-' id='676' link='manually,https://send/?phone=415415&amount=150&comment=2%20timer%20-%201%20stang&lock=1' target='_blank']So somewhere along the way, mobilepay:// get changed to https:// when used in Catalogue List Items.
December 30, 2020 at 3:20 pm #1269988Hi,
Sorry for the very late reply, I tried to investigate the mobilepay:// protocol but apparently it was shut down in January 2018, since you are asking about this I imagine this is still being used at your location. Since WordPress doesn’t recognize the mobilepay:// it is trying to correct the “error” I didn’t find a way to add your own protocols, but I believe we might be able to write a script that will adjust this for you on page load.
Can you create a test page and link to it so we can investigate further.Best regards,
MikeDecember 30, 2020 at 10:11 pm #1269993Hi Mike
The link has been supplied in Private Content in this reply.
December 31, 2020 at 1:53 pm #1270007Hi,
Thank you for the link to your test page, I see that the “Text Block with a link” & the “Link in List Item Desciption” are not changed, but because the
mobilepay:// protocol is not recognised the links do not launch.
The last link “CATALOGUE LIST ITEM ADVANCED LINK” has had the mobilepay:// removed, which we could add back in but then the link will be like the first two, where the whole link is shown but will not launch.
I do not find any plugins to add the protocol, so I don’t see how you will be able to use this.
I did find another page on your site /priser/, these links usehttps://www.mobilepay.dk/
where the protocol is https:// and the domain is mobilepay.dk and these links work correctly.
Are you sure you are supposed to use the mobilepay:// protocol?Best regards,
MikeDecember 31, 2020 at 10:13 pm #1270011The page /priser/ is irrelevant, as this is just a way to circumvent the the fact that mobilepay:// links does not work.
The thing i really need, is that when i enter the mobilepay:// it stays like that.
PS. The mobilepay:// links is recognized if you’re on you’re smartphone and have the app Mobilepay installed, so thats why i need it working.
- This reply was modified 3 years, 11 months ago by VestegnensAutocenter.
January 4, 2021 at 3:56 am #1270075Hi,
Thank you for the info.
We are yet sure why that part of the URL gets stripped from the catalogue item link but temporarily, we could use the following script to revert the link back to its original value.
function ava_catalogue_mobilepay_link() { ?> <script> (function($) { $(".av-catalogue-item").each(function() { var link = $(this).attr('href'); $(this).attr('href', 'mobilepay' + link); }); })(jQuery); </script> <?php } add_action('wp_footer', 'ava_catalogue_mobilepay_link');
Please add the snippet in the functions.php file.
Best regards,
IsmaelJanuary 4, 2021 at 9:49 pm #1270251What functions file should i put it in, right now it’s in “wp-content\themes\enfold-child\functions.php”
But what if the theme gets an update, will i then loose the snippet?Thanks. It works after a minor adjustment thought, had to put a : after mobilepay.
$(this).attr(‘href’, ‘mobilepay:’ + link);
January 5, 2021 at 2:14 pm #1270404Hi,
Glad Ismael could help, since you placed this function in your child theme functions.php it will be safe and not overwritten, this is the correct place for it.
Unless there is anything else we can assist with on this issue, shall we close this then?Best regards,
MikeJanuary 11, 2021 at 11:49 pm #1271707I do have another ‘new feature’ request, it’s also related to the Catalogue.
Currently it’s possible to to disable a List Item in a Catalogue, for example – “Temporarily disable and hide the item without deleting it, if its out of stock”
Would it be possible for you to implement a feature to put time, date rnage and/or intervals on List Items, much like what this plugin can do: https://wordpress.org/plugins/timed-content/This feature would also be nice generally in many situations in you theme :)
January 11, 2021 at 11:54 pm #1271709Sorry, that was not the correct plugin, i’m trying to find the one i tried using and will post the llink whn i find it.
It had really cool options for displaying text on specific days of the week, specific times and alot more.
January 11, 2021 at 11:58 pm #1271710Here is the plugin: https://wpfavs.com/plugins/shortcodes-to-show-or-hide-content
What do you think, can something like this be implemented? For starters in on the Catalogue List Item?
Maybe later on, extend it to more places in the Advanced Layout Editor
January 12, 2021 at 1:05 pm #1271875Hi,
Thanks for the link, here is the link to the official WP page. It is an interesting plugin, but this function is best applied as a plugin than a feature of the theme, similar to drip content or membership content.Best regards,
Mike -
AuthorPosts
- You must be logged in to reply to this topic.