Free Shipping, Business Levels correction, Products Buying, Fonts
This commit is contained in:
parent
3f2fbd6d5b
commit
0341c9c189
197 changed files with 9161 additions and 329 deletions
|
|
@ -4,9 +4,9 @@ namespace App\Services;
|
|||
|
||||
|
||||
|
||||
use App\Models\Homeparty;
|
||||
use App\Models\Product;
|
||||
use App\Models\ShippingCountry;
|
||||
use App\Models\Setting;
|
||||
use App\Models\Homeparty;
|
||||
|
||||
class HomepartyCart
|
||||
{
|
||||
|
|
@ -43,7 +43,6 @@ class HomepartyCart
|
|||
|
||||
|
||||
private static $bonus_coupon = 0;
|
||||
private static $bonus_value = 30;
|
||||
|
||||
private static $voucher_price = 0;
|
||||
public static $voucher_name = "";
|
||||
|
|
@ -54,7 +53,10 @@ class HomepartyCart
|
|||
private static $bonus_coupon_fault = 0;
|
||||
private static $bonus_coupon_next_step = 0;
|
||||
private static $bonus_coupon_next_value = 0;
|
||||
private static $bonus_start = 230;
|
||||
private static $bonus_start = 230; //230
|
||||
private static $bonus_value = 30; //30
|
||||
|
||||
|
||||
private static $bonusTable = [
|
||||
295 => 15,
|
||||
350 => 20,
|
||||
|
|
@ -63,8 +65,20 @@ class HomepartyCart
|
|||
670 => 40,
|
||||
780 => 50,
|
||||
];
|
||||
public static function calculateHomeparty(Homeparty $homeparty){
|
||||
|
||||
public static function init(){
|
||||
self::$bonus_value = Setting::getContentBySlug('hp-bonus-value');
|
||||
self::$bonus_start = Setting::getContentBySlug('hp-bonus-start');
|
||||
if($hpBonusSteps = Setting::getContentBySlug('hp-bonus-steps')){
|
||||
self::$bonusTable = [];
|
||||
for ($i=1; $i <= $hpBonusSteps; $i++) {
|
||||
self::$bonusTable[Setting::getContentBySlug('hp-bonus-step-start-'.$i)] = Setting::getContentBySlug('hp-bonus-step-value-'.$i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static function calculateHomeparty(Homeparty $homeparty){
|
||||
self::init();
|
||||
self::$homeparty = $homeparty;
|
||||
foreach ($homeparty->homeparty_users as $homeparty_user){
|
||||
if($homeparty_user->is_host){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue