The Foxy forums are on the move!

We're in the process of moving our forums over to a new system, and so these forums are now read-only.
If you have a question about your store in the meantime, please don't hesitate to reach out to us via email.

Card on file

sccr410sccr410 Member
in General edited February 2012
We are setting up a device rental service and using FoxyCart to handle the initial rental & accessories payment. However, should the customer damage the device, we need to have a way to run their card for the amount of the device. Is there any way to store the user's card number so we could retrieve and manually process it later if needed?
  • fc_adamfc_adam FoxyCart Team

    You can achieve this within FoxyCart, but just to clarify, not by actually retrieving the credit card information to process within your physical shop.

    What you can do is force customers to create a user on checkout, and force their credit cards to be saved for future use by checking that checkbox on the checkout using javascript. Then you'd also need to enable Unified Order Entry ( for your store.

    Essentially that means that after a customer has checked out and saved their credit card information for the store, you can then enter their email address and your UOE password on the checkout to checkout as that customer and run additional charges as required for damaged goods.

    If you choose to take this approach, I'd suggest modifying the language used for that 'save my credit card' checkbox in the 'language' section of the FoxyCart administration to make it clear that you need to save an encrypted version of their credit card as a security for any damages to rented goods.

    Let us know if any of that is confusing or you need a hand setting things up.
  • I think that makes sense, we would just have to setup a separate area for our admins to add special items to cart (like the total cost of the product should it be completely damaged) and then finish the "checkout" process - if I am understanding this correctly. Or maybe just textboxes to enter item name/price.

    Definitely sounds much easier than I anticipated it being.
  • fc_adamfc_adam FoxyCart Team
    Yeah, that's the easiest way to handle it - setting up a custom private add to cart page. The simplest approach would be your second option, just having open text inputs for name, price, quantity etc so you can type in whatever you need and add that to cart.
  • So I am finally working on this addition to our site, but running into issues.

    I have the open text inputs all set, that works fine. I have Unified Order Entry all setup, works fine.

    How do I require users to create an account and require them to store their card on file?

    Also, we do free shipping on orders over $65, but less than that is $10 flat rate. For these manual adding of items, we don't want to include any shipping regardless. What is a workaround for this to allow free shipping on all Unified Order Entry orders?
  • fc_adamfc_adam FoxyCart Team

    To require users to create an account, under 'checkout' in your FoxyCart administration set the 'checkout type' to 'Allow customer accounts only'.

    How you handle the shipping depends on how you're handling shipping currently. If it's through a javascript hack on your template, you'll need to modify that to allow for your special page. If it's through categories, you can simply create a new category that sets shipping to 0 and add all products on your special page to that category.
  • sccr410sccr410 Member
    edited March 2012
    So customers now have to have an account, how do I require them to save their card information and not make that optional?

    We do not use any categories for defining how shipping costs work - everything is lumped into the default category. Here is our JS:
    <script type="text/javascript" charset="utf-8">
    FC.checkout.config.customShipping = {
      onLoad: true,  // Set to false if you don't want shipping calculated when the checkout loads
      onLocationChange: false // Set to true if your shipping logic relies on updating whenever the shipping location for the order changes
    function calculateShipping() {
      var shippingCost = 0;
     var total = fc_json.total_price;
    if (total <= 65) {
      shippingCost = 10;
    } else { 
      shippingCost = 0; // Free shipping because they bought so much
      FC.checkout.config.orderFlatRateShipping = shippingCost;
    jQuery(document).ready(function() {
      if (FC.checkout.config.customShipping.onLoad) {
      if (FC.checkout.config.customShipping.onLocationChange) {
        FC.checkout.overload("updateTaxes", function() { calculateShipping(); }, null);
      // add the required class
      // add an asterisk to the label
      jQuery("li.fc_customer_phone label.fc_pre").append("<span class=\"fc_ast\">*<\/span>");
      // Now add the onblur error checking events
      jQuery("#customer_phone").blur(function() {
        if (this.value == "") {
        } else {
    How can we alter this JS or find a way to do no shipping from our special backend? Maybe make those items into a category and then somehow make shipping $0 for all items in that category?
  • fc_adamfc_adam FoxyCart Team
    edited March 2012

    Give this a try:

    Also, you'll need to add a session attribute to just your admin add to cart form that looks like this:
    <input type="hidden" name="h:adminorder" value="true" />

    The code I've given you checks for that session attribute, and if it's set, it doesn't apply shipping. Also, at the bottom I've added some jQuery logic that checks the 'save my credit card' checkbox, and also rechecks it and shows an alert if they try to uncheck it.
  • Flawless, thank you so much Adam!
Sign In or Register to comment.