ShopAssist

Enhance ShopAssist - Magento

Question pills and Compare on a Magento or Mage-OS store.

Read Enhance ShopAssist first. The pills need questions in the client dashboard, and Compare needs the shop-level switch from support.

Both features are settings of the ShopAssist module, version 1.2.0 or newer. Open Stores → Configuration → ShopAssist → AI Shopping Assistant.

Every setting can be changed per website and per store view, so a store view can use its own heading, label and colors.

Question pills

  1. Open the Ask ShopAssist group.
  2. Set Show question pills on product pages to Yes.
  3. Set the appearance to match the store. At least set Pill color to the merchant's brand color.
  4. Select Save Config, then refresh Configuration and Page Cache in System → Cache Management.

The Ask ShopAssist group in the Magento configuration with every setting: pills on, heading shown, heading Questions about this product, chat icon on, last pill label Ask something else, pill color #c2410c with an orange swatch in its color picker, empty heading color, hover style Subtle, pill shape Squared button, heading font size 16 px, heading font weight Semibold, pill font size 14 px, space between pills 12 px, space above and below 20 px.

This example changes five values from the defaults: an orange Pill color, the chat icon, Subtle hover, Squared button and a 12px gap. The product page below shows the result.

SettingWhat it doesDefault
Show headingShows the line above the pillsYes
HeadingThe text of that lineQuestions about this product
Show chat icon before the headingA small chat bubble before the headingNo
Last pill labelThe pill that opens an empty chat. Leave it empty to hide that pillAsk something else
Pill colorBorder and text of the pills, and the fill on hover. Pick it with the color picker, or type any CSS color, such as #1979c3#1979c3, the Luma blue
Heading colorColor of the heading. Color picker or any CSS colorThe theme's text color
Hover styleFilled fills the pill with its color. Subtle shows a light tintFilled
Pill shapeRounded pill, or Squared button with small cornersRounded pill
Heading font sizeIn pixels16
Heading font weightNormal, Medium, Semibold or BoldSemibold
Pill font sizeIn pixels14
Space between pillsIn pixels8
Space above and Space belowSpace around the whole block, in pixels20 and 20

A color that is not a plain CSS color is ignored and the default is used.

The Magento switch only places the container. What fills it comes from the client dashboard:

  1. In the dashboard, open FAQ and generate questions for the products.
  2. Switch the pills on for each product that should show them. A product with its pills off stays hidden on the storefront, even with questions.

The pills then appear on that product's page, under the add-to-cart form. The container stays hidden on every other product, so switching the module on changes nothing for a product you have not prepared.

A Luma product page. An orange Compare button sits in the top right corner of the product photo. Under Add to Cart, a chat icon and the heading Questions about this product precede three orange question pills with squared corners and a dashed Ask something else pill.

A click opens the chat with the product name and the question, for example Jade Yoga Jacket: Is it warm enough for an evening run? When the question has a stored answer in the dashboard and the pill starts the conversation, the shopper gets that answer word for word. Otherwise the assistant answers from the catalog. Ask something else opens an empty chat.

The chat open over the Jade Yoga Jacket page, with the question Jade Yoga Jacket: Is it warm enough for an evening run? and the assistant's answer about the jacket.

A shopper can click a pill before the chat has finished loading, because the module loads the chat only after the page. The click is kept, and the chat opens with that question as soon as it is ready.

The first time you open FAQ in the dashboard of a Magento shop, it can take around ten seconds. ShopAssist reads the whole catalog from the store's GraphQL API and keeps it for three hours, so later visits are fast. Ask support to turn on product sync for the shop if every first visit is slow.

The block is shopassist.questions in the catalog_product_view layout. To place it somewhere else on the page, move it in the theme's Magento_Catalog/layout/catalog_product_view.xml:

<move element="shopassist.questions" destination="product.info.main" after="product.info.price"/>

Compare

  1. Open the Compare group.
  2. Set Show Compare buttons to Yes.
  3. Set the label, color and placement to match the store.
  4. Select Save Config, then refresh the caches as for the pills.

The Compare group in the Magento configuration with every setting: Compare on, label Compare, icon only No, button color #c2410c with an orange swatch in its color picker, button size Medium, product image selector .product.media, corner Top right, product card selector .product-item, card buttons on category pages, search results and the home page, card button placement After the anchor, card corner Top right, card anchor element .price-box, space above and below 8 px, no skipped areas.

This example uses an orange Button color, Medium size, the home page as a third listing page, and After the anchor with .price-box, which puts the card button under the price instead of over the photo.

SettingWhat it doesDefault
Button labelText on the button. It changes to "Selected" and "Compare with" during a listing comparisonCompare
Icon onlyShows only the compare icon, without the labelNo
Button colorColor picker or any CSS colorThe chat widget's color
Button sizeSmall, medium or largeThe widget's default
Product image selectorThe gallery on the product page. The button sits in its corner.product.media
Corner on the product imageTop right or top left of the photoTop right
Product card selectorOne product card in a listing. Empty means no buttons in listings.product-item
Pages with card buttonsCategory pages, search results, the home page, in any combinationCategory pages and search results
Card button placementOver the product image, in a corner. Or in the card, next to the anchor element: inside it at the end or start, or after or before itOver the product image
Corner on the card imageTop right or top left of the photo, when the button is over the image. To put it lower in the card, use a placement next to the anchor elementTop right
Card anchor elementA selector inside the card that the button is placed next to, such as .price-box for "under the price". Empty means the card itselfEmpty
Space above the card button and Space below the card buttonSpace around the button when it sits in the card, in pixels8 and 8
Skip cards insideAreas that get no buttons, such as .block.related for the related products block. Comma separatedEmpty

The button appears on the product image and on every product card in category and search results. It needs Compare switched on for the shop as well, see Before you start. With only the Magento setting on, no button appears.

The two places work differently:

  • On a product page, Compare opens a panel of similar products. The shopper picks one, and the chat opens with the two side by side and a recommendation.
  • In a listing, the first click marks that card Selected, and every other card's button changes to Compare with. A click on a second card opens the comparison. Clicking the selected card again clears it.

The module tells the widget which product a product page shows, so that button appears without a lookup. On Luma-style cards the widget reads the product from the card itself. On other cards it asks the store's GraphQL API once per card.

A Luma category page. Each product card has an orange Compare button under its price, above the size and color swatches.

The chat with a side-by-side comparison of two jackets, an Add to Cart button under each and a recommendation.

The two selectors are set for Luma and for themes built on it. On another theme, set Product image selector and Product card selector to that theme's markup.

A card must contain a link to the product page. To skip the per-card request, it also needs an element with the id product-item-info_<product id> or a data-product-id attribute, as Luma cards have.

Troubleshooting

SymptomCauseResolution
Compare on the product page but not in listingsThe theme does not use Luma's card markupSet Product card selector to the theme's card element
Settings saved, nothing on the storefrontThe page cache still serves the old pagesRefresh Configuration and Page Cache in System → Cache Management
For pills that do not appear or a missing Compare button on every platform, see the
shared troubleshooting.

Last updated on

On this page