Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #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.

    #1269869

    Hey 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,
    Victoria

    #1269887

    If 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

    #1269888

    If 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.

    #1269988

    Hi,
    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,
    Mike

    #1269993

    Hi Mike

    The link has been supplied in Private Content in this reply.

    #1270007

    Hi,
    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 use https://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,
    Mike

    #1270011

    The 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.

    #1270075

    Hi,

    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,
    Ismael

    #1270251

    What 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);

    #1270404

    Hi,
    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,
    Mike

    #1271707

    I 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 :)

    #1271709

    Sorry, 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.

    #1271710

    Here 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

    #1271875

    Hi,
    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

Viewing 15 posts - 1 through 15 (of 15 total)
  • You must be logged in to reply to this topic.