Skip to main content

Subscription custom status field value

More
8 years 4 months ago #294437 by 3by400
-- 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

3by400, Inc.
3by400.com
Websites that Work, Marketing that Matters

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

More
8 years 4 months ago #294441 by Jerome
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.

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

More
8 years 4 months ago #294460 by 3by400
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.

3by400, Inc.
3by400.com
Websites that Work, Marketing that Matters

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

More
8 years 4 months ago #294467 by Jerome
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.

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

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