Guest checkout with downloadable products

  • Posts: 159
  • Thank you received: 2
11 years 1 month ago #161395

-- url of the page with the problem -- : 5-elemente.org/33/de/shop
-- HikaShop version -- : 2.3.1 Bussiness and HikaMarket
-- Joomla version -- : 3.3.1

Hi,
I opened a new thread for this, since it was a question within another thread.

I'm still struggling to set up the possibility to download a product without logging in. I use the guest checkout option only and I don't want to use any of the registration options.
If a order is set to confirmed and the E-Mail with the download link has been sent, the customer should be able to click on the ink and get his download product. If I click the download link in the email I get routed to a login page with the message Please login first.
I've been told here in the Forum that HikaShop is able to do that, but it's just not working for me.
Is there any hidden feature I need to activate? Please, give me a step by step instruction, because I'm trying for days now to get this working.
Thanks
Roger

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

  • Posts: 84218
  • Thank you received: 13670
  • MODERATOR
11 years 1 month ago #161408

Hi,

I can't give you any step by step as this is already automatic. There is even no option to deactivate it.
The only think I can think of is that you were using an old version of HikaShop where you had customized the notification emails via the menu Display>Emails and then updated to the latest version and thus your emails still use the old emails code which doesn't support that capability.
In that case, removing the customization of the emails via the menu Display>Emails should fix the problem.

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

  • Posts: 159
  • Thank you received: 2
11 years 1 month ago #161565

Hi Nicolas,
it seems to be HikaMarket related. When I send the status change mail from the front-end vendor page, the link in the mail leads to a login page.
If I change the status of the order in HikaShop backend, it works fine and the link in the mail leads to the download.

I deleted the changes in the HTML of the mails as you suggested, but that didn't change anything. In the code the version is 2.3.1, so I guess it should be the current one.
Best
Roger

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

  • Posts: 26264
  • Thank you received: 4043
  • MODERATOR
11 years 1 month ago #161603

Hi,

I have to admit that I don't know why this problem will come from HikaMarket. I have checked with Nicolas and HikaMarket does not load the "customer" in the order object.
So I think that a plugin load the order customer using the current logged user, and does not use the "order user id".

Could you please edit the file "administrator/components/com_hikashop/classes/order.php" and replace

		if(empty($order->customer)) {
			$userClass = hikashop_get('class.user');
			$order->customer = $userClass->get($order->order_user_id);
		}
		$this->orderNumber($order);
By:
		if(empty($order->customer) || @$order->customer->user_id != $order->order_user_id) {
			$userClass = hikashop_get('class.user');
			$order->customer = $userClass->get($order->order_user_id);
		}
		$this->orderNumber($order);
In the loadOrderNotification function, it should force the loading the of the right customer and fix the problem.

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: 159
  • Thank you received: 2
11 years 1 month ago #161725

Hi Jerome,
I did the suggested changes, but the download link still leads to a login page!

While I was doing the changes, it crossed my mind, that I edited the order.php file of HikaMarket to get rid of some error messages. I don't know, if that is related. You send me this code a few days ago:
www.hikashop.com/forum/19-hikamarket/868...-after-checkout.html

Best
Roger

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

  • Posts: 26264
  • Thank you received: 4043
  • MODERATOR
11 years 1 month ago #161777

Hi,

There are no link between the vendor fees and the email sent.
In order to understand what is going wrong, I will need more details ; like the links in the emails.
You said that one link is good and the order is not. What is the different between them ?

Without more details, I can just make some speculations and I don't think it is the right way to find the source of the problem.
So we have to investigate and get some details or debug data.

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: 159
  • Thank you received: 2
11 years 1 month ago #162345

Hi Jerome,
I sent you a PM with the two links to investigate.
Best
Roger

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

  • Posts: 26264
  • Thank you received: 4043
  • MODERATOR
11 years 1 month ago #162368

Hi,

Thanks for the links.
Because HikaMarket is in the front-end, the Joomla itemid is present. But the menu is an HikaMarket menu and it should contain a joomla group restriction. So when the user try to open the link, Joomla refuse it because the menu itself is restricted.

We will find a better solution for next release but for the moment, you can fix the problem by overriding the order_status_notification preload email.
Replacing

$t .= '<a href="'.hikashop_frontendLink('index.php?option=com_hikashop&ctrl=order&task=download&file_id='.$file->file_id.'&order_id='.$data->order_id.$file_pos.$url_itemid).'">'.$fileName.'</a><br/>';
By:
$t .= '<a href="'.hikashop_frontendLink('index.php?option=com_hikashop&ctrl=order&task=download&file_id='.$file->file_id.'&order_id='.$data->order_id.$file_pos).'">'.$fileName.'</a><br/>';
It will no longer use the item id in the url so the link, even if generated in the front-end, will work.

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: 39
  • Thank you received: 2
11 years 1 month ago #162884

Hi, I'm running into this same problem on my site, but we're running essential. Can you tell me where I can go to edit the code above? Is it in a file or a setting in the component?

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

  • Posts: 84218
  • Thank you received: 13670
  • MODERATOR
11 years 1 month ago #162891

With the Business edition, you can directly do it via the menu System>Emails.
Otherwise, you would have to edit the file order_status_notification.preload.php in the folder media/com_hikashop/mail

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

  • Posts: 159
  • Thank you received: 2
11 years 1 month ago #162995

Hi Jerome,
sorry for my slow response. I tried your solution, but nothing changed. The link still goes to a login page. But now I receive an additional message saying 'wrong order'.
I sent you the link via PM.
Best
Roger

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

  • Posts: 26264
  • Thank you received: 4043
  • MODERATOR
11 years 1 month ago #163007

Hi,

Your problem is strange because it is not possible for HikaShop to send a notification email for a subsale.
HikaMarket just forbidden all emails about subsales. So, unless the subsale is not a subsale but a sale, I don't know why this email is send.
That's why I am wondering a lot of things :
- Your HikaMarket version number
- The full and complete emails you received (to whom, from whom, with the images)
- The process you made exactly (because you're not editing the same things in front-end and backend)
- The "mass action" you could have
- The modification you made in HikaShop or HikaMarket
- The content of the table order for the orders you mentioned.

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: 159
  • Thank you received: 2
11 years 1 month ago #163020

Hi,
ok, here are some of the information you were asking for:

HikaMarket Version is 1.4.1
Could you PM me a mail address, so that I can forward you the Status email?

I log in in with the vendor access at the front end - go to orders - click on order number - change order status - safe by clicking on the little pencil icon - click 'e mail' and send the mail to the customer.

What is a 'Mass Action'?

There were some modifications you or Nicolas sent me the changes for. I did a few CSS changes...

The content of the table order for the orders you mentioned.

Do you mean the SQL table?

Regards
Roger

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

  • Posts: 26264
  • Thank you received: 4043
  • MODERATOR
11 years 1 month ago #163037

Hi,

I guess it would be useful if I could have some credentials to test the problem directly in your website.
With a backend access to check your configuration and a front-end access to edit an order and see the result.
In a second time, a FTP access might be useful if I want to add some debug traces, but in the first time I prefer to check the configuration.

You can use my email "jerome" at hikashop.com.

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: 39
  • Thank you received: 2
11 years 1 month ago #163056

Hi, the file you mentioned doesn't exist at that path. I've got order_status_notification.html.php and order_status_notification.text.php.

I don't really understand the support in this thread, but I'm having the same problem. A user purchases a digital file for download and when they get the email notification, the link to download the file takes them to a login screen even though they purchased it as a guest.

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

  • Posts: 26264
  • Thank you received: 4043
  • MODERATOR
11 years 1 month ago #163060

Hi holdsworthdesign,

Please open a new thread.
Your problem is really not the same and we got no useful information about your configuration (version number, real problem, etc).

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: 26264
  • Thank you received: 4043
  • MODERATOR
11 years 1 month ago #163268

Hi Rokell,

Thanks for the accesses.

If I understand right your process, the email sent from the front-end is sent using the "email" button, it was not the automatic email send by HikaShop when an order status changed.
I was able to reproduce this specific problem. When a vendor want to send an email, his order is loaded so the links are targeted the vendor order, not the parent one (which allow the download, the vendor orders do not).

That's why I update your order_status_notification.preload email with this content

	$oid = $data->order_id;
	if(!empty($data->cart->order_parent_id))
		$oid = $data->cart->order_parent_id;
	$t .= '<a href="'.hikashop_frontendLink('index.php?option=com_hikashop&ctrl=order&task=download&file_id='.$file->file_id.'&order_id='.$oid.$file_pos.$url_itemid).'">'.$fileName.'</a><br/>';
So it fix the order_id for the generation of the download links.

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: 159
  • Thank you received: 2
11 years 1 month ago #163322

Hi Jerome,
hurray it works! Thank you!

One more thing - when a vendor change the status of an order in the front end, he has to send the status mail manually to the customer. Is there a setting to send the status mail automatically once the status has been changed?
Thanks
Roger

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

  • Posts: 26264
  • Thank you received: 4043
  • MODERATOR
11 years 1 month ago #163388

Hi,

The "notify customer" checkbox is only available for the main vendor.
To change the order status of the main order, the order status of the sub orders has to be the same. Otherwise the order status is a mix, so it is difficult to send an order status notification for a partial order status modification.

There are two possibilities.
* We can add an extra option in HikaMarket to send automatically a notification to the customer when the main order status change (so when all sub orders are the same).
* We can let the vendors have the "notify customer" checkbox when you have a vendor limitation in the cart (or when he is the only sub-order).

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: 159
  • Thank you received: 2
11 years 1 month ago #164127

Hi Jerome,
I received the first order and even though the download link worked before, I ran into the same problem as before you fixed it. But now the downloadlink in the mails are always linking to a login page. NO matter if I send them from the front end or the back end.
I got offline again and switched back to my old Virtuemart shop to avoid problems with my clients.
Please have a look again. I need a stable fix to work with HikaMarket...
Thanks
Roger

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

Time to create page: 0.124 seconds
Powered by Kunena Forum