Home

Awesome

The Art of Ecommerce Debugging

A course to embed super-problem-solving strategies into your workflow: turning you into a super developer.

Hey, I'm Joseph Maxwell, and I've learned a lot through my decade as an ecommerce developer. It's my goal through this course to supercharge your capabilities as you build and fix websites.


I hate to say it, but...

This project is not a good example of the code that I write. If you're looking to hire me to work on your project, please don't take this as "the example" of my work. There is some super-good code in here. And there is some code that's old. And there is some code that I've built to replicate, well (how do I say this), the less-than-quality code that I've seen in the wild.


Reward:

If you find a bug in this project that looks like a good one to solve, please email me: joseph@swiftotter.com. If I agree that it's good to enter into this course, I'll pay you $150. Or, if you work with me to build out the documentation for solving this bug, I'll pay you $500 (then, I'll record and publish it) and credit your name.

This course contains five problems to solve:

Process:

This course is built on the idea of a walk-through. You and I sit down together to troubleshoot these bugs. As such, there are a couple of critical points:

Support:

Getting Started

Project Requirements

Overview

  1. Clone project
  2. Create the database
  3. Run composer install
  4. Run bin/magento setup:install
  5. Import the latest training data set
  6. Configure URLs
  7. Run bin/magento setup:upgrade
  8. Ready to go!

1. Clone Project

git clone https://github.com/swiftotter-certifications/art-of-ecommerce-debugging debugging

The last parameter is which directory you wish to insert the project. Remove this parameter to insert into the current directory.

Note #1: If you get an Access Denied error, make sure you have properly configured your computer to connect to GitHub. Feel free to email us and we will help you PRONTO.

Note #2: if you are using a docker-based environment (like Warden), you will want to ssh into the environment and continue these instructions.

2. Create the database

If you are using a docker-based development environment (like Warden), the database is already created. Make sure to configure the correct name in configuration below.

If you are using a MAMP/WAMP/LAMP-esque system, you will need to create the database. Log into MySQL and run:

CREATE DATABASE aoed;

If you are not using root credentials locally, you will also want to assign privileges:

GRANT ALL PRIVILEGES ON aoed.* to 'myuser'@'%';
FLUSH PRIVILEGES;

3. Install Composer

cd debugging # or whatever directory the project is found in
composer install

This should just work. The most likely error you will receive is regarding Magento authentication. If this happens, log into the Magento Marketplace and get your Composer credentials there.

4. Install Magento

bin/magento setup:install --db-host=mysql --db-name=aoed --db-user=canthelpyouhere --db-password=orhereeither --search-engine=elasticsearch7  --elasticsearch-host=elasticsearch --admin-user=admin_username --admin-password=admin_password --admin-email="me@me.com" --admin-firstname=Great --admin-lastname=Developer

The easiest it to copy into a text editor, update the values, then run it on your command line.

Note: if you are using a docker-based development environment, use the appropriate host names (typically, it is mysql, elasticsearch, etc.). Otherwise, use 127.0.0.1. Also, don't forget to specify the correct version of ElasticSearch: elasticsearch5, elasticsearch6, or elasticsearch7.

Common Problems:

5. Load the latest training data set

./vendor/bin/driver run --environment=local-init import-s3

This uses Driver to fetch in the latest data.

Known problem: At this point, your admin details will be reverted each time you reload. We are getting this fixed.

Thus, you will want to then run:

bin/magento admin:user:create

6. Set configuration values

bin/magento config:set web/unsecure/base_url "[your URL here]"
bin/magento config:set web/secure/base_url "[your URL here]"
bin/magento config:set web/cookie/cookie_domain "[cookie domain]"

7. Upgrade Magento

bin/magento setup:upgrade

If this fails, the first thing to do is do it again.

Installing Avatax

You might see this error:

Installing schema... Upgrading schema... Column "cross_border_type" does not exist in table "avatax_cross_border_class".

In this case, go into the database and add cross_border_type to avatax_cross_border_class. Based on their documentation, this is a known error.

Then, you are likely to get this error:

SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'cross_border_type_id'

Just delete this column.

8. That's it!

Pretty easy, isn't it? Let's get rocking some bugs!

Refreshing with the latest data

./vendor/bin/driver run --environment=local-init import-s3

Known problem: At this point, your admin details will be reverted each time you reload. We are getting this fixed.