Skip to main content

GSoC’17 Coding period | Week #6 | UC-Wishlist





With the conclusion of the sixth week of Google Summer of Code 2017, the Coding regime is nearly halfway through the second phase. The previous week involved some basic albeit important conceptualizations, which have been of immense help and have provided noteworthy assistance for understanding the port functionality.
As mentioned earlier, the previous week I had summarised the implementation for the third port concerning the second phase, i.e, porting ‘View/Update wishlist’ functionality. Concerning the above port the following tasks had to be considered:
  • Creating the WishlistViewForm class by implementing the​ Form &​ Module API​ s, where the forms are created using ​  $form=\Drupal::formBuilder()->getForm( )​.
  • Providing an interface defining a wish list entity by creating the class UcWishlistInterface by extending ContentEntityInterface and EntityOwnerInterface.
  • The callback: uc_wishlist_display($wid, $mode) is utilised under the function uc_wishlist_view_form to check for required permissions and private checkbox for lists:
    • Set $wid (wish list id) if it is null.
    • Check the if user is wish list owner and provide right to edit.
    • If the user is not the owner and there are no products, then show the link to search. 
    • Display the required list if user is the owner or list is not private.
  • Creating the UcWishlist.php file in order to define user entity class.
As of now, I’ve completed a significant portion of porting the the first functionality, i.e., ‘Viewing/Updating user wish list’. Moreover, the ‘Update’ functionality is integrated through the WishlistViewForm config form/class to modify any specific wish list, so that on accessing the ‘Wish list’ link the user wish list is displayed with the added products and gets the products post data and iterate them to update one by one in a specific wish list and update the information for this product in the wish list.

Regarding the fourth port, i.e., porting ‘Search Wishlist’ functionality, based on a comprehensive analysis of the same, the following work had been done the earlier week:
                   ->condition('u.name','%'.$keywords.'%','LIKE')
                   ->condition('w.title','%'.$keywords.'%','LIKE')
                   ->condition('w.address','%'.$keywords.'%',
                   'LIKE'))​​ :
                   makes three queries and returns a new DatabaseCondition.

The code for the current status of the port can be found here.

Winding up, these were the objectives and concepts learned during the third week of coding phase in GSoC’17. Hope to learn many more new concepts in the coming weeks for the successful completion of the port.

Cheers!

Comments

Popular posts from this blog

GSoC’17 Coding period | Week #11 | Uc wishlist

  Another week has reached its aftermath and the third phase of the coding regime is about to conclude with the onset of the Final Evaluations for Google Summer of Code 2017. The time spent so far during the previous months have been a great learning experience with Drupal, with the timely help provided for the project by my mentor Naveen Valecha . Coming to the present scenario, the majority of the port concerning the Uc Wishlist has been completed, save for some technical fixes and implementation requirements regarding the port of the final sub-module ‘Add user wish list settings’. Other than that, I would put up the alpha release of the module as soon as the current code gets reviewed. Additionally, I would propose few functional tests as per instructions from the mentor and reviews from the developers. Moreover, my code for the previous ports have been committed to the Drupal Core by my mentor and the current status of the code could be found here . S

GSoC’17 Coding period | Week #2 | Drupal

Google Summer of Code 2017 has entered yet another week and with the conclusion of week 2 of the Coding Phase, things in general have become much more elaborative, as well as exciting ! The previous week was significantly noteworthy in terms of the intricacies and topics dealt with for the  objectives undertaken for the first phase. I was also able to manage time better to focus more towards my project, and the implementation in particular. In the previous blogpost , I had mentioned about the port objectives decided with regard to the first phase of the coding regime. As planned earlier, my main intent for the week was to port the functionality ‘Add administrator wish list settings’. The port of this sub-module encapsulated the completion of the following objectives: Configuring the wish list settings by administrator: This feature allows the administrator to implement crucial settings related to any wish list for authenticated users.  Man

GSoC'17 | Drupal

This year I had the utmost opportunity of getting selected for the prestigious Google Summer of Code 2017, as a part of Drupal, the open source organisation to which I contribute. Drupal, is a free and open source content-management framework written in PHP and distributed under the GNU General Public License, provides a back-end framework for at least 2.2% of all Web sites worldwide – ranging from personal blogs to corporate, political, and government sites. Systems also use Drupal for knowledge management and for business collaboration. The Google Summer of Code, often abbreviated to GSoC, is an international annual program, first held from May to August 2005, in which Google awards stipends, which depends on place of university of the student, to all students who successfully complete a requested free and open-source software coding project during the summer. The program is open to university students aged 18 or over. Students contact the mentor organization