---- dataentry snippet ---- type : snippet #do not change this line category : checkout #mention the category like 'shipping', 'checkout' etc name : Displaying PO payment option #the name of the snippet description : #description about snippet versions_tags : #compatible versions reference_url : http://forum.foxycart.com/comments.php?DiscussionID=4109&page=1 #Item_0 # External link tags_tags : snippets, checkout, advance #tags, separated by commas. date_dt : 2011-05-27 #the date in YYYY-MM-DD format ---- ===== Displaying PO payment option ===== Displaying PO payment option if certain criteria is met, using the shipping_phone field to fake a custom field for the customer. FoxEE Setup: -You must force the user to login on the EE side before you checkout. You can accomplish this by using the custom add to cart foxEE tag and using a hidden input redirect to redirect the user to a EE custom login/checkout page. Make sure to turn FoxyBox Off. You can turn it on later once you force the user to login and/or if you want the ability to update quantity of the items in the cart. I didn't really have time to figure out how to update quantity using foxEE tags. -Create a custom profile field called purchase order under the members and groups section. I use a straight text field and use either 0 or 1 in that field. 0 for false, 1 for true. - FoxEE Module --> General Settings --> Click "Automatically Create and Map Member Fields" - FoxEE Module --> General Settings --> Change the radio button for "Shipping Fields are the same?" = "No" - Map the shipping phone field to the purchase order field created in step 2. - Go to the member and click on edit profile. Set the member custom profile field. FoxyCart Setup: - Enable purchase order purchase in the payment settings - Add the following code to the checkout template right above the tag. - Css hide the Shipping Phone Field using the CSS override documented on the foxycart site. ===== Related Forum Discussions ===== * http://forum.foxycart.com/comments.php?DiscussionID=4109&page=1#Item_0 * http://forum.foxycart.com/comments.php?DiscussionID=3988&page=2#Item_16