Uploaded image for project: 'YesCart'
  1. YesCart
  2. YC-400

Refactor setting defaults to cart

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.0
    • Fix Version/s: 2.1.0, 2.2.0
    • Component/s: sf server
    • Labels:
      None

      Description

      Currently we have the following order of filters (in web.xml)
      1. ShoppingCartResolverFilter - which gets cart object from cookies (but cart is not aware of the Shop, so we cannot set defaults for currency and shop id)
      2. ShopResolverFilter - which sets the Shop object in ApplicationDirector and also sets defaults to the cart (which is set by previous filter).
      Therefore there is a bit of circular dependency here.

      What we need to do is:
      1. Fix the order so that the ShopResolverFilter is triggered first BUT DOES NOT set defaults to cart (this code should be moved to ShoppingCartResolverFilter once it restores the cart object). This can be achieved by re-ordering <filter-mapping> in web.xml
      2. Move the setting of defaults to ShoppingCartResolverFilter
      This will remove the cyclic dependency between filters and refine the responsibility of each filter.

        Attachments

          Activity

            People

            • Assignee:
              denis.lozenko Denis Lozenko (Inactive)
              Reporter:
              denis.lozenko Denis Lozenko (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: