I added some custom attributes to my product such as cost
and markup
. By default markup will be set to 1.5 but the admin can adjust this.
When I am in the admin panel, I want to be able to observe a change on the cost
field and have the price
field populated automatically based on the formula:
price = cost * markup
If anyone can point me in the right direction on where this code may need to be updated or provide any examples that would be awesome.