Support

Home Forums Event Espresso Premium Add event title to Mijireh slurped page

Add event title to Mijireh slurped page

Posted: January 22, 2016 at 11:39 am


Leslie Evans

January 22, 2016 at 11:39 am

Hi! The integration with Mijireh is working as expected, with a slurped page and processing of the payments. However, the event title of the event is not passed to the Mijireh checkout page.

Mijireh documentation mentions that through a meta_data attribute (see http://www.mijireh.com/docs/what-is-page-slurp/) they can accept custom content.

For example, if you were to pass something like this as meta_data when posting the order:
“meta_data” : { “some-custom-message” : “Hi Bob” }
And if the slurped checkout page had a placeholder named {{some-custom-message}} anywhere in the HTML markup, that placeholder will get replaced with the custom message on that specific order

Could you help us to add the event title somehow?


Josh

  • Support Staff

January 22, 2016 at 1:05 pm

Hi Leslie,

I checked the code and it turns out that in the Event Espresso 4 Mijireh gateway, it doesn’t set meta_data and there isn’t a filter hook in place to add meta_data. So we’ll need to add a filter hook in a future version to make this happen.


Leslie Evans

January 25, 2016 at 8:40 am

Thanks Josh! We look forward to the update and will appreciate if, in due time, you or one of your colleagues posts here a usage guide (or a link to another post with it) to achieve adding the event title.

Have a good week ahead!


Josh

  • Support Staff

January 28, 2016 at 3:07 pm

Hi Leslie,

There were some new hooks added to the Mijireh gateway and they were included in Event Espresso 4.8.32.p, which was released today.

You can make use of the new hook for sending meta data by adding something like this to a functions file/plugin:

add_filter( 'FHEE__EEG_Mijireh__set_redirection_info__order_arguments', 'mijireh_send_meta_data', 10, 3);
function mijireh_send_meta_data( $order, $payment, $primary_registrant ){
 $evt_name = $primary_registrant->event_name();
 $order[ 'meta_data' ] = array('event_name'=>$evt_name); 
 return $order;
}

You can add the above to a functions plugin or into your WordPress theme’s functions.php file.

Then you edit the Mijireh slurp page and add some text to the content, including the event_name placeholder wrapped in double curly brackets. eg:
Thanks for registering for {{event_name}}, you can pay by credit card here

Then you click the button to re-slurp the page.


Leslie Evans

January 29, 2016 at 1:41 pm

Thanks again Josh! Very appreciated!

The title of the corresponding event is now added when the checkout page is produced by Mijireh.

Now, let’s see if the final receipt produced by the gateway also catches the event name from the Mijireh’s checkout page, for the description in the receipt, where right now there’s only the title of the ticket. I guess that if it doesn’t we will need to contact Mijireh, or do you see any other option?

Thanks again and have a good weekend!


Josh

  • Support Staff

January 29, 2016 at 2:38 pm

Hi Leslie,

The final receipt from Mijireh will likely not have the event name because that’s something that would get passed to the Order Description. EE4 automatically passes the Ticket name where possible, and the Event name if not possible. So if you want it to pass the Event name all of the time, we have another filter that can be used. If you want it to pass the Event name all of the time, let me know and I can show you how.


Leslie Evans

February 1, 2016 at 5:22 pm

Oh!, thanks for the clarification then!

Yes please, if you can post here how to pass the event name all the time, it’d be great!

Thanks!


Josh

  • Support Staff

February 2, 2016 at 4:36 pm

You can pass the event name for all tickets by adding the following code to your functions file:

add_filter( 'FHEE__EEG_Mijireh__set_redirection_info__full_amount_line_item_name', 'mijireh_send_event_name', 10, 4 );
function mijireh_send_event_name( $name, $lin, $payment, $primary_registrant ){
 $name = $primary_registrant->event_name();
 return $name;
}


Leslie Evans

February 3, 2016 at 11:43 am

Thanks so much! Effectively, with the latest filter, the event title is now passed to the ticket description line and to Mijireh’s slurped checkout page. We are now waiting to check the final receipt produced by the gateway to confirm that the event title has been passed all the way through.

We appreciate all your help!
Have a good day!


Josh

  • Support Staff

February 3, 2016 at 11:47 am

No need to wait, you go into your Mijireh account, click on orders, and you can view the orders there.


Leslie Evans

February 8, 2016 at 4:04 pm

That’s right! Thanks for pointing us out in the right direction and the prompt changes to the code to achieve the task! Very appreciated!


Lorenzo Orlando Caum

  • Support Staff

February 8, 2016 at 5:12 pm

Hi Leslie,

Did you have any other questions about Mijireh?

If not, could you go ahead and update your support post to resolved?

Thanks


Lorenzo

The support post ‘Add event title to Mijireh slurped page’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso