cyben76 Posted December 3, 2018 Share Posted December 3, 2018 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? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted December 3, 2018 Share Posted December 3, 2018 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)... 0 Quote Link to comment Share on other sites More sharing options...
cyben76 Posted December 6, 2018 Author Share Posted December 6, 2018 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.. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted December 7, 2018 Share Posted December 7, 2018 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. 0 Quote Link to comment Share on other sites More sharing options...
cyben76 Posted December 11, 2018 Author Share Posted December 11, 2018 On 12/8/2018 at 12:23 AM, brian! said: "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. Ok noted, guess I'll have to do like what you said earlier. Get the client ID and check if there is any orders, if no orders add a line in complete.tpl with custom message 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.