Post by piyushvisaria » Wed Mar 16, 2022 3:52 pm

Hi,
I have added custom fields like date, text and upload under affiliate section. I can see these fields under the affiliate registration form. After the user has registered as affiliate, under the admin - customer, i do not see the data filled by the user. although i can see the fields but they are empty.

Thankyou for your support.

New member

Posts

Joined
Thu Mar 03, 2022 8:04 pm

Post by straightlight » Wed Mar 16, 2022 7:53 pm

OC version.

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 piyushvisaria » Wed Mar 16, 2022 9:59 pm

OC version 3.0.3.7

New member

Posts

Joined
Thu Mar 03, 2022 8:04 pm

Post by straightlight » Wed Mar 16, 2022 10:05 pm

See this fix that is related to the orders: https://github.com/opencart/opencart/pu ... 83eac4e356 . Perhaps the same fix can be applied with the customer controllers, AFAIK, when loading the custom fields (and if there aren't any commits already reported about it already).

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 piyushvisaria » Thu Mar 17, 2022 12:46 pm

actually, i tried lot of different options but nothing seems to be working. Can you please help me like on which files [path] should i apply these changes...

Thank you for the reply.

New member

Posts

Joined
Thu Mar 03, 2022 8:04 pm

Post by piyushvisaria » Thu Mar 17, 2022 8:03 pm

I modified the files, as per the code given above, but i get validation errors. screenshot attached...

Attachments

Screenshot 2022-03-17 at 5.32.35 PM.png

Screenshot 2022-03-17 at 5.32.35 PM.png (203.52 KiB) Viewed 1446 times


New member

Posts

Joined
Thu Mar 03, 2022 8:04 pm

Post by straightlight » Thu Mar 17, 2022 8:59 pm

Which PHP version?

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 piyushvisaria » Fri Mar 18, 2022 12:14 am

I have tried on both 7.4.12 and 8

New member

Posts

Joined
Thu Mar 03, 2022 8:04 pm

Post by straightlight » Fri Mar 18, 2022 3:19 am

piyushvisaria wrote:
Fri Mar 18, 2022 12:14 am
I have tried on both 7.4.12 and 8
Please provide your recent Server Error Logs about this page.

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 piyushvisaria » Fri Mar 18, 2022 3:06 pm

There are no server logs as i am working on local system.. also i noticed one more thing. first the data does not get reflected in the admin and also if i reenter the data in the custom fields from admin and save it.. the data doesnot get stored. so either from front end or from admin panel - the custom fields under the affiliate does not get stored.. I also tried with the fresh install.. the problem still persists ..

New member

Posts

Joined
Thu Mar 03, 2022 8:04 pm

User avatar
Expert Member

Posts

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

Post by piyushvisaria » Fri Mar 18, 2022 9:07 pm

I believe from the front end once the customer fills the data in the custom field under affiliate, there is no database entry. I checked the database [custom field] its seems to be empty...

New member

Posts

Joined
Thu Mar 03, 2022 8:04 pm

Post by straightlight » Fri Mar 18, 2022 10:50 pm

In admin/controller/customer/affiliate.php file,

in the validateForm() method, find:

Code: Select all

if ((utf8_strlen($this->request->post['firstname']) < 1) || (utf8_strlen(trim($this->request->post['firstname'])) > 32)) {
add above:

Code: Select all

echo "<pre />\n";
print_r($this->request->post);
exit;
Then, try again on the page to edit your information. Once the form gets submitted, you should notice an array in the next page. Please post the results afterwards.

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 piyushvisaria » Fri Mar 18, 2022 11:14 pm

Hi,
i do not see affiliate.php file under admin/controller/customer

Screen shot attached.

Attachments

Screenshot 2022-03-18 at 8.44.21 PM.png

Screenshot 2022-03-18 at 8.44.21 PM.png (252.46 KiB) Viewed 1273 times


New member

Posts

Joined
Thu Mar 03, 2022 8:04 pm

Post by piyushvisaria » Fri Mar 18, 2022 11:25 pm

I got the array. actually affiliate file is no there, its customer.php.

I can see the information in the array, but thats after i have edited the customer details under the admin section. When users first registers as affiliate and enters the data. under admin -- >the data for default fields is there but the for custom fields its missing.


heres the array.
Array
(
[customer_group_id] => 1
[firstname] => ppppppp
[lastname] => ppppppp
[email] => admin@12dfdf.com
[telephone] => 122323
[password] =>
[confirm] =>
[newsletter] => 0
[status] => 1
[safe] => 0
[seller] => 1
[company] => 121212
[custom_field] => Array
(
[2] => 1
[1] => 2121-02-01
[3] =>
[4] =>
[5] =>
[6] => dsdsd
)

[website] => dsf
[tracking] => L5Mou70xifA6TqdbjbfSSfXQKujORNMHgqhkEidj3S9qeAWhkY4mMKqQMRwgRZI9
[commission] => 5.00
[tax] => dsfdfs
[payment] => cheque
[cheque] => dsfdsf
[paypal] =>
[bank_name] =>
[bank_branch_number] =>
[bank_swift_code] =>
[bank_account_name] =>
[bank_account_number] =>
[affiliate] => 1
[comment] =>
[description] =>
[amount] =>
[points] =>
[kbmp_default_commission] =>
[kbmp_default_commission_global] => 1
[kbmp_new_product_approval_required] => 0
[kbmp_new_product_approval_required_global] => 1
[kbmp_enable_seller_review] => 0
[kbmp_enable_seller_review_global] => 1
[kbmp_seller_review_approval_required] => 0
[kbmp_seller_review_approval_required_global] => 1
[kbmp_email_on_new_order] => 0
[kbmp_email_on_new_order_global] => 1
[category] =>
)

New member

Posts

Joined
Thu Mar 03, 2022 8:04 pm

Post by straightlight » Sat Mar 19, 2022 12:17 am

Extensions involved.

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 piyushvisaria » Sat Mar 19, 2022 1:47 pm

Sir, Without the extensions also i am facing issue. I did the fresh install of 3.8, the problem still persists... and the issue is only under affiliate. custom fields are working fine with account, registration..

New member

Posts

Joined
Thu Mar 03, 2022 8:04 pm

Post by piyushvisaria » Sat Mar 19, 2022 1:54 pm

Heres the screen shot... the custom fields under affiliate are not showing any data - -- admin - customer ---affiliate. opencart 3.8

Attachments

Screenshot 2022-03-19 at 11.23.29 AM.png

Screenshot 2022-03-19 at 11.23.29 AM.png (218.92 KiB) Viewed 1214 times


New member

Posts

Joined
Thu Mar 03, 2022 8:04 pm

Post by xxvirusxx » Sat Mar 19, 2022 3:53 pm

piyushvisaria wrote:
Sat Mar 19, 2022 1:54 pm
admin - customer ---affiliate. opencart 3.8
You have changed in to this??
https://github.com/opencart/opencart/co ... 6e9fe0acb4

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 piyushvisaria » Sat Mar 19, 2022 4:33 pm

Its not working...

New member

Posts

Joined
Thu Mar 03, 2022 8:04 pm
Who is online

Users browsing this forum: No registered users and 32 guests