Skip to content

flexi cart | Ecommerce Shopping Cart Library

haseydesign edited this page Sep 15, 2012 · 1 revision

flexi cart is a free shopping cart library for use with the CodeIgniter 2.0+ framework.
CodeIgniter already includes a basic shopping cart library that allows you to add items to a cart and display it - but sadly, thats about it.
For anyone trying to build a complete shopping cart store, the native library is just not going to cut it.
This is where flexi cart comes to the rescue, offering a plethora of flexible features that can be customised to behave and function the way you need them to.

Quick Links

To give you a clear example of the features available with flexi cart, there is a complete working online demo that is also available to download with the library.
Demo: http://haseydesign.com/flexi-cart/

To then get you started with using flexi cart, there is a detailed user guide detailing every function available with the library.
User Guide: http://haseydesign.com/flexi-cart/user_guide/

For any support queries, please post your questions to the flexi cart libraries CodeIgniter forum thread.
Support: http://codeigniter.com/forums/viewthread/212926

The flexi cart library is available to download from its Github repo.
Download: https://github.com/haseydesign/flexi-cart


The Feature List

Flexibility

The features in flexi cart are designed to be modularised, so that you can use bits and pieces of different features without needing to setup other features that are not required.
If you want a cart that can calculate shipping, but don't need a discount system, simply delete the table and disable the feature via the cart config.
If you want to use the item stock feature, but wish to add and remove the stock yourself, simply change a setting via the cart config.
The idea of flexi cart is to let you build the site, the way you want it built, rather than being confined to a one path design flow.

Localisation

  • Locations and zones can be setup to interact with other functions within the cart, and then return data that is relevant to a customers location.
  • Unlimited tiers of location types can be set. It could be as basic as just 'Countries', or as specific as 'Countries > States > Cities > Post/Zip Codes > Streets > Door Numbers'.
  • Multiple locations can be grouped into zones.
  • Individual shipping and tax locations can be set to apply different rules on the customers billing and shipping locations.

Shipping

  • The availability of shipping options can be set to be dependent on the location the customer is shipping the order to.
  • Shipping rate tiers can be set that check the weight and value of the order and adjust the shipping rate accordingly.
  • Shipping options can be set with their own tax rate that is independent of the carts global tax rate.
  • Specific shipping options can be excluded from any discounts that may be applied to the cart.

Item Shipping Rules

  • Set shipping rates per item, that can act as free shipping, or as a surcharge that is applied on top of the entire carts shipping rate.
  • Define that an item must be shipped separately from other items in the order. The cart will then separately calculate the shipping rate for the item and apply it to the shipping rate of the rest of the items in the cart.
  • Items can be banned from being shipped to specific locations.
  • Each shipping rule can be set to only activate if the order is being shipped to a specific location.

Tax

  • Tax rates can be set to be dependent on the location the order is being billed or shipped to.
  • Customers can toggle to display prices in the cart between including and excluding tax.
  • Items can be set with their own location dependent tax rates.

Discounts

  • Apply discounts to specific items in the cart or to specific summary columns in the cart.
  • Create item groups and apply discounts to all items within the group.
  • Define how tax should be applied to individual discounts.
  • Create discounts that apply either a percentage, fixed rate or new value discount.
  • Activate discounts via either a code or automatically when the discounts minimum quantity and value requirements are reached.
  • Create discounts that are only applied if the order is being shipping to a specific location.
  • Prevent specific discounts being applied if other discounts are already applied to the cart.
  • Prevent customers from earning reward points if they use a specific discount.
  • Set start and expiry dates for discounts to be active between.
  • Set usage limits per discount.

Reward Points and Vouchers

  • Reward points can be earnt by customers for purchasing items. The points can then be converted to vouchers which they can use to discount their next order.
  • The number of reward points earnt from each item can either be specifically set, or automatically calculated by the cart.
  • The monetary worth of earnt reward points are completely configurable.
  • Reward points can be set to only become active a preset number of days after an order has been shipped.
  • Expiry dates can be set on how long points and vouchers are valid for.

Surcharges

  • Surcharges can be manually applied to the cart.
  • The surcharge value can either be percentage based (add 10%) or a fixed value (add £5)
  • Percentage based surcharges can be applied to the value of specific summary columns, rather than just the cart total.

Item Stock Control

  • Item stock levels can controlled by automatically deducting and returning stock when items are ordered or returned.
  • The stock level of specific items can be displayed to customers.
  • Low stock and out-of-stock items can automatically have their quantities adjusted or removed from the cart.

Currencies

  • Unlimited currencies can be set for customers to view site pricing in.
  • The display format of each currency can be customised to define the currency symbol, the position of the symbol and the characters used as the 'thousand' and 'decimal' separators.
  • The exchange rate of each currency to the carts default currency can be set.

Save Cart Session Data

  • Customers can save their shopping cart so they can continue shopping at a later time or date, even via a different computer.

Order Management

  • Easily customise the shopping cart data that is saved as an order.
  • Manage the number of items that have been shipped, cancelled or returned on an order.
  • Edit saved customer orders as if you are using their shopping cart.

Miscellaneous

  • Set a required minimum order value.
  • Currency conversion tools.
  • Weight conversion tools.
  • Multilingual custom status and error messages.

Three Different Purpose Libraries

It's likely that 90% of the pages on your site will not require the complete functionality of flexi cart, which would result in wasting memory resources loading parts of the library that would not be used.
To solve this, the functionality of flexi cart is split into three different libraries all with a different intended purpose.

  • The 'lite library' is primarily used to return data from the cart session data, but cannot set data. On its own, it is light enough to include on all pages within your site.
  • The 'standard library' is used to manage data within the cart session data, inserting items and updating settings.
  • The 'admin library' manages the content of flexi carts database and is typically used in the admin 'backend' of a site.

What's Not Included

Whilst flexi cart offers a huge number of features, it is not intended to be an all-in-one out-of-the-box cart, therefore there are elements that are required by an e-commerce site that are not included in the library.
To some degree, it can be looked at as a limitation, but it was purposely designed this way to actually maintain its key feature - flexibility.

Item (Product) and Category Tables

The most obvious missing element is that there are no tables in flexi cart for inserting an items main data into. There are tables for item stock, item shipping and item taxes, but they are all designed to have a many-to-one relationship with a custom item table, i.e. many tax rates can be set to one item.
The reason there is no item table is that every site tends to be quite specific with the type of data that needs to be stored, this then becomes even more varied depending on how item category and attribute tables are related to the item table.
Therefore, the design of these elements was kept out of the library and up to the developer.

Connection Settings to Online Payment Gateways

Whilst flexi cart is perfectly capable of connecting to payment gateways (Paypal etc.), there are no inbuilt functions to do this for you.
I'll leave this one open for the community to provide.

Connection Settings to Online Shipping Calculators

Once again, flexi cart is capable of having its shipping values updated via a third party provider (FedEx etc.), however there are no inbuilt functions for this.
Again, I'll leave this one open for the community to provide.

Location Data

Whilst flexi cart provides the functionality to set locations to control data within the cart, this data is not provided for you.

Clone this wiki locally