User Guide
Thank you for purchasing from CodeShack!
Your support will help keep our website up and running, and will help us provide you with more quality content!
If you have any issues, don't hesitate to contact us via our website or directly to our email at support@codeshack.io.
If you need help setting up the package, we offer installation service for a small fee. Please get in touch with us at the email address mentioned above.
For more information regarding this package (FAQs, updates, etc.), click here.
Requirements
If you plan to use the tutorial source code, I recommend you read the following tutorials on our website:
You will need the following:
- XAMPP or a web-server with PHP, MySQL and phpMyAdmin installed. If you've purchased web hosting, you will need to upload the files to your web directory. XAMPP should not be used for production purposes.
- Code Editor ‐ You can use Notepad to edit the PHP files, but I don't recommend it. Instead, download one of the following: Visual Studio Code, Notepad++, or Atom.
Optional: With Visual Studio Code, you can download a SCSS compiler extension that automatically converts SCSS to CSS.
Instructions
- Open the XAMPP control panel and start Apache and MySQL
- Upload/import the "shoppingcart.sql" file with phpMyAdmin
NOTE: If you get a MySQL permissions error you might need to create the database manually. - Copy/cut one of the packages folder into your web directory (htdocs/www, etc)
- Rename the directory to "shoppingcart" and navigate to http://localhost/shoppingcart/ in your web browser
-
Basic: Edit the "function.php" file and update the MySQL details in the "pdo_connect_mysql" function
Advanced: Edit the "config.php" and update the database variables. You can also change them on the "Settings" page via the "Admin Panel". - You can add new products directly in phpMyAdmin, click the "products" table and click the "Insert" tab, ignore the ID column as this will auto increment
NOTE: Advanced users can add new products and products images via the admin panel. Only accounts with the role "Admin" can access the admin panel. - Enjoy coding and thank you for supporting us!
How to Access the Admin Panel
Navigate to the "My Account" page and log-in with the following credentials:
Email: admin@example.com
Password: admin
You should see the "Admin" tab located in the top navigation bar. If you click the tab, you'll be redirected to the admin panel. You can change the default admin credentials via the "Admin > Accounts" page or hover the profile icon in the top-right corner and click "Edit Profile".
How to set-up PayPal
- The shopping cart system is required to be on a production server. PayPal sends a request to the IPN file on every purchase made, therefore this will not work on your local server unless the IPN file can be accessed remotely.
- Log-In via the "My Account" page with an admin account and click the "Admin" link.
- Click the "Settings" tab and update the PayPal variables.
- PayPal is currently in test mode, while being in test mode you can make dummy payments etc, you can create sandbox accounts here: https://developer.paypal.com/developer/accounts/
- If you are ready to start accepting payments with PayPal, you can set the "paypal testmode" variable to false.
- Make sure you update the IPN URL on the "Settings" page and update it in your PayPal account, click here for the guide on how to set this up.
How to set-up Stripe
- Stripe also requires your website to be on a production server.
- Log-In to the Stripe dashboard and create a new API secret and publishable key.
- Log-In via the "My Account" page with an admin account and click the "Admin" link.
- Click the "Settings" tab and update the Stripe variables.
- Make sure you update the IPN URL on the "Settings" page.
How to set-up Coinbase Commerce
- Coinbase Commerce also requires your website to be on a production server.
- Log-In to the Coinbase Commerce dashboard and create a new API key.
- Log-In via the "My Account" page with an admin account and click the "Admin" link.
- Click the "Settings" tab and update the Coinbase Commerce variables.
- Create a new webhook subscription on the coinbase commerce dashboard and enter the IPN URL, which should be in the following format: https://example.com/ipn/coinbase.php?key=YOUR_SECRET_KEY
- If you're not capturing payments, ensure the IPN URL key parameter is the same as your "coinbase_secret" setting.
Additional Resources
- Video guide on how to install XAMPP: https://www.youtube.com/watch?v=tgxzEXASInI
- PHPMailer documentation: https://github.com/PHPMailer/PHPMailer
- FontAwesome library: https://fontawesome.com/
- HTML Currency Codes: https://codeshack.io/html-currency-symbols-reference/
- Identifying your IPN listener to PayPal: https://developer.paypal.com/api/nvp-soap/ipn/IPNSetup/