Skip to content

Commit

Permalink
OrderModifier: disable Amount() method
Browse files Browse the repository at this point in the history
  • Loading branch information
wernerkrauss committed Jan 2, 2024
1 parent a828c33 commit 4e146ce
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 20 deletions.
3 changes: 2 additions & 1 deletion client/dist/css/shopcms.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 19 additions & 19 deletions src/Model/Modifiers/OrderModifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class OrderModifier extends OrderAttribute
'Order.ID' => 'Order ID',
'TableTitle' => 'Table Title',
'ClassName' => 'Type',
'Amount' => 'Amount',
'Amount.Nice' => 'Amount',
'Type' => 'Type',
];

Expand Down Expand Up @@ -121,24 +121,24 @@ public function valid()
return true;
}

/**
* This function is always called to determine the
* amount this modifier needs to charge or deduct.
*
* If the modifier exists in the DB, in which case it
* already exists for a given order, we just return
* the Amount data field from the DB. This is for
* existing orders.
*
* If this is a new order, and the modifier doesn't
* exist in the DB ($this->ID is 0), so we return
* the amount from $this->LiveAmount() which is a
* calculation based on the order and it's items.
*/
public function Amount()
{
return $this->Amount;
}
// /**
// * This function is always called to determine the
// * amount this modifier needs to charge or deduct.
// *
// * If the modifier exists in the DB, in which case it
// * already exists for a given order, we just return
// * the Amount data field from the DB. This is for
// * existing orders.
// *
// * If this is a new order, and the modifier doesn't
// * exist in the DB ($this->ID is 0), so we return
// * the amount from $this->LiveAmount() which is a
// * calculation based on the order and it's items.
// */
// public function Amount()
// {
// return $this->Amount;
// }

/**
* Monetary to use in templates.
Expand Down

0 comments on commit 4e146ce

Please sign in to comment.