Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Edit Order Functionality Not Working Rate Topic   - - - - -

 
  • sunil0907
  • Member
  • Trial users
  • Join Date: 14-Sep 16
  • 47 posts

Posted 10 February 2017 - 05:02 PM #1

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.

Attached Thumbnails

  • Image 2.jpg
  • Image 1.jpg


 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 12156 posts

Posted 11 February 2017 - 01:13 AM #2

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.


Edited by tbirnseth, 11 February 2017 - 01:14 AM.

EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • sunil0907
  • Member
  • Trial users
  • Join Date: 14-Sep 16
  • 47 posts

Posted 06 March 2017 - 01:01 PM #3

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



 
  • sunil0907
  • Member
  • Trial users
  • Join Date: 14-Sep 16
  • 47 posts

Posted 06 March 2017 - 01:06 PM #4

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



 
  • sunil0907
  • Member
  • Trial users
  • Join Date: 14-Sep 16
  • 47 posts

Posted 06 March 2017 - 01:15 PM #5

List of payment methods currently showing.


List of payment methods currently showing.

Attached Thumbnails

  • OrderListError.jpg


 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 22943 posts

Posted 06 March 2017 - 01:59 PM #6

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


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 1210     Multi-Vendor              USD 1250    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 4025     CS-Cart + YOUPI      USD 1459      Multi-Vendor Ultimate       USD 7500 (6000)


 
  • sunil0907
  • Member
  • Trial users
  • Join Date: 14-Sep 16
  • 47 posts

Posted 06 March 2017 - 02:46 PM #7

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.



 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 12156 posts

Posted 06 March 2017 - 09:03 PM #8

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.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • krola
  • Advanced Member
  • Members
  • Join Date: 18-Jun 11
  • 68 posts

Posted 26 September 2017 - 03:02 PM #9

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!



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 22943 posts

Posted 27 September 2017 - 01:07 PM #10

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


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 1210     Multi-Vendor              USD 1250    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 4025     CS-Cart + YOUPI      USD 1459      Multi-Vendor Ultimate       USD 7500 (6000)


 
  • krola
  • Advanced Member
  • Members
  • Join Date: 18-Jun 11
  • 68 posts

Posted 29 September 2017 - 09:31 AM #11

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.



 
  • krola
  • Advanced Member
  • Members
  • Join Date: 18-Jun 11
  • 68 posts

Posted 29 September 2017 - 11:18 AM #12

 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