Locked product / Unlock by code

  • Posts: 410
  • Thank you received: 15
5 years 1 month ago #304838

Hi Jerome, I have an idea, but I do not know exactly how to implement it. Can you give me some direction how I can get it. I want to lock a product (video) and after entering the code generated by HikaSerial to unlock.

Update: In fact, I figured out how to do it by subscription. But how do I do this before I unlock the content to check for an active subscription. I think this feature would help: if and else

Last edit: 5 years 1 month ago by neo191987.

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

  • Posts: 26000
  • Thank you received: 4004
  • MODERATOR
5 years 1 month ago #304839

Hello,

I'm sorry, I don't know what you want to do.
Please understand that we are not using the same kind of language ; "locking / unlocking" a product does not mean anything logic for me.
So, you have to explain it with more details, maybe like you were talking to someone who does not know anything at your website and activities (or even website/e-commerce)

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: 410
  • Thank you received: 15
5 years 1 month ago #304864

Now I will explain it in more detail. The product page must have a php code to verify that the user has a purchased subscription for this product or not before showing content. For example, when there is no subscription to show "You must have a valid subscription to see this content". If there is a valid subscription to show the content.

Last edit: 5 years 1 month ago by neo191987.

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

  • Posts: 81510
  • Thank you received: 13065
  • MODERATOR
5 years 1 month ago #304890

Hi,

With HikaSubscription, you can have the user account added to a user group upon activation of the subscription (after a purchase for example) and have it removed after the subscription expires.
With that, you can restrict a product to that user group so that it will only be available for users in that user group. However, if the user is not in that user group, he actually won't see it in the products listings and even if he tries to access the URL of the product page directly he will be met with a 404 error. That 404 error can be catched by the redirect component of Joomla to redirect it to a Joomla article that would say "You must have a valid subscription to see this content". However, there is no system to keep the products in the products listing when the access level of the user account doesn't match the access level of the product.
So I'm afraid this solution doesn't match exactly what you want.
Instead, you could not apply an access level to the product and have a custom PHP check in the show.php of the product view to display either the normal product page or the message you want based on the user groups of the user account. I believe that it would meet your needs, but it requires a bit of PHP coding on the product page view file.

The following user(s) said Thank You: neo191987

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

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