Subscription custom status field value

  • Posts: 162
  • Thank you received: 11
  • Hikaserial Subscription
10 months 3 weeks ago #294437

-- HikaShop version -- : 3.4.0
-- HikaSerial version -- : 2.1.1
-- Joomla version -- : 3.8.8
-- PHP version -- : 5.6.36

We are creating subscriptions automatically when a product is purchased. However, the subscription requires an external activity for the actual start date to be set. (NOTE: I have a plugin that nulls the start and end date at present as soon as the subscription is created - onAfterSubscriptionCreate.)

I would like to set the subscription status to maybe 'pending'. Would that break anything in HikaSubscriptions? I don't need HikaSubscriptions to understand that status or manage it. Once the event (coming from an external system) is set, I will update the subscription status to active. I just don't want to create anything that will result in odd or unpredictable behavior in HikaSubscriptions or be counting on the 'pending' value only to have HikaSubscriptions somehow come along and change it to any other 'valid' value (active, closed, deleted, expired).

If it is a problem I will probably set some custom field or my own database table field (my custom table).

Thanks
Paul

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

  • Posts: 23419
  • Thank you received: 3638
  • MODERATOR
10 months 3 weeks ago #294441

Hello,

If I understand you right ; you want that new subscriptions which are not yet paid/active, have a "pending" status instead of the "closed" one ?
And you will use that status just in such case ?

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: 162
  • Thank you received: 11
  • Hikaserial Subscription
10 months 3 weeks ago #294460

Actually the initial status will not be tied to paid or not paid. In this case the subscription is bundled with the price of a hardware product. But the subscription should not become active until the hardware item is installed and activated. At that point data from an external system will be reported and a custom plugin will use that data to update the pending subscription by setting the start and end dates and in theory the status.

If I use my custom plugin (which not clears the initial subscription's start and end date) I can set the status to anything. I wanted to make sure that setting a status that was NOT one of the four supported natively would not cause issues with the core software.

If there is any question about such a 'custom' status interfering, then I will set my own 'status' elsewhere. It would be more convenient though in the #__hikaserial_subscription.subscription_status field. I don't need HikaSerial / HikaSubscription to DO anything with a custom status. I just don't want the custom status to 'break' anything in the core code.

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

  • Posts: 23419
  • Thank you received: 3638
  • MODERATOR
10 months 3 weeks ago #294467

Hello,

The only section I can think of is the functions to get Renewals or Upgrades ; but if you do not put a "end date", it won't generate unwanted side effects.

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.

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