SiteGenesis Gift Registry and Wish List Features
If you want to add gift registry functionality to an existing site, you need to understand how this functionality works within the SiteGenesis application, specifically with gift registry and wish list specific templates and pipelines.
Products are added to a wish list or gift registry on the product details page and the Quickview page (see the SiteGenesis Wireframes).
- Start by comparing the SiteGenesis application against your application to identify the storefront changes needed.
-
Modify the
account-landingcontent asset (or your application's equivalent) to include an Add to Gift Registry or Add to Wish list link. -
Modify your existing files so they perform like SiteGenesis
relative to the following files, which are located in the SiteGenesis
Storefront Core cartridge, unless indicated otherwise:
Option Description Form definitions cart.xmlSpecifies action: addToGiftRegistryandaddToWishList.product.xmlSpecifies action: addtogiftregistryandaddtowishlist.productlists.ditaContains the form for the gift registry. profile.xmlRegisters a customer. sendtofriend.xmlContains the form for sending an email to a friend. Pipelines Cart.xmlHandles GiftRegistry-ReplaceProductListItemandWishlist-ReplaceProductListItemin the AddProduct Start node (from gift registry or wish list page). This is used only for the simple UI.GiftRegistry.xmlContains workflows that enable customers to create and maintain one or more gift registries. GiftRegistryCustomer.xmlRenders a public gift registry, which can be accessed by people other than the owner. Wishlist.xmlContains workflows that enable a customers to create and maintain a wish list. ProductList.xmlProvides utility workflows associated with product lists such as a wish list or a gift registry Script productlist/GenerateShipmentName.dsGenerates a shipment name for a shipment representing a product list. Generally, a product list of type Gift Registryis given a name when the registry is created. However, a product list of typeWish Listis not always given a name. Also, there might be more than one product list with the same name, though they represent two different owners. For example, you could have two different gift registries called 'My Wedding'. To generate a name, this script uses the list name first, then the list name and the owner's name if there is already a shipment using that name, and finally the owner's name and the type of product list if the product list doesn't have a name. This script also assigns the ID to the list as its name if the list doesn't have a name.Static Files path: static/defaultcss/style.cssProvides styling for gift registry and wish list search. css/style-responsive.cssProvides styling for gift registry and wish list search for responsive design. app.jsBinds handlers to AddtoCartDisabled, AddtoCartEnabled events for disabling/enabling wishlist/gift registry links (located in the SiteGenesis Storefront cartridge). Templates checkout/cart/cart.ismlProcesses a gift registry shipment. components/header/header.ismlLinks to the gift registry and wish list from the header. product/compare/compareshow.ismlProvides Add products to the gift registry and Add products to the wish list buttons within product compare. product/components/displayliproduct.ismlShows the gift registry or wish list customer if the list item is in the gift registry. product/product.ismlProvides an Add to Registry button to the product detail page. Performs a remote include of the Product-Detail, and must reside in that related template. Resource files path: templates/resourcesaccount.propertiesContains messages specific for ISML files in the templates/default/account directory. components.propertiesContains messages specific for ISML files in the templates/default/components directory. forms.propertiesContains messages specific for ISML files in the forms directory. product.propertiesContains messages specific for ISML files in the templates/default/product directory. -
Add the SiteGenesis gift registry files.
Option Description Form definitions forms/default/giftregistry.xmlMetadata for the gift registry form. Pipelines GiftRegistry.xmlContains a set of workflows that let you create and maintain one or more gift registries. GiftRegistryCustomer.xmlRenders a public gift registry, which can be accessed by people other than the owner. Scripts path: scripts/account/giftregistryAssignEventAddresses.dsAssigns the addresses used for the gift registry event. There are two addresses: the address to use before the event occurs and the address to use after the event occurs. You can create new addresses. This script uses form object definitions and form value definitions defined in the giftregistry.xmlform.AssignPostEventShippingAddress.dsAssigns the form values of the address before event to the address after event. This script uses form object definitions and form value definitions defined in the giftregistry.xmlform.CopyAddressFormFields.dsCopies the gift registry event address form fields, clears the form, and copies the values back to the form. This is done to maintain the state of the form when creating a new gift registry and the customer clicks the Previous button. InitializeAddressOptionsd.dsInitializes the selected radio buttons for the addresses used for the event's before and after shipping addresses. UpdaterRegistryAddress.dsEnsures that shipments representing gift registries have an address in place. Because a gift registry shipping address can change based on the date of the gift registry event, this ensures that the address that appears on the summary page is the up-to-date address. Templates path: account/giftregistryaddresses.ismlProvides the second step of the gift registry creation logic: participant addresses, and provides address-related gift registry actions such as address changes. eventparticipation.ismlProvides the first step of the gift registry creation logic: event participants. giftregistryconfirmation.ismlProvides the third step of the gift registry creation logic: the final confirmation. giftregistrylanding.ismlCreates the gift registry landing page, which provides search and account create facilities. giftregistryresults.ismlShows the results of the gift registry search. giftregistrysearch.ismlShows the form to search the gift registry. navigation.ismlShows the form navigation buttons for the gift registry. pt_giftregistry.ismlProvides the page type (decorator template) file for gift registry display. purchases.ismlShows the gift registry purchases form. refreshregistry.ismlIntentionally empty. registry.ismlRenders the gift registry form and provides basic actions such as item updates and publishing. registrycustomer.ismlRenders a public gift registry, which can be accessed by people other than the owner. registrylist.ismlShows the current gift registries and enables the creation of a new registry. registryselect.ismlSelects a gift registry from a list of gift registries, for example, found by the registry search. -
Add the SiteGenesis wish list files:
Option Description Form definitions wishlist.xmlMetadata for the wish list form. Pipelines Wishlist.xmlContains a set of workflows that let you create and maintain a customer's wish list. Templates path: account/wishlistpt_wishlist.ismlProvides the page type (decorator template) file for the wish list display. refreshwishlist.ismlEmpty file. wishlist.ismlRenders the wish list page. wishlistlanding.ismlContains the login form specific for the wish list. wishlistresults.ismlShows the wish list search results. wishlistsearch.ismlShows the form to search the wish list. -
Add this script:
scripts/account/wishlist/SetShippingAdress.ds. -
Use these API classes:
-
ProductList -
ProductListItem -
ProductListItemPurchase -
ProductListMgr -
ProductListRegistrant
-