Post by jesseg » Thu Jun 18, 2015 2:48 am

Is it possible to customize the fields in the admin dashboard of the Orders page through the dashboard settings?
I want to add a field called 'Recipient's Phone' below the 'Telephone' field in the OpenCart Orders page.

I've attached an image to better display what I want to do.

If it's not possible through the admin settings/dashboard, then what files would I need to go into to make it happen?

Thank you.

Attachments

opencart.png

Admin dashboard for the Orders page. - opencart.png (29.92 KiB) Viewed 3719 times


Newbie

Posts

Joined
Wed Nov 26, 2014 5:50 am

Post by IP_CAM » Fri Jun 19, 2015 12:47 am

That would be easy, I just did it, to show you. Just USE/rename another unused FORM Field, like the FAX-Number, the image gives you details on it. Change/Rename all instances of text_fax and entry_fax in the translation files of your language(s) used. ;)
Good Luck
Ernie
PS. Something like this could be reworked easy to do the same by VqMod.
So, I just created one, at least, on one of my Test Sites, it seems to work :D
http://www.opencart.com/index.php?route ... n_id=22666

Sample:
http://www.ipc.li/cart/account/register

My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by jesseg » Tue Jun 23, 2015 11:52 pm

Thanks, IP_CAM. That got me closer to where I need to be with the mods.

Unfortunately, for some reason, the admin page still won't display anything I create, BUT it does show edits to the existing fields. Which is odd that it won't display new content.

I worked on: cart/admin/language/english/sale/order.php

I'll keep working at it and thank you again.

Newbie

Posts

Joined
Wed Nov 26, 2014 5:50 am

Post by IP_CAM » Wed Jun 24, 2015 1:54 am

Sorry, I was, or came, a little off track... ::), and forgot to 'complete' the explanation...

It's the order_info.tpl, you have to check, to find the Section.
It would display, if the DB would contain a VALUE, in the (former FAX-) Field! But it only display's it,
if a 'value' exists, by default.
I manually added some content as well, to display something, as you can see, and removed
the (PHP execute ... IF ($fax) Content EXIST..., or then, ignore this Table Row <tr>...</tr> Section) Routine,
to make this Field visible, regardless of, if a $fax DB Field Value/Content exists, or not.

Ernie
hitline.info/shop/

here is a similar theme to such things, btw:
http://forum.opencart.com/viewtopic.php ... 32#p567232
Just found some links, I saved some time ago, on such things:
http://nikolaloncar.com/how-to-add-cust ... min-panel/
http://karlmac.com/2011/07/how-to-add-c ... ncart-1-5/
Last edited by IP_CAM on Wed Jun 24, 2015 4:40 am, edited 1 time in total.

My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by IP_CAM » Wed Jun 24, 2015 4:33 am

Proof of concept, FAX Number Field works with alphanumeric Content.
To conclude this! ;)
Ernie

My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by jesseg » Thu Jul 02, 2015 6:35 am

I was able to make the Admin side of OpenCart function. It pulls the data from the database and displays it in the Order Pages of the Sales Section.

Now, the only issue is writing to the database. Somehow, somewhere, I'm losing the front-end form value and not inserting to the database.

I've added the fieldnames to the MODEL section: /cart/catalog/controller/sale/order.php

To explain the process of the order form: There are 6 steps to order. The new field values are in the shipping section (Step 2) called: Recipients Phone and Recipients Email respectively.

I've done a variable dump on the confirmation page of the front side...and I'm not seeing the field values I want.

So, more obvious than not, this is why the values are not being inserted into the database. But I've gone over the MODEL, LANGUAGE, CONTROLLER, VIEW files of the CATALOG directory. I'm wondering if there's some other directory or file I'm missing.

Newbie

Posts

Joined
Wed Nov 26, 2014 5:50 am
Who is online

Users browsing this forum: No registered users and 4 guests