Table of Contents
Advanced Code Snippets for v2.0
Looking for snippets for version 1.1 or older? You can find all the old snippets available on this page. If you're using version 2.0 and a snippet you require isn't yet available below, get in touch with us.
- Live Rate Shipping Modification - for altering returned live rates
- Flat Rate Shipping Modification - for creating custom tiered flat rate shipping costs
- Remove USPS day timeframe from rate name - for changing “USPS Priority Mail 2-Day Small Box” to “USPS Priority Small Box”
- Custom Live Rate Endpoint - for fetching shipping rates from your own shipping endpoint
- Breaking large shipments into multiple smaller packages - if you ship large weight products, use this snippet to break overweight shipments into smaller packages to return rates
- Setting the shipping total through product attributes - paired with the flat rate shipping modification snippet allows you to set shipping on the individual products
- Dynamically setting the shipping origin point for live rates - for changing the origin point for shipping calculations for the whole order
- Locations Modification - for performing dynamic filtering of the countries and states available in the checkout
Add To Cart Snippets
- Update product page total price to include option modifiers - to dynamically update your product listings total price as the customer changes options before adding to cart
- Removing PayPal Button From Cart - css code to hide the “Checkout With PayPal” button from the cart
- Dynamic Terms of Service Link - for changing your terms of service link depending on the selected state or country
- Dynamically Require Phone Number - if you require the customer provide a phone number depending on their shipping country
- Dynamically Require Tax ID - if you require the customer provide a tax id depending on their country
- Upsell modal on the checkout - to allow customers to quickly add additional products at checkout
- Gift Wrapping checkbox on the checkout, or other upsell / add-on items from the checkout
- Adding donations on the checkout, allowing customers to add configurable price donations to cart
- Guest Checkout - to allow guest checkout without requiring the customer to enter an email address
- Prevent Shipping to PO Boxes - for preventing customers from shipping to PO Box addresses
- Setting a Max Length on Checkout Fields - if you need to limit how much text a user can enter in an address field.
- Dynamically blocking checkouts based on custom conditions - such as requiring a total order or quantity.
- Add or remove coupon code based on item in cart - Will add/remove coupon if required item is added to/removed from cart.
- Display a dropdown list with "Other" text box - Will display a dropdown list in the checkout, and will display an extra text box for “Other” input if “Other” is selected.
- Toggle tax exemption status on checkout with a checkbox - if you don't need to have a customer provide a tax ID, but want to allow them to specify that they're tax exempt
- Auto Fill and Hide Purchase Order Field - If you'd like to allow customers to submit orders without supplying payment details (use case: Quote System)
- Conversion Tracking Pixels/Scripts - general information for tracking transaction completions with third party services
- Change text on the "Continue To" Button Based on Products in Cart - Will allow you to customize the verbiage on the “Continue To” button based on the category.
- Add a link to the web receipt based on item category - Add a link to the web receipt based on the category of items in the order