Post by gnucho » Mon Feb 10, 2014 8:33 am

Hi,

I have created a new text field under Delivery Method (cataloge/checkout/shipping_method.tpl) on checkout where customers can fill in their mobile number.

how can I get the value from that field to be inserted into my database (order->mobile)?

I have tried two nights in a row now, I really need help with this ??? So far I think i have to modyfi something in a controller file and mabye a model file.

I hope someone out there has an answer :joker:

Newbie

Posts

Joined
Mon Feb 10, 2014 7:46 am

Post by MarketInSG » Tue Feb 11, 2014 3:09 pm

most of the data from all the steps for checkout reaches the confirm.php file, and it calls the addOrder function in catalog/model/checkout/order.php


User avatar
Guru Member

Posts

Joined
Wed Nov 16, 2011 11:53 am
Location - Singapore

Post by gnucho » Tue Feb 11, 2014 7:37 pm

Okay, thanks for the info will check it out :)

Newbie

Posts

Joined
Mon Feb 10, 2014 7:46 am

Post by gnucho » Sat Feb 15, 2014 6:14 am

MarketInSG wrote:most of the data from all the steps for checkout reaches the confirm.php file, and it calls the addOrder function in catalog/model/checkout/order.php
Damn didn't get it to work. I have more info how my setup is.

I have removed the "fax" field in guest checkout and added it on shipping method with the new name "mobile" ($mobile).

I also changed the fax to mobile in database. In the addOrder I changed fax to mobile so add addOrder will insert mobile variable into mySQL.

It must be something in the shipping_method.php under controller? I have also changed the fax to mobile in confirm.php.

Please let me know if you need any more information. Really want this to work :)

Thanks for helping me out!

Newbie

Posts

Joined
Mon Feb 10, 2014 7:46 am

Post by MarketInSG » Sun Mar 02, 2014 9:28 am

I don't see a need in changing the variables names in the files. If you would like, you can consider just to rename the fax field to be named a mobile field. Changing the language file would do the trick instead


User avatar
Guru Member

Posts

Joined
Wed Nov 16, 2011 11:53 am
Location - Singapore

Post by gnucho » Sun Mar 02, 2014 9:39 am

Would it be hard to move the text field (fax) down under Delivery Method instead of Account & Billing Details?

Newbie

Posts

Joined
Mon Feb 10, 2014 7:46 am

Post by MarketInSG » Sun Mar 02, 2014 11:14 am

yes, you will need more skills to do that. Would recommend you to hire someone to work on that if you aren't proficient in OpenCart.


User avatar
Guru Member

Posts

Joined
Wed Nov 16, 2011 11:53 am
Location - Singapore
Who is online

Users browsing this forum: No registered users and 1 guest