Message after step3

  • Posts: 187
  • Thank you received: 10
10 years 10 months ago #164409

We need to show a message after people paid for their product.
Step 3 of the wizard ends with a "thank you message" which we could expand a bit but it would be nice to go to a full article.
Somewhere in the forum I found the code to add a redirect to the "after_end" file, which I tried:


$app=& JFactory::getApplication();
$app->redirect('http://domain/winkel-bedankt');

But after the purchase I keep seeing this standard "thank you page". Does it need a specific setting in the config?
(Of course I am using an alias/dummy link to stay flexible)

Secondly could this message or better the redirect be made depending on the product (or category)?

if( this category)
{do this}
elseif(etc etc)

Any hint how to achieve this?

Bastiaan

Last edit: 10 years 10 months ago by zebrafilm.

Please Log in or Create an account to join the conversation.

  • Posts: 83930
  • Thank you received: 13586
  • MODERATOR
10 years 10 months ago #164441

Hi,

If you don't enter any "return URL" in your payment method, you'll indeed go to the after_end view file for most payment methods.
So if you entered a return URL the after_end view file won't be called. That could be why you don't get your redirect to work.

You can always have more complex code with conditions, but it will be quite complex since you can have several products in the same order, and several categories per product, and that the data of the order/products/categories is not loaded (so you first need to load all that with MySQL queries).

Please Log in or Create an account to join the conversation.

Time to create page: 0.068 seconds
Powered by Kunena Forum