




























Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





























Question 1. Which Shopify CLI command authenticates you to a store? A) shopify login B) shopify auth C) shopify connect D) shopify init Answer: A Explanation: shopify login opens the browser for OAuth authentication to the selected store. Question 2. What file extension does an Online Store 2.0 template use? A) .liquid B) .json C) .js D) .scss Answer: B Explanation: OS 2.0 templates are JSON files that declare sections and blocks. Question 3. In a section schema, which type creates a repeatable sub‑element? A) block B) setting C) preset D) snippet Answer: A Explanation: block definitions let merchants add multiple instances of the same UI component. Question 4. Which global Liquid object provides the store’s currency code? A) shop.currency B) shop.currency_code C) shop.money D) shop.locale Answer: B Explanation: shop.currency_code returns the three‑letter ISO currency (e.g., “USD”). Question 5. How do you retrieve a collection by its handle in Liquid? A) collections[handle] B) collection.handle C) collections.handle D) shop.collections[handle] Answer: A Explanation: Bracket notation with the handle string accesses the collection object. Question 6. Which filter converts a string to uppercase? A) upcase B) capitalize C) downcase D) titlecase Answer: A Explanation: upcase returns the string in all capital letters. Question 7. What tag limits the number of items displayed in a for‑loop? A) limit B) offset C) paginate D) slice Answer: A Explanation: The limit parameter of the for tag restricts iteration count. Question 8. Which Liquid tag is used to create a paginated list of products? A) paginate B) for C) capture D) assign Answer: A Explanation: paginate splits a collection into pages and provides navigation variables.
Question 9. In a settings_schema.json file, which type renders a color picker? A) color_picker B) color C) picker_color D) swatch Answer: A Explanation: The color_picker input type displays a UI for selecting colors. Question 10. Where are translation strings stored for a theme? A) locales/.json B) config/.json C) assets/.liquid D) snippets/.json Answer: A Explanation: Each locale file in the locales folder contains key‑value pairs for i18n. Question 11. Which attribute enables lazy‑loading on an image tag? A) loading="lazy" B) defer="true" C) async="true" D) lazy="yes" Answer: A Explanation: The native HTML loading="lazy" attribute defers image loading until it enters the viewport. Question 12. What is the effect of adding type="module" to a script tag? A) Executes after DOM ready B) Enables ES6 imports C) Makes the script async D) Blocks rendering Answer: B Explanation: type="module" allows the use of import/export and runs the script in strict mode. Question 13. Which ARIA attribute indicates the current page in a navigation list? A) aria-current B) aria-selected C) aria-page D) aria-active Answer: A Explanation: aria-current="page" signals assistive tech which link represents the current page. Question 14. What does the focus-visible pseudo‑class target? A) All focused elements B) Keyboard‑focused elements C) Mouse‑clicked elements D) Hovered elements Answer: B Explanation: :focus-visible applies when focus is visible, typically from keyboard navigation. Question 15. Which Shopify API endpoint returns metafields for a product? A) /admin/api/2024- 01/products/{id}/metafields.json B) /admin/api/2024-01/metafields/product/{id}.json C) /admin/api/2024-01/products/{id}/meta.json D) /admin/api/2024-01/metafields.json Answer: A Explanation: The product‑specific metafields endpoint follows the pattern /products/{id}/metafields.json.
Question 23. In CI/CD, which GitHub Action event triggers a deployment after a merge to main? A) push B) pull_request C) release D) workflow_dispatch Answer: A Explanation: The push event on the main branch can start a deployment workflow. Question 24. What does the Liquid case tag replace? A) if/elsif/else chain B) for loops C) capture D) assign Answer: A Explanation: case provides a cleaner syntax for multiple conditional branches. Question 25. Which setting type lets a merchant upload a logo image? A) image_picker B) file_picker C) media D) image_upload Answer: A Explanation: image_picker opens the media library for image selection. Question 26. How do you reference a theme setting named “primary_color” inside CSS? A) {{ settings.primary_color }} B) {{ theme.settings.primary_color }} C) {{ settings['primary_color'] }} D) {{ theme['primary_color'] }} Answer: A Explanation: Theme settings are accessed via the settings object using dot or bracket notation. Question 27. Which Liquid filter formats a number as currency? A) money B) currency C) format_money D) price Answer: A Explanation: The money filter adds the store’s currency symbol and formatting. Question 28. What does the theme inspector Chrome extension primarily detect? A) Unused CSS B) Liquid rendering time C) JavaScript errors D) Image dimensions Answer: B Explanation: Theme Inspector measures Liquid rendering performance and highlights bottlenecks. Question 29. **Which attribute on a `
Question 30. When defining a block, which property sets its maximum count? A) limit B) max_blocks C) max_items D) count_limit Answer: A Explanation: The limit attribute in the block schema defines how many instances can be added. Question 31. Which Liquid object contains the currently logged‑in customer’s email? A) customer.email B) shop.customer.email C) cart.customer.email D) user.email Answer: A Explanation: The customer global object holds the authenticated shopper’s data. Question 32. What is the purpose of the theme.json file? A) Declares theme metadata B) Stores translation strings C) Lists JavaScript assets D) Configures SEO settings Answer: A Explanation: theme.json provides name, version, and theme‑level settings for the theme. Question 33. Which Shopify API allows you to retrieve product recommendations? A) Recommendations API B) Product Recommendations API C) Storefront API D) GraphQL Recommendations Answer: B Explanation: The Product Recommendations endpoint returns items related to a given product. Question 34. In a JSON template, how do you specify that a section should appear only on the home page? A) "target": "index" B) "templates": ["index"] C) "section": {"home": true} D) "layout": "home" Answer: B Explanation: The templates array lists the template files where the section is injected. Question 35. Which Liquid tag can be used to output raw Liquid code without rendering? A) raw B) comment C) escape D) literal Answer: A Explanation: {% raw %} tells the parser to ignore Liquid syntax inside the block. Question 36. What does the assign tag create? A) A new variable B) A new snippet C) A new section D) A new block Answer: A Explanation: assign stores a value in a temporary variable for later use.
Question 45. What is the purpose of the theme.liquid layout file? A) Holds global HTML skeleton B) Stores JavaScript assets C) Defines product schema D) Manages metafields Answer: A Explanation: theme.liquid wraps all page templates, providing head, header, footer, and body tags. Question 46. Which attribute on a tag enables preloading of a critical stylesheet?** A) rel="preload" B) rel="prefetch" C) rel="stylesheet" D) rel="preconnect" Answer: A Explanation: `rel="preload"` with `as="style"` tells the browser to fetch the CSS early. Question 47. **How can you limit the number of items a merchant can add to a cart via Liquid?** A) Use `cart.item_limit` B) No native Liquid limit; enforce via JavaScript C) Set `max_quantity` in product metafield D) Use `limit` filter on cart.items Answer: B Explanation: Shopify does not provide a Liquid‑only limit; you must add client‑side validation. Question 48. **Which GraphQL query field retrieves a product’s metafields?** A) metafields B) metafieldEntries C) customMetafields D) metafieldNamespaces Answer: A Explanation: The `metafields` connection returns metafield objects for the queried node. Question 49. **What does the `srcset` attribute on an tag help with? A) Responsive image selection B) Lazy‑loading C) SEO indexing D) Image compression Answer: A Explanation: srcset provides multiple image sources for different viewport widths or pixel densities. Question 50. Which Liquid tag can be used to iterate over a collection in reverse order? A) for reversed B) for reverse:true C) for reversed:true D) for reversed=true Answer: B Explanation: Adding reverse: true to the for tag iterates backwards. Question 51. In Git, what does git rebase accomplish? A) Merges two branches without a merge commit B) Rewrites commit history onto a new base C) Deletes a branch D) Stashes changes Answer: B Explanation: Rebase reapplies commits onto another base, creating a linear history.
Question 52. Which Shopify setting type allows merchants to select multiple colors? A) color_multi_select B) color_picker C) select_multiple D) multi_color_picker Answer: C Explanation: select with "multiple": true enables multi‑selection; the UI presents a list of options. Question 53. What is the purpose of the theme.app.liquid file? A) Loads app blocks B) Stores global JavaScript C) Defines meta tags D) Handles checkout scripts Answer: A Explanation: theme.app.liquid is the entry point for App Blocks, allowing apps to inject content. Question 54. Which Liquid filter converts a string to a URL‑friendly format? A) handleize B) slugify C) url_encode D) escape_url Answer: B Explanation: slugify creates a lowercase, hyphen‑separated string suitable for URLs. Question 55. When should you use defer instead of async on a script? A) When the script depends on DOM content B) When the script must run before DOM parsing C) When the script is tiny D) When the script loads CSS Answer: A Explanation: defer ensures the script runs after the document is parsed, preserving order. Question 56. Which Liquid object gives you the current page’s template name? A) template.name B) template C) page.template D) content_for_header Answer: B Explanation: The template string contains the file name (e.g., “product”). Question 57. What does the theme_editor JavaScript object allow? A) Live preview of settings B) Uploading assets C) Managing metafields D) Triggering checkout Answer: A Explanation: theme_editor provides a bridge for real‑time updates from the theme editor UI. Question 58. Which CSS property is recommended for creating a sticky header that does not affect layout shift? A) position:fixed B) position:absolute C) position:sticky D) top:0; margin:auto Answer: C Explanation: position:sticky keeps the element in flow until it reaches the viewport offset.
window" D) role="link" Answer: C Explanation: Adding an explicit aria-label informs users that the link opens a new window. Question 67. Which Liquid filter would you use to remove whitespace from both ends of a string? A) strip B) trim C) lstrip D) rstrip Answer: A Explanation: strip removes leading and trailing whitespace characters. Question 68. What does the theme object in Liquid provide? A) Access to theme settings and assets B) Storefront API token C) Current cart contents D) Customer authentication status Answer: A Explanation: theme holds metadata like theme.name and theme.settings. Question 69. Which Shopify CLI flag forces a theme push to overwrite remote changes without prompting? A) --force B) --allow-overwrite C) --ignore-conflicts D) --no-prompt Answer: A Explanation: The --force flag bypasses the safety prompt. Question 70. When defining a block, what does the limit attribute control? A) Maximum number of blocks of that type B) Maximum characters in a block’s setting C) Maximum nested blocks D) Maximum images per block Answer: A Explanation: limit caps how many instances a merchant can add for that block. Question 71. Which Liquid object provides data about the current page’s SEO meta tags? A) page.seo B) shop.seo C) content_for_header D) meta_tags Answer: A Explanation: page.seo contains title, description, and other SEO fields for the current template. Question 72. What is the primary benefit of using app blocks over script tags? A) No need for app approval B) Cleaner theme code and easier theme updates C) Faster page load D) Unlimited block count Answer: B Explanation: App blocks encapsulate functionality, preventing direct code injection and reducing theme‑upgrade friction.
Question 73. Which Liquid filter can be used to split a string into an array by a delimiter? A) split B) split_by C) divide D) chunk Answer: A Explanation: split: "," returns an array of substrings. Question 74. In Git, what does git stash pop do? A) Applies the most recent stash and removes it B) Lists all stashes C) Creates a new stash D) Merges two branches Answer: A Explanation: pop restores the saved changes and deletes the stash entry. Question 75. Which JavaScript event should you listen for to detect a lazy‑loaded image becoming visible? A) load B) lazyload C) intersectionobserver D) visibilitychange Answer: C Explanation: IntersectionObserver fires when the image enters the viewport, enabling lazy loading. Question 76. What does the {{ 'product.css' | asset_url }} filter output? A) Full URL to the CSS asset B) File name only C) Minified CSS content D) Asset ID Answer: A Explanation: asset_url returns the absolute URL for the specified asset. Question 77. Which Liquid tag can be used to conditionally include a snippet only for logged‑in customers? A) {% if customer %}{% include 'snippet' %}{% endif %} B) {% unless customer %}{% render 'snippet' %}{% endunless %} C) {% if shop.customer %}{% render 'snippet' %}{% endif %} D) {% if logged_in %}{% include 'snippet' %}{% endif %} Answer: A Explanation: customer is truthy when a shopper is authenticated; include (or render) can be used inside the conditional. Question 78. Which Shopify theme file contains global JavaScript that should load on every page? A) assets/theme.js.liquid B) snippets/global.js.liquid C) layout/theme.liquid D) config/settings_schema.json Answer: A Explanation: JavaScript assets placed in assets and referenced in theme.liquid are loaded site‑wide. Question 79. What does the {{ shop.metafields.namespace.key }} syntax retrieve? A) A custom metafield value B) A product metafield C) A customer metafield D) A cart attribute Answer: A Explanation: shop.metafields accesses store‑level metafields defined under a namespace and key.
Question 87. Which Liquid tag can be used to output a variable without escaping HTML? A) {{ variable | raw }} B) {{ variable | escape }} C) {{ variable | strip_html }} D) {{ variable | safe }} Answer: A Explanation: The raw filter (or using {{ variable }} inside {% raw %}) prevents HTML escaping. Question 88. When should you use the {{ 'theme.css' | stylesheet_tag }} filter? A) Inside the `` to include a stylesheet B) Inside a `
Question 94. Which Liquid tag can be used to paginate a collection of blog articles? A) paginate B) for C) capture D) assign Answer: A Explanation: paginate works with any collection, including blog.articles. Question 95. When using the Ajax API to fetch product recommendations, which HTTP method is used? A) GET B) POST C) PUT D) DELETE Answer: A Explanation: Recommendations are retrieved via a GET request to the Storefront API endpoint. Question 96. Which CSS property is used to create a smooth scroll effect for anchor links? A) scroll- behavior B) smooth-scroll C) transition D) scroll-snap Answer: A Explanation: scroll-behavior: smooth; animates scrolling to anchors. Question 97. What does the {{ shop.domain }} object return? A) The store’s primary domain (e.g., example.myshopify.com) B) The custom domain C) Both primary and custom domains D) The checkout domain Answer: A Explanation: shop.domain reflects the myshopify.com domain. Question 98. Which Shopify CLI command opens the theme editor in a browser? A) shopify theme open B) shopify open C) shopify theme serve D) shopify theme preview Answer: D Explanation: shopify theme preview launches a preview URL with the editor enabled. Question 99. In a block schema, what does the settings array define? A) User‑editable fields for that block B) Default content C) CSS classes D) JavaScript callbacks Answer: A Explanation: settings lists the inputs (text, image, etc.) merchants can configure per block. Question 100. Which Liquid filter can be used to format a Unix timestamp as a readable date? A) date B) timestamp C) timeago D) format_date Answer: A Explanation: date: "%Y-%m-%d" converts a timestamp to a formatted date string.
Question 108. Which Liquid filter can be used to escape a string for use in a JavaScript context? A) escape_javascript B) json_escape C) js_escape D) escape_js Answer: A Explanation: escape_javascript adds backslashes to characters that could break JS strings. Question 109. What is the default HTTP status code returned by the Ajax Cart “add” endpoint on success? A) 200 OK B) 201 Created C) 202 Accepted D) 204 No Content Answer: A Explanation: The endpoint returns a 200 response with JSON payload. Question 110. Which CSS property controls the space between grid items? A) gap B) grid-gap C) spacing D) column-gap Answer: A Explanation: gap (or legacy grid-gap) defines both row and column spacing in CSS Grid. Question 111. Which Liquid object provides information about the current page’s URL path? A) request.path B) shop.url C) page.url D) content_for_header Answer: A Explanation: request.path returns the path component of the current request. Question 112. What does the {{ 'theme' | asset_img_url: '400x' }} filter generate? A) URL to a resized image version B) Inline base64 image C) CSS background‑image D) Placeholder SVG Answer: A Explanation: asset_img_url creates a URL with Shopify’s built‑in image resizing parameters. Question 113. Which Git command lists remote branches? A) git branch - r B) git remote - v C) git show-branch D) git fetch --all Answer: A Explanation: git branch - r displays branches on the remote repository. Question 114. In a JSON template, how do you reference a section’s settings value named “title”? A) {{ section.settings.title }} B) {{ settings.title }} C) {{ section.title }} D) {{ block.settings.title }} Answer: A Explanation: Section settings are accessed via section.settings..
Question 115. Which Liquid tag can be used to render a snippet without inheriting the parent’s scope? A) render B) include C) snippet D) partial Answer: A Explanation: {% render 'snippet' %} isolates variables, unlike include. Question 116. What is the purpose of the {{ content_for_footer }} placeholder? A) Inserts scripts placed at the end of the body B) Renders the footer navigation C) Loads lazy‑loaded images D) Shows cart summary Answer: A Explanation: Shopify injects scripts (e.g., analytics) just before the closing tag. Question 117. **Which attribute on an tag improves SEO by providing alternative text?** A) alt B) title C) description D) aria-label Answer: A Explanation: The alt attribute supplies descriptive text for search engines and accessibility tools. Question 118. When using the Ajax API, which response header indicates JSON content? A) Content-Type: application/json B) Accept: application/json C) X-Requested-With: XMLHttpRequest D) Content-Type: text/html Answer: A Explanation: Shopify returns JSON with the application/json MIME type. Question 119. Which Liquid filter can be used to sort an array of objects by a numeric property? A) sort: "price" B) order_by C) sort_numerical D) sort_by Answer: A Explanation: sort: "price" orders the collection based on the price attribute. Question 120. What does the {{ 'logo' | asset_url | img_tag: alt: 'Store logo' }} expression output? A) An HTML element with the logo asset B) The raw URL of the logo C) A tag D) A base64‑encoded image Answer: A Explanation: img_tag creates the `` element, applying the provided alt text. Question 121. Which Shopify CLI command creates a new theme from a starter template? A) shopify theme init B) shopify theme new C) shopify theme create D) shopify theme scaffold Answer: A Explanation: shopify theme init clones a starter theme into the current directory.
Question 129. What is the purpose of the theme.json “presets” property? A) Provide ready‑made section configurations B) Define default colors C) List available fonts D) Set SEO defaults Answer: A Explanation: Presets allow merchants to add a section with pre‑filled settings from the editor. Question 130. Which attribute on a `` indicates that it triggers a modal dialog? A) aria- haspopup="dialog" B) role="button" C) data-modal="true" D) tabindex="0" Answer: A Explanation: aria- haspopup="dialog" informs assistive tech that the button opens a dialog. Question 131. Which Liquid object provides the list of all navigation menus? A) linklists B) navigation.menus C) shop.linklists D) menus Answer: A Explanation: linklists (or linklists.) contains the defined menus. Question 132. When using the Ajax API, which endpoint updates line item quantity? A) /cart/change.js B) /cart/update.js C) /cart/quantity.js D) /cart/modify.js Answer: A Explanation: POST to /cart/change.js with quantity and line parameters updates the cart. Question 133. Which CSS property can be used to hide an element visually but keep it accessible to screen readers? A) position: absolute; left: - 9999px B) display:none C) visibility:hidden D) opacity: Answer: A Explanation: Off‑screen positioning removes visual presence while preserving accessibility. Question 134. What does the {{ product.available }} boolean indicate? A) Stock availability B) Visibility in store C) Publication status D) Discount eligibility Answer: A Explanation: available is true when at least one variant is in stock. Question 135. Which Shopify CLI flag forces the dev server to use HTTPS? A) --https B) --ssl C) -- secure D) --tunnel Answer: D Explanation: --tunnel creates an HTTPS tunnel (via ngrok) for local development. Question 136. In a block schema, what does the max_per_row property control? A) Number of blocks displayed per row in the editor B) Number of items per row on the storefront C) Maximum blocks
a merchant can add D) Grid column count Answer: A Explanation: max_per_row affects the layout of blocks inside the theme editor UI. Question 137. Which Liquid filter can be used to truncate a string to a specific length? A) truncate B) shorten C) limit D) slice Answer: A Explanation: truncate: 30 shortens the string and adds an ellipsis. Question 138. **What is the primary advantage of using {{ 'file' | asset_url | script_tag }} over a hard‑coded `