Private content tag not workig with subscription?

  • Posts: 260
  • Thank you received: 31
  • Hikaserial Subscription Hikashop Business
3 weeks 5 days ago #368526

-- HikaShop version -- : 6.1.0
-- HikaSerial version -- : 6.0.0
-- Joomla version -- : 5.3.3
-- PHP version -- : 8.3.25
-- Browser(s) name and version -- : Google chrome

Hi,
When I use the Private Content button in the editor and select a subscription plan to restrict the content, and to make it visible only for that subscription, the content does not display for users who actually purchased the product and have an active subscription. The order is confirmed and the subscription is active, but the restricted content is still not visible.
You can see the attached gif.

This option "Private content", it only works with serials?

Thank you!

Attachments:

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

  • Posts: 26288
  • Thank you received: 4046
  • MODERATOR
3 weeks 4 days ago #368528

Hello,

You are selecting a serial pack, not a subscription plan.
The plugin (serial private content) is only for serials ; there is no "subscription private content" since the subscription can update the user's group, so you can use Joomla ACL.

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: 260
  • Thank you received: 31
  • Hikaserial Subscription Hikashop Business
3 weeks 4 days ago #368529

Yes, I understand that the plugin currently only works with serials. However, it would be very useful to have something like a "subscription private content" feature as well.

With serials, I can reveal part of the content and keep the rest restricted, encouraging the user to purchase access in order to view the full content. This flexibility is exactly what I would like to achieve with subscriptions too.

Using Joomla ACL for subscriptions does not allow this: the entire item (article) is either fully visible or completely hidden. There is no way to show a preview and then restrict only a part of the content or suggest that the rest is available with a subscription.

Regards,

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

  • Posts: 260
  • Thank you received: 31
  • Hikaserial Subscription Hikashop Business
3 weeks 4 days ago #368530

Hi Jerome,

While testing further, I noticed that the Serial Private Content plugin actually seems to already contain the basis for a kind of "subscription private content."
In the file serialprivatecontent.php, inside the onContentPrepare function (around line 170), there is a condition written as:

's.subscription_end_date = 0 OR s.subscription_end_date <= ' . time(),
From my tests, this comparison appears to cause the subscription check to fail. If it is adjusted to:
's.subscription_end_date = 0 OR s.subscription_end_date >= ' . time(),
then the content visibility correctly follows the user’s subscription status, meaning that the content is shown or hidden depending on whether the subscription is active and its end date is in the future.

Could you please confirm if my understanding is correct, or if I might be doing something wrong?

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

  • Posts: 260
  • Thank you received: 31
  • Hikaserial Subscription Hikashop Business
3 weeks 3 days ago #368536

I have a suggestion for the private content plugin.

{privatecontent pack:1 product:2964 text:"Buy Basic to unlock the content"/}
To have the possibility to add the " link: " parameter inside the tag, replacing the " product: " if you want, to allow the administrator to define the link for the button that appears in the front-end.

For example, it can be a link to a page where all the subscription options are displayed href="/subscriptions", or it can be a link taken from a product ( Add to cart HTML link) , which adds that product directly to the cart and takes the customer directly to the checkout.
/index.php?option=com_hikashop&ctrl=product&task=updatecart&quantity=1&cid=2964&Itemid=248
So you can chose between using product: or link: to create the link for the button. :silly:

Thank you!

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

  • Posts: 26288
  • Thank you received: 4046
  • MODERATOR
3 weeks 37 minutes ago #368534

Hello,

Yes, some work have been started some time ago in order to make that plugin compatible with subscriptions.
But it hasn't been finished (or tested). I don't know why that code has been published since the editor part is not done and it hasn't been tested at all (like you can see with the typo in the SQL query).

If you fix the query and perform some tests ; you might be able to use it but you won't be able to select the "plan" via the interface ; you would have to modify the ID manually.

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: 260
  • Thank you received: 31
  • Hikaserial Subscription Hikashop Business
2 weeks 6 days ago #368587

Actually, apart from that small change in the query, it seems to be fully functional, I can even select the subscription from the UI for which I want the content to be available, I will attach 2 images for you.
I did some tests and it's working.

Regards!

Attachments:
Last edit: 2 weeks 6 days ago by oxido.

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

  • Posts: 26288
  • Thank you received: 4046
  • MODERATOR
2 weeks 6 days ago #368609

Hello,

That's a great news!
The SQL fix is already pushed on my side, but I should see to publish an hotfix for it.

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.
The following user(s) said Thank You: oxido

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

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