TNEW Form Procedure Upsell

Hello all,

I have a specific situation, and I am curious if anyone has ever had to deal with this before, and what sort of workaround they found, if any.

In our subscription purchase path online we have a donation upsell precart page.  Following that, and in existence for our single ticket path as well, there is an upsell precart page for Valet and pre-show Dinners.  Not all performances have both, and some only have one, but 95% of our performances have a Valet offering, and a good 60% have a pre-show Dinner offering as well.  Thus this page almost always comes up, especially for subscriptions.  The donation page up-sell is done via the standard TNEW customization of passing data through a form post that executes a local procedure.  This method, by its default using an <input type="submit" value="Donate Now"/> button, bypasses the precart method and goes directly to the cart.  We want the Valet/Dinner upsell page to come next, so I have simply set that custom procedure to call LWP_VALIDATE_CART at the very end, and life goes on, no big deal.  When they click on the "No Thanks" button, that link simply loads the precart page again which has logic to bypass the donation and loads the Valet/Dinner upsell page, so that works just fine, too.

However, this season, because of quirks of the performances in our flex (create your own) package, and because I took the time to count (my own fault here), I noticed that it IS theoretically possible (though because of the nature of the performances one would have to select somewhat improbable) for someone to purchase a few subscription packages that contains no performances with either an associated Valet or Dinner upsell event.  If a person were to select such a package and click "No Thanks" on the donate page, then everything is still just fine, the precart @final_html is empty/null and it goes straight to the cart page.

But, if they DO choose to donate (yay for us), because the form submit method bypasses the precart logic and goes directly to the cart, with the situation as outlined above, that will simply load an empty page with no html for TNEW to display.

So, we have two choices.  1)  Make sure that, in that specific circumstance, a lovely "thank you for your donation - click here to proceed to your cart" page is loaded, and let that be it.  Or 2) remove the Valet/Dinner upsell precart procedure call from the local procedure and just not offer those options to our patrons.  There are supporters of both sides, but the bulk seem to be leaning towards option 1).  However, our Development department has an aversion to multiple clicks for their donors (we paid to have built a custom donation page where donors could enter all of their information and make a full donation with one click).  Given that, they would rather not have to have that page in between, but for that to go directly to the cart.

Anyone have any ideas?  Thanks!

John

Parents
  • Former Member
    Former Member $organization

    Hi John! Found your post by looking for help on my own pre-cart donation ask customization...

    Not sure if you're still working on this, but could you have that blank page just contain a bit of Javascript that re-directed to the cart? It would officially load the page still, but hopefully redirect quick enough that no one would think much of it.

  • Lily,

    Thanks for your thought!  A good one.  Though I came up with a different solution in the meantime (forgot to post it here for anyone looking, so thanks!).

    Basically, I just made an if/then in the donation procedure using the same if/then logic as the beginning of the precart logic procedure.  Then, inside the if/then, I call the precart procedure from the donation procedure directly when necessary and bypassing it completely when not necessary.  That way, there is never a blank page loaded, because when not called it just shoots straight through to the cart as it should.  And, since it is only called when there is at least one result on the page that should be there... there are no issues there either because the page loads correctly.

    Thanks, though!  In general, I just need to keep working on refreshing my Javascript skills anyway.

    John

Reply
  • Lily,

    Thanks for your thought!  A good one.  Though I came up with a different solution in the meantime (forgot to post it here for anyone looking, so thanks!).

    Basically, I just made an if/then in the donation procedure using the same if/then logic as the beginning of the precart logic procedure.  Then, inside the if/then, I call the precart procedure from the donation procedure directly when necessary and bypassing it completely when not necessary.  That way, there is never a blank page loaded, because when not called it just shoots straight through to the cart as it should.  And, since it is only called when there is at least one result on the page that should be there... there are no issues there either because the page loads correctly.

    Thanks, though!  In general, I just need to keep working on refreshing my Javascript skills anyway.

    John

Children
No Data