mirror of
https://github.com/kevin-DL/LaravelShoppingcart.git
synced 2026-01-23 07:31:31 +00:00
Update CanBeBought.php
This commit is contained in:
@@ -54,4 +54,16 @@ trait CanBeBought
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the taxRate of the Buyable item.
|
||||
*/
|
||||
public function getBuyableTaxRate($options = null): float
|
||||
{
|
||||
if (($taxRate = $this->getAttribute('taxRate'))) {
|
||||
return $taxRate;
|
||||
}
|
||||
|
||||
return config('cart.tax', 0.21);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user