I’m trying to find the spot in the 2.1.3 code where I can make offline payment default to the “Compete” order status. Can anyone point me in the right direction?
thanks,
Glen
Direction would generally be the fn_start_payment() function. I do not believe that fn_finish_payment() is called for offline processors. But that’s where I’d look.
Thanks for the reply, Tony. CS-Cart got me the solution:
in /core/fn.cart.php
change
```php
if (!$is_processor_script && $__order_status == STATUS_INCOMPLETED_ORDER) {
$__order_status = ‘O’;
}
```
to
```php
if (!$is_processor_script && $__order_status == STATUS_INCOMPLETED_ORDER) {
$__order_status = ‘OC’;
}
```
and change
```php
if (substr_count(‘OP’, $status) > 0) {
```
to```php
if (substr_count(‘OPC’, $status) > 0) {
```
best,
Glen
Hmm, 1st pair of changes look identical for ‘from’ and ‘to’… Am I missing something?
The first pair simply makes offline_payments that have an INCOMPLETE designation be in status ‘O’.
Anyway, glad you got it working to your liking.
Tony - thanks for spotting my typo. The code is now correct.
“O” to “OC” (open>open,complete i think)
but wouldn’t this change ALL incompleted order to “completed” ??
[quote]
but wouldn’t this change ALL incompleted order to “completed” ??
[/quote]
No, only those that do not have a processor associated with them. I believe that’s what he wanted.
[quote name=‘tbirnseth’]No, only those that do not have a processor associated with them. I believe that’s what he wanted.[/QUOTE]
Hello, It appears that they have changed the code in 2.1.4. The above changes are not applicable if we want to apply in new version 2.1.4. Can someone suggest how to make the status of all the orders as ‘open’ irrespective of the payment status in version 2.1.4
sixnin9: how much cs-cart deduct point from that solution?
thanks for share