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
Who is online

Users browsing this forum: mcfc4heatons, Stinger23 and 259 guests