Hika + Akeeba Subs - 2 PHP issues

  • Posts: 4
  • Thank you received: 0
9 years 9 months ago #165184

-- url of the page with the problem -- : http : // www . furiantech . com
-- HikaShop version -- : 2.3.2
-- Joomla version -- : 3.3
-- PHP version -- : 5.3.10
-- Browser(s) name and version -- : Chrome 36.0.1985.125 m

Hey guys,

Before I start, I just want to thank you for taking the time out to develop an awesome product and that I cant wait to actually earn some money and justify me upgrading B)
Further I understand the Akeeba Subscriptions is not supported anymore, but once I get it working I will then be able to check at alternatives.
Down to business;
I am using Hikashop Starter and Akeeba Subsciptions together. I am using PayFast as my payment plugin, and everything seems to work when you are placing an order via the traditional method. The problem I am experiencing is related to "post purchase". Basically I am using Akeeba Subs to send a link to a user before their subscription expires (since Payfast doesnt accept recurring payments, and PayPal doesnt accept ZAR as an accepted currency).
To add complexity I am also using JoomSEF to neaten up my links and help with SEO.

Everything to that point works, except the following issues:
1. Going to HikaShop User Control Panel, click -> "Show your subcriptions" just redirects to the current link followed by a # symbol.
The same issue was experienced here: www.hikashop.com/forum/3-bug-report/7856...malformed.html#91075 - I would like confirmation of what piece of code to use to fix it.

2. In the email sent by Akeeba Subs it sends a URL to manage your subscriptions, you go there and it takes you to a "My Subscriptions" page. On there I can see my current order, when I try click "renew" (Image: AkeebaURL3) it doesnt use the custom URL I specified in the Subscription Level itself. Please see attached image (AkeebaURL1). Basically that URL never applies itself correctly, I suspect an issue with the logic in the code itself.
The link that should be used for the custom URL is actually a Hikashop Link with Checkout specified, so basically they just buying my item again when they click the renew button. But the URL is not applied. ie. "index.php/solutions/proper-test/checkout" when appended to my domain will check out the item and start the checkout process.
(Image: AkeebaURL2) is the actual page I get to when I click Renew.

I hope the above makes sense! I have looked at the code myself, but far too many variables for me to dig around.

I may have gone into too much detail about the issue and not explained it well.
Thank you for your time :)

Attachments:

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

  • Posts: 13201
  • Thank you received: 2322
9 years 9 months ago #165297

Hi,

1. The link should be something like: ".../index.php?option=com_akeebasubs&view=subscriptions" as it is set in the plugin.
You can potentially edit that link directly in the plugin file "plugins/hikashop/akeebasubs/akeebasubs.php"

2. This is more a Akeeba subscription issue, we don't manage the emails sent by Akeeba. As link, you can provide the default HikaShop link to the orders page.

The following user(s) said Thank You: timk

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

  • Posts: 4
  • Thank you received: 0
9 years 9 months ago #165429

Hey Xavier,

I appreciate your time! Thank you good sir.

Re 1. I am still trying to find the link to edit, all I can find is this:
$buttons[] = array('link'=>JRoute::_('index.php?option=com_akeebasubs&view=subscriptions'.$url_itemid),'level'=>1,'image'=>'subscription','text'=>JText::_('SUBSCRIPTIONS'),'description'=>'<ul><li>'.JText::_('VIEW_SUBSCRIPTIONS').'</li></ul>');
which is under : function onUserAccountDisplay

But even editing that URL entirely does nothing.

Re 2. Managed to sort it out, seems there was a problem with the $CanRenew and $RenewURL, so just told it to always use the custom value irrespective :)

Have a good day further and I look forward to using your products extensively.

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

  • Posts: 81539
  • Thank you received: 13069
  • MODERATOR
9 years 8 months ago #165443

Hi,

That's however the URL to change. I don't see why that wouldn't work.
Are you sure that you're editing the file on the correct website ? That you uploaded it back successfully ?

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

  • Posts: 4
  • Thank you received: 0
9 years 8 months ago #167654

Hey Nicolas,

Yeah I am positive. I am working in the following dir:
joomla/plugins/hikashop/akeebas, filename is akeebas.php

$buttons[] = array('link'=>JRoute::_('my-account/subscriptions/subscriptions'),'level'=>1,'image'=>'subscription','text'=>JText::_('SUBSCRIPTIONS'),'description'=>'<ul><li>'.JText::_('VIEW_SUBSCRIPTIONS').'</li></ul>');

Maybe the SEF link is causing issues? I tried to change it to anything else and it doesnt work :(

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

  • Posts: 13201
  • Thank you received: 2322
9 years 8 months ago #167827

Hi,

In the plugin, thanks to replace the function "onUserAccountDisplay" by:

	function onUserAccountDisplay(& $buttons){
		global $Itemid;
		$url_itemid='';
		if(!empty($Itemid)){
			$url_itemid='&Itemid='.$Itemid;
		}
		$buttons[] = array('link'=>JRoute::_('index.php?option=com_akeebasubs&view=subscriptions'.$url_itemid),'level'=>0,'image'=>'subscription','text'=>JText::_('SUBSCRIPTIONS'),'description'=>'<ul><li>'.JText::_('VIEW_SUBSCRIPTIONS').'</li></ul>');
		return true;
	}

Are you using the plugin "akeebas" or "akeebasubs" ? It's two different one, so thanks to make the modification in both plugins. (if you have both presents).

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

  • Posts: 4
  • Thank you received: 0
9 years 8 months ago #167873

Hi Xavier,

Thank you for the reply :)

Your code fixed it right up. From what I can tell, the level =>0 is the difference between them.

Working like a charm!

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

Time to create page: 0.080 seconds
Powered by Kunena Forum