Edit Order Functionality Not Working

Hello,

The edit order functionality is not working in my multi-vendor marketplace. Whenever I click the edit order link for any order(new or old) like in image 2 below , it opens the part page (Image 1 below) in which I'm not able to perform any operation.

(Note : Some links are blacked out in the images.)

The only option that I have, is to click the back button of the browser.

Any suggestions as to why this may be happening. I tried the feature in demo cs-cart multi-vendor and there it seems to be working fine. Other than installing a few add-ons I do not have any major custom changes in my multi-vendor cs-cart version.

Thanks,

Sunil

Image 1

Image 2


Members please give your suggestions please.

Image 2.jpg

Image 1.jpg

It would appear that the sidebar template that displays the payment info below the status has an error. Check your php error_log file or enable display errors via ini_set('display_errors', true) to see any template error or PHP errors that are impacting the completion of the page load. You might also look in your browser console to see if there are any JS errors being generated.

Update: Oops, not sure if the payment info shows in edit order. But the above places to check for errors are still valid.

Thanks @tbirnseth,

Was able to enable logging and figure out that the error was due to the new payment methods that I had added and the new payment template needed to be copied to the location

design/backend/templates/views/orders/components/payments/****.tpl

Hello All,

In edit order the list shows many more payment methods than the ones that we have selected in allowed payment methods.

Is this a bug?

Also, what will be the workaround to fix this for now in my particular case, if I just want to keep 2 types of payments

1. my custom payment method, and

2. phone ordering.

Thanks,

Sunil

List of payment methods currently showing.


List of payment methods currently showing.

OrderListError.jpg

app/controllers/backend/order_management.php

Try to replace

$payment_methods = fn_get_payments(array('usergroup_ids' => $customer_auth['usergroup_ids']));

with

$payment_methods = fn_get_payments(array('usergroup_ids' => $customer_auth['usergroup_ids'], 'status' => 'A'));

P.S. It is better to use custom addon and order_management.post.php controller to override list of payment methods

app/controllers/backend/order_management.php

Try to replace

$payment_methods = fn_get_payments(array('usergroup_ids' => $customer_auth['usergroup_ids']));

with

$payment_methods = fn_get_payments(array('usergroup_ids' => $customer_auth['usergroup_ids'], 'status' => 'A'));

Bullseye! The above solution fixes the issue, now working as expected.

P.S. It is better to use custom addon and order_management.post.php controller to override list of payment methods

I'm have been a Java developer sometime back and never worked on PHP, so not very sure how add the above changes with such a add-on. Without the add-on it will be difficult to manage the changes, as every upgrade will override it.

Note that restricting payment methods to those that are currently active in admin can have a negative side effect when editing an older order where the payment method is no longer used but was in use at the time of the original order.

I would suggest you make a change to display inactive payment method in a different color or other indicator versus filtering them out of the list.

I seem to have the same problem in a normal installation version 4.3.4

Is there any way I could use this same solution??

Hope someone can help!

Thanks in advance!

I seem to have the same problem in a normal installation version 4.3.4

Is there any way I could use this same solution??

Hope someone can help!

Thanks in advance!

Just make backup of the mentioned file and try. I believe, it should work

Thanks eCOM for your response but that didn't work for me

.

The problem only happens with my custom payment method(iDeal) and not with paypal for example.

Fixed it!

I just needed to do this and the code change. Made new .tpl file in that folder. for the ideal payment method. Now edit does work!

I just made an empty .tpl file is that a problem? shoul there be someting in there? wil i cause any issues do you think?

Thanks @tbirnseth,

Was able to enable logging and figure out that the error was due to the new payment methods that I had added and the new payment template needed to be copied to the location

design/backend/templates/views/orders/components/payments/****.tpl