Jump to content

Recommended Posts

Posted

We have a few customers who pay by bank transfer using the Print Order Form during checkout. Is there a way to get the Print Order Form to set the order to processing and reduce stock levels after the order has been made?

Posted

Somebody on here needed Stock reduction on Pending as I recall. But you need it only IF it's a Print Order Form Checkout. That's probably not the same situation, but I'll try to find that thread.

Posted

Thanks Dirty Butter for the suggestion but couldn't find anything relevant when I searched.

My problem is that if I leave the stock levels to reduce at a pending order some customers are pressing the back button after going to checkout then retrying to pay which means that they sometimes get a warning saying products no longer in stock. We sometimes end up with the customer having 4 or 5 pending orders in the space of a few minutes. This usually means that we are losing sales and our stock levels are incorrect until we cancel the pending or unpaid orders.

I'm now thinking it would be better to set the stock levels to reduce on payment. However because we have several customers who pay by bank transfer I need the print order form orders to go straight to processing and not pending and to reduce the stock levels as if payment had been made.

Posted

Please try this. In /modules/gateway/Print_order_Form/gateway.class.php:

Near line 57, find:

		$order->logTransaction($transData);

Change to:

//		$order->logTransaction($transData); // $transData may get modified later


Near line 238, find:

			$GLOBALS['cart']->clear();
		}
	}

Change to:

/* NEW */
			$transData['status']		= 'FProc';
			$transData['notes']		= 'Forced to Processing. ' . $transData['notes'];
			$order->orderStatus(Order::ORDER_PROCESS, $cart_order_id);
/*     */
			$GLOBALS['cart']->clear();
		}
/**/		$order->logTransaction($transData); // $transData may have been modified earlier
	}

This has the POF gateway forcing the order to processing. CubeCart's internal Order management functions (the Order 'class') manages stock levels.

  • 2 months later...
Posted
On 30/06/2016 at 5:56 AM, bsmither said:

Please try this. In /modules/gateway/Print_order_Form/gateway.class.php:


Near line 57, find:

		$order->logTransaction($transData);

Change to:

//		$order->logTransaction($transData); // $transData may get modified later


Near line 238, find:

			$GLOBALS['cart']->clear();
		}
	}

Change to:

/* NEW */
			$transData['status']		= 'FProc';
			$transData['notes']		= 'Forced to Processing. ' . $transData['notes'];
			$order->orderStatus(Order::ORDER_PROCESS, $cart_order_id);
/*     */
			$GLOBALS['cart']->clear();
		}
/**/		$order->logTransaction($transData); // $transData may have been modified earlier
	}

This has the POF gateway forcing the order to processing. CubeCart's internal Order management functions (the Order 'class') manages stock levels.

 
 

Today I installed POF and have exact same problem. Order status stuck on "Pending". Even though I apply above fix, didn't solve it. 

CubeCart : v6.0.7

POF v1.0.1

Posted

Other than the line numbers between POF v100 (which is what my solution is based on) versus POF v101, there is no difference in code.

In the POF control panel, do you have "Send Confirmation Email" checked? If checked, did the customer get the confirmation email?

 

 

Posted

After your reply, I checked and test it. However still doesn't work

One thing I realized, items are still in "Basket". Even though I proceed with POF, it doesn't process at all.

Posted

Customer doesn't get confirmation email.

On 11/09/2016 at 1:15 PM, bsmither said:

Other than the line numbers between POF v100 (which is what my solution is based on) versus POF v101, there is no difference in code.

In the POF control panel, do you have "Send Confirmation Email" checked? If checked, did the customer get the confirmation email?

 

 

 

 

Posted

If it helps at all, I also tried this today.

When choosing the 'POF' button, the site goes straight back to the home page.

I don't see the status bar 'Transferring, Please Wait'

And the order is still stuck on 'Pending'

 

I have 'send confirmation email' checked.

  • 1 month later...
Posted

Please let us know the exact version of CubeCart you are running.

In CC6012, if a gateway has been chosen, the Cancel Order button should not be shown.

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...