Posted: June 13, 2019 at 5:49 am
|
Hi there, I am writing to you about a little change into the order-confirmation page that could be really useful to me. In order to collect purchase value, I process the DOM by using a little Javascript code that processes the value displayed on the screen and it works like a charm! Nevertheless, it could happen sometimes that a logged user has more than a transaction into the order-confirmation page (some completed, some others no) as in the screen https://drive.google.com/file/d/1PgwnpVgNGbVj7LKk_-51-JjK76oeGaGt/view?usp=sharing . In this case, what happens is that my script collects the first value that does not belong to the completed transaction but to the first row starting from the top (in the screen is the transaction with payment data 12/06/2019 20:44). I think we could easily overcome the issue in the following way: Could you order transactions on this page by payment data DESC instead of ASC? This should solve any possible future error or mistake. Here there is an URL that you can use for debugging purpose https://www.digitalinnovationdays.com/grazie/?e_reg_url_link=1-f9a32d904c9029e1ecdff92313450ba8#checkout Thank you |
|
Hi there, Altering the order of those payments may work for your use case, but could break anyone else’s that is already relying on the current order. It’s also possible for, in your example the ‘middle’ payment to be Approved (after a delay) and the others not, which would also be incorrect, right? (This situation is a little less likely but possible) What could be done is adding a class to the td which has the status of the payment, so your JS could search for for the rows with a td that has a class of Would that work for you? You could actually also add a timestamp class to the rows and compare using that if needed. |
||
|
Yes, that could work too. I think the best scenario would be the one in which when I visit the order-confirmation page (that is more like a thank you page) I see only the payment I have completed or started in that transaction with a class PAP (payment approved) or PNAP (payment not approved). In this way, I can determine the transaction’s value and if it has been approved or not. In your option, would be probably good to add a class like LPAP (last payment approved) only to the payment completed and related to that transaction. Would be also great to have the value split in two span: one for the amount and another for the currency. Something like this: <td class=pap”><span class=”Price-amount”>500.00<span class=”Price-currencySymbol”>€</span></span></td> |
|
Just to note,
Again, that’s not something we are going to do with EE however the template can be overridden so you are free to do the above should you wish to, although we won’t provide support for those customizations. The more I think about, why are you using that table at all? You’re on the thank you page so you have full access to the
Again, I don’t think this is the correct method to get the details you want, may I ask why you are using this method? What exactly are you trying to do with your JS? We may be able to guide you to a solution that isn’t as fragile. You can override the template file used to output the details, but you’ll need to basically recreate a lot of the output yourself as EE doesn’t have a filter you can use to adjust the output earlier. |
||
The support post ‘Thank you page and order confirmation’ 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.