Integrate with Membership extension.

  • Posts: 38
  • Thank you received: 2
10 years 3 months ago #137653

Hello,

We want to integrate Emerald with Hikashop. Emerald is Joomla membership extension. The idea is to associate hikashop products with subscription plans. And when product is purchased, assign subscription for user.

I have found developer documentation with is detailed enough. I know what event to use after success purchase to assign associated subscription.

Right now I have only one question. What event to use to add subscription plans selector into product form so that during product add/edit seller could indicate what subscription to give after success product purchase.

And how to access this value later in success purchase event.

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

  • Posts: 81484
  • Thank you received: 13062
  • MODERATOR
10 years 3 months ago #137692

Hi,

The trigger to display additional fields in the product edition page is:

function onProductFormDisplay(& $product, & $html)
The trigger to generate the subscription after a purchase is:
function onAfterOrderUpdate( &$order,&$send_email)
I would recommend to look at our akeeba subscriptions plugins for an example of how to use such triggers since they do exactly the same thing but for Akeeba subscriptions :
www.hikashop.com/support/documentation/1...a-subscriptions.html

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

  • Posts: 38
  • Thank you received: 2
10 years 3 months ago #137721

Excellent! Exactly what we need.

onAfterOrderUpdate and onAfterOrderCreate. What is the difference between those?

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

  • Posts: 81484
  • Thank you received: 13062
  • MODERATOR
10 years 3 months ago #137733

The first one is for when the order information is updated in some way and the second one is for when the order is created at the end of the checkout.

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

  • Posts: 38
  • Thank you received: 2
10 years 3 months ago #137741

Then I should use onAfterOrderCreate to assign subscription because it is done only once? Or order may be created in pending mode and later to be updated to confirmed? If yes how do I understand that this update confirms the order and not only update some comment or whatever?

Also what are onCheckSubscription and onCheckSubscritpionPlugin methods are for?

Here is what i want to do. And you tell me if I am on a good track.

1. During subscription plan creation I can select Hikashop products and associate this plan with those product(s).
2. On success product purchase I query all plans that are associated with this product or each product of the order and assign associated subscription plan.

That is it.

What do you think?

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

  • Posts: 81484
  • Thank you received: 13062
  • MODERATOR
10 years 3 months ago #137745

I invite you to look at how it's done in the akeeba subscriptions. You can see there that the plugin only adds the subscription if the order_status is present and set to confirmed and that it is being changed from a different order status.

You're on a good track yes. As I said, it's exactly what the akeeba subscriptions plugin does.

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

  • Posts: 38
  • Thank you received: 2
10 years 3 months ago #137775

Thank you Nicolas,

Looks like I have managed to create an integration. Now Emerald Joomla membership is integrated. users can purchase products with Hikashop cart and get subscriptions.

Thank you for your excellent assistance!

Release link
http://www.mintjoomla.com/downloads/item/34-actions/326-action-hikashop.html

Last edit: 10 years 3 months ago by Sergey Romanov.
The following user(s) said Thank You: nicolas

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

  • Posts: 81484
  • Thank you received: 13062
  • MODERATOR
10 years 3 months ago #137848

Hi,

That's great ! I've added a link to it in our integrations area and tweeted about it.

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

  • Posts: 38
  • Thank you received: 2
10 years 3 months ago #137851

Excellent!

This is weird but I cannot find integration area on your site :)

Also added release news
http://www.mintjoomla.com/blog/item/327-update-emerald-v-9-128-stable.html

Last edit: 10 years 3 months ago by Sergey Romanov.

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

  • Posts: 81484
  • Thank you received: 13062
  • MODERATOR
10 years 3 months ago #137863

You can see it in the documentation page: www.hikashop.com/support.html#hk4

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

  • Posts: 1
  • Thank you received: 0
9 years 4 months ago #181143

Hi Nicolas,

I've been working with Sergey to integrate his extension with our payment platform and create a landing page for his product on our carts page; I'd like to discuss the same for you and your product.

Can I setup time to talk with you?

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

  • Posts: 81484
  • Thank you received: 13062
  • MODERATOR
9 years 4 months ago #181221

Hi,

Yes, please use our contact to reach me and plan that:
www.hikashop.com/support/contact-us.html

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

Time to create page: 0.081 seconds
Powered by Kunena Forum