Jump to content

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

Added Order Status Does Not Reflect In "total Paid" Rate Topic   - - - - -

 
  • Darius
  • Douchebag
  • Members
  • Join Date: 20-Apr 08
  • 3348 posts

Posted 21 February 2017 - 07:03 AM #1

Added new order status and its amounts do not reflect in

 

?dispatch=orders.manage

Total paid

How to fix that?



 
  • galtinbaeva
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 06-Dec 13
  • 3406 posts

Posted 21 February 2017 - 07:13 AM #2

Added new order status and its amounts do not reflect in

 

?dispatch=orders.manage

Total paid

How to fix that?

 

I suppose this is hardcoded:

if (is_array($orders)) {
    foreach ($orders as $k => $v) {
        $result['gross_total'] += $v['total'];
        if ($v['status'] == 'C' || $v['status'] == 'P') {
            $result['totally_paid'] += $v['total'];
        }
    }
}

Only processed and complete statuses are taken into account.


Simtech Development | sales@simtechdev.com | www.simtechdev.com
CERTIFIED CS-CART PARTNER | LICENSES | DEVELOPMENT | ADD-ONS | DESIGN | UPGRADE

Google Analytics Enhanced Ecommerce - get advanced ecommerce analytics


 
  • Darius
  • Douchebag
  • Members
  • Join Date: 20-Apr 08
  • 3348 posts

Posted 21 February 2017 - 07:22 AM #3

Yea but this does not make any sense as to why then there is such feature to create new status..
 
Basically I use this new order status  P > C > I
 
to make order status > Invoice/Credit memo - invoice
this makes invoice +1 it is very tricky order status since invoice cannot go -1 unless breaking in to db...

What if

if ($v['status'] == 'C' || $v['status'] == 'P' || $v['status'] == 'I')

? Would this work?



 
  • galtinbaeva
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 06-Dec 13
  • 3406 posts

Posted 21 February 2017 - 07:56 AM #4

Yea but this does not make any sense as to why then there is such feature to create new status..
 
Basically I use this new order status  P > C > I
 
to make order status > Invoice/Credit memo - invoice
this makes invoice +1 it is very tricky order status since invoice cannot go -1 unless breaking in to db...

What if

if ($v['status'] == 'C' || $v['status'] == 'P' || $v['status'] == 'I')

? Would this work?

 

It should work.

 

I think there should be a setting for each order status.


Simtech Development | sales@simtechdev.com | www.simtechdev.com
CERTIFIED CS-CART PARTNER | LICENSES | DEVELOPMENT | ADD-ONS | DESIGN | UPGRADE

Google Analytics Enhanced Ecommerce - get advanced ecommerce analytics


 
  • Darius
  • Douchebag
  • Members
  • Join Date: 20-Apr 08
  • 3348 posts

Posted 21 February 2017 - 11:15 AM #5

I think so too.

 

I think there should be a setting for each order status.



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

Posted 21 February 2017 - 01:19 PM #6

There is the following code

$paid_statuses = array('P', 'C');

in these files:

 

- app/controllers/backend/index.php

- app/functions/fn.cart.php

 

You should extend it with your order status IDs


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 345     Multi-Vendor              USD 1250    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)

 
  • Darius
  • Douchebag
  • Members
  • Join Date: 20-Apr 08
  • 3348 posts

Posted 21 February 2017 - 01:54 PM #7

This works well! Thank you

 

There is the following code

$paid_statuses = array('P', 'C');

in these files:

 

- app/controllers/backend/index.php

- app/functions/fn.cart.php

 

You should extend it with your order status IDs



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

Posted 22 February 2017 - 05:33 AM #8

You are welcome!


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 345     Multi-Vendor              USD 1250    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)

 

Posted 31 October 2019 - 05:45 PM #9

Thanks for the tip, really should be something that is configured, if you can add the status you should be able to have it included in calculations if required.

 

thanks again



 
  • Ranger-1
  • Member
  • Trial users
  • Join Date: 20-Aug 11
  • 41 posts

Posted 17 March 2020 - 10:13 AM #10

Has this changed lately? I looked in the files, but cannot find the codes that needs to be changed. 



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

Posted 17 March 2020 - 01:19 PM #11

In the index.php file the line is

$paid_statuses = ['P', 'C'];

in the fn.cart.php it was changed to sql query which retrieves from database all statuses with the Inventory parameters set to Decrease


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 345     Multi-Vendor              USD 1250    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)

 
  • Ranger-1
  • Member
  • Trial users
  • Join Date: 20-Aug 11
  • 41 posts

Posted 17 March 2020 - 05:51 PM #12

Hmm I dont find this in index.php. I find this:

 

$paid_statuses = fn_get_settled_order_statuses();

 

Can it be somewhere else?



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

Posted 18 March 2020 - 05:55 AM #13

Hmm I dont find this in index.php. I find this:

 

$paid_statuses = fn_get_settled_order_statuses();

 

Can it be somewhere else?

 

Yes, looks like it was also changed


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 345     Multi-Vendor              USD 1250    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)

 
  • Ranger-1
  • Member
  • Trial users
  • Join Date: 20-Aug 11
  • 41 posts

Posted 18 March 2020 - 07:33 PM #14

So anyone know where "fn_get_settled_order_statuses" is defined?



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

Posted 19 March 2020 - 08:13 AM #15

So anyone know where "fn_get_settled_order_statuses" is defined?

 

app/functions/fn.cart.php


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 345     Multi-Vendor              USD 1250    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)

 
  • Ranger-1
  • Member
  • Trial users
  • Join Date: 20-Aug 11
  • 41 posts

Posted 19 March 2020 - 06:52 PM #16

Found it. Adjusted. Works!

 

Thank you!



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

Posted 20 March 2020 - 05:18 AM #17

You are welcome! :)


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 345     Multi-Vendor              USD 1250    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)