Bug in Download view

  • Posts: 25
  • Thank you received: 1
  • Hikaserial Subscription Hikashop Business
3 months 1 week ago #289447

Hi,
menu item of type Hikaserial->Download listing show Subscription instead Downloads, now the only way to see Downloads is from Hikashop Control Panel link.

To fix this I have removed line 64 in file /components/com_hikaserial/controllers/subscription.php

hikaInput::get()->set('layout', 'listing');

Menu item should have link like index.php?option=com_hikaserial&view=subscription&layout=downloads but this code seems to force "layout" get var to "listings" instead "downloads"

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

  • Posts: 25
  • Thank you received: 1
  • Hikaserial Subscription Hikashop Business
3 months 1 week ago #289480

ops, with this modification page works (good) but you can't download file (bad)

to works it require option=com_hikashop, but menu item is associated to com_hikaserial.

So the problem is this
Menu item "Hikaserial->Download listing" create a link like "index.php?option=com_hikaserial&view=subscription&layout=downloads" but the correct working link is "index.php?option=com_hikashop&view=subscription&layout=downloads"

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

  • Posts: 25
  • Thank you received: 1
  • Hikaserial Subscription Hikashop Business
3 months 1 week ago #289490

Finally I found a good fix and I hope you can add it in the next release.



Changed line 64 file in /components/com_hikaserial/controllers/subscription.php from:

hikaInput::get()->set('layout', 'listing');
to:
if(!hikaInput::get()->get('layout')) hikaInput::get()->set('layout', 'listing');
Now assign "listing" to "layout" var only if it is empty, otherwise you will never see downloads page.



Changed line 47 in file /components/com_hikaserial/views/subscription/tmpl/downloads.php from:
$url = hikaserial::completeLink($this->param_prefix.'subscription&task=download......
to:
$url = hikaserial::completeLink('shop.subscription&task=download.....
Download controller works only when you use "com_hikashop" therefore "shop." prefix is always required

Last Edit: 3 months 1 week ago by fdesanto.

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

  • Posts: 22433
  • Thank you received: 3487
  • MODERATOR
3 months 1 week ago #289481

Hello,

Unfortunately your patch will generate errors and won't really solve your issue.
If you want to fix it you will have to add that code in the controller :

	public function downloads() {
		$this->requireJoomlaAccount();

		hikaInput::get()->set('layout', 'downloads');
		return $this->display();
	}
And it also require the same "download" function that you can find in the "shop_subscription" controller (with few modifications for the links and the class $rights variable).

Now ; when you post a message in our forum, please provide the details regarding your HikaShop & HikaSerial version number.
We asked for these details in order to provide a good support and not having to ask that question for every new thread..
Thank you for your understanding.


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: 25
  • Thank you received: 1
  • Hikaserial Subscription Hikashop Business
3 months 1 week ago #289528

Thanks, it works perfectly :D

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

Moderators: Obsidev
Time to create page: 0.055 seconds
Powered by Kunena Forum