This test is designed to assess skills in Shopify theme development, Liquid, HTML, CSS, JavaScript, React, and understanding of Git and Shopify CLI.
- Any code editor (we recommend VSCode)
Create a small Shopify product card. When clicked, the product card should add product to cart via AJAX API and show a "Added to Cart" message.
Initial Code
{% assign product = all_products['sample-product'] %}
<div class="product-card" onclick="addToCart()">
<!-- HTML & Liquid goes here -->
</div>
<style>
/* CSS goes here */
</style>
<script>
function addToCart() {
// JS goes here
}
</script>
You'll answer a series of questions and provide a small piece of code (if necessary).
- What are React Hooks? Provide an example of a functional component that uses the useState and useEffect hooks.
- Describe the process you would take to clone a create a new branch. You can use ready add-ons in your IDE.
- You need to make a form accessible for screen readers. What HTML attributes would you use?
- How would you display different prices for logged-in and logged-out users using Liquid? Show some example code.
- How would you make a responsive navigation bar? Outline your approach.
- How would you use Shopify CLI to create a new theme and then deploy it to a development store? Walk me through the steps.
Note: We're not looking for perfection in this task, we're more interested in your understanding and approach to the problem.
Please send the answers via email by discussed deadline.