updated for designer

This commit is contained in:
franknstayn
2021-07-15 16:33:01 +08:00
parent cbf708428c
commit 9a44b14fb3
16 changed files with 309 additions and 313 deletions

View File

@@ -1,4 +1,6 @@
<?php namespace App\Http\Controllers; <?php
namespace App\Http\Controllers;
use App\Http\Requests; use App\Http\Requests;
use App\Http\Controllers\Controller; use App\Http\Controllers\Controller;
@@ -8,7 +10,8 @@ use App\Models\TemplatesModel;
use App\Models\SportsModel; use App\Models\SportsModel;
use App\Models\PrintPatternModel; use App\Models\PrintPatternModel;
class TemplatesController extends Controller { class TemplatesController extends Controller
{
public function displayTemplates() public function displayTemplates()
{ {
@@ -21,16 +24,16 @@ class TemplatesController extends Controller {
$m = new TemplatesModel; $m = new TemplatesModel;
$m1 = new SportsModel; $m1 = new SportsModel;
$m2 = new PrintPatternModel; $m2 = new PrintPatternModel;
$templateData = $m->selectTemplate($q); $templateData = $m->selectTemplate($q);
$templatePathsData = $m->selectTemplatePaths($q); // plain svg for visualizer $templatePathsData = $m->selectTemplatePaths($q); // plain svg for visualizer
$templateTypes = $m->selectTemplateTypes(); $templateTypes = $m->selectTemplateTypes();
$sportsList = $m1->getSportsName(); $sportsList = $m1->getSportsName();
$printPatternList = $m2->selectAllPrintTemplate($q); $printPatternList = $m2->selectAllPrintTemplate($q);
return view('sub_pages.edit_template')->with('templatedata', $templateData)->with('templatepath', $templatePathsData)->with('sportsname', $sportsList)->with('templatetype', $templateTypes)->with('printpattern', $printPatternList); return view('sub_pages.edit_template')->with('templatedata', $templateData)->with('templatepath', $templatePathsData)->with('sportsname', $sportsList)->with('templatetype', $templateTypes)->with('printpattern', $printPatternList);
} }
public function getTemplates(Request $request) public function getTemplates(Request $request)
{ {
@@ -40,23 +43,23 @@ class TemplatesController extends Controller {
// /public/images/sports-thumbnails // /public/images/sports-thumbnails
if(!empty($data)){ if (!empty($data)) {
foreach ($data as $row) { foreach ($data as $row) {
?> ?>
<div class="col-md-4 col-sm-4 col-xs-6"> <div class="col-md-4 col-sm-4 col-xs-6">
<div style="" class="text-center"> <div class="text-center">
<h3><?php echo $row->TemplateName ?></h3> <h3><?php echo $row->TemplateName ?></h3>
</div>
<div class="sports-border">
<a href=""><img src="<?php echo url('public') . "/" . $row->Thumbnail ?>" alt="Sports" height="400px;" class="img img-responsive product-center" /></a>
<div class="sport-edit-btn">
<a href="<?php echo url('admin/templates') . "/edit/" . $row->TemplateCode . "/" ?>" class="btn btn-primary btn-block"><i class="fa fa-edit"></i> Edit</a>
</div> </div>
<div class="sports-border"> </div>
<a href=""><img src="<?php echo url('public') . "/" . $row->Thumbnail ?>" alt="Sports" height="400px;" class="img img-responsive product-center" /></a> </div>
<div class="sport-edit-btn"> <?php
<a href="<?php echo url('admin/templates') . "/edit/" . $row->TemplateCode . "/" ?>" class="btn btn-primary btn-block"><i class="fa fa-edit"></i> Edit</a>
</div>
</div>
</div>
<?php
} }
}else{ } else {
echo '<script> echo '<script>
alert("No available Template/s"); alert("No available Template/s");
</script>'; </script>';
@@ -71,26 +74,26 @@ class TemplatesController extends Controller {
public function getTemplateTypes() public function getTemplateTypes()
{ {
//if(Request::ajax()){ //if(Request::ajax()){
$m = new TemplatesModel; $m = new TemplatesModel;
$data = $m->selectTemplateTypes(); $data = $m->selectTemplateTypes();
?> ?>
<option value="">--Select Type--</option> <option value="">--Select Type--</option>
<?php <?php
foreach ($data as $row) { foreach ($data as $row) {
echo '<option value="'.$row->TemplateType.'">'.$row->TemplateType.'</option>'; echo '<option value="' . $row->TemplateType . '">' . $row->TemplateType . '</option>';
} }
?> ?>
<?php <?php
//} //}
} }
public function getLastId() public function getLastId()
{ {
//if(Request::ajax()){ //if(Request::ajax()){
$m = new TemplatesModel; $m = new TemplatesModel;
$data = $m->selectTemplateLastId(); $data = $m->selectTemplateLastId();
echo $templateCode = "TEMP-" . str_pad($data->Id + 1, 5,'0',STR_PAD_LEFT); echo $templateCode = "TEMP-" . str_pad($data->Id + 1, 5, '0', STR_PAD_LEFT);
} }
public function saveNewTemplates(Request $request) public function saveNewTemplates(Request $request)
@@ -106,124 +109,129 @@ class TemplatesController extends Controller {
$getSkins = $post['getSkins']; $getSkins = $post['getSkins'];
$tempateImage = $post['tempateImage']; $tempateImage = $post['tempateImage'];
$rawName = date('Ymd') . "-" . time().'-'.$request->file('tempateImage')->getClientOriginalName(); $rawName = date('Ymd') . "-" . time() . '-' . $request->file('tempateImage')->getClientOriginalName();
$imageExt = $request->file('tempateImage')->getClientOriginalExtension(); $imageExt = $request->file('tempateImage')->getClientOriginalExtension();
$custom_file_name = str_replace(' ','-',strtolower($rawName)); $custom_file_name = str_replace(' ', '-', strtolower($rawName));
$custom_file_name = preg_replace("/\.[^.\s]{3,4}$/", "", $custom_file_name); $custom_file_name = preg_replace("/\.[^.\s]{3,4}$/", "", $custom_file_name);
$NewImageName = $custom_file_name.'.'.$imageExt; $NewImageName = $custom_file_name . '.' . $imageExt;
$thumbnail = "images/templates/thumbnail/" . $NewImageName; $thumbnail = "images/templates/thumbnail/" . $NewImageName;
$data = array( $data = array(
'SportsId' => $sportName, 'SportsId' => $sportName,
'TemplateCode' => $templateCode, 'TemplateCode' => $templateCode,
'Thumbnail' => $thumbnail, 'Thumbnail' => $thumbnail,
'TemplateName' => $templateName, 'TemplateName' => $templateName,
'TemplateType' => $templateType, 'TemplateType' => $templateType,
'Trim' => $numberOfTrims, 'Trim' => $numberOfTrims,
'PatternId' => $getSkins, 'PatternId' => $getSkins,
'IsActive' => 'TRUE' 'IsActive' => 'TRUE'
); );
$i = $m->insertNewTempalte($data); $i = $m->insertNewTempalte($data);
if($i){ if ($i) {
$request->file('tempateImage')->move( $request->file('tempateImage')->move(
base_path() . '/public/images/templates/thumbnail', $NewImageName base_path() . '/public/images/templates/thumbnail',
$NewImageName
); );
//for front jersey //for front jersey
if(!empty($request->file('svgJerseyFront')->getClientOriginalName())){ if (!empty($request->file('svgJerseyFront')->getClientOriginalName())) {
$svgName = $request->file('svgJerseyFront')->getClientOriginalName(); $svgName = $request->file('svgJerseyFront')->getClientOriginalName();
$svgThumbnail = "uniform-templates/".$templateCode."/DISPLAY/".$svgName; $svgThumbnail = "uniform-templates/" . $templateCode . "/DISPLAY/" . $svgName;
//var_dump($svgThumbnail); //var_dump($svgThumbnail);
$Templatedata = array( $Templatedata = array(
'TemplateCode' => $templateCode, 'TemplateCode' => $templateCode,
'Type' => 'Jersey', 'Type' => 'Jersey',
'Side' => 'Front', 'Side' => 'Front',
'Path' => $svgThumbnail, 'Path' => $svgThumbnail,
'IsActive' => 'TRUE' 'IsActive' => 'TRUE'
); );
$i = $m->insertTempaltePaths($Templatedata); $i = $m->insertTempaltePaths($Templatedata);
if($i){ if ($i) {
$request->file('svgJerseyFront')->move( $request->file('svgJerseyFront')->move(
base_path() . '/public/images/uniform-templates/'.$templateCode. '/DISPLAY' , $svgName base_path() . '/public/images/uniform-templates/' . $templateCode . '/DISPLAY',
$svgName
); );
} }
} }
if(!empty($request->file('svgJerseyBack')->getClientOriginalName())){ if (!empty($request->file('svgJerseyBack')->getClientOriginalName())) {
$svgName = $request->file('svgJerseyBack')->getClientOriginalName(); $svgName = $request->file('svgJerseyBack')->getClientOriginalName();
$svgThumbnail = "uniform-templates/".$templateCode."/DISPLAY/".$svgName; $svgThumbnail = "uniform-templates/" . $templateCode . "/DISPLAY/" . $svgName;
$Templatedata = array( $Templatedata = array(
'TemplateCode' => $templateCode, 'TemplateCode' => $templateCode,
'Type' => 'Jersey', 'Type' => 'Jersey',
'Side' => 'Back', 'Side' => 'Back',
'Path' => $svgThumbnail, 'Path' => $svgThumbnail,
'IsActive' => 'TRUE' 'IsActive' => 'TRUE'
); );
$i = $m->insertTempaltePaths($Templatedata); $i = $m->insertTempaltePaths($Templatedata);
if($i){ if ($i) {
$request->file('svgJerseyBack')->move( $request->file('svgJerseyBack')->move(
base_path() . '/public/images/uniform-templates/'.$templateCode. '/DISPLAY' , $svgName base_path() . '/public/images/uniform-templates/' . $templateCode . '/DISPLAY',
$svgName
); );
} }
} }
if(!empty($request->file('svgShortRight')->getClientOriginalName())){ if (!empty($request->file('svgShortRight')->getClientOriginalName())) {
$svgName = $request->file('svgShortRight')->getClientOriginalName(); $svgName = $request->file('svgShortRight')->getClientOriginalName();
$svgThumbnail = "uniform-templates/".$templateCode."/DISPLAY/".$svgName; $svgThumbnail = "uniform-templates/" . $templateCode . "/DISPLAY/" . $svgName;
$Templatedata = array( $Templatedata = array(
'TemplateCode' => $templateCode, 'TemplateCode' => $templateCode,
'Type' => 'Shorts', 'Type' => 'Shorts',
'Side' => 'Right', 'Side' => 'Right',
'Path' => $svgThumbnail, 'Path' => $svgThumbnail,
'IsActive' => 'TRUE' 'IsActive' => 'TRUE'
); );
$i = $m->insertTempaltePaths($Templatedata); $i = $m->insertTempaltePaths($Templatedata);
if($i){ if ($i) {
$request->file('svgShortRight')->move( $request->file('svgShortRight')->move(
base_path() . '/public/images/uniform-templates/'.$templateCode. '/DISPLAY' , $svgName base_path() . '/public/images/uniform-templates/' . $templateCode . '/DISPLAY',
$svgName
); );
} }
} }
if(!empty($request->file('svgShortLeft')->getClientOriginalName())){ if (!empty($request->file('svgShortLeft')->getClientOriginalName())) {
$svgName = $request->file('svgShortLeft')->getClientOriginalName(); $svgName = $request->file('svgShortLeft')->getClientOriginalName();
$svgThumbnail = "uniform-templates/".$templateCode."/DISPLAY/".$svgName; $svgThumbnail = "uniform-templates/" . $templateCode . "/DISPLAY/" . $svgName;
$Templatedata = array( $Templatedata = array(
'TemplateCode' => $templateCode, 'TemplateCode' => $templateCode,
'Type' => 'Shorts', 'Type' => 'Shorts',
'Side' => 'Left', 'Side' => 'Left',
'Path' => $svgThumbnail, 'Path' => $svgThumbnail,
'IsActive' => 'TRUE' 'IsActive' => 'TRUE'
); );
$i = $m->insertTempaltePaths($Templatedata); $i = $m->insertTempaltePaths($Templatedata);
if($i){ if ($i) {
$request->file('svgShortLeft')->move( $request->file('svgShortLeft')->move(
base_path() . '/public/images/uniform-templates/'.$templateCode. '/DISPLAY' , $svgName base_path() . '/public/images/uniform-templates/' . $templateCode . '/DISPLAY',
$svgName
); );
} }
} }
echo '<div class="alert alert-success alert-dismissible"> echo '<div class="alert alert-success alert-dismissible">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button> <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<h4><i class="icon fa fa-check"></i> Success!</h4> <h4><i class="icon fa fa-check"></i> Success!</h4>
Sports is successfully added. Sports is successfully added.
</div>'; </div>';
}else{ } else {
echo '<div class="alert alert-danger alert-dismissible"> echo '<div class="alert alert-danger alert-dismissible">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button> <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<h4><i class="icon fa fa-check"></i> Error!</h4> <h4><i class="icon fa fa-check"></i> Error!</h4>
@@ -249,123 +257,122 @@ class TemplatesController extends Controller {
$getSkins = $post['getSkins']; $getSkins = $post['getSkins'];
if (array_key_exists('tempateImage', $post)) { if (array_key_exists('tempateImage', $post)) {
$tempateImage = $post['tempateImage']; $tempateImage = $post['tempateImage'];
$rawName = date('Ymd') . "-" . time().'-'.$request->file('tempateImage')->getClientOriginalName(); $rawName = date('Ymd') . "-" . time() . '-' . $request->file('tempateImage')->getClientOriginalName();
$imageExt = $request->file('tempateImage')->getClientOriginalExtension(); $imageExt = $request->file('tempateImage')->getClientOriginalExtension();
$custom_file_name = str_replace(' ','-',strtolower($rawName)); $custom_file_name = str_replace(' ', '-', strtolower($rawName));
$custom_file_name = preg_replace("/\.[^.\s]{3,4}$/", "", $custom_file_name); $custom_file_name = preg_replace("/\.[^.\s]{3,4}$/", "", $custom_file_name);
$NewImageName = $custom_file_name.'.'.$imageExt; $NewImageName = $custom_file_name . '.' . $imageExt;
$thumbnail = "images/templates/thumbnail/" . $NewImageName; $thumbnail = "images/templates/thumbnail/" . $NewImageName;
$data = array( $data = array(
'SportsId' => trim($sportName), 'SportsId' => trim($sportName),
'TemplateCode' => $templateCode, 'TemplateCode' => $templateCode,
'Thumbnail' => $thumbnail, 'Thumbnail' => $thumbnail,
'TemplateName' => $templateName, 'TemplateName' => $templateName,
'TemplateType' => trim($templateType), 'TemplateType' => trim($templateType),
'Trim' => $numberOfTrims, 'Trim' => $numberOfTrims,
'PatternId' => $getSkins 'PatternId' => $getSkins
);
$request->file('tempateImage')->move(
base_path() . '/public/images/templates/thumbnail', $NewImageName
); );
}else{ $request->file('tempateImage')->move(
base_path() . '/public/images/templates/thumbnail',
$NewImageName
);
} else {
$data = array( $data = array(
'SportsId' => trim($sportName), 'SportsId' => trim($sportName),
'TemplateCode' => $templateCode, 'TemplateCode' => $templateCode,
//'Thumbnail' => $thumbnail, //'Thumbnail' => $thumbnail,
'TemplateName' => $templateName, 'TemplateName' => $templateName,
'TemplateType' => trim($templateType), 'TemplateType' => trim($templateType),
'Trim' => $numberOfTrims, 'Trim' => $numberOfTrims,
'PatternId' => $getSkins 'PatternId' => $getSkins
); );
} }
$i = $m->updateNewTemplate($data, $templateCode); $i = $m->updateNewTemplate($data, $templateCode);
if (array_key_exists('svgJerseyFront', $post)) { if (array_key_exists('svgJerseyFront', $post)) {
//echo 'meron jerset front'; //echo 'meron jerset front';
$svgName = $request->file('svgJerseyFront')->getClientOriginalName();
$svgThumbnail = "uniform-templates/".$templateCode."/DISPLAY/".$svgName;
$Templatedata = array( $svgName = $request->file('svgJerseyFront')->getClientOriginalName();
'Type' => 'Jersey', $svgThumbnail = "uniform-templates/" . $templateCode . "/DISPLAY/" . $svgName;
'Side' => 'Front',
'Path' => $svgThumbnail
);
$i = $m->updateTemplatePaths($Templatedata, $post['id_svgJerseyFront']); $Templatedata = array(
if($i){ 'Type' => 'Jersey',
$request->file('svgJerseyFront')->move( 'Side' => 'Front',
base_path() . '/public/images/uniform-templates/'.$templateCode. '/DISPLAY' , $svgName 'Path' => $svgThumbnail
); );
//echo 'image move success';
} $i = $m->updateTemplatePaths($Templatedata, $post['id_svgJerseyFront']);
if ($i) {
$request->file('svgJerseyFront')->move(
base_path() . '/public/images/uniform-templates/' . $templateCode . '/DISPLAY',
$svgName
);
//echo 'image move success';
}
} }
if (array_key_exists('svgJerseyBack', $post)) { if (array_key_exists('svgJerseyBack', $post)) {
$svgName = $request->file('svgJerseyBack')->getClientOriginalName(); $svgName = $request->file('svgJerseyBack')->getClientOriginalName();
$svgThumbnail = "uniform-templates/".$templateCode."/DISPLAY/".$svgName; $svgThumbnail = "uniform-templates/" . $templateCode . "/DISPLAY/" . $svgName;
$Templatedata = array( $Templatedata = array(
'Type' => 'Jersey', 'Type' => 'Jersey',
'Side' => 'Back', 'Side' => 'Back',
'Path' => $svgThumbnail 'Path' => $svgThumbnail
); );
$i = $m->updateTemplatePaths($Templatedata, $post['id_svgJerseyBack']); $i = $m->updateTemplatePaths($Templatedata, $post['id_svgJerseyBack']);
if($i){ if ($i) {
$request->file('svgJerseyBack')->move( $request->file('svgJerseyBack')->move(
base_path() . '/public/images/uniform-templates/'.$templateCode. '/DISPLAY' , $svgName base_path() . '/public/images/uniform-templates/' . $templateCode . '/DISPLAY',
$svgName
); );
} }
} }
if (array_key_exists('svgShortRight', $post)) { if (array_key_exists('svgShortRight', $post)) {
$svgName = $request->file('svgShortRight')->getClientOriginalName(); $svgName = $request->file('svgShortRight')->getClientOriginalName();
$svgThumbnail = "uniform-templates/".$templateCode."/DISPLAY/".$svgName; $svgThumbnail = "uniform-templates/" . $templateCode . "/DISPLAY/" . $svgName;
$Templatedata = array( $Templatedata = array(
'Type' => 'Shorts', 'Type' => 'Shorts',
'Side' => 'Right', 'Side' => 'Right',
'Path' => $svgThumbnail 'Path' => $svgThumbnail
); );
$i = $m->updateTemplatePaths($Templatedata, $post['id_svgShortRight']); $i = $m->updateTemplatePaths($Templatedata, $post['id_svgShortRight']);
if($i){ if ($i) {
$request->file('svgShortRight')->move( $request->file('svgShortRight')->move(
base_path() . '/public/images/uniform-templates/'.$templateCode. '/DISPLAY' , $svgName base_path() . '/public/images/uniform-templates/' . $templateCode . '/DISPLAY',
$svgName
); );
} }
} }
if (array_key_exists('svgShortLeft', $post)) { if (array_key_exists('svgShortLeft', $post)) {
$svgName = $request->file('svgShortLeft')->getClientOriginalName(); $svgName = $request->file('svgShortLeft')->getClientOriginalName();
$svgThumbnail = "uniform-templates/".$templateCode."/DISPLAY/".$svgName; $svgThumbnail = "uniform-templates/" . $templateCode . "/DISPLAY/" . $svgName;
$Templatedata = array( $Templatedata = array(
'Type' => 'Shorts', 'Type' => 'Shorts',
'Side' => 'Left', 'Side' => 'Left',
'Path' => $svgThumbnail 'Path' => $svgThumbnail
); );
$i = $m->updateTemplatePaths($Templatedata, $post['id_svgShortLeft']); $i = $m->updateTemplatePaths($Templatedata, $post['id_svgShortLeft']);
if($i){ if ($i) {
$request->file('svgShortLeft')->move( $request->file('svgShortLeft')->move(
base_path() . '/public/images/uniform-templates/'.$templateCode. '/DISPLAY' , $svgName base_path() . '/public/images/uniform-templates/' . $templateCode . '/DISPLAY',
$svgName
); );
} }
} }
@@ -376,5 +383,4 @@ class TemplatesController extends Controller {
Template is successfully updated. Template is successfully updated.
</div>'; </div>';
} }
} }

View File

@@ -13,7 +13,7 @@ use App\Models\user\UserModel;
// use Mail; // use Mail;
use Illuminate\Support\Facades\Mail; use Illuminate\Support\Facades\Mail;
use Analytics; use Analytics;
use App\Models\TemplatesModel;
class TeamStoreController extends Controller class TeamStoreController extends Controller
{ {
@@ -129,7 +129,7 @@ class TeamStoreController extends Controller
$m = new TeamStoreModel; $m = new TeamStoreModel;
$q = $request->input('q'); $q = $request->input('q');
$sort = $request->input('s'); $sort = $request->input('s');
if (isset($q) && isset($sort)) { if (isset($q) && isset($sort)) {
if ($sort == "latest") { if ($sort == "latest") {
@@ -793,7 +793,16 @@ class TeamStoreController extends Controller
}); });
} }
public function contact(){ public function contact()
{
return view('contact'); return view('contact');
} }
}
public function selectTemplates()
{
$m = new TemplatesModel;
$data = $m->selectAllTemplate();
return view('merchbay.templates')
->with('row', $data);
}
}

View File

@@ -23,7 +23,7 @@ Route::controllers([
]); ]);
Route::get('/', 'MainController@index'); // Route::get('/', 'MainController@index');
Route::get('/sportslist', 'MainController@sports'); Route::get('/sportslist', 'MainController@sports');
Route::get('/sports/{url}', 'MainController@templatesCat'); Route::get('/sports/{url}', 'MainController@templatesCat');
Route::get('/sports/{url}/{id}', 'MainController@templatesByCategory'); Route::get('/sports/{url}/{id}', 'MainController@templatesByCategory');
@@ -56,22 +56,22 @@ Route::post('/designer/a/save-roster', 'designer\DesignerController@saveRoster')
//END CUSTOMIZER DISPLAY //END CUSTOMIZER DISPLAY
// Route::post('/designer/a/gradient-append', 'designer\DesignerController@gradientAppend'); Route::post('/designer/a/gradient-append', 'designer\DesignerController@gradientAppend');
// Route::post('/designer/a/set-pattern', 'designer\DesignerController@setPattern'); Route::post('/designer/a/set-pattern', 'designer\DesignerController@setPattern');
// Route::post('/designer/a/set-trim-pattern', 'designer\DesignerController@setTrimPattern'); Route::post('/designer/a/set-trim-pattern', 'designer\DesignerController@setTrimPattern');
// Route::post('/designer/a/get-template-default-colors', 'designer\DesignerController@getTemplateDefaultColors'); Route::post('/designer/a/get-template-default-colors', 'designer\DesignerController@getTemplateDefaultColors');
// Route::post('/designer/a/get-font-display', 'designer\DesignerController@getFontDisplay'); Route::post('/designer/a/get-font-display', 'designer\DesignerController@getFontDisplay');
// Route::post('/designer/a/get-cliparts', 'designer\DesignerController@getCliparts'); Route::post('/designer/a/get-cliparts', 'designer\DesignerController@getCliparts');
// Route::post('/designer/a/clipart-properties', 'designer\DesignerController@clipartProperties'); Route::post('/designer/a/clipart-properties', 'designer\DesignerController@clipartProperties');
// Route::post('/designer/a/save-design', 'designer\DesignerController@saveDesign'); Route::post('/designer/a/save-design', 'designer\DesignerController@saveDesign');
// Route::post('/designer/edit/a/edit-gradient-append', 'designer\DesignerController@editGradientAppend'); Route::post('/designer/edit/a/edit-gradient-append', 'designer\DesignerController@editGradientAppend');
// Route::post('/designer/edit/a/edit-pattern-properties', 'designer\DesignerController@editPatternProperties'); Route::post('/designer/edit/a/edit-pattern-properties', 'designer\DesignerController@editPatternProperties');
// Route::post('/designer/edit/a/edit-set-pattern', 'designer\DesignerController@editSetPattern'); Route::post('/designer/edit/a/edit-set-pattern', 'designer\DesignerController@editSetPattern');
// Route::get('/designer/a/tab-clipart-content', 'designer\DesignerController@tabClipartContent'); Route::get('/designer/a/tab-clipart-content', 'designer\DesignerController@tabClipartContent');
// Route::post('/designer/a/save-design-details', 'designer\DesignerController@saveDesignDetails'); Route::post('/designer/a/save-design-details', 'designer\DesignerController@saveDesignDetails');
// teamstore // teamstore
Route::get('/', 'teamstore\TeamStoreController@login'); // old // Route::get('/', 'teamstore\TeamStoreController@login'); // old
Route::get('/', 'teamstore\TeamStoreController@storelist'); // old Route::get('/', 'teamstore\TeamStoreController@storelist'); // old
@@ -84,6 +84,10 @@ Route::post('/teamstore/q/add-to-cart', 'teamstore\TeamStoreController@addToCart
Route::get('/teamstore/q/clearsession', 'teamstore\TeamStoreController@clearSession'); Route::get('/teamstore/q/clearsession', 'teamstore\TeamStoreController@clearSession');
Route::post('/teamstore/q/add-voucher', 'teamstore\TeamStoreController@addVoucher'); Route::post('/teamstore/q/add-voucher', 'teamstore\TeamStoreController@addVoucher');
Route::post('/teamstore/q/add-new-row', 'teamstore\TeamStoreController@addNewRow'); Route::post('/teamstore/q/add-new-row', 'teamstore\TeamStoreController@addNewRow');
Route::post('/teamstore/q/add-new-row', 'teamstore\TeamStoreController@addNewRow');
Route::get('/templates', 'teamstore\TeamStoreController@selectTemplates');
// }); // });
Route::post('/teamstore/checkpassword', 'teamstore\TeamStoreController@checkTeamStorePassword'); Route::post('/teamstore/checkpassword', 'teamstore\TeamStoreController@checkTeamStorePassword');

View File

@@ -1,7 +1,7 @@
<?php namespace App\Models; <?php namespace App\Models;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
use DB; use Illuminate\Support\Facades\DB;
class TemplatesModel extends Model { class TemplatesModel extends Model {
@@ -57,4 +57,11 @@ class TemplatesModel extends Model {
return $i; return $i;
} }
function selectAllTemplate(){
$i = DB::table('templates')
->where('IsActive', '=', 'TRUE')
->get();
return $i;
}
} }

View File

@@ -18,7 +18,7 @@ class TeamStoreModel extends Model {
{ {
$i = DB::table('teamstore_products') $i = DB::table('teamstore_products')
->where($field, $teamstoreId) ->where($field, $teamstoreId)
->orderBy('Ordering', 'ASC') // ->orderBy('Ordering', 'ASC')
->orderBy('Ordering', 'ASC')->get(); ->orderBy('Ordering', 'ASC')->get();
return $i; return $i;
} }
@@ -224,7 +224,17 @@ class TeamStoreModel extends Model {
$i = DB::table('teamstores') $i = DB::table('teamstores')
->where("IsActive", "true") ->where("IsActive", "true")
->orderby($field, $value) ->orderby($field, $value)
->paginate(16); ->paginate(12);
return $i;
}
function selectFeaturedProduct(){
$i = DB::table('teamstore_products')
->where("IsActive", "true")
// ->orderby($field, $value)
->paginate(12);
return $i; return $i;
} }

View File

@@ -2,7 +2,7 @@ html,
body { body {
width: 100%; width: 100%;
height: 100%; height: 100%;
font-family: 'Montserrat', sans-serif !important; font-family: "Montserrat", sans-serif !important;
background-color: #f5f5f6; background-color: #f5f5f6;
font-size: 0.9rem; font-size: 0.9rem;
} }
@@ -15,6 +15,10 @@ body {
font-weight: 900; font-weight: 900;
} }
.navbar-brand > img {
height: 28px !important;
}
.btn-white-outline { .btn-white-outline {
color: #ffffff; color: #ffffff;
border-color: #ffffff; border-color: #ffffff;
@@ -80,7 +84,7 @@ body {
} }
.added-or::before { .added-or::before {
content: 'or'; content: "or";
position: absolute; position: absolute;
display: inline-block; display: inline-block;
padding: 5px; padding: 5px;
@@ -119,12 +123,12 @@ li.footer-menu-item {
} }
li.footer-menu-item::after { li.footer-menu-item::after {
content: ' |'; content: " |";
/* margin: 0px 10px 0px 10px; */ /* margin: 0px 10px 0px 10px; */
} }
li.footer-menu-item:last-child::after { li.footer-menu-item:last-child::after {
content: ''; content: "";
/* margin: 0 10px; */ /* margin: 0 10px; */
} }
@@ -160,7 +164,7 @@ li.footer-menu-item a:hover {
bottom: 0; bottom: 0;
margin: auto; margin: auto;
/* padding: 5px; */ /* padding: 5px; */
box-shadow: 0 .125rem .25rem rgba(0,0,0,.075); box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
} }
.product-image img { .product-image img {
@@ -188,7 +192,7 @@ li.footer-menu-item a:hover {
margin: -5px 0px; margin: -5px 0px;
} }
.product-price-display div{ .product-price-display div {
font-size: 1.5rem; font-size: 1.5rem;
font-weight: 600; font-weight: 600;
color: #9a9a9a; color: #9a9a9a;
@@ -261,38 +265,38 @@ a.btn-white-outline.nuxt-link-exact-active {
color: #000; color: #000;
} }
.product-price > .previous-price{ .product-price > .previous-price {
margin-right: 10px; margin-right: 10px;
} }
.product-price > .current-price{ .product-price > .current-price {
color: #e01414; color: #e01414;
font-size: 1.1rem; font-size: 1.1rem;
} }
.breadcrumb-item a{ .breadcrumb-item a {
color: #9a9a9a !important; color: #9a9a9a !important;
text-decoration: none; text-decoration: none;
font-weight: 500; font-weight: 500;
} }
.breadcrumb-item.active{ .breadcrumb-item.active {
color: #9a9a9a !important; color: #9a9a9a !important;
} }
.breadcrumb-item+.breadcrumb-item::before{ .breadcrumb-item + .breadcrumb-item::before {
color: #9a9a9a !important; color: #9a9a9a !important;
} }
.adbg{ .adbg {
background-color: #bdc6c5; background-color: #bdc6c5;
} }
span.designer-text{ span.designer-text {
color: #b90a0c; color: #b90a0c;
} }
.product-active-thumbnail{ .product-active-thumbnail {
height: 400px; height: 400px;
} }
@@ -343,7 +347,7 @@ span.designer-text{
.nav-item { .nav-item {
padding-left: 1rem; padding-left: 1rem;
padding-right: 1rem; padding-right: 1rem;
padding-top: .8rem; padding-top: 0.8rem;
} }
.store-logo img { .store-logo img {
/* max-height: 100%; */ /* max-height: 100%; */
@@ -353,7 +357,7 @@ span.designer-text{
/* width: 1; */ /* width: 1; */
} }
.store-name{ .store-name {
text-align: center; text-align: center;
} }
@@ -365,22 +369,22 @@ span.designer-text{
text-align: left; text-align: left;
} }
.product-active-thumbnail{ .product-active-thumbnail {
height: 345px; height: 345px;
} }
.btn-white-outline{ .btn-white-outline {
color: #000000; color: #000000;
border-color: #000000; border-color: #000000;
} }
.btn-white-outline:hover{ .btn-white-outline:hover {
color: #ffffff; color: #ffffff;
border-color: #000000; border-color: #000000;
background-color: #000000; background-color: #000000;
} }
.bi.bi-cart-fill{ .bi.bi-cart-fill {
color: #000000; color: #000000;
} }
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@@ -349,16 +349,16 @@
if(template_format == "png"){ if(template_format == "png"){
if(port == 5952){ if(port == 5952){
gen_url = ip+":"+port+"/ap/{{ $client_design_array[0]->DesignCode }}"; gen_url = ip+":"+port+"/merchbay/ap/{{ $client_design_array[0]->DesignCode }}";
}else{ }else{
gen_url = ip+":"+port+"/mask/{{ $client_design_array[0]->DesignCode }}"; gen_url = ip+":"+port+"/merchbay/mask/{{ $client_design_array[0]->DesignCode }}";
} }
}else{ }else{
if(port == 5953){ if(port == 5953){
gen_url = ip+":"+port+"/classic-mask/{{ $client_design_array[0]->DesignCode }}"; gen_url = ip+":"+port+"/merchbay/classic-mask/{{ $client_design_array[0]->DesignCode }}";
}else{ }else{
gen_url = ip+":"+port+"/tb/{{ $client_design_array[0]->DesignCode }}"; gen_url = ip+":"+port+"/merchbay/tb/{{ $client_design_array[0]->DesignCode }}";
} }
} }

View File

@@ -8,7 +8,7 @@
<span class="icon-bar"></span> <span class="icon-bar"></span>
</button> </button>
<a class="navbar-brand" href="{{ url('/') }}"> <a class="navbar-brand" href="{{ url('/') }}">
<img src="{{asset('public/images/logo.png')}}" /> <img src="{{asset('public/images/merchbay-black.png')}}" style="height: 28px" />
{{-- <small>JAC Printing & Graphics Co.</small> --}} {{-- <small>JAC Printing & Graphics Co.</small> --}}
</a> </a>
</div> </div>

View File

@@ -28,39 +28,12 @@
<div class="carousel-inner"> <div class="carousel-inner">
<div class="carousel-item active" data-bs-interval="10000"> <div class="carousel-item active" data-bs-interval="10000">
<img src="https://crewsportswear.app:5955/WIPCAPS.jpg" class="d-block w-100" alt="..."> <img src="https://crewsportswear.app:5955/WIPCAPS.jpg" class="d-block w-100" alt="...">
{{-- <v-lazy-image
src="https://crewsportswear.app:5955/WIPCAPS.jpg"
class="d-block w-100"
alt="..."
/> --}}
<!-- <div class="carousel-caption d-none d-md-block">
<h5>First slide label</h5>
<p>Nulla vitae elit libero, a pharetra augue mollis interdum.</p>
</div> -->
</div> </div>
<div class="carousel-item" data-bs-interval="10000"> <div class="carousel-item" data-bs-interval="10000">
<img src="https://crewsportswear.app:5955/NINONG.jpg" class="d-block w-100" alt="..."> <img src="https://crewsportswear.app:5955/NINONG.jpg" class="d-block w-100" alt="...">
{{-- <v-lazy-image
src="https://crewsportswear.app:5955/NINONG.jpg"
class="d-block w-100"
alt="..."
/> --}}
<!-- <div class="carousel-caption d-none d-md-block">
<h5>Second slide label</h5>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
</div> -->
</div> </div>
<div class="carousel-item" data-bs-interval="10000"> <div class="carousel-item" data-bs-interval="10000">
<img src="https://crewsportswear.app:5955/DRIVE.jpg" class="d-block w-100" alt="..."> <img src="https://crewsportswear.app:5955/DRIVE.jpg" class="d-block w-100" alt="...">
{{-- <v-lazy-image
src="https://crewsportswear.app:5955/DRIVE.jpg"
class="d-block w-100"
alt="..."
/> --}}
<!-- <div class="carousel-caption d-none d-md-block">
<h5>Third slide label</h5>
<p>Praesent commodo cursus magna, vel scelerisque nisl consectetur.</p>
</div> -->
</div> </div>
</div> </div>
<a <a
@@ -118,9 +91,9 @@
</div> </div>
</div> </div>
<div class="col-lg-3 added-or"> <div class="col-lg-3 added-or">
<button type="submit" class="btn btn-black mb-3 w-100"> <a href="{{ url('templates') }}" type="submit" class="btn btn-black mb-3 w-100">
Design your own Design your own
</button> </a>
</div> </div>
</form> </form>
</div> </div>

View File

@@ -1,7 +1,8 @@
<nav class="navbar navbar-expand-lg bg-black"> <nav class="navbar navbar-expand-lg bg-black">
<div class="container"> <div class="container">
<a class="navbar-brand text-white" href="/"> <a class="navbar-brand text-white" href="/">
<span>M</span>erchbay {{-- <span>M</span>erchbay --}}
<img src="{{asset('/public/images/merchbay-white.png')}}" class="img-fluid" alt="logo">
</a> </a>
<button <button
class="navbar-toggler" class="navbar-toggler"

View File

@@ -0,0 +1,47 @@
@extends('merchbay_main')
@section('main-content')
<div class="wrapper pb-5">
<div class="main__content">
<div class="container">
{{-- breadcrumbs --}}
<div class="row">
<div class="col-lg-12">
<div class="py-4">
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="{{ url('/') }}">Home</a></li>
<li class="breadcrumb-item active" aria-current="page">Templates</li>
</ol>
</nav>
</div>
</div>
</div>
<div class="row">
@if(!empty($row ))
@foreach ($row as $r)
<div class="col-margin-bottom col-lg-3 col-md-3 col-sm-4 col-xs-6">
<div class="thumb-border" style="border:1px solid #e2e2e2; padding: 5px;">
<a href="{{ url('/designer') }}/{{ md5($r->TemplateCode) }}">
<img src="{{ config('site_config.uploads') . $r->Thumbnail}}" alt="{{ $r->TemplateName }}" class="img-fluid" />
</a>
<div class="text-center" style="border-top: 1px solid #e2e2e2; padding: 10px;">
<h5 class="sports-title">{{ $r->TemplateName }}</h5>
</div>
</div>
</div>
@endforeach
@else
<div class="col-md-12 col-sm-12 col-xs-12">
<h3 class="no-record no-record">No Record Found.</h3>
</div>
@endif
</div>
</div>
</div>
</div>
@endsection

View File

@@ -23,72 +23,7 @@
</button> </button>
</div> </div>
</div> --}} </div> --}}
</div> </div>
{{-- <div class="container">
<div class="row">
<form class="form-horizontal" role="search" id="frm_search_store">
<div class="col-lg-7">
<div class="form-group">
<div class="col-sm-12">
<label>Seach Store</label>
<div class="input-group">
<input type="text" class="form-control" placeholder="Search Store" value="{{ $keyword }}" name="q">
<div class="input-group-btn">
<button class="btn btn-default" type="submit"><i class="fa fa-search"></i></button>
</div>
</div>
</div>
</div>
</div>
<div class="col-lg-5">
<div class="form-group">
<label class="col-sm-7 control-label hidden-xs">&nbsp;</label>
<div class="col-sm-5">
<label>Sort by:</label>
<select class="form-control" name="s" id="select_sort_stores">
<option @if($filter == "al-asc") selected @endif value="al-asc">Store Name A &rarr; Z</option>
<option @if($filter == "al-desc") selected @endif value="al-desc">Store Name Z &rarr; A</option>
<option @if($filter == "latest") selected @endif value="latest">Newest &rarr; Oldest</option>
<option @if($filter == "oldest") selected @endif value="oldest">Oldest &rarr; Newest</option>
</select>
</div>
</div>
</div>
</form>
<div class="clearfix"></div>
</div>
<div class="row" id="slider-thumbs">
<ul class="hide-bullets">
@foreach ($stores_array as $store)
<li class="li-custom col-lg-3 col-md-3 col-sm-4 col-xs-12">
<div style="border: 1px solid #dddddd; padding: 5px;">
@if($store->Password != null )
<a class="thumbnail password-protected" href="#" data-store-id="{{ $store->Id }}" data-store-url="{{ $store->StoreUrl }}">
<img class="store-logo" src="{{ config('site_config.uploads') . 'teamstore/'. $store->ImageFolder . '/' . $store->StoreLogo }}">
</a>
<h4 style="border-top: 1px solid #dddddd; padding: 10px; font-size: 16px; font-weight: bold; text-transform: uppercase;" class="text-center">{{ $store->StoreName }} <i class="fa fa-lock" title="This store is password protected."></i></h4>
@else
<a class="thumbnail" href="{{ url('teamstore') . '/' . $store->StoreUrl }}">
<img class="store-logo" src="{{ config('site_config.uploads') . 'teamstore/' . $store->ImageFolder . '/' . $store->StoreLogo }}">
</a>
<h4 style="border-top: 1px solid #dddddd; padding: 10px; font-size: 16px; font-weight: bold; text-transform: uppercase;" class="text-center">{{ $store->StoreName }}</h4>
@endif
</div>
</li>
@endforeach
</ul>
</div>
<div class="row">
<div class="col-sm-12">
<div class="text-center">
{!! $stores_array->render() !!}
</div>
</div>
</div>
</div> --}}
<!-- /container -->
<div id="team-store-login" class="modal fade" role="dialog"> <div id="team-store-login" class="modal fade" role="dialog">
<div class="modal-dialog"> <div class="modal-dialog">

View File

@@ -4,5 +4,5 @@
Version 1.0 Version 1.0
</div> </div>
<!-- Default to the left --> <!-- Default to the left -->
<strong>Copyright © <?php echo date('Y') ?> <a href="http://crewsportswear.com">crewsportswear.com</a>.</strong> All rights reserved. <strong>Copyright © <?php echo date('Y') ?> <a href="https://merchbay.com">merchbay.com</a>.</strong> All rights reserved.
</footer> </footer>

View File

@@ -137,7 +137,7 @@
@else @else
<div class="text-center" id="homepage-logo"> <div class="text-center" id="homepage-logo">
<img src="{{asset('/public/images/logo.png')}}" style="height: 200px;" class="img img-responsive" /> <img src="{{asset('/public/images/merchbay-black.png')}}" style="width: 50%" class="img img-responsive" />
</div> </div>
@endif @endif
</section> </section>