Jump to content
cyben76

Custom message on complete.tpl

Recommended Posts

Hi Guys,

I was wondering how i could display a custom message for first time orders when it is paid.

Is there an if statement i could use within the {if $ispaid} ... {/if} in complete.tpl?

Share this post


Link to post
Share on other sites
1 hour ago, cyben76 said:

I was wondering how i could display a custom message for first time orders when it is paid. 

Is there an if statement i could use within the {if $ispaid} ... {/if} in complete.tpl?

my inclination would be to use a ShoppintCartCheckoutCompletePage action hook - especially if what you want to do depends on determining whether this is a user's first order (which I imagine would require getting their client ID and seeing if there is more than 1 order assigned to them in the database)...

Share this post


Link to post
Share on other sites
On 12/3/2018 at 11:31 PM, brian! said:

my inclination would be to use a ShoppintCartCheckoutCompletePage action hook - especially if what you want to do depends on determining whether this is a user's first order (which I imagine would require getting their client ID and seeing if there is more than 1 order assigned to them in the database)...

Hi brian! 

I noticed under ShoppingCartValidateCheckout there is a variable custtype with Possible values are new or existing, could that be of use for me.. 

Share this post


Link to post
Share on other sites
17 hours ago, cyben76 said:

I noticed under ShoppingCartValidateCheckout there is a variable custtype with Possible values are new or existing, could that be of use for me.. 

"new" and "existing" in this context basically relates to whether they are already logged in - if they are logged in, they are an "existing" customer; if not, they're classed as "new".

i'm not sure that it would be of use for two reasons - firstly, because it returns an error message if the cart is invalid... it's not going to return an error message if the cart is valid and in any event, you want to show a custom message on the complete page, which is after the validatecheckout hook would run.

the second reason goes back to this new/existing issue... let's say that you have "Allow Client Registration" feature enabled in general settings -> other... that would allow users to register without ordering... so I could have registered a week ago, never made an order and then login today and make an order... i'd be classed as an "existing" customer, but i've never made an order previously, so if you were basing the custom message trigger purely on my loggedin status, I wouldn't see your custom message even though I should.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

By using this site, you agree to our Terms of Use & Guidelines