Download free product after ordering

  • Posts: 29
  • Thank you received: 2
12 years 11 months ago #32670

Hi,

We have Hikashop 1.5.4 Business edition & Joomla 1.7.3.

We have some free products and some paid products. We want customers to register (i.e. go through the check out process) for any type of product regardless of whether it is free or paid.

I reviewed this forum post www.hikashop.com/en/support/forum/2-gene...l-products.html#7400 which noted that since version 1.4.4 it is possible to 'order' free products using the 'Display 'add to cart' button for free products' option in the Configuration. We have turned this option on.

The rest of the forum post says you need to update a line in the File: Show / View: Order in the frontend.

After checking this file it already has the required line

if($this->order_status_download_ok || bccomp($product->order_product_price,0,5)==0){


However when the order created email is received, you click on the link and view the order summary page. Then you try to click on the file download itself on the order summary page and an error appears saying "Order status does not permit download".

How do I allow free products ($0.00) to be downloaded after the user has gone through checkout?

Thanks,

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
12 years 11 months ago #32694

Indeed that won't work because the status of the order is not changed to "confirmed".

Here is a plugin that you can use to confirm automatically free orders. That should solve your problem.

File Attachment:

File Name: validate_f...rder.zip
File Size:1 KB

Attachments:
The following user(s) said Thank You: wirthconsulting

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

  • Posts: 29
  • Thank you received: 2
12 years 11 months ago #32755

You are a star - this is perfect - thank you!

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

  • Posts: 187
  • Thank you received: 10
12 years 7 months ago #45269

Guys, pleas help me out.

The validate free.. is exactly what makes my testing a lot easier but I can't find the right way to use it....

I have installed it and it is enabled in the plugins but then?
Can't find any hint of it anywhere in HIKA.....

Do I need to set something or is it suppose to work 'invisible'?

In that case it is not working for me.

I was hoping I could setup a product, lets say E-book for 5 euro as download, give myself a coupon code of 100% discount and test the whole process.

Bastiaan

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
12 years 7 months ago #45404

Indeed once installed and published it will work automatically by validating the orders when they are created with a price of 0.
If it doesn't work, either the plugin is not published or the order price is not 0.

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

  • Posts: 187
  • Thank you received: 10
12 years 7 months ago #45429

I assume it is working because status is set to 'confirmed' but I installed the plugin because I was under the impression that changing the order status would also send out the email to my client with the download link. That does not happen.

Related: in the backend I have to specifically switch on the 'notify customer' to get that email out. Wish there was an option to set it to default 'on' and hopefully the plugin starts to send out emails than too.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
12 years 7 months ago #45437

It's the order creation email which is sent at that time and it does not include the download links.
That will be available in next release of HikaShop.

The following user(s) said Thank You: tspielmann, zebrafilm

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

  • Posts: 187
  • Thank you received: 10
12 years 7 months ago #45439

Thats great news, love to make HIKAshop my standard component but download links and proper invoicing are high on the list :-) and keeping me from using it at the moment.

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

  • Posts: 35
  • Thank you received: 0
12 years 7 months ago #45559

Waiting impatiantly for this ! Do you have any idea about the timeframe?

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
12 years 7 months ago #45691

Note that the download link in the confirmation email is already in HikaShop. And it should be what most of the users of HikaShop use.
The download link in the creation email is an edge case that will be in the next version to be released in a month or so.

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

  • Posts: 35
  • Thank you received: 0
12 years 7 months ago #45703

Nicolas,

(bare with me, it's my first hika installation)
I have free products (electronic) which should be "purchased", so I have the customer details at the end.
after "buying" the product, the email is sent out immediately though the plugin you published.
The customer now is awaiting immediately a download link, but this is only sent in the following (manual) email. Am I in sync with what you wrote, or can i accomplish this already in the current version?
Many thanks,
Torsten

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
12 years 7 months ago #45873

That plugin changes the status of the order from created to confirmed automatically if the order is free. Thus, you get two emails whent hat plugin is activated: one for the creation of the order and a second one for the confirmation of the order. It's that second email which has the links in it.
So yes, you should be able to accomplish what you want with the current version and that plugin already.

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

  • Posts: 35
  • Thank you received: 0
12 years 7 months ago #46064

hello,
can it be, that this plugin is no loger working since the last hikashop update? I recall it worked in a demo install earlier, but now i tried it on two installs without success with the most recent hika version.

I just installed hika on a new demo site, plugin is enabled, status is set to confirmed in the order automatically, but the confirmation email to the customer with the DL link is never sent? (only order creation email is sent to customer email)

Many thanks,
Torsten

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
12 years 7 months ago #46069

What I wrote in my previous message is wrong.

That plugin only changes the status of the order while it is created. So there is no second email sent.
And since that first email doesn't contain any code to display the download links, it's normal that you get that result.
In next version of HikaShop, we'll change that creation email so that the links are added to the email if the order is confirmed.

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

  • Posts: 35
  • Thank you received: 0
12 years 7 months ago #46076

Hi Nicolas,

many thanks for your reply. Is there any workaround for the time being? I have to get the email-adresses of the downlaoders, so they can get inserted into acymailing for the newsletter...that's the purpose...any idea?

Thanks!
Torsten

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
12 years 7 months ago #46201

You can add the code:

$statusDownload = explode(',',$config->get('order_status_for_download','confirmed,shipped'));
										if(in_array($data->order_status,$statusDownload)){
											if(!empty($item->files)){
												global $Itemid;
												$url_itemid = '';
												if(!empty($Itemid)){
													$url_itemid='&Itemid='.$Itemid;
												}
												echo '<p>';
												foreach($item->files as $file){
													$fileName = empty($file->file_name) ? $file->file_path : $file->file_name;

													echo '<a href="'.hikashop_frontendLink('index.php?option=com_hikashop&ctrl=order&task=download&file_id='.$file->file_id.'&order_id='.$data->order_id.$url_itemid).'">'.$fileName.'</a><br/>';
												}
												echo '</p>';
											}
										}
after the code:
if(!empty($itemFields)){
											foreach($itemFields as $field){
												$namekey = $field->field_namekey;
												if(empty($item->$namekey)) continue;
												echo '<p>'.$fieldsClass->getFieldName($field).': '.$fieldsClass->show($field,$item->$namekey).'</p>';
											}
										}
in the order creation notification email that you can edit via the menu System->Emails (Business edition).

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

  • Posts: 35
  • Thank you received: 0
12 years 7 months ago #47764

Hi Nicolas,

sadly this doesn't work.
Attached the modified file.

Regards!
Torsten

File Attachment:

File Name: NeuesTextd...ent2.txt
File Size:11 KB

Attachments:

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
12 years 7 months ago #47894

Could you try to also change the line:

$query = 'SELECT * FROM '.hikashop_table('file').' WHERE file_ref_id IN ('.implode(',',$ids).') AND file_type = \'product\' ORDER BY file_ref_id ASC, file_ordering ASC';


to:

$query = 'SELECT * FROM '.hikashop_table('file').' WHERE file_ref_id IN ('.implode(',',$ids).') AND file_type IN( \'product\',\'file\') ORDER BY file_ref_id ASC, file_ordering ASC';

in the file administrator/components/com_hikashop/class/cart.php ?

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

  • Posts: 35
  • Thank you received: 0
12 years 6 months ago #48713

Hi,

this is sadly still not working. The confirmation email still doesnt contain any link to the download.

regards,
torsten

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
12 years 6 months ago #48761

Strange, it works fine for us with that code.

How are configured your products ? Do you have options, charcteristics ?
Does it work with a simple product on your end ?

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

Time to create page: 0.125 seconds
Powered by Kunena Forum