v0.0.2
Demos (demo panel, opens in a new tab)

Service promises

The store's service promises as four cards: free shipping, easy 30-day returns, secure payment and live support.

zb:shop.benefits zubazar/ui-pro

PRO

This component is in Zubazar UI Pro; Zubazar UI Pro brings Zubazar UI with it. Installing Zubazar UI Pro →

Promise cards

Promise cards: view
BLADE

The component takes no props; attributes such as class go on the list (ul).

blade
<section aria-label="Why us?">
    <zb:shop.benefits />
</section>

Free shipping threshold

PHP

The amount on the first card comes from the store's freeShippingThreshold() method in minor units; when it returns null, that card is not drawn.

php
public function freeShippingThreshold(): ?int
{
    return 150000; // free shipping on orders of ₺1,500 and more
}

Changing the texts

JSON

Change the cards' texts in the application's lang/en.json (or lang/tr.json) with the package's English keys.

json
{
    "Easy 30-day returns": "Free returns within 14 days",
    "Return shipping on us, no questions asked": "We pay the return shipping",
    "Weekdays 9 am–6 pm, live chat": "Every day 9 am–9 pm, live chat"
}

Developer notes

Events, hooks and details
  • The store shows the promises on the home page, above the newsletter box.
  • The cards stack on phones and line up in two columns on tablets and four on wide screens, on the theme's card surface.
  • Without the free shipping card, the other three remain.
  • The application's translations come before the package's; to write the cards from scratch, copy the component to resources/views/vendor/zubazar-ui-pro/components/shop/benefits.blade.php.
Zubazar UI · ZubazarDesigned for people.