Hide , Remove , Modify Checkout Fields?

hpandwshpandws Member
in Help edited April 2013
May I hide, remove, or modify any checkout's default fields ?
Comments
  • fc_adamfc_adam FoxyCart Team
    @hpandws,

    It depends on the field - some fields are required to complete the checkout. Perhaps if you detail the fields you're wanting to change/remove, we can give you some specific advice.
  • I want to hide, remove, reorder the not-required fields, can I ?
  • Currently, I want to remove "company / address2 / location state / phone" fields.........

    and disable "country" field autocomplete ( only show the country on Taiwan )
  • Second, can I reorder all fields ?
  • fc_adamfc_adam FoxyCart Team
    @hpandws,

    You can certainly reorder the fields - either by using jQuery to move the elements, or if your store is on version 1.0 or newer, you can use the Twig templates to edit the raw template.

    In terms of removing/hiding fields - you can do that either using CSS styles in your template, or again, by editing the Twig template itself. For the fields you mentioned, the company, address 2 and phone fields aren't required generally, so that should be fine. The state field can be required, depending on the country - but if you're setting it to Taiwan, it's not required then (providing you're on 1.0 or newer) so that should be fine too. Due to the way the javascript operates though, I'd recommend just hiding the state field using CSS rather than removing it from the template, as otherwise you may run into some errors.

    In terms of restricting the country field to a single country - you can do that using some javascript on your checkout - grab the right snippet for your store version from our snippets page: http://wiki.foxycart.com/snippets/start - you're looking for the locations modification snippet.
  • thankk you very much, work fine now...
  • Can I hide po option in updateinfo ?
  • fc_adamfc_adam FoxyCart Team
    @hpandws,

    You mean the Purchase Order payment option? Yes you can - you'd want to do that using jQuery - and you could use the following variable to hide it "FC.checkout.config.isUpdateCustomer".

    For example:
    <script type="text/javascript">
    if (FC.checkout.config.isUpdateCustomer) {
      // Hide things here
    }
    </script>
    
  • thanks, but it only hide the Purchase Order payment option , I want ot disable the the Purchase Order payment option when the customers update their personal info.
  • Where can I find the complete FC variable list ?
  • fc_adamfc_adam FoxyCart Team
    @hpandws,

    We don't have a list of the variables - but they're in the source code of your checkout page.
    thanks, but it only hide the Purchase Order payment option , I want ot disable the the Purchase Order payment option when the customers update their personal info.

    Currently you can't set the payment to be disabled on an update info request - hiding it, or removing it from the DOM using jQuery will be your best bet.
  • thank you very much , all work now...
Sign In or Register to comment.