Using Microsoft InfoPath to create a shopping cart...

17
Using Microsoft InfoPath to create a shopping cart experience Stacy Little Faegre Baker Daniels

Transcript of Using Microsoft InfoPath to create a shopping cart...

Using Microsoft InfoPath to create a shopping cart experience

Stacy Little

Faegre Baker Daniels

Background

• Prior to Faegre Baker Daniels existing there was Faegre & Benson and Baker & Daniels – two separate firms with two separate processes for client holiday gifts.

• Large Scale Goal: Unifying the two firms into one firm across multiple platforms, domains, applications and processes – Unifying the client holiday gift order process

Client Holiday Gift Order (demo)

Design

• Created the Details and Checkout page

• Wanted a consistent look/feel for each item available to choose – Designed the main view

• ***Made sure it contained all essential parts that needed to appear on each of the item views

– copied/pasted it to other views

– updated content on each view to be of that particular item

Creating the Shopping Cart

• Utilized Qdabra’s qRules – http://www.qdabra.com/

• Used a repeating table within InfoPath then set rules to run logic – Inserted row into repeating table – “Add to Cart” button

• Same button with same rules on each item – easily reusable • Set values of last row inserted based on item selected by

user • Created formulas to do all calculations

Insert Row

Insert Row cont.

• Because repeating tables give you a blank row to begin with, only run this rule after the first item has been added to the cart

• Use a helper field and a condition against it to determine if it will execute or not – Simple yes/no text box field

– Default value of no

• Upon first time of clicking any “Add to Cart” button from any item, change it from no to yes

Insert Row cont.

• qRules command: Insert Row

• This command allows you to insert a row anywhere in the table

– we just want to insert the row at the end

Set Values

Set Values cont.

• Three details about each item are needed for shopping cart : – Option chosen

– Title of the item based on which option they pick

– Quantity

Set Values cont.

• Example: Savory Variety Basket has 2 options:

Set Values cont.

• Rule on the Option field, sets the title of the item

Set Values cont.

• Use qRule command: Set Value

• Take direct xPath of field you want to set, incorporating [last] into the formula

– This indicates you want to set the last row of the table – the one we just inserted

• Repeat this command for the Price and Quantity

Check if Initial Row has Been Added

Check if Initial Row has Been Added

• This rule is on every Add to Cart button

– It will run the first time the Add to Cart button is clicked no matter what the item

• Changing the value of our helper field we used previously from no to yes

• Now the “Insert Row” rule will always run

Reset Quantity Option