Where to put the secure download PayPal button?

  • Posts: 10
  • Thank you received: 0
8 years 7 months ago #250492

-- HikaShop version -- : 2.6.4
-- Joomla version -- : 3.6.2
-- PHP version -- : 5.6.23-0+deb8u1
-- Browser(s) name and version -- : Firefox - Chrome

On my site I'm using a Linklok script for secure PayPal downlods of my files.
But when I put the download code into the description of the product page the PayPal button is acting like the Hika add to cart button en send customers to Hika checkout instead of the PayPal secure download page.

The PayPal download code looks like this:

<form target="paypal" action=" www.paypal.com/cgi-bin/webscr " method="post">
<input type="hidden" name="add" value="1">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="business" value="mysites@email adress">
<input type="hidden" name="item_name" value=" the digital file">
<input type="hidden" name="item_number" value="001">
<input type="hidden" name="amount" value="1.15">
<input type="hidden" name="currency_code" value="EUR">
<input type="image" src=" www.paypal.com/en_US/i/btn/x-click-but10.gif " alt="Add to cart">
</form>


For now I use the solution to place the PayPal button as well as the Hika add to cart button in an article and link to that article instead of the product page. But it could save me a lot of work when I just could place the PayPal download code straight into the product page somehow.

Can you please point me out how to manage this?

Thanks in advance.

Please Log in or Create an account to join the conversation.

  • Posts: 26226
  • Thank you received: 4035
  • MODERATOR
8 years 7 months ago #250505

Hi,

HikaShop is an full e-commerce system and it comes with payment plugins (and several for paypal).
The addition of a "paypal payment button" in some parts are unfortunately, in opposite with the concept of an e-commerce website.

Nevertheless, you can follow the instructions from that forum thread :
www.hikashop.com/forum/4-how-to/57972-ad...-to-the-product.html

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 10
  • Thank you received: 0
8 years 7 months ago #250618

Hi Jerome, thanks for your reply.
But I think you don't understand.
I know about the PayPal function in the Hika shopping cart.
I also know what you mean by placing the code into the html function of the editor in the backend by clicking on TOGGLE EDITOR so thats not the problem.
.
My problem is that I also want to give my customers the opportunity to download the file right away on the product page so they don't have to wait untill the banktransfer is complete or/and me sending them the files when they have payed with Paypal in the Hikashop checkout page.

Therefore I have a script for immediate payed download using PayPal.
On the product page they can choose to add he file(product) to Hika shopping cart or click on the download button (see attachments)
When they click the Download button on the product page they will be sent to a pay screen of PayPal where they can pay for the file.
After they have payed with PayPal they will return to my site which have the download link for the file.
These files have a secure path so customers can not see the URL or location of the file.
The download link will expire in 10 minutes (or other time I can set in the script).
For as far as I know this is not an option in Hikashop right?

So when I put the immediate download Button in the HTML of my editor the file is placed in the Hika shopping cart instead of sending my customers to the secure download page of PayPal.
In other words: The PayPal button is acting like the Hika add to cart button.

The secure download works fine on any other page of my site so that is not the problem.

Edit: It also doesn't work when I disable Hika PayPal function or plugin so thats not the problem either.

Attachments:
Last edit: 8 years 7 months ago by Meander.

Please Log in or Create an account to join the conversation.

  • Posts: 83671
  • Thank you received: 13542
  • MODERATOR
8 years 7 months ago #250653

Hi,

I think you didn't understand what Jerome was trying to say. HikaShop is not meant to be used like that.
If you want to have your own PayPal button, then there is no need to use an ecommerce solution. You can just add it in a Joomla article and be done with it.
What HikaShop does is that it handles all you described already that you want to do with your script and button, without writing one line of code.
With HikaShop, you can add files to the products, and these files will be treated as secure downloads that will only be available after the payment. And you can do that with the normal checkout and paypal payment plugin of HikaShop (and all the other payment plugins). So I don't see why you try to have your own script and add to cart if you already use HikaShop for bank transfer payments. Just configure the paypal payment plugin of HikaShop and add your files in the products so that they are only available after the payment. It will work the same for bank transfers and credit card payments through PayPal.

Please Log in or Create an account to join the conversation.

  • Posts: 10
  • Thank you received: 0
8 years 7 months ago #250680

Hi Nicolas,

I tried this several times with the Hika shopping cart and PayPal Pay method.
And every time the payment was made and I got an email that the order was placed and paid with Paypal.
The customer however (my husband in this case because I used his PayPal account for testing) got nothing in his mail box.
No download files whatsoever.

My Paypal email says:

You received a payment from (customer name and email address) The payment was made.
You can now send the objects (red underlined in attachment) .


Edit: I placed the file in the backend of the add product page.
Maybe I'm doing it the wrong way?

Please see attachments

Attachments:
Last edit: 8 years 7 months ago by Meander.

Please Log in or Create an account to join the conversation.

  • Posts: 10
  • Thank you received: 0
8 years 7 months ago #250696

Hi Nicolas,
I misunderstood you in your previous message.
I thought you meant that download link of the files be sent right away to the customer after payment with PayPal is finished.

I know about changing the order status in order to sent customers the email with the download link.
But that is exactly what I meant in my answer to Jerome and why I have this PayPal instant download button as a second option next to the Hika shopping cart.

My problem is that I also want to give my customers the opportunity to download the file right away on the product page so they don't have to wait until the bank transfer is complete or/and me sending them the files when they have payed with Paypal in the Hikashop checkout page.


By that I meant for instance late at night or during the weekends when bank transfers usually take longer.
Besides its a small business next to my regular job and I don't always have the opportunity to change order statuses right away and send email with download link when payment is made. The PayPal instant download button is just a little extra service.

I'm not saying that Hika checkout and payment options are not good, on the contrary. And customers are still free to pay with PayPal or bank transfer trough Hika checkout page.
But what I don't understand is why I just can't get an answer to my original question instead of getting the feeling I have to defend myself for not using Hika checkout and payment as the one and only option.

Especially when I explained my reasons for wanting to have this extra option next to the shopping cart in the first place.


.

Last edit: 8 years 7 months ago by Meander. Reason: typo

Please Log in or Create an account to join the conversation.

  • Posts: 83671
  • Thank you received: 13542
  • MODERATOR
8 years 7 months ago #250703

Hi,

The problem is that your reasons are not good.
You say that you have to manually change the status of the orders and that's why you want that possibility.
But HikaShop already change the status of the orders automatically when PayPal automatically notifies it of the payment of the customer and automatically sends the download link to the customer in an email. And the customer can also directly download it in the download area.
If the status of the orders paid by PayPal isn't changed automatically to confirmed (and thus you're not getting the notification email with the download link), it means that you have a problem with how HikaShop or your website is setup. So you can follow this documentation which provide instructions as to how to proceed to find the issue:
www.hikashop.com/support/documentation/i...or.html#notification

I'm saying this so that you don't loose time trying to setup a download button for something which should already work by default with just HikaShop.

If you want to have your custom button on the product page, it has to be placed outside of the form on the product page. The form on the product page englobes all the product page, so you would have to add it in the file "show" of the view "product" either at the beginning or at the end, which would place the button either at the top or the bottom of the product page.
Placing it in the middle like you want would also be possible if you were to remove the form of the product page but then you couldn't use the normal add to cart button of the product page which is not what you want.
That's also why I'm trying to explain to you that it's better to fix the issue with your PayPal payment notifications than trying to shoe in your own paypal payment buttons somewhere where it isn't meant to.

Please Log in or Create an account to join the conversation.

  • Posts: 10
  • Thank you received: 0
8 years 6 months ago #250931

Hi Nicolas,

It took me a while to figure it out but now I know what you mean. My apologies.
I always thought that the attachments where only meant for free downloads.
I have tried it out and it works perfectly, thank you.

Since I know now that I can also send links in confirmation email for paid downloads instead of sending the files manually to my customers email address I also want to use this for my bank transfer payment method.
However I do have a few issues with that.

First of all I can't get the return url to the download page to work.
In another topic I read to make a menu-item and place the url in the return url of the payment method.
So I made a menu item to Hika customer download area and placed the link in the bank transfer payment method.
When a customer is placing the order he is taken to this download page so that works fine.
But when the order status is set to confirmed and customer gets the email with the download link he will be sent to a blank page for a few milliseconds and download starts immediately (I know this last one is a browser thing) and than the page is closed.
(The same with free downloads by the way.)

I have already changed the view/end and view/after_end to the return url to the download page (the same as I placed in the return url of the bank transfer payment method):

<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.6.4
 * @author	hikashop.com
 * @copyright	(C) 2010-2016 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
if(empty($this->html)){
	$app = JFactory::getApplication();
$app->redirect('http://www.mysite.nl/download');
}else{
	echo $this->html;
}
$this->nextButton = false;

But when the customer clicks the download link in the confirmation email he is still being redirected to that blank page.
What am I doing wrong here and how can I get this to work? Or have I misunderstood this too?
The download page works fine when I enter the url directly into my browser and I can see all downloads that are confirmed or already made.

Second, in tab Order of the configuration Main I have set Default order status to Created and Payment confirmed order status to Confirmed.
In tab Files I have set Valid order statuses for download to Confirmed too.
When customer places an order for a free download the download link of the file is send immediately in the confirmation email. That's ok.
But when the customer is ordering free files as well as payed files the link to the free file is not placed in the Created email until I set the order status to Confirmed. Then the customer gets an email with links from payed as well as free files.
Is there any way I can change this in the settings that while waiting on the Confirmed email for the payed files meanwhile the customer can have at least access to the free files in the Created email?
Or do they have to place an order separately for the free files in order to have immediate access to them?

Thank you for your time.

.

Last edit: 8 years 6 months ago by Meander.

Please Log in or Create an account to join the conversation.

  • Posts: 83671
  • Thank you received: 13542
  • MODERATOR
8 years 6 months ago #250950

Hi,

1. I'm sorry but this time I'm the one not understanding what is the problem. The fact that when you click on a download link in an email, it opens a blank browser tab and starts the download is the way it is supposed to be.
I don't see why you would want to display the downloads page instead of that process.
If you want to, then simply add a link to the download area in the emails by changing the translation texts of the emails:
www.hikashop.com/download/languages.html#modify

2. I don't see a solution for that. It's not possible to confirm only some products and not others and the download system won't let the customer download a file of a product (regardless of its price) as long as the order status is not confirmed.
It would indeed require two separate orders in that case.

Please Log in or Create an account to join the conversation.

  • Posts: 10
  • Thank you received: 0
8 years 6 months ago #251068

Hi Nicolas,

I understand what you mean by that it's supposed to be this way.
And please keep in mind that this is my personal opinion and no offence, but I feel like it's a little bit rude way to close the transaction.
The customer has taken time and effort to place the order, register on my site, and transferring the money. In that case I don't care if the total order amount is high or low.
Normally you would at least expect something like: "Thank you for your purchase. Your download will start now" or something like that.
For me (and again: that's strictly personal) it feels a bit like : "I received my money, here is your file, and for he rest I don't care."
When customer is surfing on the internet while receiving the confirmation email and clicking on the download link it is even stranger.
I will invite you to take about a minute of your time to watch a small video I made for you to see what I mean.

Here's where you can see the video It takes a little bit more than one minute.

By placing the link to the customer download area in the after_end.php view I was under the assumption that it would take the customer there after clicking on the download link in the confirmation email. Apparently I misunderstood that too, my apologies.

Meanwhile I got the idea to replace the download link in the confirmation email with the link to the customer download area, as you can see in the video too. This works great.
Although it would be easier if I could place this link/url in the email template so I don't have to edit it manually every time I'm sending a confirmation email.
If this is possible would you please be so kind to point me in the right direction were I can find this file and how to edit it?
Otherwise this solution that I have now works fine for me too.

Thank you very much for your time.


.

Last edit: 8 years 6 months ago by Meander.

Please Log in or Create an account to join the conversation.

  • Posts: 83671
  • Thank you received: 13542
  • MODERATOR
8 years 6 months ago #251074

Hi,

I understand what you're saying but I don't agree that it's not respectful of the customer that way. When I click on a download link, I expect that the file starts downloading directly in my browser and when it doesn't and I have to click on a second link on the page where I'm being directed to, I feel like it's more steps for the same thing. That's how I see it as a customer.

Now, doing it like you want is easy. Edit the emails and replace the code:
'.hikashop_frontendLink('index.php?option=com_hikashop&ctrl=order&task=download&file_id='.$file->file_id.'&order_id='.$oid.$file_pos.$url_itemid).'
by the URL of your download area in the preload of the emails.
If you have the Business edition, you can edit the emails via the menu System>Emails.
Otherwise, you would have to edit them in the folder media/com_hikashop/mail/ via FTP but note that you will loose your changes when you update HikaShop in that case.

Please Log in or Create an account to join the conversation.

  • Posts: 10
  • Thank you received: 0
8 years 6 months ago #251346

Hi Nicolas,

It works like a charm now.
Thank you very much for your time.

I love the new layout of the board by the way.

Please Log in or Create an account to join the conversation.

Time to create page: 0.090 seconds
Powered by Kunena Forum