Marketpress download link to a registration page

Hi Guys, I am using Marketpress and I would like to send people after a purchase to a registration page.

When I tried to add the registration page link to the Product Download link, it just doesn't work. How can I accomplish this..?

Thanks

  • Vinod Dalvi

    Hi @BePresence,

    I hope you are well today and thank you for your question.

    Do you want to redirect people to registration page instead of confirmation page?

    Do you want not to allow people to download the product until it registers but allow them to make purchase?

    If yes then you will have to develop custom code to achieve this.

    You can instead force customers to login by setting Force Login option to No from the following path so that they must be registered and logged in to checkout.

    Admin area -> Products -> Store Settings -> Miscellaneous Settings

    Kind Regards,
    Vinod Dalvi

  • BePresence

    Hi Vinod, thanks for your response...

    I don't want them to go directly to the registration page, what I would like is for them to get the encrypted link to the registration page in the confirmation page, just like if it where a download link. Unfortunately I don;t know why it does not work like that.

    I added a registration URL in the product download link, I purchased that product, but and when I click on the link for my download inside the purchase confirmation email it gives me the following message:

    Warning: MarketPress was unable to download the file http://prideglobedemo.com/linkredirect for serving as download: Not Found in /home/pride007/public_html/wp-content/plugins/marketpress/marketpress.php on line 4265
    Whoops, there was a problem loading up this file for your download. Please contact us for help.

    Which as you can see it also gives the original url of the file :slight_frown:

    Anyway like I said, I'd like to be able to redirect to the registration instead of only using digital downloads...

    Thanks for your help

  • BePresence

    Hi Jack thanks for your response. I would like the download link to be the registration link, since marketpress is really good at protecting the link and I can use the max. download built-in. But if you have any suggestion on how can I deliver the registration page link, that will work as well...

    Thanks

    p.s. is there a way to tweak marketpress in order for the link NOT to be an actual download?

  • BePresence

    Thanks Jack, I also thought of that, however the problem is that inside the pdf will be the registration link, which then it can be shared and has no security, that's why I wanted to use marketpress built-in security.

    I am sure there must be some code in marketpress that makes sure there is a file for the download, maybe that particular code can be tweaked in a way that it doesn't care if there's a file.

    If anyone in the forum has an idea I will very much appreciate your input... :slight_smile:

  • Vaughan

    Hi @bepresence,

    I'm not sure if this will be as easy as it sounds, as a page isn't an actual file. One of our developers has been informed and should hopefully respond shortly. It would definitely require some custom changes in the plugin though as i'm sure there isn't a hook to make those changes with so it might require quite a few changes. This would mean that the changes would need to be re-applied each time the plugin is updated.

    Thanks for your patience.

  • Jose

    Hi @BePresence,

    Hope you are doing great today!.

    Could you please describe what is the workflow that you have in mind? I'm not totally clear on what you are trying to achieve. Specifically, why do you want to sell/protect the registration page url instead of selling membership subscriptions.
    Also, suppose you can obfuscate the url and print the link in the email, once the user open the page he can also share the link.

    Please elaborate a bit more so that I can assist you accordingly.

    Thanks in advance,

  • BePresence

    Hi Jose, thanks for your response... here some additional info you requested:

    Could you please describe what is the workflow that you have in mind?
    Let me see if I understood correctly in this question:

    1.-Buyer adds the product to the shopping cart
    2.- Buyer purchases the product
    3a.- He gets an email with the encrypted link
    3b.- He is redirected to his Order information where there is an encrypted link

    (up until here everything is the usual marketpress behavior)

    4.- He clicks on the encrypted link and while the browser shows the encrypted link in the navigation bar (just like marketpress already does) you can see the registration page.
    5.- He registers and the process is finished

    Is this what you needed,, I mean it is so simple that I don't know if tihs was your request

    ----------------------------

    I'm not totally clear on what you are trying to achieve.
    I am trying to sell page views (registration, access to a video inside a post or page, access to a download that it is inside the page, access to subscribe to a paid newsletter, etc...) using Marketpress.

    Specifically, why do you want to sell/protect the registration page url instead of selling membership subscriptions.
    My site is not a Membership website. I also already have an integration of another payment gateway in marketpress and it is very expensive to make that integration on all the other plugins you have (directory, membership, classifieds, and other services that I provide in which I am using marketpress as my e-commerce solution)

    Also, suppose you can obfuscate the url and print the link in the email, once the user open the page he can also share the link.
    I don't understand what you mean here, marketpress already has an linkencryption capability built-in, I do not need to obfuscate anything, the user can't share the link and eve when they share the download encrypted link (just like marketpress already does), I still be adding an extra layer of security by using marketpress download limit capability.

    Thanks

  • Jose

    Hey again @BePresence,

    I'm attaching a very simple Must Use Plugin that I made for you. It's actually a single line of code, but you better keep it in a separate mu-plugin so that you can update the main plugin without worrying about the changes being lost.

    Here the explanation:

    When you sell a download link, the plugin actually do not check if it is a file or not, but it will search by default for the file path into the server file system.
    Of course, if you provide a URL and not a file path, the system will thrown an error because it can't find anything.

    You can see this routine in the file marketpress.php line 4205 method serve_download().

    Luckily, there is an exception to avoid looking for the file and perform a redirect instead. (this is intended for large files and memory issues, but will do the trick in this case as well):

    if ( MP_LARGE_DOWNLOADS === true ) {
       //attempt to record a download attempt
       if (isset($download['downloaded'])) {
          $order->mp_cart_info[$product_id][0]['download']['downloaded'] = $download['downloaded'] + 1;
          update_post_meta($order->ID, 'mp_cart_info', $order->mp_cart_info);
       }
    
       wp_redirect($url);
       exit;
    }

    So, if we define the constant MP_LARGE_DOWNLOADS to true, it will perform a redirection. (the default value is false).

    This is all the code in the attached mu-plugin:
    define('MP_LARGE_DOWNLOADS', true);

    Now, you just need to download the php file attached and put it into this folder:
    wp-content/mu-plugins/
    (create the folder if it doesn't exists).

    This should solve your issue.
    ---------------------------------------------------------------------------------

    Now, that said, I must advice you to check other alternatives for what you are trying to achieve.
    Remember that your URLs are not being protected at all with this method. It's a quite simple task to crawl a site and access all the content without having the URL.

    I recommend you to put your efforts in the gateway customization (if needed) for our Pay Per View plugin, which is designed to achieve exactly what you are trying here.

    Hope all this information helps you!.

    I'll be here to assist you in any further details.

    Cheers!
    JJ

  • calvinrogercanas

    Hey there @BePresence,

    Hope you're well! :slight_smile:

    This was one of the potential problem that JJ talking about. Since the link provided in the email is just a redirection link, it will show you the real URL once you successfully redirected. As suggested by JJ, you can take advantage of our Pay Per View plugin and I think using our PPV plugin will protect your products in long term.

    is there a way to mask that url?

    We can change the registration link if you want but I don't think masking the url is possible or will prevent the violator from doing what they are doing.

    Looking forward for your reply! :slight_smile:

    Best Regards,
    Calvin

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.