V3.0.4: Submit Form To An External Site From The Admin Panel


I have Cs-Cart Professional 3.0.4 with an admin panel template modification “payment_info.override.tpl”. This will show some additional information on the selected order detail page, in the payment info section, which is working nicely. In that section I am also trying to submit a form to a new browser tab (form attribute target=“_blank” does not work here for some reason) to an external webpage to gather some additional information about the payment. However, clicking the submit button just opens a blank admin panel page with the admin panel base url. Only to “home icon” is visible. See the attached screenshot for more.

The problem is somewhere here:

How should I implement the submit button if the type=“submit” does not work here?

Thanks in advance.




Not clear what you're trying to do with a separate tab. If all you want to do is collect the info and send it somewhere, just add the elements in their own container like name=“my_stuff[merchant_id]” and then use an orders.pre.php controller in my_changes to capture the $_REQUEST['my_stuff'] and send it where ever you want.

Yes, that is exactly what I want. I dont fully understand all the controllers and templates yet and how they work together, so I totally forgot that the .tpl does not actually send the data I have in the form. The controller is needed for that…right. Hmm…but should it be post controller rather than pre controller?

Thanks for the tip, much appreciated! I will give it a “trial and error” type of approach. :)

In most controllers that deal with POST data, the controller redirects to itself after it completes (I.e. before the post controller operation). So I always use a 'pre' when dealing with POSTed data I want to capture or work with that is not handled by other PHP hooks.