Skip to content

Instantly share code, notes, and snippets.

@mattumland
Last active June 27, 2024 15:52
Show Gist options
  • Save mattumland/7912b95d77a1c4fbcf96fba9f7a80805 to your computer and use it in GitHub Desktop.
Save mattumland/7912b95d77a1c4fbcf96fba9f7a80805 to your computer and use it in GitHub Desktop.
Sample PR 1

What does this PR do?

  • Displays volume discounts that are added on a Fastspring product. This occurs on the buy page, before items are added to the shopping cart.
  • Updates the fastspring_products.rb seeds to include a product with a volume discount
  • There's also a small update to app/views/layouts/_profile_navigation.html.erb due to a version update of the SBL script.

Background

While Fastspring handles volume discounts within the cart, we aren't reflecting those on our buy page

Manual Testing

double check your ENV
see the project wiki for instructions on creating a user, if you need one

  1. If you have previously pulled FastSpring products, you should get rid of the old stuff using - FastspringProduct.destroy_all in rails console
  2. get the current set of products- bundle exec rake cron:refresh_fastspring_products
  3. set up the test db with the current productsbundle exec rails RAILS_ENV=test setup_test_db
  4. Log in as a user
  5. From the navbar, go to download/purchase -> homer grid -> purchase license
  6. Select quantity - 4 customer type - standard term - annual
  7. Confirm that 25% volume discount for 4 or more licenses appears under the price
  8. Click add to cart
  9. Click the shopping cart icon in the header
  10. Under the email field, click continue
  11. Confirm that the total listed in the shopping cart is the same number that was displayed on the buy form (see screenshot)

image

Associated Tracker Item

Tracker #182872999

Affirm Completion

Remove inapplicable DoD items

  • This PR has appropriate test coverage.
  • This PR has been manually tested by another developer.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment