Goals and Implementation overview

Listed below are the goals and deliverables for the Google Summer of Code 2017 project Porting UC wishlist to Drupal 8:

Phase 1:

#2889425: Porting Uc wishlist module to Drupal 8 | Phase 1

  1. Add administrator wish list settings:
    • The feature makes use of the Form API for the creation and implementation of the above functionalities. The Form function has to be refactored to the FormStateInterface function.
    • The Configuration API provides a central location to store configuration details of the above components, particularly Drupal::config()→get() & Drupal::config()→set(), to store the involved variables.
    • The global theme variables have to be replaced by the active theme object.
  2. Enable ‘Add to Cart’ and ‘Add to wishlist
    • Enables the user to add items (products) either to the cart or to a particular wishlist based upon requirement. Also, this feature enables to add particular items to the cart present in specific wishlists.
    • This feature would be implemented using the Hook functions in Drupal. Considering adding items to cart, the function uc_cart_add_item() would be used. This button would be accessible on the user’s wish list only if product is not out of stock. To check that we would use uc_stock module uc_product_exist.
    • For adding items to a wishlist, we would use the Hook function uc_wishlist_add_to_wishlist_submit and delivery to orders will add item to wishlist and redirect the page.
    • Implement hook_form_validation to add validation to the uc_cart_view_form.

Phase 2:

#2880447: Porting Uc wishlist module to Drupal 8 | Phase 2

  1. Allowing a user to view/update wishlist:
    • This functionality enables the user to view the contents of a specific wish list, modify it according to the options available and add to cart the required items.
    • The callback: uc_wishlist_user_display is implemented for user authorization
    • The callback: uc_wishlist_display($wid, $mode) is utilised under the function uc_wishlist_view_form to check for required permissions and private checkboxes.
    • The Theme API is used to arrange the created forms in the resulting page. The Renderable Array System has to be applied to improve the grouping of items.
  2. Enable 'Search Wishlist' functionality:
    • Allows user to search a specific wish list with a purpose to access/modify it.
    • This functionality would make use of the Form and Search APIs for executing a functional and effective search.

Phase 3:

#2880444: Porting Uc wishlist module to Drupal 8 | Phase 3

  1. Option to email wishlist to others:
    • This feature would enable users or wish list owners to share any wish list with other users or potential customers by emailing it to the respective user.
    • The Email subject, Email recipients & Email message properties are defined in an appropriate hook_mail implementation.
    • The Form API and Database API would be used for the creation, submission & validation of the wish list email and to provide a structured interface for the dynamic construction of queries to implement the above functionality.
    • Conversion of D7 Hook functions to D8 APIs involving Routes, to define the path to controllers (page callbacks in D7) or to create tabs and/or contextual links. Email address of an user is verified through the Data Common API.
    • The Renderable Array System has to be applied to improve the grouping of form items. The email could be sent by using Mail Manager using public function MailManager::mail.
    1. Add User wish list settings:
      • This functionality specifically allows the user to implement certain modifications for any specific wishlist.
      • This feature is implemented by creating a table for the required wish list settings using the Form and Database APIs.
      • The mandatory fields, including User, Title, Expiration Date & Status are created using Field API and the Hook functions hook_field_settings_form & hook_field_widget_form. The Configuration API would be used to configure the fields.
      • db_select is implemented with a Join to join/combine with another table containing relevant information.
      • The Renderable Array system would be applied to improve the grouping of the contents. The Field Theme System would be configured.

    Documentation

    References:

    Comments

    chiranjeeb2410 created an issue. See original summary.

    chiranjeeb2410’s picture

    Issue summary: View changes
    chiranjeeb2410’s picture

    Issue summary: View changes
    chiranjeeb2410’s picture

    chiranjeeb2410’s picture

    Issue summary: View changes
    chiranjeeb2410’s picture

    Issue summary: View changes
    chiranjeeb2410’s picture

    Issue summary: View changes
    chiranjeeb2410’s picture

    Issue summary: View changes
    chiranjeeb2410’s picture

    Issue summary: View changes
    naveenvalecha’s picture

    Project: UC_wishlist » UC Wish List
    Version: » 8.x-1.x-dev
    Issue tags: -Uc wishlist, -Ubercart, -e-commerce, -shopping cart, -drupal commerce

    Moving to the correct project. Please move rest of the issues to the same project.

    chiranjeeb2410’s picture

    @naveenvalecha

    On it. Will move it as directed

    naveenvalecha’s picture

    I have done that myself

    chiranjeeb2410’s picture

    @naveenvalecha,

    Thanks for the changes. Should the ported functionalities be marked as done for phase 1 ?

    chiranjeeb2410’s picture

    Issue summary: View changes
    chiranjeeb2410’s picture

    Issue summary: View changes
    chiranjeeb2410’s picture

    Issue summary: View changes
    naveenvalecha’s picture

    chiranjeeb2410’s picture

    @naveenvalecha, working on last port for phase 3, will provide updated patch soon. Will work on fixing the issues once done.

    chiranjeeb2410’s picture

    Issue summary: View changes
    naveenvalecha’s picture

    @chiranjeeb2410
    Post the patch of phase 2 here #2880447: Porting Uc wishlist module to Drupal 8 | Phase 2 before phase 3 patch.

    naveenvalecha’s picture