Add Additional Options to Checkout
|Status:||In Progress||Start date:||11/25/2017|
|Assignee:||Pavan Rikhi||% Done:|
|Category:||Checkout||Spent time:||7.71 hours|
|Target version:||v0.6.0 - Checkout|
- Coupon codes
- priority S&H
Discount order by 5% if anything is entered into the field.
Make the fee $5 + 5% of the order total on top of normal shipping cost.
Add as extra field to shipping methods, w/ specific fields for excluding products/categories from priority shipping. Ideally customers would be able to place an order w/ priority shipping w/ those excluded products if they had other products, & would only be charged for priority shipping for eligible products. Not sure how stoneedge would handle it though.
Need to exclude seasonal items & mushrooms.
[#1189] Add Store Credit to Checkout API Route
Add a storeCredit field to the Customer DB model & import store credit
data from ZenCart's Gift Certificates module in the Data Migration
Return a Customer's available store credit in the My Account & Checkout
Details Routes. In the Place Order API Route, allow Customers to apply
their store credit towards an Order.
- Add a StoreCreditLine value to the LineItemType datatype.
- Modify the Order Placed email to include any store credit that was
- Modify the chargeCustomer function so that it is no longer responsible
for deleting a Customer's Cart.
- Modify the createOrder function to also return the amount of store
credit that was applied to the Order.
[#1189] Add Store Credit Form to Checkout Process
Add an input field for applying store credit to an order during the
checkout process if the Customer has store credit available.
Display a Customer's available store credit on their My Account page.
Add any applied store credit to order summaries & total calculations.
Add a Format.centsNumber function to format cents as dollars like the
Format.cents function, but without the leading dollar sign.
[#1189] Add Member Discounts to Checkout API Routes
Modify the authorized & anonymous Checkout routes so that customers can
include their member number and receive their 5% discount.
Valid member numbers are simply strings with at least 4 characters.
- Add a `MemberDiscountLine` value to the `LineItemType` datatype.
- Add a `memberNumber` field to the `Customer` DB model.
- Add a `memberNumber` parameter to the Checkout Details & Place Order
- Add the Member Discount to the OrderPlaced email.
- Modify the Place Order routes so they update/initialize the Customer's
- Modify the `Checkout.createLineItems` function to create a
`MemberDiscountLine` if applicable.
- Modify the `CommonData.getCharges` function to account for the
membership discount if applicable.
[#1189] Add Member Numbers to Checkout Process
Add an input field for Member Numbers, enabling Customers to receive
their 5% discount.
If a Customer has an existing member number, it is used to pre-fill the
input & the discount will also shown on the Cart page.
- Add a Member Discount line to the Order Details pages.
- Add a `memberDiscount` field to the `CartCharges` type.
- Modify the Checkout Details & Place Order API requests to include the
entered member number.
- Modify the `Checkout.refreshDetails` function so that the Checkout
details are also refreshed when a valid member number is entered or
- Refactor the logic for limiting the maximum store credit during
checkout into a separate `limitStoreCredit` function.