Under work by CitadelRock. The following is the plan, still subject to review/adjustment/comments etc...

See attached screenshots for preliminary tracker definitions.

Step 1: Basic shopping cart


All profile and tracker driven, no new code or preferences needed.

Trackers:

  • Products tracker


Wiki pages:

  • Shop interface


Plugins used:

  • Add to cart


Modules used:

  • Cart
  • Payments outstanding

Step 2: Support for Product bundles


Code to extend add to cart for product type == “product bundle”. If yes, then look in Bundle Product Products tracker for products in tracker and add those individually.

Trackers:

  • Bundle Product Products


Wiki pages:

  • UI to add/edit bundles


New preferences needed:

  • Tracker ID of Bundle Product Products
  • Field ID of Bundle Product Products: Bundle Product ID
  • Field ID of Bundle Product Products: Product ID
  • Field ID of Bundle Product Products: Number of Product

Step 3: Inventory management


Profile will extend previous step. User will have to provide existing tracker ID of Products tracker.

Trackers:

  • Shared Inventory tracker
  • Additional tracker fields in Profile tracker
    • Inventory type: none, internal, shared
    • Inventory total
    • Inventory on hold
    • Shared inventory ID


Wiki pages:

  • Extended UI to modify products (with inventory settings)
  • UI to create shared inventory


New preferences needed:

  • Tracker ID of Products Tracker
    • Field ID of Products: Product ID
    • Field ID of Products: Inventory type
    • Field ID of Products: Inventory total
    • Field ID of Products: Inventory on hold
    • Field ID of Products: Shared Inventory ID
  • Tracker ID of Shared Inventory Tracker
    • Field ID of Shared Inventory: Shared Inventory ID
    • Field ID of Shared Inventory: Inventory total
    • Field ID of Shared Inventory: Inventory on hold


New code needed:

  • When Add to Cart happens, to modify Inventory on Hold
  • When Purchase is completed, to modify Inventory Total
  • User cart timing out (with warning to user to complete shopping by x time)
  • When user cart times out, to modify Inventory on Hold
  • Add to cart to have sold out message based on inventory checking, including message to say that there may be stock but currently on hold by users (i.e. Try again later, perhaps they will become available)

Step 4: Store purchase details in tracker


Profile will extend previous step. User will have to provide existing tracker ID of Products tracker.

Trackers:

  • Orders tracker
  • Order items tracker


Wiki pages:

  • UI for shop owner to review orders


New preferences needed:

  • Tracker ID of Orders Tracker
    • Field ID of Orders: User
    • Field ID of Orders: Time
    • Field ID of Orders: Order Total
    • Field ID of Orders: Tiki Payments ID
  • Tracker ID of Order Items Tracker
    • Field ID of Order Items: Order ID
    • Field ID of Order Items: Product ID
    • Field ID of Order Items: Price paid
    • Field ID of Order Items: Amount bought


New code to execute when order is made to record details of order.

To check (when reporting) if order is in fact paid for, the code will have to check the Tiki Payments database table, for this, maybe a new field type could be used to display the status.

Step 5: Taxes

Trackers:

  • Taxes tracker
  • Product taxes tracker


Wiki pages:

  • UI to create/edit different taxes


New preferences needed:

  • Tracker ID of taxes tracker
    • Field ID of Taxes: Tax ID
    • Field ID of Taxes: Tax type (percentage/flat rate)
    • Field ID of Taxes: Tax percentage rate
    • Field ID of Taxes: Tax flat rate
    • Field ID of Taxes: Tax on tax
  • Tracker ID of product taxes tracker
    • Field ID of Product Taxes: Product ID
    • Field ID of Product Taxes: Tax ID
    • Field ID of Product Taxes: Apply only when (Vertical bar separated conditions in the form trackerId:fieldId=value where tracker trackerId is a user tracker, for example, "1:10=Quebec|1:11=Canada" where tracker 1 is the user profile tracker specifying the shipping info and 10/11 is the fieldId for Province and Country respectively.)
  • Tax note to display to users (e.g. Tax registration number)


New code:

  • To select active taxes to apply for each product
  • Tiki Payment to be enhanced to apply taxes on each item, and to show the amount for each item, and totalling it up.

Step 6: Discount coupons


Trackers:

  • Discount coupons
  • Discount coupon usage


Wiki pages:

  • UI to create/edit discount coupons
  • UI for shop owner to review discount coupon usage


New modified Tiki Payments UI to:

  • Check for discount coupon feature
  • Allow applying of discount coupon leading to modifying of invoice


New preferences needed:

  • Tracker ID of Discount coupons
    • Field ID of Discount coupons: Discount coupon ID
    • Field ID of Discount coupons: Discount coupon code
    • Field ID of Discount coupons: Start validity
    • Field ID of Discount coupons: End validity
    • Field ID of Discount coupons: Reusable
    • Field ID of Discount coupons: Last used
    • Field ID of Discount coupons: Discount type (flat rate/percentage)
    • Field ID of Discount coupons: Fixed value
    • Field ID of Discount coupons: Percentage value
    • Field ID of Discount coupons: Only good for product
  • Tracker ID of Discount coupon usage
    • Field ID of Discount coupons usage: Discount coupon ID
    • Field ID of Discount coupons usage: User
    • Field ID of Discount coupons usage: Used at
    • Field ID of Discount coupons usage: Associated Order
    • Field ID of Discount coupons usage: Amount redeemed


Code to:

  • Check validity of discount coupon code entered
  • Apply and modify invoice based on application of coupon
  • Record discount coupon usage