Snippets

Advanced Code Snippets with Reference to Forum Posts

Please note that advanced manipulation of the cart or checkout via javascript is not supported by FoxyCart, and you can break things causing lost orders, errors, and global catastrophe. The links here are provided for reference, and they very likely will not work without tinkering requiring at least intermediate javascript knowledge.

Shipping Snippets

Note that applying javascript shipping modifications using either live or flat rates where you are setting custom values has been found to not work as expected for subscription based products where you need the shipping to apply to each subscription renewal. We are currently working on a fix for this issue for version 0.7.2+
NameLinkSupported versions
Conditional free shipping with live ratesconditional_free_shipping_with_live_rates0.6.0, 0.7.0, 0.7.1, 0.7.2
Breaking shipments over the maximum weight into smaller packagesbreaking_shipments_over_maximum_weight_into_smaller_packages0.6.0, 0.7.0, 0.7.1, 0.7.2
Setting a single flat rate shipping amount no matter which categories are includedsetting_single_flat_rate_shipping_amount0.6.0, 0.7.0, 0.7.1, 0.7.2
Restricting countries from the checkoutrestricting_countries_from_the_checkout_form0.6.0, 0.7.0, 0.7.1, 0.7.2
Handling fee on orders under $100, free if over, live rates included.handling_fee_on_orders_under_100_dollar0.6.0, 0.7.0, 0.7.1, 0.7.2
Live shipping rates with a fixed rate fall back for heavy shipmentslive_shipping_rates_with_fixed_rate_fall_back_for_heavy_shipments0.6.0, 0.7.0, 0.7.1, 0.7.2
Flat Rate Markup of Live Ratesflat_rate_markup_of_live_rates0.6.0, 0.7.0, 0.7.1, 0.7.2
Need to remove Alaska and Hawaii from checkoutremove_alaska_hawai_from_checkout_form0.6.0, 0.7.0, 0.7.1, 0.7.2
Multiple Flat Ratemultiple_flat_rates0.6.0, 0.7.0, 0.7.1, 0.7.2
Automatically selecting returned shipping rateautomatically_selecting_returned_shipping_rate0.6.0, 0.7.0, 0.7.1, 0.7.2
Flat rates by country and product categoryflat_rates_by_country_and_product_category
Australia TNT Rate Requests.australia_tnt_rate_requests
Dimensional weightsdimensional_weights0.6.0, 0.7.0, 0.7.1, 0.7.2
Shipping Rate Requests on the Cartshipping_rate_requests_on_the_cart
Adding handling fees for each shipment with multiship.adding_handling_fees_for_each_shipment_with_multiship
Shipping calculation on cartshipping_calculation_on_cart
Free shipping using a couponfree_shipping_using_a_coupon0.6.0, 0.7.0, 0.7.1, 0.7.2
Tiered Flat Rate Shippingtiered_flat_rate_shipping0.6.0, 0.7.0, 0.7.1, 0.7.2
Flat rate shipping calculated by product shipping attributes via add to cartshipping_calculated_by_product_shipping_attibutes_in_add_to_cart0.6.0, 0.7.0, 0.7.1, 0.7.2
Live Rate Shipping Modificationlive_rate_shipping_modification0.6.0, 0.7.0, 0.7.1, 0.7.2

"Add to Cart" Form Snippets

NameLinkSupported versions
Add products to the cart without Colorboxadd_products_without_colorbox0.7.0, 0.7.1, 0.7.2
Set the sub_startdate to X months in the futureset_sub_startdate_to_future_date0.6.0, 0.7.0, 0.7.1, 0.7.2
Updating a total element to reflect selected price modifiers in your pageupdating_total_element_to_reflect_selected_price_modifiers_in_page0.6.0, 0.7.0, 0.7.1, 0.7.2
Using a calendar date-picker to add dates to products.using_calendar_date_picker0.6.0
Automatically adding a coupon codeautomatically_adding_coupon_code0.6.0, 0.7.2
Set the sub_startdate to the next closest date from a group of datesset_sub_startdate_to_closest_shipment_date0.6.0, 0.7.0, 0.7.1, 0.7.2
Form with radio options for price with an option for user to enter any amount they wantform_with_radio_options_for_price_with_an_option_to_enter_any_amount0.6.0, 0.7.0, 0.7.1, 0.7.2
Very, very large form with lots of datavery_large_form_with_lots_of_data0.6.0
Add To Cart Form Field Validationform_field_validation0.7.0, 0.7.1, 0.7.2
 

Tax Tips and Tricks

NameLinkSupported versions
Tax-Inclusive prices for Australia, UK VAT, etc.tax_inclusive_prices
More Tax-inclusive prices, perhaps a better solution.more_tax_inclusive_prices060
 

Miscellaneous Cart and Checkout

NameLinkSupported versions
Showing the "minicart" on cart and checkoutshowing_the_mini_cart0.6.0, 0.7.0, 0.7.1, 0.7.2
Reverse Order of Items in Cartreverse_cart_items0.6.0, 0.7.0, 0.7.1, 0.7.2
Product images in the cartproduct_images_in_the_cart0.6.0
Removing PayPal from the Cart to force customers to FC checkout firstremoving_paypal_from_the_cart0.6.0, 0.7.0, 0.7.1, 0.7.2
Product Bundles/Addonsproduct_bundles_addons0.7.0, 0.7.1, 0.7.2
Product Upselling on the cart/checkoutproduct_upselling0.6.0, 0.7.0, 0.7.1, 0.7.2
 

Checkout

NameLinkSupported versions
Making shipping address fields mirror billing fieldsmaking_shipping_address_fields_mirror_billing_fields070
Adding a gift-wrapping checkbox to the checkout.adding_gift_wrapping_checkbox
Adding a coupon code field to the checkoutadding_a_coupon_code_field
Adding an email confirmation field to the checkoutadding_email_confirmation_field_to_the_checkout
Displaying PO payment optiondisplaying_po_payment_option
Pre-populating checkout values, without invoking "single-use customers"pre_populating_checkout_values
Making the the shipping and payment fields hidden until a valid selection is made for guest/login step of checkoutmaking_shipping_and_payment_fields_hidden0.6.0, 0.7.0, 0.7.1, 0.7.2
Adding an email confirmation boxadding_an_email_confirmation_box
Making checkout fields requiredmaking_checkout_fields_required0.6.0, 0.7.1, 0.7.2
Hiding the Purchase Order payment optionhiding_po_payment_option0.7.0, 0.7.1, 0.7.2
Performing actions when customer has logged in on the checkoutperforming_actions_when_customer_logged_in_on_checkout0.7.0, 0.7.1, 0.7.2
 

Receipt

Multiple Store / Session / Cookie Tweaks

snippets/start.txt · Last modified: 2012/04/19 23:55 by foxybrett
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki