Posted: June 28, 2019 at 8:05 am
|
When I save an event, all price modifiers of archived tickets are removed. All generated invoices also set to zero; especially this is a big problem. Any help? Some screenshots: |
|
(the first screenshot is before saving, the second after) |
Hi, May I ask can you update the site to the current version of Event Espresso 4? The reason I ask is because this issue cannot be replicated when testing the current version. I can look into this further, but in the meantime I can advise to update to the current version of the software. |
|
|
I just did the update to the latest version, saved another event, ticket modifiers of archived ticket disappeared again (also from the database as far as I can see) |
May I ask are there any code customizations (via add-ons or otherwise) in place? Normally we’d be able to replicate the same issue, but have not so far with the current version of EE4. You might also try clearing your browser’s cache since the older JavaScript files from the older version could still be loading. |
|
|
Ok, I ran the following test: I’ll run a few more tests tomorrow. |
|
(edit: the price modifiers are gone after saving the event) |
I should clarify a bit about the Price Modifiers and what happens when their attached ticket is archived: They should get moved to the new ticket (they do not stay with the archived ticket). The part that I wonder about is how the invoices are set to zero. Do you mean that the line item values are getting set to zero, or something else? Normally when a ticket is archived it has no effect on invoices because the invoices do not pull values from the esp_ticket and esp_price tables. Instead, they pull values from esp_line_item. Can you add some clarification about the changes you’re seeing with the invoices after archiving a ticket? |
|
|
Currently our invoices pull their values form esp_price, not from esp_line_item. The problem with the latter is that I need to know the price type where the line came from. The reason is rather technical: tickets are only partly eligible for susbsidy by the government, and this depends on the price type. Food, drinks, overnight stays and taxes can not be subsidized, while the rest can. But esp_line_item only gives me the name (which varies each event), not the type, and there is no link between price type and ticket item. So my questions: |
|
And a third question: The only workaround I can think of right now is, when building the invoice for the archived ticket, to compare the name of the line item with the price modifiers of the newer ticket, and try to figure out the price type that way, but that is a long (and error prone) shot. |
Because once the transaction is created, that’s what line items are for, price modifiers are for anything before the transaction. Archived tickets are no longer available for new transactions.
Because the changes to the event have not been updated/saved until you hit the Update button.
You can use the line items for the transaction to know exactly which price modifiers were used. This is what they’re recorded for. You can continue to get the price type from the other table, but the amounts & names of the price modifiers can be taken from the esp_line_item table. |
|
|
With all respect, but I’m not sure if you are actually listening. Of course I know I have to hit the Update button to save an event. But after the first update, the price modifiers are initially copied. I can close the page, return months later: the price modifiers of the archived ticket are still there. Only when I hit the Update button a second time (even without making any actual changes), the price modifiers magically disappear. As for whether modifiers of archived tickets should disappear: they should not, period. That has nothing to do with availability: a ticket can keep its modifiers and still be set unavailable. It is just essential information of how the pricing of the archived ticket was set, even after it is archived. But I finally found a solution: the (obscurely named) field OBJ_ID in wp_esp_line_item tuns out to point to wp_esp_price, which has the desired link to wp_esp_price_type. I was confused because the link between line item and price is missing on your venn diagram; you might want to update it. Thanks for your patience anyway. |
OBJ_ID is also known as Object ID, and the next column OBJ_type provides the type of object. |
|
|
I know, but the point is: the price object it refers to is removed from the database. Please bear with me. I eat my shoe if it is not a bug. Here’s how you can replicate it in 2 minutes:
See? |
The esp_line_item table still has the price related information for line item 6 though, correct? For example the amount is LIN_total and the name is LIN_name. Another approach you could take since you rely on price data and not line items is you could not change prices, and instead add a new ticket to replace the old ticket price. So instead of automatically archiving, you’ll keep that ticket and change its sale date to end at that moment. The archived tickets were not intended to be used for transactional data, so you’ll avoid that limitation by avoiding archived tickets. |
|
|
That gives me the amount only, but not the price type, which is – as I tried to explain – essential to know which part of the ticket price is eligible for subsidy, and which is not. Note: after the second update, the TKT_Price field in esp_ticket also shows wrong prices of the archived tickets (i.e. the base price, without modifiers). This can never be intentional. I already figured out the second approach for new tickets, but for existing archived tickets, I used the workaround I mentioned earlier (comparing the line item names of the archived ticket with the new ticket). That works, but it is ugly and hacky. The only good fix is what I’ve been saying all along: do _not_ remove the modifiers for archived tickets. There isn’t a single reason to do so. It is a bug, nothing more, nothing less. |
The support post ‘archived ticket price modifiers deleted when saving event’ 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.