Page 1 of 1

Show/Edit Company name on customer-facing Edit Your Account Information Page?

Posted: Sat Jun 16, 2018 1:27 pm
by Sidecutter
Hi all, I am working with Opencart 1.5.6.4, and I am trying to get it to show and allow editing of the company name on the customer's Edit Your Account Information page, right below their first name (index.php?route=account/edit). I have gotten as far as getting it to display the field title and the field for the data to go in, but I cannot seem to figure out where that last piece is coming from to make it actually pull that data so it shows in the Company field and can be changed/saved with everything the name and contact info. Any help would be greatly appreciated!

Re: Show/Edit Company name on customer-facing Edit Your Account Information Page?

Posted: Sat Jun 16, 2018 7:36 pm
by IP_CAM
Well, the Company Name is an editable part of the Address 1 Section.
Ernie
---
Image

Re: Show/Edit Company name on customer-facing Edit Your Account Information Page?

Posted: Sat Jun 16, 2018 7:52 pm
by Sidecutter
It is, but that's the admin side, which has been successfully altered to work with what we're doing here. What you're showing there is not an issue.

As stated, we want to get it, editable, into the customer's side of things, under My Account - Edit Your Account Information (catalog/view/theme/default/template/account/edit.tpl).

The text box is there. The labeling is there. You can put something in it. The only part I cannot seem to determine is what is missing from the file - I believe catalog/model/account/customer.php to make it pull that piece of data out of the database when you open the page like it does for all the other account information found there, and then make it save that data back when you continue, like all the other data entered there. I've taken a look at the nearby address.php model to see if I could discern what it was pulling that the customer.php was not, but I wasn't able to, and I don't know if I am just looking in the wrong place or not sure what I'm looking for, or both.

IP_CAM wrote:
Sat Jun 16, 2018 7:36 pm
Well, the Company Name is an editable part of the Address 1 Section.
Ernie
---
Image

Re: Show/Edit Company name on customer-facing Edit Your Account Information Page?

Posted: Sat Jun 16, 2018 10:19 pm
by cyclops12
I assume you have the relevant code added into the relevant controller file/s ?

Re: Show/Edit Company name on customer-facing Edit Your Account Information Page?

Posted: Sun Jun 17, 2018 3:58 am
by IP_CAM
Well, the problem is, that the ADDRESS Section, where this Value exists by default,
also uses it's own database Table, and you probably have no routine in your
edit.tpl- related file(s) yet, to get + handle this value. (just guessing ... ;) )
Ernie
---
Image

Re: Show/Edit Company name on customer-facing Edit Your Account Information Page?

Posted: Sun Jun 17, 2018 6:22 am
by Sidecutter
Yes, and I need to know what exactly I need to add to the Edit files to bring that in so it will work. Hence me asking for some assistance with this last piece of getting it working.
IP_CAM wrote:
Sun Jun 17, 2018 3:58 am
Well, the problem is, that the ADDRESS Section, where this Value exists by default,
also uses it's own database Table, and you probably have no routine in your
edit.tpl- related file(s) yet, to get + handle this value. (just guessing ... ;) )
Ernie
---
Image

Re: Show/Edit Company name on customer-facing Edit Your Account Information Page?

Posted: Sun Jun 17, 2018 11:08 am
by IP_CAM
Well, to be real honest with you, I doubt, that someone will invest a good amount of
free time, just to make this rather unique 'Move' from one to the other File work.
Especially for a Version, wich is no longer of much interest for most Dev's already. :'(
And I would not be able to, since such surpasses my very limited DB-related knowledge.
So, if you receive no help, you might better place a request again in the commercial
Forum Section, if you need this done in any case...
Good Luck!
Ernie

Re: Show/Edit Company name on customer-facing Edit Your Account Information Page?

Posted: Sun Jun 17, 2018 6:00 pm
by Sidecutter
No unfortunately that part is a bit above my level it seems.
cyclops12 wrote:
Sat Jun 16, 2018 10:19 pm
I assume you have the relevant code added into the relevant controller file/s ?

Re: Show/Edit Company name on customer-facing Edit Your Account Information Page?

Posted: Sun Jun 17, 2018 6:01 pm
by Sidecutter
I mean..if someone wants to pitch a quote, sure. I kind of assumed that would happen if what I am asking is more than I am thinking it is, but it's a bit above my level of skill so. I never said the help would necessarily be free.
IP_CAM wrote:
Sun Jun 17, 2018 11:08 am
Well, to be real honest with you, I doubt, that someone will invest a good amount of
free time, just to make this rather unique 'Move' from one to the other File work.
Especially for a Version, wich is no longer of much interest for most Dev's already. :'(
And I would not be able to, since such surpasses my very limited DB-related knowledge.
So, if you receive no help, you might better place a request again in the commercial
Forum Section, if you need this done in any case...
Good Luck!
Ernie

Re: Show/Edit Company name on customer-facing Edit Your Account Information Page?

Posted: Mon Jun 18, 2018 12:20 am
by cyclops12
This may give you some clues as to coding required

Re: Show/Edit Company name on customer-facing Edit Your Account Information Page?

Posted: Mon Jun 18, 2018 7:40 am
by Sidecutter
Thank you, that's definitely in the right direction, but ideally we want to interface with the existing Company database entries and not a new one, just on a different page. I'll see if this will tell me enough to do that.
cyclops12 wrote:
Mon Jun 18, 2018 12:20 am
This may give you some clues as to coding required