This is a takehome test for candidates applying for a software engineer position at ShopPad. It contains two sections: "Backend" and "Frontend", which together include a series of tests involving HTML, CSS, JavaScript, and PHP.
Feel free to solve these questions however you see fit, using whatever coding style or third-party libraries you think are appropriate.
To start the test, simply clone this repo and make your edits locally.
For the frontend portion of the test, we have a file called "responsive-layout.html" which contains some boilerplate HTML with 6 div elements. There are 3 features we'd like to add:
- Add CSS to create a responsive layout that will display one column on mobile devices, two columns on tablet devices, and three columns on desktops.
- Add JS to apply alphabetical sorting of the div elements when the "Sort" button is clicked.
- Add JS to apply a random shuffle to the div elements when the "Shuffle" button is clicked.
Feel free to use third-party libraries at your own discretion.
The following API access keys are for a custom Shopify app created in the Shopify admin:
- Admin API access token: (Provided via email)
- API key: (Provided via email)
- API secret key: (Provided via email)
- Shopify Dev Store URL: https://shoppad-candidate.myshopify.com/collections/all (password: "candidate", click "Enter Using Password" in the top-right)
- Shopify Admin API Documentation: https://help.shopify.com/api/reference/product
For the backend portion of the test, we have an empty PHP file called "inventory.php". We'd like to write some code that achieves the following:
- Make an authenticated request to the dev store's Admin API
- Retrieve all product data and calculate the sum of all available inventory for all products (and their variants)
The file is empty on purpose, so feel free to structure the code however you prefer and use third-party libraries at your own discretion.
There is also a file called "price-sum.php" which contains a small coding challenge:
Given a list of prices and a target sum, write a function that returns true if the list of prices contains 2 prices that add up to the target sum.
For more details, consult the comments in price-sum.php.
Once you've completed the test, please compress your files (via zip) and send them as a link (via Google Drive or Dropbox) in reply to your project invitation. We would like the code in your submission to remain private, so please avoid committing or pushing the code publicly.
Once we receive it, a member of our team will review and we'll get back to you as soon as possible.
Thanks!