Component usage
The product card is implemented as a custom HTML element<custom-salla-product-card> that accepts a product object and various attributes to control its appearance.
Attributes
Product object containing all product information including id, name, price, images, and status
Displays the card in horizontal layout instead of vertical
Adds shadow effect when hovering over the card
Hides the add to cart button from the card
Displays the product image as full-width with overlay content
Renders a minimal version of the card with reduced information
Applies special styling and shows quantity circle indicator for limited offers
Displays remaining quantity badge on the product card
Display styles
Vertical card
Default card layout with image on top and content below:Horizontal card
Card with image on the side:Full image card
Card with full-width image and overlay content:Minimal card
Compact version without subtitle and donation details:Special offer card
Highlights limited quantity products with countdown timer:Features
Wishlist integration
The card automatically integrates with Salla’s wishlist system. Users can add or remove products from their wishlist directly from the card.Price display
The component automatically handles different price scenarios:- Sale prices with strikethrough original price
- Starting prices for products with variants
- Regular pricing
- Donation amounts for donation products
Product badges
Cards display relevant badges based on product status:- Pre-order labels
- Promotion titles
- Remaining quantity
- Out of stock indicators
Image handling
The card respects the store’s image fit settings and uses the configured placeholder for products without images.The product card reads the
fit_type setting from store configuration to determine whether images should be contained or covered.