Skip to content

Add dynamic stock availability badges to product cards#198

Open
vineelatallam2008-star wants to merge 4 commits into
AnthropicBots:mainfrom
vineelatallam2008-star:stock-availability-badge
Open

Add dynamic stock availability badges to product cards#198
vineelatallam2008-star wants to merge 4 commits into
AnthropicBots:mainfrom
vineelatallam2008-star:stock-availability-badge

Conversation

@vineelatallam2008-star

@vineelatallam2008-star vineelatallam2008-star commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Closes #187
Changes Made
Added dynamic stock availability badges to product cards.
Displayed stock status as:

  • In Stock
  • Low Stock
  • Out of Stock
    Added automatic stock detection based on product inventory values.
    Moved the stock badge below the product rating for a cleaner and more user-friendly layout.
    Ensured stock badges appear correctly for featured products, new arrivals, and future products added to the catalog.

@vercel

vercel Bot commented Jun 17, 2026

Copy link
Copy Markdown

@vineelatallams143-bit is attempting to deploy a commit to the Bhuvansh's projects Team on Vercel.

A member of the Team first needs to authorize it.

@BHUVANSH855 BHUVANSH855 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution! The stock badge feature is a useful addition, but I found a few issues that should be addressed before merging:

  1. The new CSS introduces a syntax error. The .stock-badge.out rule is missing a closing } after:
.stock-badge.out {
    background: #dc3545;

This can affect CSS parsing for subsequent rules.

  1. The stock logic defaults missing stock values to 0:
const stock = Number(product.stock || 0);

This will mark products without a defined stock field as "Out of Stock".

  1. The PR removes existing button styling classes (primary-action and icon-action) from product action buttons. These changes appear unrelated to the stock badge feature and may alter existing UI behavior/styles.

Could these issues be addressed before merging?

@BHUVANSH855 BHUVANSH855 added action: clean-up Pull Request needs cleaning. SSoC26 Program label for Social Summer of Code Season 5. labels Jun 19, 2026
@BHUVANSH855

Copy link
Copy Markdown
Member

Hi @vineelatallam2008-star,

Any updates ???

@BHUVANSH855 BHUVANSH855 added the Merge Conflicts. PR has merge time conflicts, update your local branch and then re commit with updated changes. label Jun 22, 2026
@vineelatallam2008-star

Copy link
Copy Markdown
Contributor Author

Hi, I have addressed the review comments. Fixed the stock badge CSS and stock handling logic, and removed unrelated Compare feature changes to keep the PR focused. Please review the latest updates. Thanks!.

Comment thread frontend/compare.html

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why you removed full file compare.html ??

@BHUVANSH855 BHUVANSH855 removed the Merge Conflicts. PR has merge time conflicts, update your local branch and then re commit with updated changes. label Jun 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: clean-up Pull Request needs cleaning. SSoC26 Program label for Social Summer of Code Season 5.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE]: Add Dynamic Stock Availability Badges to Product Cards

3 participants