Redirect page after purchase

  • Posts: 44
  • Thank you received: 0
13 years 2 weeks ago #34687

I am selling custom jerseys and I need some information from my customers after they purchase the jerseys. So, I want HikaShop to redirect the customer to a form that I built after they submit their purchase. How do I go about creating a redirect page? I know some html so I could create the redirect page, but I am just wondering how do I go about connecting it all?

Thanks!

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

  • Posts: 83103
  • Thank you received: 13415
  • MODERATOR
13 years 1 week ago #34744

You could try to editing the after_end view file via the menu Display->Views. There, you will have access to the $this->order which contains all the order information and you will be able to do your redirect.

Alternatively, you could just create custom fields of the table "order" (Business edition only) and they would be displayed on the checkout and the values entered by the user would be attached automatically to the order (and the emails). It's way easier to do.

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

  • Posts: 44
  • Thank you received: 0
13 years 1 week ago #35077

Ok I understand, but I'm not good at writing php code. So if I want the url to redirect to: myurl.com/index.php?option=com_breezingf...&view=form&Itemid=84

How do I go about writing to code to actually perform that?

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

  • Posts: 83103
  • Thank you received: 13415
  • MODERATOR
13 years 1 week ago #35112

Redirecting can be done like that:

$app=& JFactory::getApplication();
$app->redirect(' myurl.com/index.php?option=com_breezingf...&view=form&Itemid=84 ');

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

  • Posts: 44
  • Thank you received: 0
13 years 1 week ago #35139

Thank you very much, I will test it out and let you know if it works

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

  • Posts: 44
  • Thank you received: 0
12 years 11 months ago #38626

After testing out the payment method to see if it redirects I discovered that it doesn't. All I really need is for a page on my site that contains a form to open up after the customer makes a purchase. I would use the extra fields at in the business version but the form is much more complex than that. Is there any way I can add code to the site to make it open a new window that loads that page when the user clicks the "Next" button at the end of the checkout process?

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

  • Posts: 44
  • Thank you received: 0
12 years 11 months ago #38627

Also, how do I edit the automatic email that gets sent when a customer makes an order? I want to include a reminder that tells them to fill out the form.

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

  • Posts: 83103
  • Thank you received: 13415
  • MODERATOR
12 years 11 months ago #38760

Redirecting to the page where you have the form with the code posted before sounds to be the best solution to what you're asking.

Please make sure that you're editing the correct view file of your front end template and that your payment plugin doesn't have a return URL configured. Otherwise, you wouldn't get that page displayed.

Emails can be edited via the menu System>Emails in the Business edition.

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

  • Posts: 44
  • Thank you received: 0
12 years 11 months ago #38769

Here is a screenshot of my redirect page.

Attachments:

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

  • Posts: 83103
  • Thank you received: 13415
  • MODERATOR
12 years 11 months ago #38923

The modification is correct. But make sure that you're doing it for the correct template. You should have once instance of that view file for each template on your website. If you have several templates, you might not be editing the view file for the template you're actually using.

Also, for some payment plugins, it's the file "end" of the view "checkout" which should be edited instead of the "after_end" file (when the payment happens on your website or when you're using offline payment plugins like the bank transfer).

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

Time to create page: 0.080 seconds
Powered by Kunena Forum