Guest checkout doesn't work with digital download

  • Posts: 11
  • Thank you received: 0
11 years 2 months ago #124030

We have a website in where there is guest checkout. It has to be guest checkout. What they are buying is a virtual product. It is a file that is associated the purchase. I can not find any documentation on attaching that file to the purchase email on the guest checkout.

How would I make the file attach to the email that gets sent out after a guest checkout? This is the only way I can achieve this goal, so I need some assistance in setting this up. Thanks for your help,

Last edit: 11 years 2 months ago by Rotanadan.

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

  • Posts: 12953
  • Thank you received: 1778
11 years 2 months ago #124080

Hi,
1. Currently, a link to your file is sent to your customer through a the "order confirmation email", do you want this file to be "attached" to this email ?
2. I think that the best solution to handle download file will be to enable your customer download space, through the "Enable customer download area" option of your "Hikashop->System->Configuration->'Main'" page.
The download space will allow your customer to see all their available download files and download them until they reach the download limit.
This download space will be available through the "User control panel"

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

  • Posts: 11
  • Thank you received: 0
11 years 2 months ago #124179

1.) You are correct. We need the file attachment to be on the order email, since it is a guest checkout and no account is created.

Since this is a guest checkout, there should be no need to create a customer download space. The whole point is that the customer shouldn't have to "Create an account". That is why we went with Guest Checkout. We want to bypass the creating of an account. Especially since this is a guest checkout with a digital product.

We need the ability to attach the associated file to the order email that gets sent to the buyer. Please advise us on how to make that happen, without forcing someone to log in or create an account.

Last edit: 11 years 2 months ago by Rotanadan.

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

  • Posts: 13201
  • Thank you received: 2322
11 years 2 months ago #124245

Hi,

Actually it's not possible in HikaShop, you will have to add custom code.
You have to edit the mail "order status notification" in media/com_hikashop/mail and use the file name to create add the file.

Here is the joomla function to add a mail:
docs.jelix.org/en/manual-1.4/class-utili...ending-an-attachment

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

  • Posts: 11
  • Thank you received: 0
11 years 2 months ago #124311

Okay. The actual file names and the hack to use would be helpful.

We have stumbled onto a pretty big issue with Hikashop though. You have Guest checkout, and you have digital downloads. Those 2 aren't compatible because you force a login with digital downloads. Make sense?

Any extra help with this process would be greatly appreciated.

So far I have found the actual mailing function does not happen in order status notification, but in mail.php? I can get the file links in order status notification from $file->file_path, but am having a hard time passing that to mail.php to handle the attachments and sending.

Last edit: 11 years 2 months ago by Rotanadan.

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

  • Posts: 13201
  • Thank you received: 2322
11 years 2 months ago #124354

Hi,

An easiest solution could be to createa little plugin which will add the attachment to the mail if there is a download link, and remove this download link in the email.

Here is how the plugin must looks like:

<?php
class plgHikashopBccMail extends JPlugin
{
	function plgHikashopBccMail(&$subject, $config){
		parent::__construct($subject, $config);
		if(!isset($this->params)){
			$plugin = JPluginHelper::getPlugin('hikashop', 'bccmail');
			if(version_compare(JVERSION,'2.5','<')){
				jimport('joomla.html.parameter');
				$this->params = new JParameter($plugin->params);
			} else {
				$this->params = new JRegistry($plugin->params);
			}
		}
	}

	function onBeforeMailSend(&$mail,&$mailer){
    	    // Your custom code.
	}	
}

In his function $mailer is the Joomla mailer system, and $mail the current mail.
So you have to parse the content of the mail, get the download link, retrieve the file name, and add it to the mail.

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

  • Posts: 11
  • Thank you received: 0
11 years 2 months ago #124419

So, now you are asking us to custom code and create some plugin? Something we've never done? I'm sorry, but we don't have the dev knowledge you guys have, so a little more help would be appreciated.

Can you at least either please create the plugin package and let us know what to put in the //your custom code part?

"In his function $mailer is the Joomla mailer system, and $mail the current mail.
So you have to parse the content of the mail, get the download link, retrieve the file name, and add it to the mail."

That makes no sense to us. Please help us along so we can at least get this functionality to work. Thank you,

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

  • Posts: 82906
  • Thank you received: 13378
  • MODERATOR
11 years 2 months ago #124649

Hi,

I'm sorry but you're asking for something which is not supported by HikaShop and it's clearly explained in the documentation regarding the "registration" option that the "no registration" mode cannot be used for download purchases.
We already provided a skeleton of the code of the plugin so that you just have to add code to parse the content of the email in the $mail variable (and the $mail variable contains all the data you need... you can do a var_dump on it to see what's in it) and use the standard functions of the joomla mailer to add your attachment(s) to the email. You don't need to know HikaShop coding for that.

If what you're asking here is that we develop a plugin for you, we sure can. Please use our contact form to request a quote for that development as custom coding is not part of the supported included in HikaShop.

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

  • Posts: 11
  • Thank you received: 0
11 years 2 months ago #124735

Hi Nicolas,

You provide excellent support, so thank you. I just wanted to let you know that when I purchased the software, I read over its capabilities. I saw that you have download purchases and guest checkout. I, probably like most others, did not dig into your documentation before purchase.

I think adding the digital file to the email during guest checkout is something you should consider on future releases. Otherwise, you can have one or the other, but not both.

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

  • Posts: 82906
  • Thank you received: 13378
  • MODERATOR
11 years 2 months ago #124784

Hi,

Thank you for your understanding.

Yes, that capability is something we have on our todo and hope to do at one point.

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

  • Posts: 11
  • Thank you received: 0
11 years 2 months ago #124932

Ok got it all working!

Last edit: 11 years 2 months ago by Rotanadan.

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

Time to create page: 0.094 seconds
Powered by Kunena Forum