-
Clone the
Checkout
repository to your machine- Pull down from the
main
branch
- Pull down from the
-
Using a terminal outside of VS Code, navigate to the
checkout
repository-
Once inside the checkout repository, type
pwd
and press enter to get the file path (copy and paste the path into a note for use later) -
Example of what the path looks like:
/Users/robertorodriguez/kotis/checkout
-
-
Create a new branch off of
main
this will allowestores
to find the correct version of the gem. -
Add
return {}
as the first line underdef validate_from_api
inside ofaddress_validator.rb
.- This allows you to avoid error messages when
checkout
tries to validate the entered shipping address.
- This allows you to avoid error messages when
Note: Do not commit / push up changes made to your docker-compoese.yml
file
-
In the
docker-compose.yml
(not the one in the.devcontainer
folder)- Add a new line to
volumes
underapp
. In this new line you will add the file path you copied earlier, at the end of the file path add a:
followed by/checkout
so that your file path looks like the one in the screenshot below.
- Add a new line to
-
Rebuild your docker container
-
Go to your
gemfile
-
Comment out
gem 'kotis-checkout', '~> <current version number>'
-
Add
gem 'kotis-checkout', '~> <current version number>', git: 'checkout/checkout', branch: '<branch name you created in checkout>'
-
In the terminal within VSCode run the following commands
bundle config local.kotis-checkout /checkout
- Run
bundle install
- Run your server
-
In
checkout
you can add a<div>
element with a string intoapp/views/layouts/kotis/checkout/application.html.erb
<div> Hello Kotis </div>
-
Using your localhost server, visit an estores portal, add a few items to your shopping cart then press checkout. If you see the string you added to the view in
checkout
then you are connected and ready to go.
Here's what I did with
docker-compose.yml
:.env file:
With this setup, we could push the
docker-compose.yml
change to GitHub, because the actual path remains local. But don't do that at this time.