Warning: count(): Parameter must be an array or an object that implements Countable in /srv/users/serverpilot/apps/wiki/public/lib/plugins/data/syntax/entry.php on line 168

Warning: count(): Parameter must be an array or an object that implements Countable in /srv/users/serverpilot/apps/wiki/public/lib/plugins/data/syntax/entry.php on line 168

Warning: count(): Parameter must be an array or an object that implements Countable in /srv/users/serverpilot/apps/wiki/public/lib/plugins/data/syntax/entry.php on line 168

Warning: count(): Parameter must be an array or an object that implements Countable in /srv/users/serverpilot/apps/wiki/public/lib/plugins/data/syntax/entry.php on line 168

Warning: count(): Parameter must be an array or an object that implements Countable in /srv/users/serverpilot/apps/wiki/public/lib/plugins/data/syntax/entry.php on line 168
type:
snippet
category:
checkout
name:
Hiding the Purchase Order payment option
description:
Allow for customer checkouts without requiring any payments
versions:
0.7.0, 0.7.1, 0.7.2, 1.0
date:
2011-09-14

Hiding the Purchase Order payment option

This snippet is really useful for situations where you want to gather customer orders and billing/shipping information but not actually capture any payment at all - like if you contact the customer over the phone to request credit card details to process them manually in a physical store.

Step 1: Javascript

Paste the following right before the closing </head> tag in your checkout template. Once added, you'll need to edit the string “We will contact you to organise payment” to match what your setup requires. That could be anything from “No payment required” to a random string like “f7sA9gd”. Whatever makes sense for your setup - and will make sense for customers reading it on their receipts.

<script type="text/javascript">
jQuery(document).ready(function() {
  jQuery("input#purchase_order").val("We will contact you to organise payment");
  jQuery("#li_purchase_order").hide();
});
</script>

Step 2: Language

Login to the FoxyCart administration, and navigate to the 'language' section. Under 'Checkout' search for “Purchase Order” and edit this to make sense for the value you entered into the Purchase Order field on the checkout. For example, if we prefill the PO field with “We will contact you to organise payment”, we could change the language string from “Purchase Order” to “Offline Payment”. This will appear in the receipt and in emails for your customers.

Site Tools