Add dynamic stock availability badges to product cards#198
Add dynamic stock availability badges to product cards#198vineelatallam2008-star wants to merge 4 commits into
Conversation
|
@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
left a comment
There was a problem hiding this comment.
Thanks for the contribution! The stock badge feature is a useful addition, but I found a few issues that should be addressed before merging:
- The new CSS introduces a syntax error. The
.stock-badge.outrule is missing a closing}after:
.stock-badge.out {
background: #dc3545;This can affect CSS parsing for subsequent rules.
- 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".
- The PR removes existing button styling classes (
primary-actionandicon-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?
|
Any updates ??? |
|
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!. |
There was a problem hiding this comment.
Why you removed full file compare.html ??
Closes #187
Changes Made
Added dynamic stock availability badges to product cards.
Displayed stock status as:
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.