route = $route; $this->shopping_user = $shopping_user; $this->shopping_instance = $shopping_instance; $this->mode = $mode; $this->yard_shopping_items = $yard_shopping_items; $this->is_abo = isset($shopping_instance->shopping_data['is_abo']) ? $shopping_instance->shopping_data['is_abo'] : 0; $this->is_for = isset($shopping_instance->shopping_data['is_for']) ? $shopping_instance->shopping_data['is_for'] : 0; $this->name = $shopping_user->member->account->first_name." ".$shopping_user->member->account->last_name." - "; $this->subject =$this->is_abo ? __('email.subject_custom_abo_payout', ['name' => $this->name]) : __('email.subject_custom_payout', ['name' => $this->name]); } public function build() { $salutation = __('email.hello')." ".$this->shopping_user->billing_firstname.","; return $this->view('emails.custom_payment')->with([ 'salutation' => $salutation, 'copy1line' => $this->is_abo ? __('email.your_custom_abo_payout', ['name' => $this->name]) : __('email.your_custom_payout', ['name' => $this->name]), 'shopping_user' => $this->shopping_user, 'shopping_instance' => $this->shopping_instance, 'yard_shopping_items' => $this->yard_shopping_items, 'is_abo' => $this->is_abo, 'is_for' => $this->is_for, 'copy3line' => __('email.checkout_copy3line'), 'greetings' => __('email.greetings'), 'route' => $this->route, 'mode' => $this->mode, 'sender' => __('email.sender'), ]); } }