Support

Home Forums Event Espresso Premium Different payment seller-id per venue manager

Different payment seller-id per venue manager

Posted: February 3, 2015 at 5:00 am

Viewing 7 reply threads


Stefan Verbeek

February 3, 2015 at 5:00 am

Hi there,
Situation:
I use the payment gateway from targetpay. the only variable I have to put in there is the layoutcode (rtlo).
Now on the targetpay accountsite i can make different sublayoutcodes (rtlo) so I can easily filter payments which have to go to the venuemanagers. (each venue has his own sublayoutcode).
How can I alter the venues so that if an event is created by them that the right layoutcode is used?
Meaning is that only the siteadmin can assign layoutcodes to venues.

Regards
Stefan.


Dean

February 3, 2015 at 5:35 am

Hi,

If I understood correctly, you basically need a custom meta field for the venue (or maybe event)? If so you could use a custom function to add a custom meta field and use the WordPress capabilities to only show it if the user has Admin rights.

This is something outside the scope of support, but a developer should be able to do this. The hard part would be making it usable by your payment gateway.


Stefan Verbeek

February 4, 2015 at 7:50 am

Hi, I just figgered it out.
I copied the targetpay gateway to the upload/gateways folder and editted the targetpay_vars.php file:
$gateway_name = "TargetPay";

$targetpay_settings = get_option('event_espresso_targetpay_settings');
$rtlo = empty($targetpay_settings['rtlo']) ? '' : $targetpay_settings['rtlo'];

/* MODIFICATION BY Stefan Verbeek on 4/2/2015 */

//Check for an alternate Sublayout
if (isset($event_meta['targetpay_layout'])) {
//Alternate targetpay sublayout.
$rtlo = $event_meta['targetpay_layout'];
}

if (!$rtlo) {
$rtlo = 93929; // Default TargetPay
}

/* END MODIFICATION */

This seems to work, i can now put an layoutcode (seller id) for each event in the metadata.
Tested with an activated and a non activated sublayout number.


Stefan Verbeek

February 4, 2015 at 7:52 am

Question:
Can I put event meta to a venue manager?


Stefan Verbeek

February 4, 2015 at 7:54 am

if not I have to write some extra instructions to each venue manager to put a layout code in each event they organise


Dean

February 5, 2015 at 6:54 am

Hi,

Can I put event meta to a venue manager? – Not sure what you mean here. Are you just trying to output the event meta when a venue is shown front end or in the admin? I’m also assuming this is EE3?


Stefan Verbeek

February 5, 2015 at 8:54 am

I use this in the paymentgateway so every location has a different merchant id on the same paymentgateway, it works on the event page (see post before) but i want this code to be available to all events created on a location. So I want to create event_meta per location.
Indeed I use EE3


Dean

February 6, 2015 at 2:09 am

Ok I see, well can you do it? Yes.

However, I wouldn’t recommend it, as it would require several file edits, all of which are core files, so updates will wipe the changes.

If you still want to check it out, have a look at the files here: /wp-content/plugins/event-espresso/includes/admin-files/venue-management

Viewing 7 reply threads

The support post ‘Different payment seller-id per venue manager’ 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