@@ -92,7 +92,7 @@ class PaypalController extends Controller {
|
||||
$getPercentageValue = $totalValue / 100;
|
||||
$getDiscountValue = ($getSubtotal[0]->Subtotal * $getPercentageValue);
|
||||
$data = array(
|
||||
'Price' => $getDiscountValue * -1
|
||||
'Price' => round($getDiscountValue * -1, 2)
|
||||
);
|
||||
|
||||
$m->updateVoucherValueInCart($data, $item_id);
|
||||
@@ -109,11 +109,9 @@ class PaypalController extends Controller {
|
||||
$updated_items = $m->myCart($cartKey);
|
||||
$updated_getSubtotal = $m->getSubtotal($cartKey);
|
||||
|
||||
$order_subtotal = $updated_getSubtotal[0]->Subtotal;
|
||||
// $order_subtotal = $updated_getSubtotal[0]->Subtotal;
|
||||
$order_grandtotal = $updated_getSubtotal[0]->Subtotal;
|
||||
|
||||
// $tax_value = 0.10;
|
||||
|
||||
if($grouped_item[0]->StoreId == 76 || $grouped_item[0]->StoreId == 78){
|
||||
$tax_value = 0;
|
||||
}else{
|
||||
@@ -138,10 +136,8 @@ class PaypalController extends Controller {
|
||||
|
||||
$item_list = PayPal::ItemList();
|
||||
$item_list->setItems($order_items);
|
||||
|
||||
|
||||
$amount_details = PayPal::Details();
|
||||
$amount_details->setSubtotal($order_subtotal);
|
||||
$amount_details->setSubtotal($order_grandtotal);
|
||||
$amount_details->setTax($tax);
|
||||
|
||||
$amount = PayPal::Amount();
|
||||
|
||||
@@ -823,6 +823,7 @@ class UserController extends Controller {
|
||||
$arrayItems = $post['item'];
|
||||
$order = 1;
|
||||
$UserModel = new UserModel;
|
||||
|
||||
foreach ($arrayItems as $item) {
|
||||
$i = $UserModel->updateThumbnailOrdering($order, $item);
|
||||
$order++;
|
||||
@@ -834,6 +835,25 @@ class UserController extends Controller {
|
||||
));
|
||||
}
|
||||
|
||||
function saveItemOrdering(Request $request){
|
||||
$post = $request->all();
|
||||
$arrayItems = $post['order_number'];
|
||||
$order = 1;
|
||||
$UserModel = new UserModel;
|
||||
|
||||
foreach ($arrayItems as $item) {
|
||||
$i = $UserModel->updateItemOrdering($order, $item);
|
||||
$order++;
|
||||
}
|
||||
|
||||
return response()->json(array(
|
||||
'success' => true,
|
||||
'message' => 'success'
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
|
||||
function storeSettingUpdate(Request $request){
|
||||
$post = $request->all();
|
||||
$UserModel = new UserModel;
|
||||
@@ -981,4 +1001,55 @@ class UserController extends Controller {
|
||||
'item' => $array_item
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
function itemStoreReArrange(){
|
||||
$thumbnails = array();
|
||||
$newUserModel = new UserModel;
|
||||
$newTeamStoreModel = new TeamStoreModel;
|
||||
|
||||
$user_role = Auth::user()->role;
|
||||
$store_id = Auth::user()->store_id;
|
||||
|
||||
$store_array = $newTeamStoreModel->selectTeamStore('Id', $store_id);
|
||||
$product_array = $newTeamStoreModel->selectTeamStoreProducts('TeamStoreId', $store_id);
|
||||
|
||||
foreach ($product_array as $p => $pr_arr) {
|
||||
|
||||
$thumbnails_array = $newTeamStoreModel->getProductThumbnails($pr_arr->Id);
|
||||
|
||||
if(!empty($thumbnails_array)){
|
||||
foreach ($thumbnails_array as $t => $thumb) {
|
||||
|
||||
if($thumb->ImageClass == 'custom'){
|
||||
$displayThumbnails = $thumb->Image;
|
||||
break;
|
||||
}
|
||||
|
||||
if($thumb->ImageClass == 'active'){
|
||||
$displayThumbnails = $thumb->Image;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$thumbnails[] = array(
|
||||
'folder' => $store_array[0]->ImageFolder,
|
||||
'product_id' => $pr_arr->Id,
|
||||
'thumb' => $displayThumbnails
|
||||
);
|
||||
|
||||
}else{
|
||||
$thumbnails[] = array(
|
||||
'folder' => $store_array[0]->ImageFolder,
|
||||
'product_id' => $pr_arr->Id,
|
||||
'thumb' => "product-image-placeholder.png"
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return view('user-layouts.store_items_arrange')->with('store_array', $store_array)
|
||||
->with('product_array', $product_array)
|
||||
->with('thumbnails', $thumbnails);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -123,10 +123,11 @@ Route::group(['middleware' => 'normaluser'], function () {
|
||||
Route::post('user/store-items/save-new-item', 'user\UserController@saveNewItem');
|
||||
Route::post('user/update-active-thumbnail', 'user\UserController@updateActiveThumbnail');
|
||||
Route::post('user/post/save-thumbnail-ordering', 'user\UserController@saveThumbnailOrdering');
|
||||
Route::post('user/post/save-item-ordering', 'user\UserController@saveItemOrdering');
|
||||
Route::post('user/post/show-store-order-details', 'user\UserController@showStoreOrderDetails');
|
||||
Route::post('user/post/delete-image-thumb', 'user\UserController@deleteImageThumb');
|
||||
Route::post('user/store-items/save-new-item-image', 'user\UserController@saveNewItemImage');
|
||||
|
||||
Route::get('user/store-items/re-arrange', 'user\UserController@itemStoreReArrange');
|
||||
|
||||
Route::get('user/my-designs/sell-design/{designCode}', 'user\UserController@sellDesign');
|
||||
Route::post('user/my-designs/addstoreitem', 'user\UserController@saveNewStoreItem');
|
||||
|
||||
@@ -272,6 +272,11 @@ class UserModel extends Model {
|
||||
->update(['Ordering' => $order]);
|
||||
}
|
||||
|
||||
function updateItemOrdering($order, $id){
|
||||
$i = DB::table('teamstore_products')->where('Id', $id)
|
||||
->update(['Ordering' => $order]);
|
||||
}
|
||||
|
||||
function updateTeamstore($id, $data){
|
||||
|
||||
$i = DB::table('teamstores')
|
||||
|
||||
157
composer.lock
generated
157
composer.lock
generated
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"_readme": [
|
||||
"This file locks the dependencies of your project to a known state",
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "9ad9cbf7c7c319c392284bef379f0004",
|
||||
@@ -267,16 +267,16 @@
|
||||
},
|
||||
{
|
||||
"name": "google/recaptcha",
|
||||
"version": "1.2.2",
|
||||
"version": "1.2.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/google/recaptcha.git",
|
||||
"reference": "c4a17d6af648d4f3814430cd103cba50b75b571c"
|
||||
"reference": "98c4a6573b27e8b0990ea8789c74ea378795134c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/google/recaptcha/zipball/c4a17d6af648d4f3814430cd103cba50b75b571c",
|
||||
"reference": "c4a17d6af648d4f3814430cd103cba50b75b571c",
|
||||
"url": "https://api.github.com/repos/google/recaptcha/zipball/98c4a6573b27e8b0990ea8789c74ea378795134c",
|
||||
"reference": "98c4a6573b27e8b0990ea8789c74ea378795134c",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -310,20 +310,20 @@
|
||||
"recaptcha",
|
||||
"spam"
|
||||
],
|
||||
"time": "2019-05-24T12:44:03+00:00"
|
||||
"time": "2019-08-16T15:48:25+00:00"
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/guzzle",
|
||||
"version": "5.3.3",
|
||||
"version": "5.3.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/guzzle/guzzle.git",
|
||||
"reference": "93bbdb30d59be6cd9839495306c65f2907370eb9"
|
||||
"reference": "b87eda7a7162f95574032da17e9323c9899cb6b2"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/93bbdb30d59be6cd9839495306c65f2907370eb9",
|
||||
"reference": "93bbdb30d59be6cd9839495306c65f2907370eb9",
|
||||
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/b87eda7a7162f95574032da17e9323c9899cb6b2",
|
||||
"reference": "b87eda7a7162f95574032da17e9323c9899cb6b2",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -363,7 +363,7 @@
|
||||
"rest",
|
||||
"web service"
|
||||
],
|
||||
"time": "2018-07-31T13:33:10+00:00"
|
||||
"time": "2019-10-30T09:32:00+00:00"
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/ringphp",
|
||||
@@ -654,25 +654,25 @@
|
||||
},
|
||||
{
|
||||
"name": "kylekatarnls/update-helper",
|
||||
"version": "1.1.1",
|
||||
"version": "1.2.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/kylekatarnls/update-helper.git",
|
||||
"reference": "b34a46d7f5ec1795b4a15ac9d46b884377262df9"
|
||||
"reference": "5786fa188e0361b9adf9e8199d7280d1b2db165e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/kylekatarnls/update-helper/zipball/b34a46d7f5ec1795b4a15ac9d46b884377262df9",
|
||||
"reference": "b34a46d7f5ec1795b4a15ac9d46b884377262df9",
|
||||
"url": "https://api.github.com/repos/kylekatarnls/update-helper/zipball/5786fa188e0361b9adf9e8199d7280d1b2db165e",
|
||||
"reference": "5786fa188e0361b9adf9e8199d7280d1b2db165e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"composer-plugin-api": "^1.1.0",
|
||||
"composer-plugin-api": "^1.1.0 || ^2.0.0",
|
||||
"php": ">=5.3.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"codeclimate/php-test-reporter": "dev-master",
|
||||
"composer/composer": "^2.0.x-dev",
|
||||
"composer/composer": "2.0.x-dev || ^2.0.0-dev",
|
||||
"phpunit/phpunit": ">=4.8.35 <6.0"
|
||||
},
|
||||
"type": "composer-plugin",
|
||||
@@ -695,7 +695,7 @@
|
||||
}
|
||||
],
|
||||
"description": "Update helper",
|
||||
"time": "2019-06-05T08:34:23+00:00"
|
||||
"time": "2019-07-29T11:03:54+00:00"
|
||||
},
|
||||
{
|
||||
"name": "laravel/framework",
|
||||
@@ -825,16 +825,16 @@
|
||||
},
|
||||
{
|
||||
"name": "league/flysystem",
|
||||
"version": "1.0.53",
|
||||
"version": "1.0.57",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/thephpleague/flysystem.git",
|
||||
"reference": "08e12b7628f035600634a5e76d95b5eb66cea674"
|
||||
"reference": "0e9db7f0b96b9f12dcf6f65bc34b72b1a30ea55a"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/08e12b7628f035600634a5e76d95b5eb66cea674",
|
||||
"reference": "08e12b7628f035600634a5e76d95b5eb66cea674",
|
||||
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/0e9db7f0b96b9f12dcf6f65bc34b72b1a30ea55a",
|
||||
"reference": "0e9db7f0b96b9f12dcf6f65bc34b72b1a30ea55a",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -905,7 +905,7 @@
|
||||
"sftp",
|
||||
"storage"
|
||||
],
|
||||
"time": "2019-06-18T20:09:29+00:00"
|
||||
"time": "2019-10-16T21:01:05+00:00"
|
||||
},
|
||||
{
|
||||
"name": "league/flysystem-sftp",
|
||||
@@ -956,16 +956,16 @@
|
||||
},
|
||||
{
|
||||
"name": "monolog/monolog",
|
||||
"version": "1.24.0",
|
||||
"version": "1.25.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Seldaek/monolog.git",
|
||||
"reference": "bfc9ebb28f97e7a24c45bdc3f0ff482e47bb0266"
|
||||
"reference": "70e65a5470a42cfec1a7da00d30edb6e617e8dcf"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/Seldaek/monolog/zipball/bfc9ebb28f97e7a24c45bdc3f0ff482e47bb0266",
|
||||
"reference": "bfc9ebb28f97e7a24c45bdc3f0ff482e47bb0266",
|
||||
"url": "https://api.github.com/repos/Seldaek/monolog/zipball/70e65a5470a42cfec1a7da00d30edb6e617e8dcf",
|
||||
"reference": "70e65a5470a42cfec1a7da00d30edb6e617e8dcf",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1030,7 +1030,7 @@
|
||||
"logging",
|
||||
"psr-3"
|
||||
],
|
||||
"time": "2018-11-05T09:00:11+00:00"
|
||||
"time": "2019-09-06T13:49:17+00:00"
|
||||
},
|
||||
{
|
||||
"name": "mtdowling/cron-expression",
|
||||
@@ -1078,16 +1078,16 @@
|
||||
},
|
||||
{
|
||||
"name": "nesbot/carbon",
|
||||
"version": "1.38.4",
|
||||
"version": "1.39.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/briannesbitt/Carbon.git",
|
||||
"reference": "8dd4172bfe1784952c4d58c4db725d183b1c23ad"
|
||||
"reference": "4be0c005164249208ce1b5ca633cd57bdd42ff33"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/8dd4172bfe1784952c4d58c4db725d183b1c23ad",
|
||||
"reference": "8dd4172bfe1784952c4d58c4db725d183b1c23ad",
|
||||
"url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/4be0c005164249208ce1b5ca633cd57bdd42ff33",
|
||||
"reference": "4be0c005164249208ce1b5ca633cd57bdd42ff33",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1135,7 +1135,7 @@
|
||||
"datetime",
|
||||
"time"
|
||||
],
|
||||
"time": "2019-06-03T15:41:40+00:00"
|
||||
"time": "2019-10-14T05:51:36+00:00"
|
||||
},
|
||||
{
|
||||
"name": "netshell/paypal",
|
||||
@@ -1324,16 +1324,16 @@
|
||||
},
|
||||
{
|
||||
"name": "phpseclib/phpseclib",
|
||||
"version": "2.0.18",
|
||||
"version": "2.0.23",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpseclib/phpseclib.git",
|
||||
"reference": "60519001db8d791215a822efd366d24cafee9e63"
|
||||
"reference": "c78eb5058d5bb1a183133c36d4ba5b6675dfa099"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/60519001db8d791215a822efd366d24cafee9e63",
|
||||
"reference": "60519001db8d791215a822efd366d24cafee9e63",
|
||||
"url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/c78eb5058d5bb1a183133c36d4ba5b6675dfa099",
|
||||
"reference": "c78eb5058d5bb1a183133c36d4ba5b6675dfa099",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1412,20 +1412,20 @@
|
||||
"x.509",
|
||||
"x509"
|
||||
],
|
||||
"time": "2019-06-13T06:15:54+00:00"
|
||||
"time": "2019-09-17T03:41:22+00:00"
|
||||
},
|
||||
{
|
||||
"name": "psr/log",
|
||||
"version": "1.1.0",
|
||||
"version": "1.1.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/php-fig/log.git",
|
||||
"reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd"
|
||||
"reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/php-fig/log/zipball/6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd",
|
||||
"reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd",
|
||||
"url": "https://api.github.com/repos/php-fig/log/zipball/446d54b4cb6bf489fc9d75f55843658e6f25d801",
|
||||
"reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1434,7 +1434,7 @@
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.0.x-dev"
|
||||
"dev-master": "1.1.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
@@ -1459,7 +1459,7 @@
|
||||
"psr",
|
||||
"psr-3"
|
||||
],
|
||||
"time": "2018-11-20T15:27:04+00:00"
|
||||
"time": "2019-11-01T11:05:21+00:00"
|
||||
},
|
||||
{
|
||||
"name": "psy/psysh",
|
||||
@@ -2107,16 +2107,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-ctype",
|
||||
"version": "v1.11.0",
|
||||
"version": "v1.12.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-ctype.git",
|
||||
"reference": "82ebae02209c21113908c229e9883c419720738a"
|
||||
"reference": "550ebaac289296ce228a706d0867afc34687e3f4"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/82ebae02209c21113908c229e9883c419720738a",
|
||||
"reference": "82ebae02209c21113908c229e9883c419720738a",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/550ebaac289296ce228a706d0867afc34687e3f4",
|
||||
"reference": "550ebaac289296ce228a706d0867afc34687e3f4",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -2128,7 +2128,7 @@
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.11-dev"
|
||||
"dev-master": "1.12-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
@@ -2145,12 +2145,12 @@
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
"name": "Gert de Pagter",
|
||||
"email": "BackEndTea@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Gert de Pagter",
|
||||
"email": "backendtea@gmail.com"
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Symfony polyfill for ctype functions",
|
||||
@@ -2161,20 +2161,20 @@
|
||||
"polyfill",
|
||||
"portable"
|
||||
],
|
||||
"time": "2019-02-06T07:57:58+00:00"
|
||||
"time": "2019-08-06T08:03:45+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-php56",
|
||||
"version": "v1.11.0",
|
||||
"version": "v1.12.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-php56.git",
|
||||
"reference": "f4dddbc5c3471e1b700a147a20ae17cdb72dbe42"
|
||||
"reference": "0e3b212e96a51338639d8ce175c046d7729c3403"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-php56/zipball/f4dddbc5c3471e1b700a147a20ae17cdb72dbe42",
|
||||
"reference": "f4dddbc5c3471e1b700a147a20ae17cdb72dbe42",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-php56/zipball/0e3b212e96a51338639d8ce175c046d7729c3403",
|
||||
"reference": "0e3b212e96a51338639d8ce175c046d7729c3403",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -2184,7 +2184,7 @@
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.11-dev"
|
||||
"dev-master": "1.12-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
@@ -2217,20 +2217,20 @@
|
||||
"portable",
|
||||
"shim"
|
||||
],
|
||||
"time": "2019-02-06T07:57:58+00:00"
|
||||
"time": "2019-08-06T08:03:45+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-util",
|
||||
"version": "v1.11.0",
|
||||
"version": "v1.12.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-util.git",
|
||||
"reference": "b46c6cae28a3106735323f00a0c38eccf2328897"
|
||||
"reference": "4317de1386717b4c22caed7725350a8887ab205c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-util/zipball/b46c6cae28a3106735323f00a0c38eccf2328897",
|
||||
"reference": "b46c6cae28a3106735323f00a0c38eccf2328897",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-util/zipball/4317de1386717b4c22caed7725350a8887ab205c",
|
||||
"reference": "4317de1386717b4c22caed7725350a8887ab205c",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -2239,7 +2239,7 @@
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.11-dev"
|
||||
"dev-master": "1.12-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
@@ -2269,7 +2269,7 @@
|
||||
"polyfill",
|
||||
"shim"
|
||||
],
|
||||
"time": "2019-02-08T14:16:39+00:00"
|
||||
"time": "2019-08-06T08:03:45+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/process",
|
||||
@@ -2990,22 +2990,22 @@
|
||||
},
|
||||
{
|
||||
"name": "phpspec/prophecy",
|
||||
"version": "1.8.1",
|
||||
"version": "1.9.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpspec/prophecy.git",
|
||||
"reference": "1927e75f4ed19131ec9bcc3b002e07fb1173ee76"
|
||||
"reference": "f6811d96d97bdf400077a0cc100ae56aa32b9203"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpspec/prophecy/zipball/1927e75f4ed19131ec9bcc3b002e07fb1173ee76",
|
||||
"reference": "1927e75f4ed19131ec9bcc3b002e07fb1173ee76",
|
||||
"url": "https://api.github.com/repos/phpspec/prophecy/zipball/f6811d96d97bdf400077a0cc100ae56aa32b9203",
|
||||
"reference": "f6811d96d97bdf400077a0cc100ae56aa32b9203",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"doctrine/instantiator": "^1.0.2",
|
||||
"php": "^5.3|^7.0",
|
||||
"phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0",
|
||||
"phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0|^5.0",
|
||||
"sebastian/comparator": "^1.1|^2.0|^3.0",
|
||||
"sebastian/recursion-context": "^1.0|^2.0|^3.0"
|
||||
},
|
||||
@@ -3049,7 +3049,7 @@
|
||||
"spy",
|
||||
"stub"
|
||||
],
|
||||
"time": "2019-06-13T12:50:23+00:00"
|
||||
"time": "2019-10-03T11:07:50+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-code-coverage",
|
||||
@@ -3857,16 +3857,16 @@
|
||||
},
|
||||
{
|
||||
"name": "webmozart/assert",
|
||||
"version": "1.4.0",
|
||||
"version": "1.5.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/webmozart/assert.git",
|
||||
"reference": "83e253c8e0be5b0257b881e1827274667c5c17a9"
|
||||
"reference": "88e6d84706d09a236046d686bbea96f07b3a34f4"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/webmozart/assert/zipball/83e253c8e0be5b0257b881e1827274667c5c17a9",
|
||||
"reference": "83e253c8e0be5b0257b881e1827274667c5c17a9",
|
||||
"url": "https://api.github.com/repos/webmozart/assert/zipball/88e6d84706d09a236046d686bbea96f07b3a34f4",
|
||||
"reference": "88e6d84706d09a236046d686bbea96f07b3a34f4",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -3874,8 +3874,7 @@
|
||||
"symfony/polyfill-ctype": "^1.8"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^4.6",
|
||||
"sebastian/version": "^1.0.1"
|
||||
"phpunit/phpunit": "^4.8.36 || ^7.5.13"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
@@ -3904,7 +3903,7 @@
|
||||
"check",
|
||||
"validate"
|
||||
],
|
||||
"time": "2018-12-25T11:19:39+00:00"
|
||||
"time": "2019-08-24T08:43:50+00:00"
|
||||
}
|
||||
],
|
||||
"aliases": [],
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
</div>
|
||||
|
||||
<div style="border: 1px solid #e2e2e2; padding: 10px; border-bottom: none;">
|
||||
<h3>Subtotal: <span id="my_subtotal">{{ $getSubtotal }}</span> <small>{{ $store_array[0]->StoreCurrency }}</small></h3>
|
||||
<h3>Subtotal: <span id="my_subtotal">{{ round($getSubtotal, 2) }}</span> <small>{{ $store_array[0]->StoreCurrency }}</small></h3>
|
||||
<hr>
|
||||
<div class="form-group" id="voucher_list">
|
||||
@foreach($row as $item)
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
<a href="{{ url('user/store-items/add-item') }}" type="button" class="btn btn-primary">
|
||||
<i class="fa fa-plus"></i> Add new Item
|
||||
</a>
|
||||
<button class="btn btn-primary"><i class="fa fa-exchange"></i> Re-arrange item</button>
|
||||
<a href="{{ url('user/store-items/re-arrange') }}" class="btn btn-primary"><i class="fa fa-exchange"></i> Re-arrange item</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- BEGIN PRODUCTS -->
|
||||
@@ -67,9 +67,7 @@
|
||||
</div>
|
||||
<h4 class="product-name-holder">{{ $product->ProductName }}<br><small>$ {{ $product->ProductPrice }}</small></h4>
|
||||
<hr class="line">
|
||||
|
||||
<a href="{{ url('user/store-items/item') }}/{{ $product->ProductURL }}" class="btn btn-success btn-block" > View Details</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
|
||||
84
resources/views/user-layouts/store_items_arrange.blade.php
Normal file
84
resources/views/user-layouts/store_items_arrange.blade.php
Normal file
@@ -0,0 +1,84 @@
|
||||
@extends('user-layouts.user_template')
|
||||
@section('content')
|
||||
<style>
|
||||
.badge-error {
|
||||
background-color: #b94a48;
|
||||
}
|
||||
.product-name-holder{
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
#item_list_sort{
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
grid-gap: 10px;
|
||||
}
|
||||
</style>
|
||||
<div class="content-wrapper" style="min-height: 916px;">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
Store Item Arrangement
|
||||
<!-- <small>Control panel</small> -->
|
||||
</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ url ('user') }}"><i class="fa fa-home"></i> Home</a></li>
|
||||
<!-- <li><a href="{{ url ('user/profile') }}"><i class="fa fa-user"></i> My Profile</a></li> -->
|
||||
<li class="active">Store Item Arrangement</li>
|
||||
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">
|
||||
Item List
|
||||
</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="well">
|
||||
<button type="button" id="btn_save_item_sorting" class="btn btn-primary">
|
||||
Save Changes
|
||||
</button>
|
||||
<a href="{{ url('user/store-items') }}" class="btn btn-default"> Cancel</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="item_list_sort">
|
||||
@foreach($product_array as $i => $product)
|
||||
@foreach($thumbnails as $t => $thumb)
|
||||
@if($thumb['product_id'] == $product->Id)
|
||||
@define $storeFolder = $thumb['folder']
|
||||
@define $filename = $thumb['thumb']
|
||||
@endif
|
||||
@endforeach
|
||||
<div id="{{ 'order_number_' . $product->Id }}">
|
||||
<div class="thumbnail" >
|
||||
<a href="#">
|
||||
<img style="height:200px" src="{{ config('site_config.prod_private_server_ip') }}/images/{{ $filename . '?t=' . time() }}" alt="{{ $product->ProductName }}" >
|
||||
</a>
|
||||
<hr class="line">
|
||||
<div class="pull-right">
|
||||
<div style="text-transform: uppercase;" class="badge @if($product->PrivacyStatus== 'private') badge-error @endif">{{ $product->PrivacyStatus }}</div>
|
||||
</div>
|
||||
<h4 class="product-name-holder">{{ $product->ProductName }}<br><small>$ {{ $product->ProductPrice }}</small></h4>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
@endsection
|
||||
@@ -587,7 +587,7 @@
|
||||
<!-- jQuery 2.2.3 -->
|
||||
<script src="{{asset('/public/bower_components/AdminLTE/plugins/jQuery/jquery-2.2.3.min.js')}}"></script>
|
||||
<!-- jQuery UI 1.11.4 -->
|
||||
<script src="https://code.jquery.com/ui/1.11.4/jquery-ui.min.js"></script>
|
||||
<script src="https://code.jquery.com/ui/1.10.4/jquery-ui.min.js"></script>
|
||||
<!-- Bootstrap 3.3.6 -->
|
||||
<script src="{{asset('/public/bower_components/AdminLTE/bootstrap/js/bootstrap.min.js')}}"></script>
|
||||
|
||||
@@ -761,23 +761,28 @@
|
||||
|
||||
|
||||
});
|
||||
$('.select2').select2();
|
||||
|
||||
var tr_sortable = $('#sortable');
|
||||
|
||||
var item_list_sort = $('#item_list_sort');
|
||||
item_list_sort.sortable();
|
||||
item_list_sort.disableSelection();
|
||||
// setTimeout(function(){
|
||||
// item_list_sort.sortable("disable");
|
||||
// }, 500);
|
||||
|
||||
|
||||
tr_sortable.sortable({
|
||||
revert: 100,
|
||||
placeholder: 'placeholder'
|
||||
});
|
||||
|
||||
$('.select2').select2();
|
||||
|
||||
tr_sortable.disableSelection();
|
||||
|
||||
$('#btn_save_thumbnail_sorting').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
var sortable_data = tr_sortable.sortable('serialize');
|
||||
// div_response . text ( 'Save' );
|
||||
// console.log(sortable_data);
|
||||
$.ajax({
|
||||
data: sortable_data,
|
||||
type: 'POST',
|
||||
@@ -801,6 +806,32 @@
|
||||
});
|
||||
});
|
||||
|
||||
$('#btn_save_item_sorting').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
var sorted_data = item_list_sort.sortable('serialize');
|
||||
$.ajax({
|
||||
data: sorted_data,
|
||||
type: 'POST',
|
||||
url : "{{ url('user/post/save-item-ordering') }}",
|
||||
beforeSend:function(xhr){
|
||||
|
||||
var token = $('meta[name="csrf_token"]').attr('content');
|
||||
|
||||
if (token) {
|
||||
return xhr.setRequestHeader('X-CSRF-TOKEN', token);
|
||||
}
|
||||
xhr.setRequestHeader( 'X-Requested-With', 'XMLHttpRequest');
|
||||
},
|
||||
success:function(result) {
|
||||
// div_response.html(result);
|
||||
console.log(result);
|
||||
if(result.success){
|
||||
alert('Item ordering is succcessfully updated!');
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#myModal').on('hidden.bs.modal', function () {
|
||||
location.reload();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user