Post by saregas » Mon May 07, 2018 7:14 pm

Hello,
I am trying to create a custom registration script that will register a user which will enter only Name, Email and password. The script will be executed from a custom directory inside the opencart directory. I want to directly place the information captured by the script to the opencart database. Is there any information what information and to which opencart tables do we have to submit as I could not find any info in the opencart documentation.

Newbie

Posts

Joined
Fri Apr 27, 2018 3:02 pm

Post by webcorvo » Mon May 07, 2018 8:05 pm

Hi,
look the code on the :
catalog/controller/account/register.php
admin/controller/customer/customer.php

this will help you ;)

Opencart Developer - For custom work and support contact @ webcorvo@gmail.com


User avatar
Active Member

Posts

Joined
Mon Mar 20, 2017 11:42 pm
Location - Lisbon, Portugal

Post by saregas » Mon May 07, 2018 11:21 pm

We have manage to create a PHP script that will register a user. However, the database requires to enter information for most columns. What is the address_id used for and what info should we set for this?

Also what is the salt in the customers table used for? Would it cause any issues if we enter a random generated string as salt?

Newbie

Posts

Joined
Fri Apr 27, 2018 3:02 pm

Post by webcorvo » Mon May 07, 2018 11:42 pm

address_id is the foreign key of the table address

salt is a randomly-generated string.

Opencart Developer - For custom work and support contact @ webcorvo@gmail.com


User avatar
Active Member

Posts

Joined
Mon Mar 20, 2017 11:42 pm
Location - Lisbon, Portugal

Post by saregas » Mon May 07, 2018 11:49 pm

webcorvo wrote:
Mon May 07, 2018 11:42 pm
address_id is the foreign key of the table address
So is it important what data will be set for the address_id and if we leave it empty or give it a default value (for example 1) is it changeable from the customer control panel?

Newbie

Posts

Joined
Fri Apr 27, 2018 3:02 pm

Post by webcorvo » Mon May 07, 2018 11:58 pm

If you want to change the address, etc on the CP you must add data to the table.
Open phpMyAdmin to see the structure of the table ;)

Opencart Developer - For custom work and support contact @ webcorvo@gmail.com


User avatar
Active Member

Posts

Joined
Mon Mar 20, 2017 11:42 pm
Location - Lisbon, Portugal

Post by saregas » Tue May 08, 2018 2:18 pm

Is there information on which tables should be updated as I cannot seem to find this information in the register.php and customer.php. Is this info available anywhere on the documentation? Currently when a user is registered through the script it is not seen in the admin panel most likely because we are missing to update something in the database.

Newbie

Posts

Joined
Fri Apr 27, 2018 3:02 pm

Post by webcorvo » Tue May 08, 2018 2:41 pm

Take a look on the admin/model/customer/customer.php

This will help you

Opencart Developer - For custom work and support contact @ webcorvo@gmail.com


User avatar
Active Member

Posts

Joined
Mon Mar 20, 2017 11:42 pm
Location - Lisbon, Portugal
Who is online

Users browsing this forum: FazalFariz and 112 guests