Documentation You are here: start » v » 0.7.2 » checkout

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
v:0.7.2:checkout [2011/12/09 02:44] – [Customising which Credit Card types are allowed on your Checkout] adamv:0.7.2:checkout [2017/04/26 07:02] (current) – external edit 127.0.0.1
Line 117: Line 117:
 ==== Required Fields ==== ==== Required Fields ====
  
-You can required a custom field by adding ''fc_required'' to its class (of the ''input''). You can add an error message (which will display if it's left blank) by adding a ''label.fc_error'' with ''for="your_field_name"'', like this:+You can require a custom field by adding ''fc_required'' to its class (of the ''input''). You can add an error message (which will display if it's left blank) by adding a ''label.fc_error'' with ''for="your_field_name"'', like this:
 <code html><label class="fc_error" style="display: none;" for="terms_of_service">Please accept our Terms of Service.</label></code> <code html><label class="fc_error" style="display: none;" for="terms_of_service">Please accept our Terms of Service.</label></code>
 For example, if you wanted to force a Terms of Service acceptance, it'd look like this: For example, if you wanted to force a Terms of Service acceptance, it'd look like this:
Line 190: Line 190:
  
 This type of setup can be expanded to show and hide error messages similar to how FoxyCart does with the default fields also. This type of setup can be expanded to show and hide error messages similar to how FoxyCart does with the default fields also.
 +
 +<wrap hi>Make sure that you're setting ''isValid'' to both true and false within your logic. If you just set it to false then the checkout will go nowhere.</wrap>
  
 ===== Customising which Credit Card types are allowed on your Checkout ===== ===== Customising which Credit Card types are allowed on your Checkout =====
Line 203: Line 205:
   FC.checkout.config.validPaymentCards = ["mastercard","visa"];   FC.checkout.config.validPaymentCards = ["mastercard","visa"];
 </script></code> </script></code>
 +
 +You'll also need to update the "pay with credit card" checkout language string in your FoxyCart admin under the language settings.
 ===== Other Checkout Actions ===== ===== Other Checkout Actions =====
 The checkout is primarily used to pay for new purchases, but there are certain other situations that arise that are still handled through the checkout. It's important to understand when your checkout can be used for other purposes so you can design and style accordingly. The checkout is primarily used to pay for new purchases, but there are certain other situations that arise that are still handled through the checkout. It's important to understand when your checkout can be used for other purposes so you can design and style accordingly.

Site Tools