Post by CJC » Thu Sep 23, 2021 9:17 am

straightlight wrote:
Thu Sep 23, 2021 9:03 am
Contact your host so that their support staff can do it for you.
If it is enabled, then it would have been enabled for a reason and it’s probably not a good idea to disable it. Why would that have anything to do with the problem? No one else mentioned that they had to do that.

CJC
Active Member

Posts

Joined
Wed Jun 03, 2020 5:51 am

Post by straightlight » Thu Sep 23, 2021 9:34 am

CJC wrote:
Thu Sep 23, 2021 9:17 am
straightlight wrote:
Thu Sep 23, 2021 9:03 am
Contact your host so that their support staff can do it for you.
If it is enabled, then it would have been enabled for a reason and it’s probably not a good idea to disable it. Why would that have anything to do with the problem? No one else mentioned that they had to do that.
Because disabling MOD security is a requirement starting from installation.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by CJC » Thu Sep 23, 2021 9:51 am

straightlight wrote:
Thu Sep 23, 2021 9:34 am
Because disabling MOD security is a requirement starting from installation.
Ok - 2 followups:
1. I don't see any mention of MOD Security in the system requirements section of the OC Documentation.
2. I misunderstood the original post for the modifications. I assumed that the code shown in the post was an example of what he had changed in the 3 files in the attachment. However, this is not the case. The code is for a 4th file that also needs to be modified. Once I modified the 4th file the address information entered at registration is now saved in the customer record.

CJC
Active Member

Posts

Joined
Wed Jun 03, 2020 5:51 am

Post by straightlight » Thu Sep 23, 2021 9:55 am

CJC wrote:
Thu Sep 23, 2021 9:51 am
straightlight wrote:
Thu Sep 23, 2021 9:34 am
Because disabling MOD security is a requirement starting from installation.
Ok - 2 followups:
1. I don't see any mention of MOD Security in the system requirements section of the OC Documentation.
2. I misunderstood the original post for the modifications. I assumed that the code shown in the post was an example of what he had changed in the 3 files in the attachment. However, this is not the case. The code is for a 4th file that also needs to be modified. Once I modified the 4th file the address information entered at registration is now saved in the customer record.
Then, the issue you were experiencing was with an installed extension.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by CJC » Thu Sep 23, 2021 8:16 pm

straightlight wrote:
Thu Sep 23, 2021 9:55 am
Then, the issue you were experiencing was with an installed extension.
No, that's not what I said at all. I said that I didn't completely follow the instructions from xxvirusxx. There were 4 files to modify in his solution and I only modified 3. Had nothing to do with any other extension.

Also, you didn't answer the question about where it is stated that MOD Security needs to be disabled for OC.

CJC
Active Member

Posts

Joined
Wed Jun 03, 2020 5:51 am

Post by straightlight » Thu Sep 23, 2021 8:46 pm

CJC wrote:
Thu Sep 23, 2021 8:16 pm
straightlight wrote:
Thu Sep 23, 2021 9:55 am
Then, the issue you were experiencing was with an installed extension.
No, that's not what I said at all. I said that I didn't completely follow the instructions from xxvirusxx. There were 4 files to modify in his solution and I only modified 3. Had nothing to do with any other extension.

Also, you didn't answer the question about where it is stated that MOD Security needs to be disabled for OC.
File modifications are still about extensions. As for MOD security, it's server-specifics.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by CJC » Thu Feb 03, 2022 10:19 pm

Has this been added to 3.0.3.8? I don't see any mention of it in the changelog, but it does seem to be there by default.

CJC
Active Member

Posts

Joined
Wed Jun 03, 2020 5:51 am

Post by xxvirusxx » Thu Feb 03, 2022 11:07 pm

CJC wrote:
Thu Feb 03, 2022 10:19 pm
Has this been added to 3.0.3.8?
No and will not be.

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by arthena1000 » Thu Jan 04, 2024 9:10 pm

Many thanks for this thread. Have been trying to work out how to do this for a long time. ;D

Newbie

Posts

Joined
Mon Sep 15, 2014 3:42 am

Post by wesswfl » Thu Feb 01, 2024 11:45 pm

xxvirusxx wrote:
Fri May 29, 2020 11:53 pm
tingwing wrote:
Wed May 02, 2018 12:38 pm
hi
for opencart3,is it possible to make "address" require when register?

Thanks
Make backup of register file from controller, language, template and upload files from attachment.
Or use an text editor to compare with yours and make changes.
You can search by: Start Address to see where I put the code.

LE. In catalog/model/account/customer.php add this line:

Code: Select all

$this->db->query("INSERT INTO " . DB_PREFIX . "address SET customer_id = '" . (int)$customer_id . "', firstname = '" . $this->db->escape($data['firstname']) . "', lastname = '" . $this->db->escape($data['lastname']) . "', company = '" . $this->db->escape($data['company']) . "', address_1 = '" . $this->db->escape($data['address_1']) . "', address_2 = '" . $this->db->escape($data['address_2']) . "', city = '" . $this->db->escape($data['city']) . "', postcode = '" . $this->db->escape($data['postcode']) . "', country_id = '" . (int)$data['country_id'] . "', zone_id = '" . (int)$data['zone_id'] . "', custom_field = '" . $this->db->escape(isset($data['custom_field']['address']) ? json_encode($data['custom_field']['address']) : '') . "'");
After:

Code: Select all

$customer_id = $this->db->getLastId();
Or you can make ocmod extension :)

Thank you so much for the contribution! I just started writing one and I stumbled access your much cleaner version!!

Newbie

Posts

Joined
Fri Oct 28, 2022 2:33 am

Post by henkbart » Thu May 02, 2024 7:53 pm

I have the same problem.
No address is stored in the users address database.
And MOD security is OFF.
So can you help me with this??

Henk

Newbie

Posts

Joined
Sun May 12, 2013 11:35 pm

Post by straightlight » Fri May 03, 2024 6:14 am

henkbart wrote:
Thu May 02, 2024 7:53 pm
I have the same problem.
No address is stored in the users address database.
And MOD security is OFF.
So can you help me with this??

Henk
More information is needed here.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by henkbart » Fri May 03, 2024 7:37 am

Hello.
I have Opencart 3.0.3.8
I have uploaded the 3 files from the ZIP and also added the given add to the /catalog/model/account/customer.php
But when i add a new user, i got all the entries. But when saving them, nothing is added to the address database.
I did not fount errors.
But the address is not added.....
The only thing is, that i have an email verification for new users. Perhaps that has to do something with this???
This is added for the email verification....

<file path="catalog/controller/account/register.php">
<operation>
<search><![CDATA[unset($this->session->data['guest']);]]></search>
<add position="after"><![CDATA[
$emailverification = $this->config->get('emailverification');
if (!empty($this->request->post['email'])) {
if(isset($emailverification['Enabled']) && $emailverification['Enabled'] == 1){
if (defined('JOURNAL3_ACTIVE')) {
if (\Journal3\Utils\Request::isAjax()) {
$this->session->data['ev_register'] = 'notVerified';
echo json_encode(array('status' => 'success'), true);
exit;
}
}
}
}
]]></add>
</operation>
</file>


Henk

Newbie

Posts

Joined
Sun May 12, 2013 11:35 pm

Post by straightlight » Fri May 03, 2024 9:30 pm

Since you are conditioning with Journal, this Framework is not supported on the forum. You'd have to contact Journal support.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by henkbart » Sat May 04, 2024 12:51 am

Hello,
I don't use Journal. Only the Opencart Default.
Henk

Newbie

Posts

Joined
Sun May 12, 2013 11:35 pm

Post by straightlight » Sat May 04, 2024 1:53 am

henkbart wrote:
Sat May 04, 2024 12:51 am
Hello,
I don't use Journal. Only the Opencart Default.
Henk
straightlight wrote:
Fri May 03, 2024 9:30 pm
henkbart wrote:
Fri May 03, 2024 7:37 am
Hello.
I have Opencart 3.0.3.8
I have uploaded the 3 files from the ZIP and also added the given add to the /catalog/model/account/customer.php
But when i add a new user, i got all the entries. But when saving them, nothing is added to the address database.
I did not fount errors.
But the address is not added.....
The only thing is, that i have an email verification for new users. Perhaps that has to do something with this???
This is added for the email verification....

<file path="catalog/controller/account/register.php">
<operation>
<search><![CDATA[unset($this->session->data['guest']);]]></search>
<add position="after"><![CDATA[
$emailverification = $this->config->get('emailverification');
if (!empty($this->request->post['email'])) {
if(isset($emailverification['Enabled']) && $emailverification['Enabled'] == 1){
if (defined('JOURNAL3_ACTIVE')) {
if (\Journal3\Utils\Request::isAjax()) {
$this->session->data['ev_register'] = 'notVerified';
echo json_encode(array('status' => 'success'), true);
exit;
}
}
}
}
]]></add>
</operation>
</file>


Henk
Since you are conditioning with Journal, this Framework is not supported on the forum. You'd have to contact Journal support.
If you haven't made these modifications, you can either contact the extension developer or create a new service request in the Commercial Support section of the forum to get this solved as a custom job.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON
Who is online

Users browsing this forum: No registered users and 20 guests