Post by RicardoMoutinho » Sat May 07, 2022 6:33 am

MOD: Admin MPN

FILE: admin/view/template/catalog/product_list.twig
CODE: <div class="form-group col-md-6">
NOT FOUND - OPERATIONS ABORTED!

FILE: admin/controller/catalog/product.php
CODE: 'model' => $result['model'],
LINE: 365
LINE: 1315
CODE: get['filter_model'], ENT_QUOTES, 'UTF-8'));
LINE: 36
LINE: 91
LINE: 148
LINE: 205
LINE: 297
LINE: 421
LINE: 463
LINE: 555
CODE: protected function getList() {
LINE: 243
CODE: 'filter_model' => $filter_model,
LINE: 346

FILE: admin/language/en-gb/catalog/product.php
CODE: $_['column_model'] = 'Model';
LINE: 23

FILE: admin/model/catalog/product.php
CODE: if (!empty($data['filter_price'])) {
LINE: 375

Active Member

Posts

Joined
Sat Aug 04, 2018 4:36 am

Post by mikeinterserv » Sat May 07, 2022 6:37 am

I forgot the classes are added.
This should work with form group as before I don't know why its not finding that, its a simple line.
Wait one minute while I check the original files for 3.0.2.0

Active Member

Posts

Joined
Thu May 28, 2020 6:55 am
Location - Wales

Post by RicardoMoutinho » Sat May 07, 2022 6:44 am

mikeinterserv wrote:
Sat May 07, 2022 6:37 am
I forgot the classes are added.
This should work with form group as before I don't know why its not finding that, its a simple line.
Wait one minute while I check the original files for 3.0.2.0
Check both files, they work perfect, but its for sku, not mpn....and its 2 files, not 1

Maybe it will help

Attachments


Active Member

Posts

Joined
Sat Aug 04, 2018 4:36 am

Post by RicardoMoutinho » Sat May 07, 2022 6:44 am

mikeinterserv wrote:
Sat May 07, 2022 6:37 am
I forgot the classes are added.
This should work with form group as before I don't know why its not finding that, its a simple line.
Wait one minute while I check the original files for 3.0.2.0
Check both files, they work perfect, but its for sku, not mpn....and its 2 files, not 1

Maybe it will help

Active Member

Posts

Joined
Sat Aug 04, 2018 4:36 am

Post by mikeinterserv » Sat May 07, 2022 6:44 am

Well lets have another go.
I can only think you have the column in the class.
Try again

Active Member

Posts

Joined
Thu May 28, 2020 6:55 am
Location - Wales

Post by RicardoMoutinho » Sat May 07, 2022 6:48 am

This time, it has installed, and added the MPN fields to columns and filter....

When using filter, after click the filter button, it throws a 500 error.....

MOD: Admin MPN

FILE: admin/view/template/catalog/product_list.twig
CODE: <div class="form-group col-md-6">
LINE: 55
CODE: <td class="text-left">{% if sort == 'p.status' %}
LINE: 156
CODE: <span class="label label-success">{{ product.quantity }}</span> {% endif %}</td>
LINE: 179
CODE: var filter_price =
LINE: 224

FILE: admin/controller/catalog/product.php
CODE: 'model' => $result['model'],
LINE: 365
LINE: 1315
CODE: get['filter_model'], ENT_QUOTES, 'UTF-8'));
LINE: 36
LINE: 91
LINE: 148
LINE: 205
LINE: 297
LINE: 421
LINE: 463
LINE: 555
CODE: protected function getList() {
LINE: 243
CODE: 'filter_model' => $filter_model,
LINE: 346

FILE: admin/language/en-gb/catalog/product.php
CODE: $_['column_model'] = 'Model';
LINE: 23

FILE: admin/model/catalog/product.php
CODE: if (!empty($data['filter_price'])) {
LINE: 375
----------------------------------------------------------------

Active Member

Posts

Joined
Sat Aug 04, 2018 4:36 am

Post by mikeinterserv » Sat May 07, 2022 6:53 am

can you get the 500 error from the server log ? Not oc log

Active Member

Posts

Joined
Thu May 28, 2020 6:55 am
Location - Wales

Post by RicardoMoutinho » Sat May 07, 2022 6:58 am

Code: Select all

2022-05-07 00:50:40	Error	37.158.83.171	500	GET /admin/index.php?route=catalog/product&user_token=4NeJnWB2ORdCpnT1TsY6Bg0bDp6nDgJN&filter_mpn=123456 HTTP/1.0	https://xxxxxxxxxx.com/admin/index.php?route=catalog/product&user_token=4NeJnWB2ORdCpnT1TsY6Bg0bDp6nDgJN	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36	495	Acceso SSL/TLS a Apache

Active Member

Posts

Joined
Sat Aug 04, 2018 4:36 am

Post by mikeinterserv » Sat May 07, 2022 7:06 am

You should see something like this

Code: Select all

[Fri May 06 22:34:10.004696 2022] [fcgid:warn] [pid 110585] [client 31.50.68.2:37867] mod_fcgid: stderr: PHP Parse error:  syntax error, unexpected '$this' (T_VARIABLE), expecting function (T_FUNCTION) or const (T_CONST) in /user/xxxxxxx/xxxxxx/system/storagexxxxxxxxxxxx/modification/admin/controller/catalog/product.php on line 1368, referer: https://www.domain.com/admin/index.php?route=catalog/product&user_token=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Active Member

Posts

Joined
Thu May 28, 2020 6:55 am
Location - Wales

Post by RicardoMoutinho » Sat May 07, 2022 7:10 am

I dont have cPanel, i have Plesk....a crap admin panel.

I see also this :

Code: Select all

[client 37.158.83.171] ModSecurity: Warning. Operator GT matched 0 at ARGS. [file "/etc/httpd/conf/modsecurity.d/rules/custom/001_i360_1_infectors.conf"] [line "255"] [id "77316833"] [msg "IM360 WAF: Suspicious OpenCart plugin installation attempt||File:||T:APACHE||Install directory:||"] [severity "DEBUG"] [tag "service_i360custom"] [hostname "xxxxxxxxxx.com"] [uri "/admin/index.php"] [unique_id "YnWmCl0XUu3NQ45z7GUNGgAAABU"], referer: https://xxxxxxxxxx.com/admin/index.php?route=marketplace/installer&user_token=4NeJnWB2ORdCpnT1TsY6Bg0bDp6nDgJN
My admin log file is empty

Active Member

Posts

Joined
Sat Aug 04, 2018 4:36 am

Post by mikeinterserv » Sat May 07, 2022 7:11 am

The only other thing you can do is to get the file from the modification folder
and post it here as an attachment.
storage/modification/admin/view/template/catalog/product_list.twig
Then I can see directly what has been changed in that file by the mod.
It is something simple, I will stay here until its working. I have it working perfectly on 3.0.3.2 and 3.0.3.6

Active Member

Posts

Joined
Thu May 28, 2020 6:55 am
Location - Wales

Post by mikeinterserv » Sat May 07, 2022 7:13 am

Also temporarily disable modsecurity and see what happens - modsec can be problematic

Active Member

Posts

Joined
Thu May 28, 2020 6:55 am
Location - Wales

Post by RicardoMoutinho » Sat May 07, 2022 7:16 am

I send you the file, because if i post it.....its way complicated to see the code i guess

Active Member

Posts

Joined
Sat Aug 04, 2018 4:36 am

Post by mikeinterserv » Sat May 07, 2022 7:25 am

OK that file is fine
Now I need storage/modification/admin/controller/catalog/product.php
Did you try it with modsec disabled for a moment.

Active Member

Posts

Joined
Thu May 28, 2020 6:55 am
Location - Wales

Post by RicardoMoutinho » Sat May 07, 2022 7:28 am

I send you to OCMODS (1 adds the filter and its working, the other adds the column and works amazing), the only problem is that both OCMODS are for SKU and i need them for MNP.....

Do you think you could change "SKU" to some other shit and tell me how to do the field in the admin product page after location?

What do you say?

"ill send product.php now...."

Attachments


Active Member

Posts

Joined
Sat Aug 04, 2018 4:36 am

Post by RicardoMoutinho » Sat May 07, 2022 7:32 am

I dont have those storage/modification/admin/controller/catalog/product.php :choke: :choke: :choke: :choke: :choke: :choke:

Active Member

Posts

Joined
Sat Aug 04, 2018 4:36 am

Post by mikeinterserv » Sat May 07, 2022 7:43 am

Well I guess modsecurity blocked that
and thats why you have a 500 error.
I can't do anything about that. It is the modsec settings
How come it doesn't block those other OCMods

Active Member

Posts

Joined
Thu May 28, 2020 6:55 am
Location - Wales

Post by RicardoMoutinho » Sat May 07, 2022 7:46 am

It shouldnt be that problem since the other mods i sent work...something else its messing with the code.....🤔🤔🤔🤔🤔

The error is on the filter i suppose

Im just guessing.....

Active Member

Posts

Joined
Sat Aug 04, 2018 4:36 am

Post by mikeinterserv » Sat May 07, 2022 7:51 am

The only difference between my mod and the other as far a modsec goes is the word admin and an http address instead of https.
I have changed those. So now see if it will install. If you see no file in the storage/modification/admin/controller/catalog/product.php
Then mod security is blocking it. I bet if you try and reinstall those other mods they will be blocked also.
There is no point in me converting those other mods because the same will happen. If my mod does not work then neither will they.
Also you should see that file because those other mods USE IT.
.
Last edited by mikeinterserv on Sat May 07, 2022 8:27 am, edited 1 time in total.

Active Member

Posts

Joined
Thu May 28, 2020 6:55 am
Location - Wales

Post by straightlight » Sat May 07, 2022 8:00 am

mikeinterserv wrote:
Sat May 07, 2022 7:51 am
The only difference between my mod and the other as far a modsec goes is the word admin and an http address instead of https.
I have changed those. So now see if it will install. If you see no file in the storage/modification/admin/controller/catalog/product.php
Then mod security is blocking it. I bet if you try and reinstall those other mods they will be blocked also.
There is no point in me converting those other mods because the same will happen. If my mod does not work then neither will they.
Also you should see that file because those other mods USE IT.
.
var filter_price =
</file>

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 135 guests