Skip to content

Ticket 12345 fixing order product price#1

Open
NyazJaff wants to merge 8 commits intomainfrom
TICKET_12345_fixing_order_product_price
Open

Ticket 12345 fixing order product price#1
NyazJaff wants to merge 8 commits intomainfrom
TICKET_12345_fixing_order_product_price

Conversation

@NyazJaff
Copy link
Copy Markdown
Owner

@NyazJaff NyazJaff commented Jul 7, 2024

The proposed fix for this task is to add a new price column to the OrderProduct table because:

  1. This new column will allow the price to be detached from the Product table.
  2. In case of a refund, the exact amount paid by the buyer can be refunded.

There is a small line commented out to prevent editing of the newly added each_item_price_in_cents column. This line can be uncommented once the code has been deployed. This decision is based on the assumption that once an item is sold, its price should remain unchanged. If this column were editable, I would use the paper_trail gem to track who makes changes to this column for compliance purposes.

Thank you for the opportunity. It has been a nice, small challenge.

Nyazfoxsoft and others added 8 commits July 8, 2024 00:12
- This will help seeing the current data in database
- The javascript file is required to fix ActiveAdmin error

refs TICKET_12345
refs TICKET_12345
…nd personal computer setup.

refs TICKET_12345
This migration will also change historical data to align it with new changes.

refs TICKET_12345
When a new orderProduct is created, the current product price will be store on the OrderProduct to allow future changes to product price without impacting historical orders.

refs TICKET_12345
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants