I have implemented front-end functionality for the shopping cart. Here is the main flow of things:
geem_cart.js
Clicking #updatePackageButton retrieves @context and specifications of items in shopping cart via get_cart_items_context and get_cart_items_specifications, which are then added to the user-selected draft package via add_context_to_package and add_specifications_to_package
get_cart_items_context, get_cart_items_specifications, add_context_to_package and add_specifications_to_package call functions in geem_api.js
I have implemented front-end functionality for the shopping cart. Here is the main flow of things:
geem_cart.js
Clicking
#updatePackageButton
retrieves@context
andspecifications
of items in shopping cart viaget_cart_items_context
andget_cart_items_specifications
, which are then added to the user-selected draft package viaadd_context_to_package
andadd_specifications_to_package
get_cart_items_context
,get_cart_items_specifications
,add_context_to_package
andadd_specifications_to_package
call functions ingeem_api.js
geem_api.js
Direct calls from the browser to the server
get_resource_context
Calls
ResourceViewSet.context
Called by
geem_cart.get_cart_items_context
get_resource_specifications
Calls
ResourceViewSet.specifications
Called by
geem_cart.get_cart_items_specifications
add_to_resource_context
Calls
ResourceViewSet.create_context
Called by
geem_cart.add_context_to_package
add_to_resource_specifications
Calls
ResourceViewSet.create_specifications
Called by
geem_cart.add_specifications_to_package