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
  • 3307 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
  • 3376 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
  • 3307 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
  • 3376 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
  • 3307 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
  • 19829 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    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • Darius
  • Douchebag
  • Members
  • Join Date: 20-Apr 08
  • 3307 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
  • 19829 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    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 

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