Akeeba Subs plugin - wrong multiple renewal date

  • Posts: 195
  • Thank you received: 5
  • Hikashop Business
11 years 3 months ago #117167

-- url of the page with the problem -- : tested on various
-- HikaShop version -- : 2.2.0
-- Joomla version -- : 2.5.14
-- PHP version -- : 5.3.27
-- Browser(s) name and version -- : chrome
-- Error-message(debug-mod must be tuned on) -- : n/a

Purchasing multiple renewals doesn't properly set the date after the first renewal.

Ex.

1. Purchase Subscription - date is set to start in 2013 and end in 2014 (correct)
2. Purchase renewal - date is set to start in 2014 and end in 2015 (correct)
3. Purchase renewal again - date is set to start in 2014 and end in 2015 (wrong - it should start in 2015 and end in 2016)

Akeeba subs itself had the same problem until about May of this year.
You can see Nicholas' comments here:

www.akeebabackup.com/support/akeeba-subs...-problem.html#p92979

Looks like we've got the exact same problem with the integration plugin.

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

  • Posts: 13201
  • Thank you received: 2322
11 years 3 months ago #117289

Hi,

I read the topic in the akeeba forum, and we had the same problem, we were taking into account only the enabled subscriptions.
But the subscriptions are enabled automatically when their date start, so the confirmed and not enabled subscription were ignored.

Thanks to edit the akeebasubs.php file of the plugin and replace the SQL request from:

				$query = 'SELECT * FROM '.hikashop_table('akeebasubs_subscriptions',false).'
							WHERE state = '.$db->quote('C').'
							AND user_id = '.(int)$user_id.' AND enabled = 1 AND akeebasubs_level_id = '.(int)$level_id.' ORDER BY akeebasubs_subscription_id DESC';
				$db->setQuery($query);
To
				$query = 'SELECT * FROM '.hikashop_table('akeebasubs_subscriptions',false).'
							WHERE state = '.$db->quote('C').'
							AND user_id = '.(int)$user_id.' AND akeebasubs_level_id = '.(int)$level_id.' ORDER BY akeebasubs_subscription_id DESC';
				$db->setQuery($query);

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

  • Posts: 195
  • Thank you received: 5
  • Hikashop Business
11 years 3 months ago #117743

Yeah!
That worked perfectly.

Hope that makes it into the next release.

Thanks!!!

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
11 years 3 months ago #117760

Yes, it is already updated in the akeeba subscription plugin available on our website.

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

Time to create page: 0.045 seconds
Powered by Kunena Forum