Radian 3.0 đã ra mắt — bundle, category showcase và chuyển động điện ảnh.Xem có gì mới

View by card styles

The View by buttons above a collection grid let shoppers choose how many products show per row, for example 4, 6 or 8. Each button also switches the view profile: which details the cards show, how they are aligned and how far apart they sit. A large view can show the title, price and swatches, and a dense view only the images.

All of this is set in the View by card styles block of the Collection product grid section. This article explains how buttons and profiles relate, then how to set them up.

How View by works

Views and view profiles

A view is one of the View by buttons: a number of products per row. A view profile is the set of card settings that view uses: which details each card shows (title, price, vendor, swatches, badges, quick view), how the card text is aligned, and the gap between cards.

The block has three profiles. Each button uses the profile with the same position: the first button uses View profile 1, the second View profile 2, the third View profile 3. So when a shopper clicks a button, two things change at once: the number of columns and the profile. That is what lets a big view show full product details while a dense view shows images only.

Which profile each button uses

Button Profile Note
Desktop, 1024px and wider (example: options 4/6/8)
1st button: 4 View profile 1 The page opens here.
2nd button: 6 View profile 2
3rd button: 8 View profile 3 Only with Number of views set to 3.
Phones, 767px and narrower (always 1, 2 and, with three views, 3)
1 column View profile 1
2 columns View profile 2 The page opens here.
3 columns View profile 3 Only with three views.
Tablets, 768px to 1023px
No buttons The desktop view and its profile The grid keeps the desktop view the shopper is on, or the first count.

Phone buttons always mean 1, 2 and 3 columns, whatever counts you set for desktop. The profiles are shared: View profile 2 sets up both the second desktop button and the 2-column phone view. Keep that in mind when you choose what a profile shows.

What a profile controls, and what it doesn't

On the collection page every card is built with all its parts: vendor, title, price, swatches, badges and the quick view button. The profile of the current view then decides which parts show. This means the show/hide switches in Theme settings > Product card (Show product title, Show price, Show vendor, Show variant options, Show badges, Enable quick view) don't apply to the collection grid; the View profiles do. Those theme settings still apply to product cards in other sections.

Set per view profile, or for the whole grid

In each View profile
Show product title The product name under the image.
Show price The price, with the compare-at price when on sale.
Show vendor The brand above the title.
Show variant options Color swatches or option buttons (such as sizes) under the title.
Variant style How price and swatches share the card: see below.
Variant overlap display Swatches overlap each other until the shopper points at them: see below.
Show badges Sale, Sold out, New and other badges on the image, and a drop status line for products in a drop event.
Enable quick add The quick add button on the image.
Content alignment Left, center or right for the title, price and swatches, or Product card setting to follow the product cards' alignment on desktop and phones.
Grid gap (desktop) / (mobile) The space between cards in this view.
For the whole grid (Product card settings of the section, or Theme settings > Product card)
Thumbnail ratio, Image fit The shape of every card image.
Hover effect, Autoplay video What the image does on hover.
Corner radius, Variant option size The look of the card and its swatches.
Mobile quick add behavior, quick add button colors How the quick add button behaves on phones and how it looks.

Variant style: Hover reveal or Always show

Under the title, the card has one row for the price and the swatches.

  • Hover reveal: the row shows the price. When the shopper points at the card (or reaches it with the keyboard), the row slides up and the swatches take the price's place. The card stays compact and calm until someone shows interest.
  • Always show: the price and the swatches sit side by side on the row, price on the left, swatches on the right. With many colors, the swatches scroll sideways. Phones have no hover, so use Always show in a profile used on phones if shoppers should see the colors without tapping.

If only one of the two is on (price or swatches), there is nothing to swap: that one simply shows.

Variant overlap display

With it on, the swatches overlap each other in a tight stack and spread apart when the shopper points at them. With it off, they are always spaced apart. The stack saves room in small cards.

Image-only views

Turn off Show product title, Show price, Show vendor and Show variant options in a profile and the text area under the image is removed completely, so the images sit edge to edge (with a grid gap of 0). Turn off Show badges and Enable quick view too for a clean lookbook wall. Every image still links to its product.

Set it up

Step 1: Open the block

  1. In the theme editor, use the page picker to choose Collections > Default collection.
  2. Click Collection product grid, then the View by card styles block below it.
  3. If the section has no such block, click Add block under the section and choose View by card styles. A section has one. Without it, the grid still shows View by 3 / 4 with every detail on in both views.

Step 2: Choose the buttons

  1. Scroll to the bottom of the block. Under Desktop, open Columns (desktop) (1) and pick a pair: 2 / 3, 3 / 4, 4 / 5, 5 / 6 or 6 / 7. These give two buttons, so profiles 1 and 2 are used.
  2. For other counts, or for three buttons, choose Custom. Two settings appear at the top of the block: set Number of views to 2 or 3, then type the counts in Custom view by options (1) with slashes, for example 3/5, 2/5 or 4/6/8. Each count is a number of columns from 1 to 8.
  3. Put the counts in the order you want the profiles: the first count opens the page and uses View profile 1. View profile 3 only appears in the block when Number of views is 3.
Columns (desktop), at the bottom of the block.
Columns (desktop), at the bottom of the block.
Custom: Number of views and Custom view by options, at the top of the block.
Custom: Number of views and Custom view by options, at the top of the block.

Step 3: Set up View profile 1 (the first button, and 1 column on phones)

  1. Turn on the details shoppers need when they first see the grid: usually Show product title, Show price and Show badges.
  2. Turn on Show variant options for swatches, and choose the Variant style: Hover reveal (price swaps for swatches on hover) or Always show (both on one row).
  3. Keep Variant overlap display on for a tight stack of swatches, or turn it off to space them out.
  4. Turn on Enable quick add to add the quick add button on the image.
  5. Choose the Content alignment and the Grid gap (desktop). Product card setting, the default for new views, follows the product cards' desktop and mobile alignment.

Step 4: Set up View profile 2 (the second button, and 2 columns on phones)

  1. Cards are smaller here, so show less: for example title and price, swatches on Hover reveal, no vendor.
  2. Remember that phones open on 2 columns, so this profile is what most phone shoppers see first.

Step 5: Set up View profile 3 (the third button, and 3 columns on phones)

  1. Only with three views. This is the densest view: turn off every detail and set the gap to 0 for an image-only wall, or keep just the price.

Step 6: Set the gaps for phones

  1. Turn on Customize for mobile to show Grid gap (mobile) in each profile, and set the space between cards on phones.

Step 7: Animate the change (optional)

  1. Turn on Animate grid view changes to replay the cards' reveal animation when a shopper switches views. With it off, the grid changes at once.

Step 8: Check every view

  1. Open a collection on the storefront and click each View by button. Check the details and the gaps.
  2. Point at a card with swatches to check the Hover reveal.
  3. Switch the editor preview to mobile and try 1, 2 and 3.
View by 4 uses View profile 1: title, price, badges and quick view.
View by 4 uses View profile 1: title, price, badges and quick view.
View by 8 uses View profile 3: images only, no gap.
View by 8 uses View profile 3: images only, no gap.
Hover reveal, at rest: the row shows the price.
Hover reveal, at rest: the row shows the price.
Hover reveal, on hover: the swatches slide in where the price was.
Hover reveal, on hover: the swatches slide in where the price was.
Always show: price and swatches side by side.
Always show: price and swatches side by side.
Phones open on 2 columns, with View profile 2.
Phones open on 2 columns, with View profile 2.
3 columns on a phone use View profile 3.
3 columns on a phone use View profile 3.

Example: the Radian demo (4 / 6 / 8)

Radian demo collection

Button Profile Cards show
4 View profile 1 Title, price, swatches (Hover reveal, overlapping), badges, quick view. Left aligned. Gap 8px desktop, 4px phones.
6 View profile 2 The same details in smaller cards. Gap 6px desktop, 4px phones.
8 View profile 3 Images only: no title, price, vendor, swatches, badges or quick view. Gap 0.

On phones the same profiles give: 1 column with full details, 2 columns with full details (the page opens here), and 3 columns of images only.

Ideas for your store

Three setups

Setup Profiles Good for
Classic (3 / 4) Profile 1: everything on, swatches Always show. Profile 2: title and price, swatches Hover reveal, no vendor. Stores with many colors per product.
Editorial (2 / 4) Profile 1: large cards, title and price centered, no swatches, gap 24px. Profile 2: title and price, gap 12px. Few products with strong photos.
Lookbook (4 / 6 / 8) Profiles 1 and 2: full details. Profile 3: images only, gap 0. Large catalogs and campaign shoots, like the demo.

Settings reference

View by card styles block

Number of views Options: 2, 3.
Custom view by options Enter two or three column counts from 1 to 8, separated by slashes. Examples: 3/5, 2/5, or 4/6/8.
Animate grid view changes Turns this on or off.
View profile 1
Show product title Turns this on or off.
Show price Turns this on or off.
Show vendor Turns this on or off.
Show variant options Turns this on or off.
Variant style Options: Hover reveal, Always show, Always show, above price.
Variant overlap display Turns this on or off.
Show badges Turns this on or off.
Enable quick add Turns this on or off.
Content alignment Product card setting follows the content alignment of the product cards (desktop and mobile). Options: Product card setting, Left, Center, Right.
Grid gap (desktop) Slider.
Customize for mobile Shows mobile alignment, size and spacing overrides. While off, mobile alignment and position follow desktop; size and spacing values already set keep applying.
Grid gap (mobile) Slider.
View profile 2
Show product title Turns this on or off.
Show price Turns this on or off.
Show vendor Turns this on or off.
Show variant options Turns this on or off.
Variant style Options: Hover reveal, Always show, Always show, above price.
Variant overlap display Turns this on or off.
Show badges Turns this on or off.
Enable quick add Turns this on or off.
Content alignment Product card setting follows the content alignment of the product cards (desktop and mobile). Options: Product card setting, Left, Center, Right.
Grid gap (desktop) Slider.
Grid gap (mobile) Slider.
View profile 3
Show product title Turns this on or off.
Show price Turns this on or off.
Show vendor Turns this on or off.
Show variant options Turns this on or off.
Variant style Options: Hover reveal, Always show, Always show, above price.
Variant overlap display Turns this on or off.
Show badges Turns this on or off.
Enable quick add Turns this on or off.
Content alignment Product card setting follows the content alignment of the product cards (desktop and mobile). Options: Product card setting, Left, Center, Right.
Grid gap (desktop) Slider.
Grid gap (mobile) Slider.
Desktop
Columns (desktop) Options: 2 / 3, 3 / 4, 4 / 5, 5 / 6, 6 / 7, Custom.

How it works

  • A shopper's choice is saved in their browser, separately for desktop and phone, so the collection opens in the view they picked last time. When you change the options in the block, everyone starts again on the first count.
  • In Custom, counts outside 1 to 8 and repeated counts are skipped, and only as many counts as Number of views are read. With fewer than two usable counts, the buttons fall back to 3 / 4.
  • Filtering, sorting, Load more and infinite scroll keep the chosen view: products that load later use the same profile.
  • View by is part of the collection page only. The search results page and product sections use their own card settings.

Troubleshooting

I turned off Show vendor in Theme settings, but it still shows on the collection page.

On the collection grid, the View profiles decide what cards show. Turn off Show vendor in each View profile.

The View by buttons don't show on a tablet.

That is by design: between 768px and 1023px wide, the grid uses the desktop view without buttons. If the first count is large, such as 6, tablets show six columns: put a smaller count first.

The page opens in a different view than I set.

Your browser remembers the view you clicked last. Open the collection in a private window to see what a new shopper gets.

My phone shows titles in 3 columns, but I set images only for 8 columns.

Phone column 3 uses View profile 3, and desktop 8 uses it too only when 8 is your third count. Check the order of your counts.

My custom options show 3 / 4 instead.

Use numbers from 1 to 8 with slashes, such as 3/5, with at least two different numbers, and set Number of views to match.

Related

Still stuck?

Include your store URL and theme version — we'll get back to you.

Contact support