Support

Home Forums Custom Files Add-on (EE3) Is this possible?

Is this possible?

Posted: September 25, 2012 at 5:48 pm

Viewing 4 reply threads


Mila Baumberg

September 25, 2012 at 5:48 pm

So our site requires a lot of different events (for classes). Since we have 4 pricing options for each event (class), that means 8 total prices when you count members, and 16 total fields when you add in the descriptors. Is it possible to have preset pricing fields in the add new event form? This would be similar to the venue manager, but for prices. I’m comfortable with editing PHP. Thanks for any help!


Chris Reynolds

  • Support Staff

September 26, 2012 at 2:02 pm

@Mila

There is no function built into Event Espresso that would do this for you — it would require custom development. Off the top of my head, I don’t know where those price forms are created, but I’m thinking that’s where you’d want to start looking. Just make sure that you’re using the custom files add-on rather than hacking core directly.

In 3.2 I believe this can be done natively.


Mila Baumberg

September 26, 2012 at 2:51 pm

@Chris

Thank you for your response. I was looking around but I can’t seem to find how the pricing fields are generated either.


Mila Baumberg

September 26, 2012 at 4:42 pm

So I added this to add_new_event.php but it only populates the member pricing fields, not the standard ones. Any idea why?

a href=”#event-pricing” onclick=”

document.getElementById('add-member-name-2').value = 'Drop-in Class'; 
document.getElementById('add-member-price-2').value = '15.00'; 
document.getElementById('add-member-name-3').value = 'Buy 8 Classes (Never Expire)'; 
document.getElementById('add-member-price-3').value = '110.00'; 
document.getElementById('add-member-name-4').value = 'Buy 1 Month Unlimited Classes'; 
document.getElementById('add-member-price-4').value = '150.00'; 
document.getElementById('add-member-name-5').value = 'Pay Later'; 
document.getElementById('add-member-price-5').value = '0.00'; 
document.getElementById('add-member-name-6').value = 'I\'ve already paid (package)'; 
document.getElementById('add-member-price-6').value = '0.00';   
document.getElementById('add-price-type-1').value = 'Drop-in Class'; 
document.getElementById('add-event-cost').value = '15.00'; 
document.getElementById('add-price-type-2').value = 'Buy 8 Classes (Never Expire)'; 
document.getElementById('add-price-2').value = '110.00'; 
document.getElementById('add-price-type-3').value = 'Buy 1 Month Unlimited Classes'; 
document.getElementById('add-price-3').value = '150.00'; 
document.getElementById('add-price-type-4').value = 'Pay Later'; 
document.getElementById('add-price-4').value = '0.00'; 
document.getElementById('add-price-type-5').value = 'I\'ve already paid (package)'; 
document.getElementById('add-price-5').value = '0.00';

                    ">Populate</a
  • This reply was modified 12 years, 2 months ago by Mila Baumberg.
  • This reply was modified 12 years, 2 months ago by Mila Baumberg.
  • This reply was modified 12 years, 2 months ago by Mila Baumberg.


Sidney Harrell

September 27, 2012 at 10:03 pm

I would actually do it on the submission side, instead of the form side. Maybe put a checkbox in the form “use preset pricing”, and the in insert_event.php, right before line 360, check for that checkbox, and if it’s checked, override the $_REQUEST[‘event_cost’] array with one populated with your preset pricing.

Viewing 4 reply threads

The support post ‘Is this possible?’ 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