@@ -307,24 +307,44 @@ class PaypalController extends Controller {
|
||||
$array_payment_details = $newUserModel->selectPaymentDetails('CartKey', $cartKey);
|
||||
$array_storename = $newUserModel->selectTeamStoreName($cartKey); // email subject
|
||||
|
||||
|
||||
foreach($array_storename as $storname){
|
||||
|
||||
$sName[] = $storname->StoreName;
|
||||
$sid[] = $storname->Id;
|
||||
}
|
||||
$sName = implode (", ", $sName);
|
||||
|
||||
|
||||
$user_loginsArray = $newUserModel->selectUserLoginsWhereIn($sid);
|
||||
|
||||
foreach($user_loginsArray as $userdata){
|
||||
|
||||
$other_email[] = $userdata->other_email;
|
||||
}
|
||||
|
||||
if($other_email[0] != null){
|
||||
$other_email = implode (", ", $other_email);
|
||||
$email_cc = "orders@crewsportswear.com" . "," . $other_email;
|
||||
}else{
|
||||
$email_cc = "orders@crewsportswear.com";
|
||||
}
|
||||
|
||||
$explode_other_email = explode(",", $email_cc);
|
||||
|
||||
$data = array(
|
||||
'order_item_array' => $order_item_array,
|
||||
'item_goup_array' => $item_goup_array,
|
||||
'img_thumb' => $item_thumbs,
|
||||
'array_payment_details' => $array_payment_details,
|
||||
'receiver' => $user_email,
|
||||
'email_cc' => $explode_other_email,
|
||||
'subject' => $sName . ' ORDERS',
|
||||
);
|
||||
|
||||
Mail::send('emails.orders', $data, function($message) use ($data) {
|
||||
$message->from('no-reply@crewsportswear.com', 'CREW Sportswear');
|
||||
$message->cc('orders@crewsportswear.com', 'Orders From CREW Sportswear');
|
||||
$message->bcc($data['email_cc'], 'Orders From CREW Sportswear');
|
||||
$message->to($data['receiver'])->subject($data['subject']);
|
||||
});
|
||||
// end email sending
|
||||
|
||||
@@ -29,7 +29,7 @@ class UserModel extends Model {
|
||||
|
||||
function selectProfileInfo($id){
|
||||
|
||||
$i = DB::table('user_logins')->select('user_logins.name', 'user_logins.username', 'user_logins.email', 'user_logins.email_is_verified', 'user_logins.role', 'user_logins.store_id', 'user_info.ContactNumber', 'user_info.Gender', 'user_info.Birthday')
|
||||
$i = DB::table('user_logins')->select('user_logins.name', 'user_logins.username', 'user_logins.email', 'user_logins.email_is_verified','user_logins.other_email', 'user_logins.role', 'user_logins.store_id', 'user_info.ContactNumber', 'user_info.Gender', 'user_info.Birthday')
|
||||
->leftjoin('user_info', 'user_info.UserId','=','user_logins.id')
|
||||
->where('user_logins.id','=',$id)
|
||||
->get();
|
||||
@@ -254,12 +254,14 @@ class UserModel extends Model {
|
||||
|
||||
function selectTeamStoreName($ck){
|
||||
$pdo = DB::connection()->getPdo();
|
||||
$query = $pdo->prepare("SELECT t.StoreName FROM orders AS o INNER JOIN teamstores AS t ON t.Id = o.StoreId WHERE o.CartKey = :ck GROUP BY o.StoreId ORDER BY t.StoreName ASC");
|
||||
$query = $pdo->prepare("SELECT t.Id, t.StoreName FROM orders AS o INNER JOIN teamstores AS t ON t.Id = o.StoreId WHERE o.CartKey = :ck GROUP BY o.StoreId ORDER BY t.StoreName ASC");
|
||||
$query->execute(array(':ck'=>$ck));
|
||||
$row = $query->fetchAll(\PDO::FETCH_OBJ);
|
||||
return $row;
|
||||
}
|
||||
|
||||
|
||||
|
||||
function updateActiveThumb($id, $product_id){
|
||||
DB::table('teamstore_product_thumbnails')->where('ProductId', $product_id)
|
||||
->update(['ImageClass' => null]);
|
||||
@@ -292,4 +294,11 @@ class UserModel extends Model {
|
||||
->get();
|
||||
return $i;
|
||||
}
|
||||
|
||||
function selectUserLoginsWhereIn($ids){
|
||||
$i = DB::table('user_logins')
|
||||
->whereIn('store_id', $ids)
|
||||
->get();
|
||||
return $i;
|
||||
}
|
||||
}
|
||||
@@ -284,6 +284,15 @@
|
||||
<canvas id="canvas_{{ $template->Type }}_{{ $template->Side }}" width="158px" height="174px" style="margin-top:171px; margin-left:0xp;"></canvas>
|
||||
@endif
|
||||
|
||||
|
||||
<!-- Cake -->
|
||||
@if($template->Type == "Cake" && $template->Side == "Front" && $template->TemplateFormat == "svg")
|
||||
<canvas id="canvas_{{ $template->Type }}_{{ $template->Side }}" width="400px" height="400px" style="margin-top:60px; margin-left: -5px;"></canvas>
|
||||
@endif
|
||||
@if($template->Type == "Cake" && $template->Side == "Back" && $template->TemplateFormat == "svg")
|
||||
<canvas id="canvas_{{ $template->Type }}_{{ $template->Side }}" width="400px" height="400px" style="margin-top:60px; margin-left: -5px;"></canvas>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1027,7 +1036,7 @@
|
||||
var get_template_type = "{{ $template->Type }}";
|
||||
|
||||
// if((get_template_type != "Shirts") || (get_template_type != "Hoodie")){
|
||||
if(get_template_type != "Hoodie" && get_template_type != "Shirts" ){
|
||||
if(get_template_type != "Hoodie" && get_template_type != "Shirts" && get_template_type != "Cake" ){
|
||||
addDefaultTeamText();
|
||||
addNameNumber();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user