Post by abhijitg » Fri Nov 21, 2008 5:19 am

Hi,
I am customising payment module.
When i am passing information using opencart ... application is generating   

because of some security feature when i am passing my attributes as input type = hidden they are not getting trasmitted when I removed enctype="multipart/form-data" from tag it is working properly.

Can you please tell me reason behind this?

And how can I remove enctype="multipart/form-data" from form tag. How is this code being generated?

Newbie

Posts

Joined
Tue Nov 18, 2008 5:32 am

Post by Qphoria » Fri Nov 21, 2008 6:29 am

If you are using 0.7.9 RC3 you can utilize the session override variable

In your payment module under the getActionURL() function, add this at the top:

Code: Select all

$this->session->set('payment_form_enctype', 'text/plain');

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by abhijitg » Wed Nov 26, 2008 12:01 am

I modified the checkout_confirm.tpl page.

and it worked fine.
Thanks

Newbie

Posts

Joined
Tue Nov 18, 2008 5:32 am

Post by Qphoria » Wed Nov 26, 2008 1:12 am

The point of having the override is so you don't have to modify core files. When we release a new version you will need to make those changes again. Also if you wanted to release this as a contrib for others you might break some files. You should always try to keep custom code within its own files to make them completely modular when possible

Instead you should really do as I explain
Last edited by Qphoria on Wed Nov 26, 2008 3:38 am, edited 1 time in total.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by abhijitg » Wed Nov 26, 2008 3:14 am

ohh ya ......

I really forgot this point.
Thanks for your reply.....

Newbie

Posts

Joined
Tue Nov 18, 2008 5:32 am
Who is online

Users browsing this forum: No registered users and 5 guests