Support

Home Forums Community Forum One click updates

One click updates

Posted: December 3, 2014 at 8:38 pm


beth

December 3, 2014 at 8:38 pm

I’ve just started using EE4 (4.4.5) and have a question about one-click updates. I’ve hacked up the files in the EE4 install pretty good – nothing functional, mind you, but removing some odd phrases and spellings of words, changing the word “tickets” in many areas (since I don’t sell tickets), etc.

So, the question – when the one-click update occurs, which files are updated? To clarify fully, here are the list of files I’ve modified:

/public/Espresso_Arabica_2014/loop-espresso_events.php
/modules/ticket_selector/templates/ticket_selector_chart.template.php
/modules/ticket_selector/EED_Ticket_Selector.module.php
/modules/ticket_selector/assets/ticket_selector.css
/modules/single_page_checkout/templates/registration_page_payment_options.template.php
/modules/single_page_checkout/templates/registration_page_attendee_information.template.php

This may be an impossible question to answer, but will any of these files be affected during an automated/one-click update?


Tony

  • Support Staff

December 4, 2014 at 2:42 am

Hi Beth,

Yes, they will.

When you update, all of the plugins files are deleted and the new plugin version is extracted in their place.

To change phrasing we usually recommend ‘translating’ the phrase, removing phrases/elements is usually easier using come custom css (and more ‘update-safe’) then loading custom templates, although this depends on exactly what has been changed.

If all of your changes are to change spellings or phrasing, I would recommend following this guide:

https://eventespresso.com/wiki/how-to-change-wording-with-poedit/

To note, when you download the PO file from GlotPress, rename the file to event_espresso-en_US.po (en_US will actually be whichever locale you use) before editing, then when you save, upload the .mo file POEdit creates and upload that to wp-content/uploads/espresso/languages/

Or use a plugin such as Loco Translate which will scan Event Espresso for all translatable strings and allow you to make changes in a similar way to POEdit, only you can do it all through the WP Dashboard.


beth

December 4, 2014 at 6:53 am

Thank you for the quick response! I’ve hacked things up a bit too much to simply translate, but I’ve kept careful track of things so I can easily replicate the changes. A few notes that may or may not be helpful in future development:

1) For the invoice template, it would be helpful to be able to remove the “VAT/Tax” line. In the U.S., we have no idea what “VAT” is (I do, but most won’t). Side note: What “value” is actually added from this tax? I suppose none…but if wishing made it so, then the govt. would be onto something!

2) The phrasing “Owing” sounds odd to the U.S. ear – “still owed” or simple “owed” would be more appropriate (again, only for the U.S. – not sure of Canada/Europe/elsewhere).

3) Option to change “cheque” to “check” would be helpful (just as above)

4) Option to change “ticket” to something else would be helpful (we sell “class slots” or “class registrations” but making this customizable would be great).

5) In LINE 113 of this file: /modules/gateways/Invoice/lib/templates/receipt_body.template.php

The way “echo sprintf” call was coded was somehow resulting in a time zone of “Africa/etc.” showing. No idea how this could be reading my server or WP install time as Africa (we’re on the U.S. East Coast), but I edited to remove that portion so that my users didn’t see an African timezone on their invoices.

Even so, a bit of searching through files and hacking fixed every issue I had!

Thanks again!


Tony

  • Support Staff

December 4, 2014 at 7:23 am

Hi Beth,

Thank you for the feedback, I can reply to some of those point, others I will create tickets for to pass on the feedback 🙂

1) For the invoice template, it would be helpful to be able to remove the “VAT/Tax” line. In the U.S., we have no idea what “VAT” is (I do, but most won’t). Side note: What “value” is actually added from this tax? I suppose none…but if wishing made it so, then the govt. would be onto something!

You can create custom Invoice templates to be used in place of the default would would allow you to change the full invoice template without needed to hack up core.

Currently this requires a bit of a strange directory structure, but you can copy event-espresso-core-reg/modules/gateways/Invoice/lib/templates/ to wp-content/uploads/espresso/templates/modules/gateways/Invoice/lib/templates/ and alter the files there. These will then load in place of the core templates.

However, to note, within EE4.5 we have move the Invoice and Receipts to within the ‘Messages’ system, allowing you completely customise either of those from within the WP Admin. The custom templates mentioned above will still work with that version, to allow you time to setup the custom template within the Admin and switch over by simply removing your custom templates.

3) Option to change “cheque” to “check” would be helpful (just as above)

Is this within the Payment methods or elsewhere?

4) Option to change “ticket” to something else would be helpful (we sell “class slots” or “class registrations” but making this customizable would be great).

We have an open ticket to make this easier and somehow allow different, in a sense ‘modes’ to be used on the ticket selector, ‘Event mode’, ‘Class mode’ etc.

I don’t know exactly how this will be implemented but it is something we are looking into.

5) In LINE 113 of this file: /modules/gateways/Invoice/lib/templates/receipt_body.template.php

Whats happening here is EE is taking you timezone set from Dashboard -> Settings -> General. I’m guessing it is UTC based and not set to a specific location?

The problem with that is UTC+0 for example applies to multiple locations, so when that ‘TimeZone’ is passed into EE you’ll find it defaults to some strange locations.

Setting up the Timezone in the general settings to apply to a city close to your location will fix this.


beth

December 4, 2014 at 7:40 am

Let me start off with a note that your support is top-notch. Your replies are fast and thorough! Also, I just purchased the EE4 Calendar add-on. Works simply with very little effort. I’m most pleased with it.

To dig into the details from above:

1) Thanks for the note on custom invoices – I’ll try that to avoid the hacking I’ve done. I didn’t even realize that was available in the WP Admin panel (guess I should stop digging in the code and dig into the pretty interface instead!).

2) “Check” vs. “Cheque” item. This is in the invoice and then the “Details” view on the individual event pages (within the ticket selector). These are the files where I modified it:

/modules/gateways/Invoice/lib/templates/receipt_body.template.php
/modules/gateways/Invoice/lib/templates/invoice_body.template.php

3) Noted on the “ticket” vs. “class/registration/other” – I modified it fairly easily, but an admin panel function would be great too!

4) Timezone – thanks for the note! I’ll do that now.

All the best,
Beth


Tony

  • Support Staff

December 4, 2014 at 9:41 am

Thank you for the feedback, its much appreciated 🙂

Its not currently available under general release (only on the Pre-Release channel for testing)

The current release version is 4.4.5.p

The next version will be 4.5.0.p it is this version that will include the Invoices & Receipts within the Admin.

The method mentioned above with the custom invoices is how 4.4.X loads custom templates, 4.5+ will all be within the Admin, due to the vast amount of options available it will be a little complicated, but we’ve done our best to make it as simple as possible and provide as much flexibility as we can.

The support post ‘One click updates’ 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