Project

General

Profile

Feature #162

Updated by Eugene Suhanov 4 months ago

Nine storefront corrections across five branches. 

 **Cart (items 1, 4, 5)** — `CartController`'s actions gain `wantsJson()` branches; a new 
 `resources/js/modules/cart.js` intercepts the add forms so the button flips to "Pridané do košíka" 
 in place and a +/- stepper edits the real cart line. The product page reuses its existing 
 `ProductPurchase.vue` stepper rather than gaining a second. `/cart`'s steppers move to the same AJAX 
 path with a 2-second debounce. Header badge switches to a new `cartLineCount()` so 3 copies of one 
 bouquet reads **1**. Existing redirects stay as the no-JS fallback. 

 **Lightbox (item 3)** — `product/show.blade.php:348` uses `bg-black/92`, which is off Tailwind's 
 opacity scale, so no rule is emitted and the overlay is transparent. Change to `bg-black/90` and 
 sweep for other off-scale modifiers. 

 **Code pills (item 2)** — `ProductCardData::$code` already exists but `product-card.blade.php` 
 never renders it. Mirror the product page's pill into the card's free top-right slot. 

 **Category gating (items 6, 7, 8)** — one signal (`products_count`), three treatments: showcase 
 pills hide empty categories and finally carry `?category={slug}` (they currently all link to bare 
 `/products`); the home Katalóg grid shows all, blurred + lock-iconed when empty; `/products` shows 
 all, grayed and inert when empty. 

 **Why "Bestsellery" is the default:** it isn't. It's a hardcoded `<h2>` over `$products->take(5)` 
 — no flag, no query, no sales data. The seeded `bestsellery` category has no products, so after 
 gating it renders locked beneath a slider bearing its name. Rename the heading. 

 **Reviews (item 9)** — replace four invented testimonials with a `reviews` table + DTO + one looped 
 card partial (`rating >= 4`, visible, rating-desc, limit 4, section hidden at zero). Add a 
 `reviews:sync` command behind a disabled flag; the section always reads the DB. **Blocked on the 
 shop owner:** needs the Google **Business Profile** API (Places caps at 5 reviews with no rating 
 sort), which requires the managing account to grant OAuth access.

Back