[Skip to main content](#vessel-content)

#   Akeeba Subs plugin - wrong multiple renewal date

##

- **[cpaschen](/forum/user/12420-cpaschen "View cpaschen's Profile")**
- [![cpaschen's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar_2013-01-25.jpg)](/forum/user/12420-cpaschen "View cpaschen's Profile") Topic Author
- [ Offline](/forum/user/12420-cpaschen)

Less More

- Posts: 196
- Thank you received: 6
-
-
-
- [](http://www.paschencommunications.com)
-

13 years 3 months ago [\#117167](#117167) by [cpaschen](/forum/user/12420-cpaschen "View cpaschen's Profile")  *[Akeeba Subs plugin - wrong multiple renewal date](/forum/30-integrations/860670-akeeba-subs-plugin-wrong-multiple-renewal-date#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.")* was created by *[cpaschen](/forum/user/12420-cpaschen "View cpaschen's Profile")*

-- 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](https://www.akeebabackup.com/support/akeeba-subscriptions/16119-multiple-renewal-problem.html#p92979)

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

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMwLWludGVncmF0aW9ucy84NjA2NzAtYWtlZWJhLXN1YnMtcGx1Z2luLXdyb25nLW11bHRpcGxlLXJlbmV3YWwtZGF0ZT90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

13 years 2 months ago [\#117289](#117289) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Akeeba Subs plugin - wrong multiple renewal date](/forum/30-integrations/860670-akeeba-subs-plugin-wrong-multiple-renewal-date#117289 "-- 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.")*

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: Code:

$query = 'SELECT * FROM '.hikashop_table('akeebasubs_subscriptions',false).' WHERE state = '.$db-&gt;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-&gt;setQuery($query);

To Code:

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

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMwLWludGVncmF0aW9ucy84NjA2NzAtYWtlZWJhLXN1YnMtcGx1Z2luLXdyb25nLW11bHRpcGxlLXJlbmV3YWwtZGF0ZT90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[cpaschen](/forum/user/12420-cpaschen "View cpaschen's Profile")**
- [![cpaschen's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar_2013-01-25.jpg)](/forum/user/12420-cpaschen "View cpaschen's Profile") Topic Author
- [ Offline](/forum/user/12420-cpaschen)

Less More

- Posts: 196
- Thank you received: 6
-
-
-
- [](http://www.paschencommunications.com)
-

13 years 2 months ago [\#117743](#117743) by [cpaschen](/forum/user/12420-cpaschen "View cpaschen's Profile")  Replied by *[cpaschen](/forum/user/12420-cpaschen "View cpaschen's Profile")* on topic *[Akeeba Subs plugin - wrong multiple renewal date](/forum/30-integrations/860670-akeeba-subs-plugin-wrong-multiple-renewal-date#117743 "-- 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.")*

Yeah!
That worked perfectly.

Hope that makes it into the next release.

Thanks!!!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMwLWludGVncmF0aW9ucy84NjA2NzAtYWtlZWJhLXN1YnMtcGx1Z2luLXdyb25nLW11bHRpcGxlLXJlbmV3YWwtZGF0ZT90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86322
- Thank you received: 14281
-
-

13 years 2 months ago [\#117760](#117760) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Akeeba Subs plugin - wrong multiple renewal date](/forum/30-integrations/860670-akeeba-subs-plugin-wrong-multiple-renewal-date#117760 "-- 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.")*

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

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMwLWludGVncmF0aW9ucy84NjA2NzAtYWtlZWJhLXN1YnMtcGx1Z2luLXdyb25nLW11bHRpcGxlLXJlbmV3YWwtZGF0ZT90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.061 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
