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

TH-109: Harmony > Prevent the customer from placing an order if a variant is out of stock #65

Merged
merged 8 commits into from
Oct 18, 2024

Conversation

bj-anas
Copy link
Contributor

@bj-anas bj-anas commented Oct 16, 2024

JIRA Ticket

Ticket: TH_109

Prerequisites

  • Check this branch locally and run pnpm run release
  • 3 new files will be generated in this format theme name + date + .zip
  • Upload generated file locally or in seller-area test env

QA Steps

There are two different scenarios to test this PR:

1- Direct add to cart:

  • To activate this feature:
    -> On store admin under: Store > theme > Product settings > Advanced > direct add to cart
    -> Now theme editor: Theme settings > general settings > direct add to cart

  • On store admin > Products > all products > create a product or select one that doesn't have variants

  • Now activate track inventory feature on him and set a number

  • To test this feature that's working good make sure that this product is visible on the home page of your store front for example (you can do that from theme editor by adding it on a product slider section)

  • After you clicking on the product you should see that the cart drawer is open and your product is in your cart (if the stock is out you will see a warning popup notification)

2- Normal mode:

  • First make sure that you have activated track inventory on your product.
  • Set the tracking inventory number on a product (if it have variants scroll down open the variants accordion, under the Untracked input set a number on each variant.
  • Now under the product page of your store front try to choose a higher stock than the available you will see a popup notification warning or if the stock is 0 you won't even be able to click on the add to cart button or express checkout button as well you will see them disabled.
  • We also have the ability to see the single product section on the home page you can test the same thing again.
  • The behaviour that you expect to happen when you have a product that have many variants based on its own inventory you supposed to see this:
    - variant has 0 inventory: express checkout & cart buttons are disabled
    - variant has 2 on inventory : max quantity that the customer can add to cart is 2 if try to add more the popup notification warning show up
    - variant has 2 on inventory and 2 on cart: the popup notification warning show up

PS: Make sure to test also the cart drawer and the cart page in both scenarios => changing the variant quantity.

@bj-anas bj-anas self-assigned this Oct 16, 2024
@bj-anas bj-anas added the in progress Currently being developed. label Oct 16, 2024
@bj-anas bj-anas added Ready for review Requires a review from another developer. and removed in progress Currently being developed. labels Oct 17, 2024
@bj-anas bj-anas merged commit e4ee134 into master Oct 18, 2024
@bj-anas bj-anas deleted the TH-109-2 branch October 18, 2024 16:08
@bj-anas bj-anas added Reviewed PR has been reviewed and approved. and removed Ready for review Requires a review from another developer. labels Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Reviewed PR has been reviewed and approved.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants