Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.rst with set up of CT #274

Merged
merged 11 commits into from
Oct 2, 2024
39 changes: 39 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,42 @@ Local
# You should see JSON output indicating that two receivers were called, one successful, and one with exception/traceback information.
# In the shell where the server is running you should see log output indicating that two test receivers were called with the sender argument "Something".

Setup with Commercetools
NoyanAziz marked this conversation as resolved.
Show resolved Hide resolved
=========================

1. Open the **`commerce_coordinator/settings/base.py`** file and update the `COMMERCETOOLS_CONFIG`.
The values can be found at:
https://twou.frontastic.io/configuraaton?environment=development&project=checkout&locale=en_US

2. Update `COMMERCETOOLS_FRONTEND_URL` to:
`'http://localhost:3000/en/add-to-cart/'`

3. Go to the following URL to update the **waffle flags**:
http://localhost:8140/admin/waffle/flag/

Add the `transition_to_commercetools.redirect_to_commercetools_checkout` flag with the **Everyone** attribute set to **Yes**.

4. Similarly, go to:
http://localhost:18000/admin/waffle/flag/

Add the `commerce.transition_to_coordinator.checkout` flag with the **Everyone** attribute set to **Yes**.
NoyanAziz marked this conversation as resolved.
Show resolved Hide resolved


Setup for running Refunds flow (**For refunds flow only**)
NoyanAziz marked this conversation as resolved.
Show resolved Hide resolved
NoyanAziz marked this conversation as resolved.
Show resolved Hide resolved
==========================================================

Add the following inside your `'edx-platform/lms/envs/private.py'` file

.. code-block:: console

COMMERCE_COORDINATOR_REFUND_SOURCE_SYSTEMS = ('commercetools',)
COMMERCE_COORDINATOR_URL_ROOT = 'http://host.docker.internal:8140'

Go to the following URL to update the **waffle flags**:
NoyanAziz marked this conversation as resolved.
Show resolved Hide resolved
http://localhost:18000/admin/waffle/flag/

Add the `commerce.transition_to_coordinator.refunds` flag with the **Everyone** attribute set to **Yes**.


Every time you develop something in this repo
=============================================
Expand Down Expand Up @@ -118,6 +154,9 @@ Local testing with Celery
# Start redis in devstack from your local devstack directory
make dev.up.redis

# Update the CELERY_BROKER_URL flag
Update CELERY_BROKER_URL to "redis://:password@localhost:6379/0" inside `commerce_coordinator/settings/local.py`

# Start celery from the commerce-coordinator venv; this management command will auto-reload celery when python files are changed
python manage.py celery

Expand Down
2 changes: 1 addition & 1 deletion commerce_coordinator/settings/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@

LOGGING = get_logger_config(debug=DEBUG)

CELERY_BROKER_URL = "redis://:@localhost:6379/0"
CELERY_BROKER_URL = "redis://:password@localhost:6379/0"

EDX_API_KEY = 'PUT_YOUR_API_KEY_HERE' # This is the actual API key in devstack.

Expand Down
Loading