Skip to content

Ajaxify the update of cart block

Compare
Choose a tag to compare
@subhojit777 subhojit777 released this 23 Nov 06:53
· 39 commits to 8.x-1.x since this release
  • Issue [#2925451] by subhojit777: Update the module as per latest the Drupal Commerce
  • Issue [#2923410] by subhojit777: [Code Improvement] dc_ajax_add_cart.refresh_page_elements_helper should be responsible for updating add to cart form
  • Issue [#2919633] by subhojit777: [Code Improvement] Use container for loading services in RefreshPageElementsHelper
    • Fixed a problem with Symfony ContainerInterface.
    • Made `refreshAddToCartForm()` non-static so that it has access to the current form object. Thanks to https://api.drupal.org/comment/62339#comment-62339.
    • Using `dc_ajax_add_cart.refresh_page_elements_helper` inside AjaxAddToCartForm.
    • Updated tests.
  • Issue [#2915360] by subhojit777: Review the approach of showing confirmation messages
  • Issue [#2920694] by subhojit777: [Code Improvement] Unhardcode status message block id inside RefreshPageElementsHelper
  • Issue [#2921187]: [Test Improvement] Check return type of RefreshPageElementsHelper update methods
  • Issue #2910746 by subhojit777: Ajaxify the update of cart block
    • Kernel tests for `getCartBlock()`, `updateCart()`, `updatePageElements()`.
    • Update of cart block implemented.
    • Tests updated.
  • Issue [#2919191] by subhojit777: [Code Improvement] Remove the static usages of methods in RefreshPageElementsHelper
  • Issue [#2917569] by subhojit777: [Code Improvement] Move methods for refreshing page elements into a helper class
    • Negative tests added.
    • Code updated as per the definition of `updateStatusMessages()`.
    • Since `updateStatusMessages()` returns an object, `refreshAddToCartForm()` is updated so that it returns the output from `updateStatusMessages()`, rather than returning the updated response.
  • Issue [#2910738] by subhojit777: Code improvements
    • Added test message.
    • Added notes for further improvements.