Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Customer Coupon #5662

Closed
KevinSu89 opened this issue Dec 5, 2019 · 8 comments · Fixed by #5959
Closed

Customer Coupon #5662

KevinSu89 opened this issue Dec 5, 2019 · 8 comments · Fixed by #5959

Comments

@KevinSu89
Copy link

"My coupons" Page
As a customer, I want to have a "my coupons" page so that I can see all my coupons there

AC:
UI

  • Create a new page called "My coupons" under the "My account" to show a list of all the coupons belong to the current customer
    -- Page title: My Coupons
    -- For anonymous users, ask the customer to login first
    -- The list is paged and show 10 coupons per page
    -- Be able to sort the list by startDate, endDate
    -- Do not show expired coupons
    -- For each coupon we should show the following information:
    --- Name, if it is longer than 2 lines, show "..." in the end
    --- Status: yellow for Effective Soon, green for Active and red for Expiration Soon; this should be localized
    --- Effective period: the date should be localized
    --- "Read more" link
    --- Notification checkbox
    --- "Find Product" button
  • Create a pop-up page will contain all the detailed information for a coupon
    -- Name
    -- Description
    -- Effective period: the date should be localized
    -- Status: yellow for Effective Soon, green for Active and red for Expiration Soon; this should be localized

Interaction
Claim a coupon

  • When the customer enter a claiming url for a coupon, like .../my-account/coupon/claim/ {couponcode}
    , try to claim this coupon for this customer and redirect to "My coupon" page
    -- For anonymous users, ask the customer to login first; after login, continue claiming the coupon and redirect to "my coupons"
    -- Upon success
    --- show a global message "You have successfully claimed this coupon."
    --- show the new claimed coupon in the "My coupon" page
    -- Upon failure
    --- show a proper global message.

"Read more" link

  • When the customer click the "Read more" link, show a pop-up which contains the detailed information for this coupon(refer to above)
  • Show a busy indicator in the pop-up before getting the data from backend

Notification checkbox

  • By default, the coupon notification is disabled
  • When customer clicks this checkbox, enable the coupon notification and put the checkbox as "checked"
  • When customer clicks this checkbox again, disable the coupon notification and put the checkbox as "unchecked"
  • If the coupon is expired, show error message and refresh the coupon list

Find Product" button

  • When the customer clicks the "Find products" button, redirect to the product search page which contains all the applicable products of this coupon
    -- The breadcrumb should contain the coupon name, like: HOME/MY COUPONS/xxx results found
  • If the user direct input the url to enter the product search page of a coupon, ask the user to login first

Please refer to the mock-ups:
https://app.zeplin.io/project/5c9ddbcf16d4ed776bceeeaa?seid=5ca4c1c7e32f16b878c6a5d3

NFR:
Use cms framework to ensure extensibility of "My coupons" page

Applying Customer Coupon
As a customer, I want to apply my customer coupon to the cart so that I can get some promotions

AC:

  • Enhance the standard coupon input box to show a dropdown list of all the customer coupons for this customer
    -- Show a placeholder in the input box and a note below the coupon input box to indicate that the customer can input or select coupon codes here
    -- Only show the customer coupons belong to the current user
    -- Only show available coupons(not applied, not expired)
    -- The code is sort by the coupon code(ascending)
    -- In the list, show the coupon code for each coupon; warp the word if it's too long
    -- The dropdown list have a maximum height(5 coupons) and show a scoll bar if the customer have too many coupons
    -- Still allow customer to enter coupon code
    --- When the customer inputs some characters, filter the list to show the coupon codes which contains the input characters
    -- For anonymous users or the users who don't have a customer coupon, show the standard coupon input box
    -- The customer should be able to click a coupon from the dropdown list to apply it to the cart
    --- Same behavior as applying a standard coupon, such as recalculate the cart, show coupon code in order summary section, etc.
    -- Customer should be able to checkout and place order with customer coupons and get the corresponding promotions
    --- Expired coupons cannot be checkout or placeorder

Please refer to the UI mock-up: https://app.zeplin.io/project/5c9ddbcf16d4ed776bceeeaa?seid=5ca4c1c7e32f16b878c6a5d3

@KevinSu89 KevinSu89 created this issue from a note in KungFu SPRINT (To Do) Dec 5, 2019
@KevinSu89 KevinSu89 moved this from To Do to In Progress in KungFu SPRINT Dec 5, 2019
maggielin0 added a commit that referenced this issue Dec 10, 2019
@hackergil
Copy link
Contributor

hackergil commented Dec 10, 2019

I tested the PR above with 1905 and it failed. Which commerce suite version does it work with?

No bean named 'customerCouponCodeValueResolver' available

@maggielin0
Copy link
Contributor

it works with patch 1905.5, and the bean 'customerCouponCodeValueResolver' is defined in customercouponservice, which should exist in any version of 1905. the spa recipe already added customercouponoccaddon, so the customercouponservice should also be there.

@kacperknapik kacperknapik moved this from In Progress to Code Review & Local QA in KungFu SPRINT Jan 2, 2020
@kacperknapik kacperknapik self-assigned this Jan 2, 2020
maggielin0 added a commit that referenced this issue Jan 13, 2020
Introduce customer coupon so that user can claim customer coupon, check the coupons in "My Coupons" page and apply customer coupon in cart page. Add components, selectors, ngrx and occ-services.

BREAKING CHANGE:

CartCouponComponent updates constructor to add CustomerCouponService.

Closes GH-5662
marek-sap added a commit to marek-sap/cloud-commerce-spartacus-storefront that referenced this issue Jan 14, 2020
* develop:
  feat: introduce selective cart (SAPGH-5720)
  Only send amended order entries (SAP#6053)
  fix: XMLHttpRequest error when dynamically loading translations using SSR (SAP#6039)
  feat: introduce customer coupon (SAPGH-5662)
  fix: Global Message timeout blocks rendering of SSR application
  Add variant info to cancel/returns (SAPGH-6016) (SAP#6040)
  update dev with latest from maintenance branch (SAP#6031)
  feat: change schematics versioning to more automatic for releases (SAP#6025)
  fix: Make guest order route configurable SAP#6017 (SAP#6024)
@kacperknapik kacperknapik moved this from Code Review & Local QA to Server QA in KungFu SPRINT Jan 23, 2020
@kacperknapik kacperknapik moved this from Server QA to Doc Input & Check in KungFu SPRINT Jan 23, 2020
@kacperknapik kacperknapik removed their assignment Jan 23, 2020
@KevinSu89 KevinSu89 moved this from Doc Input & Check to Done in KungFu SPRINT Feb 11, 2020
@nabazhenovValtech
Copy link

it works with patch 1905.5, and the bean 'customerCouponCodeValueResolver' is defined in customercouponservice, which should exist in any version of 1905. the spa recipe already added customercouponoccaddon, so the customercouponservice should also be there.

Im trying to follow this guide https://sap.github.io/cloud-commerce-spartacus-storefront-docs/installing-sap-commerce-cloud/ and prepare the SAP Commerce locally for Spartacus. And getting the mentioned exception "No bean named 'customerCouponCodeValueResolver' available"

SAP Commerce version is 1905.11
spartacussampledataaddon is dowloaded from the latest Spartacus Storefront release 1.4.1

Do you know which version doesn't have such issue?

@maggielin0
Copy link
Contributor

Which recipe do you use? this is the spartacus recipe https://github.tools.sap/cx-commerce/c3po-legacy-devconfigs/blob/master/spartacus/build.gradle . Make sure that the customercouponoccaddon is installed.

@nabazhenovValtech
Copy link

https://github.tools.sap/cx-commerce/c3po-legacy-devconfigs/blob/master/spartacus/build.gradle

As it is defined in the mentioned guide, I use b2c_acc_plus renaming to b2c_for_spartacus and adding spartacussampledataaddon into the extension list

@maggielin0
Copy link
Contributor

I get your problem. Because there's no customercouponoccaddon in backend, you need to remove /spartacussampledataaddon/resources/spartacussampledataaddon/import/stores/electronics/solr.impex which depends on the bean.

@nabazhenovValtech
Copy link

@maggielin0 Thanks, it has solved that problem. I've removed solr_en.impex too

@JdidouBrahim
Copy link

I get your problem. Because there's no customercouponoccaddon in backend, you need to remove /spartacussampledataaddon/resources/spartacussampledataaddon/import/stores/electronics/solr.impex which depends on the bean.

That was helfpful thanks

ikeshishian added a commit to ikeshishian/cloud-commerce-sample-setup that referenced this issue May 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
KungFu SPRINT
  
Done
Development

Successfully merging a pull request may close this issue.

6 participants