added canada
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\Http\Controllers\paypal;
|
namespace App\Http\Controllers\paypal;
|
||||||
|
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
|
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
@@ -76,14 +77,34 @@ class PaypalController extends Controller
|
|||||||
|
|
||||||
public function getCheckout(Request $request)
|
public function getCheckout(Request $request)
|
||||||
{
|
{
|
||||||
|
$UserModel = new UserModel;
|
||||||
|
|
||||||
if (Auth::guest()) {
|
if (Auth::guest()) {
|
||||||
|
|
||||||
$message = 'Please <a href="' . url('auth/login') . '">Sign in</a> to your account to proceed.';
|
$message = 'Please <a href="' . url('auth/login') . '">Sign in</a> to your account to proceed.';
|
||||||
Session::flash('msg', $message);
|
Session::flash('msg', $message);
|
||||||
return Redirect::back();
|
return Redirect::back();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$userId = Auth::user()->id;
|
||||||
|
$array_address_book = $UserModel->selectAddresBook('UserId', $userId);
|
||||||
|
if (count($array_address_book) <= 0) {
|
||||||
|
$message = 'Please add Shipping address.';
|
||||||
|
Session::flash('cartkeyError', $message);
|
||||||
|
return Redirect::back();
|
||||||
|
}
|
||||||
|
|
||||||
|
// $shippingAddress = [
|
||||||
|
// "recipient_name" => $array_address_book[0]->Fullname,
|
||||||
|
// "line1" => $array_address_book[0]->Address,
|
||||||
|
// "line2" => "",
|
||||||
|
// "city" => $array_address_book[0]->City,
|
||||||
|
// "country_code" => $array_address_book[0]->CountryCode,
|
||||||
|
// "postal_code" => $array_address_book[0]->ZipCode,
|
||||||
|
// "state" => $array_address_book[0]->State,
|
||||||
|
// "phone" => $array_address_book[0]->ContactNumber
|
||||||
|
// ];
|
||||||
|
|
||||||
|
|
||||||
// $request->session()->forget('cartkey');
|
// $request->session()->forget('cartkey');
|
||||||
if (!$request->session()->has('cartkey')) {
|
if (!$request->session()->has('cartkey')) {
|
||||||
$message = 'Your cart is empty';
|
$message = 'Your cart is empty';
|
||||||
@@ -94,6 +115,28 @@ class PaypalController extends Controller
|
|||||||
$payer = PayPal::Payer();
|
$payer = PayPal::Payer();
|
||||||
$payer->setPaymentMethod('paypal');
|
$payer->setPaymentMethod('paypal');
|
||||||
|
|
||||||
|
$inputFields = Paypal::InputFields();
|
||||||
|
$inputFields->setAllowNote(true)
|
||||||
|
->setNoShipping(1)
|
||||||
|
->setAddressOverride(0);
|
||||||
|
$webProfile = Paypal::WebProfile();
|
||||||
|
$webProfile->setName("YeowZa! T-Shirt Shop" . uniqid())
|
||||||
|
// ->setPresentation($presentation)
|
||||||
|
->setInputFields($inputFields);
|
||||||
|
|
||||||
|
// $shipping = PayPal::ShippingAddress();
|
||||||
|
// $shipping->setRecipientName($array_address_book[0]->Fullname);
|
||||||
|
// $shipping->setLine1($array_address_book[0]->Address);
|
||||||
|
// $shipping->setCity($array_address_book[0]->City);
|
||||||
|
// $shipping->setCountryCode($array_address_book[0]->CountryCode);
|
||||||
|
// $shipping->setPostalCode($array_address_book[0]->ZipCode);
|
||||||
|
// $shipping->setState($array_address_book[0]->State);
|
||||||
|
// $shipping->setPhone($array_address_book[0]->ContactNumber);
|
||||||
|
|
||||||
|
// $payerInfo = Paypal::PayerInfo();
|
||||||
|
// $payerInfo->setShippingAddress($shipping);
|
||||||
|
// $payer->setPayerInfo($payerInfo);
|
||||||
|
|
||||||
$m = new TeamStoreModel;
|
$m = new TeamStoreModel;
|
||||||
$paypal_model = new PayPalModel;
|
$paypal_model = new PayPalModel;
|
||||||
$last_id = $paypal_model->getLastIdPaymentDetails();
|
$last_id = $paypal_model->getLastIdPaymentDetails();
|
||||||
@@ -108,74 +151,20 @@ class PaypalController extends Controller
|
|||||||
$cartKey = $request->session()->get('cartkey');
|
$cartKey = $request->session()->get('cartkey');
|
||||||
|
|
||||||
$items = $m->myCart($cartKey);
|
$items = $m->myCart($cartKey);
|
||||||
|
|
||||||
$getSubtotal = $m->getSubtotal($cartKey);
|
$getSubtotal = $m->getSubtotal($cartKey);
|
||||||
|
|
||||||
$grouped_item = $m->selectTeamStoreGroupByCartKey($cartKey);
|
$grouped_item = $m->selectTeamStoreGroupByCartKey($cartKey);
|
||||||
$store_array = $m->selectTeamStore('Id', $grouped_item[0]->StoreId);
|
$store_array = $m->selectTeamStore('Id', $grouped_item[0]->StoreId);
|
||||||
|
|
||||||
$getSmallItemQty = 0;
|
|
||||||
$getBulkyItemQty = 0;
|
|
||||||
$getMaskItemQty = 0;
|
|
||||||
$getDGSItemQty = 0;
|
|
||||||
$shippingFee = 0;
|
|
||||||
|
|
||||||
|
$shippingFee = $this->getShippingFee($cartKey);
|
||||||
|
|
||||||
foreach ($items as $item) {
|
$tax = $this->getTax($cartKey)['tax'];
|
||||||
if ($item->VoucherId != null) {
|
$order_grandtotal = $this->getTax($cartKey)['order_grandtotal'];
|
||||||
$voucherIds[] = $item->VoucherId;
|
|
||||||
$voucher = $m->selectVoucherWhereIn($voucherIds);
|
|
||||||
$item_id = $item->Id;
|
|
||||||
$totalValue = $voucher[0]->VoucherValue;
|
|
||||||
if ($voucher[0]->VoucherType == "Percentage") {
|
|
||||||
$getPercentageValue = $totalValue / 100;
|
|
||||||
$getDiscountValue = ($getSubtotal[0]->Subtotal * $getPercentageValue);
|
|
||||||
$data = array(
|
|
||||||
'Price' => round($getDiscountValue * -1, 2)
|
|
||||||
);
|
|
||||||
|
|
||||||
$m->updateVoucherValueInCart($data, $item_id);
|
|
||||||
} else {
|
|
||||||
$voucherData = array(
|
|
||||||
'totalValue' => $totalValue,
|
|
||||||
'type' => 'Flat'
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if($item->ShippingCostId == 1){
|
|
||||||
$getSmallItemQty += $item->Quantity;
|
|
||||||
}else if($item->ShippingCostId == 2){
|
|
||||||
$getBulkyItemQty += $item->Quantity;
|
|
||||||
}else if($item->ShippingCostId == 3){
|
|
||||||
$getMaskItemQty += $item->Quantity;
|
|
||||||
}else if($item->ShippingCostId == 4){
|
|
||||||
$getDGSItemQty += $item->Quantity;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$getSmallItemQty = ceil($getSmallItemQty / 3) * 8;
|
|
||||||
$getBulkyItemQty = ceil($getBulkyItemQty / 1) * 8;
|
|
||||||
$getMaskItemQty = ceil($getMaskItemQty / 25) * 8;
|
|
||||||
$getDGSItemQty = ceil($getDGSItemQty / 4) * 5;
|
|
||||||
$shippingFee = $getSmallItemQty + $getBulkyItemQty + $getMaskItemQty + $getDGSItemQty;
|
|
||||||
// var_dump($shippingFee);
|
|
||||||
|
|
||||||
$order_items = array();
|
$order_items = array();
|
||||||
$updated_items = $m->myCart($cartKey);
|
$updated_items = $m->myCart($cartKey);
|
||||||
$updated_getSubtotal = $m->getSubtotal($cartKey);
|
|
||||||
|
|
||||||
// $order_subtotal = $updated_getSubtotal[0]->Subtotal;
|
|
||||||
$order_grandtotal = $updated_getSubtotal[0]->Subtotal;
|
|
||||||
|
|
||||||
if ($grouped_item[0]->StoreId == 76 || $grouped_item[0]->StoreId == 78 || $grouped_item[0]->StoreId == 111 || $grouped_item[0]->StoreId == 131 || $grouped_item[0]->StoreId == 30 || $grouped_item[0]->StoreId == 141 || $grouped_item[0]->StoreId == 162 || $grouped_item[0]->StoreId == 185 || $grouped_item[0]->StoreId == 244) {
|
|
||||||
$tax_value = 0;
|
|
||||||
} else {
|
|
||||||
$tax_value = 0.10;
|
|
||||||
}
|
|
||||||
|
|
||||||
$tax = $order_grandtotal * $tax_value;
|
|
||||||
|
|
||||||
foreach ($updated_items as $key => $item) {
|
foreach ($updated_items as $key => $item) {
|
||||||
|
|
||||||
@@ -192,6 +181,19 @@ class PaypalController extends Controller
|
|||||||
|
|
||||||
$item_list = PayPal::ItemList();
|
$item_list = PayPal::ItemList();
|
||||||
$item_list->setItems($order_items);
|
$item_list->setItems($order_items);
|
||||||
|
|
||||||
|
|
||||||
|
$shipping = PayPal::ShippingAddress();
|
||||||
|
$shipping->setRecipientName($array_address_book[0]->Fullname);
|
||||||
|
$shipping->setLine1($array_address_book[0]->Address);
|
||||||
|
$shipping->setCity($array_address_book[0]->City);
|
||||||
|
$shipping->setCountryCode($array_address_book[0]->CountryCode);
|
||||||
|
$shipping->setPostalCode($array_address_book[0]->ZipCode);
|
||||||
|
$shipping->setState($array_address_book[0]->State);
|
||||||
|
$shipping->setPhone($array_address_book[0]->ContactNumber);
|
||||||
|
$item_list->setShippingAddress($shipping);
|
||||||
|
// var_dump($item_list);
|
||||||
|
|
||||||
$amount_details = PayPal::Details();
|
$amount_details = PayPal::Details();
|
||||||
$amount_details->setSubtotal($order_grandtotal);
|
$amount_details->setSubtotal($order_grandtotal);
|
||||||
$amount_details->setTax($tax);
|
$amount_details->setTax($tax);
|
||||||
@@ -212,9 +214,13 @@ class PaypalController extends Controller
|
|||||||
$redirectUrls = PayPal::RedirectUrls();
|
$redirectUrls = PayPal::RedirectUrls();
|
||||||
$redirectUrls->setReturnUrl(route('getDone'));
|
$redirectUrls->setReturnUrl(route('getDone'));
|
||||||
$redirectUrls->setCancelUrl(route('getCancel'));
|
$redirectUrls->setCancelUrl(route('getCancel'));
|
||||||
|
// var_dump($shippingAddress)
|
||||||
|
|
||||||
$payment = PayPal::Payment();
|
$payment = PayPal::Payment();
|
||||||
|
|
||||||
|
var_dump(array($transaction));
|
||||||
|
|
||||||
|
$payment->setExperienceProfileId($this->createWebProfile());
|
||||||
$payment->setIntent('sale');
|
$payment->setIntent('sale');
|
||||||
$payment->setPayer($payer);
|
$payment->setPayer($payer);
|
||||||
$payment->setRedirectUrls($redirectUrls);
|
$payment->setRedirectUrls($redirectUrls);
|
||||||
@@ -253,6 +259,108 @@ class PaypalController extends Controller
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getShippingFee($cartKey)
|
||||||
|
{
|
||||||
|
|
||||||
|
$m = new TeamStoreModel;
|
||||||
|
$UserModel = new UserModel;
|
||||||
|
$userId = Auth::user()->id;
|
||||||
|
|
||||||
|
|
||||||
|
$items = $m->myCart($cartKey); // item from cart_tmp
|
||||||
|
$getSubtotal = $m->getSubtotal($cartKey);
|
||||||
|
$getSmallItemQty = 0;
|
||||||
|
$getBulkyItemQty = 0;
|
||||||
|
$getMaskItemQty = 0;
|
||||||
|
$getDGSItemQty = 0;
|
||||||
|
$shippingFee = 0;
|
||||||
|
$CAShippingfee = 0;
|
||||||
|
|
||||||
|
|
||||||
|
foreach ($items as $item) {
|
||||||
|
if ($item->VoucherId != null) {
|
||||||
|
$voucherIds[] = $item->VoucherId;
|
||||||
|
$voucher = $m->selectVoucherWhereIn($voucherIds);
|
||||||
|
$item_id = $item->Id;
|
||||||
|
$totalValue = $voucher[0]->VoucherValue;
|
||||||
|
if ($voucher[0]->VoucherType == "Percentage") {
|
||||||
|
$getPercentageValue = $totalValue / 100;
|
||||||
|
$getDiscountValue = ($getSubtotal[0]->Subtotal * $getPercentageValue);
|
||||||
|
$data = array(
|
||||||
|
'Price' => round($getDiscountValue * -1, 2)
|
||||||
|
);
|
||||||
|
|
||||||
|
$m->updateVoucherValueInCart($data, $item_id);
|
||||||
|
} else {
|
||||||
|
$voucherData = array(
|
||||||
|
'totalValue' => $totalValue,
|
||||||
|
'type' => 'Flat'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($item->ShippingCostId == 1) {
|
||||||
|
$getSmallItemQty += $item->Quantity;
|
||||||
|
} else if ($item->ShippingCostId == 2) {
|
||||||
|
$getBulkyItemQty += $item->Quantity;
|
||||||
|
} else if ($item->ShippingCostId == 3) {
|
||||||
|
$getMaskItemQty += $item->Quantity;
|
||||||
|
} else if ($item->ShippingCostId == 4) {
|
||||||
|
$getDGSItemQty += $item->Quantity;
|
||||||
|
}
|
||||||
|
|
||||||
|
$CAShippingfee += $item->Quantity; // for canada
|
||||||
|
}
|
||||||
|
|
||||||
|
$array_address_book = $UserModel->selectAddresBook('UserId', $userId);
|
||||||
|
$countryCode = "";
|
||||||
|
if (count($array_address_book) > 0) {
|
||||||
|
$countryCode = $array_address_book[0]->CountryCode;
|
||||||
|
$CAShippingfee = ceil($CAShippingfee / 2) * 30;
|
||||||
|
}
|
||||||
|
|
||||||
|
$getSmallItemQty = ceil($getSmallItemQty / 3) * 8;
|
||||||
|
$getBulkyItemQty = ceil($getBulkyItemQty / 1) * 8;
|
||||||
|
$getMaskItemQty = ceil($getMaskItemQty / 25) * 8;
|
||||||
|
$getDGSItemQty = ceil($getDGSItemQty / 4) * 5;
|
||||||
|
$shippingFee = $getSmallItemQty + $getBulkyItemQty + $getMaskItemQty + $getDGSItemQty;
|
||||||
|
|
||||||
|
if ($countryCode == "CA") {
|
||||||
|
$shippingFee = $CAShippingfee;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $shippingFee;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getTax($cartKey)
|
||||||
|
{
|
||||||
|
$m = new TeamStoreModel;
|
||||||
|
$updated_getSubtotal = $m->getSubtotal($cartKey);
|
||||||
|
$grouped_item = $m->selectTeamStoreGroupByCartKey($cartKey);
|
||||||
|
|
||||||
|
if (count($grouped_item) <= 0) {
|
||||||
|
$tax_value = 0;
|
||||||
|
} else {
|
||||||
|
if ($grouped_item[0]->StoreId == 76 || $grouped_item[0]->StoreId == 78 || $grouped_item[0]->StoreId == 111 || $grouped_item[0]->StoreId == 131 || $grouped_item[0]->StoreId == 30 || $grouped_item[0]->StoreId == 141 || $grouped_item[0]->StoreId == 162 || $grouped_item[0]->StoreId == 185 || $grouped_item[0]->StoreId == 244) {
|
||||||
|
$tax_value = 0;
|
||||||
|
} else {
|
||||||
|
$tax_value = 0.10;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$order_grandtotal = $updated_getSubtotal[0]->Subtotal;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$tax = $order_grandtotal * $tax_value;
|
||||||
|
|
||||||
|
return [
|
||||||
|
'tax' => $tax,
|
||||||
|
'order_grandtotal' => $order_grandtotal,
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
public function getDone(Request $request)
|
public function getDone(Request $request)
|
||||||
{
|
{
|
||||||
$id = $request->get('paymentId');
|
$id = $request->get('paymentId');
|
||||||
@@ -267,7 +375,7 @@ class PaypalController extends Controller
|
|||||||
$paymentExecution->setPayerId($payer_id);
|
$paymentExecution->setPayerId($payer_id);
|
||||||
$executePayment = $payment->execute($paymentExecution, $this->_apiContext);
|
$executePayment = $payment->execute($paymentExecution, $this->_apiContext);
|
||||||
$obj = json_decode($executePayment);
|
$obj = json_decode($executePayment);
|
||||||
|
// var_dump($obj);
|
||||||
} catch (PayPalConnectionException $e) {
|
} catch (PayPalConnectionException $e) {
|
||||||
//throw $th;
|
//throw $th;
|
||||||
// echo $e->getCode();
|
// echo $e->getCode();
|
||||||
@@ -288,7 +396,8 @@ class PaypalController extends Controller
|
|||||||
// echo 'Payment success';
|
// echo 'Payment success';
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
// var_dump($obj->payer->payer_info->shipping_address);
|
||||||
|
// var_dump($obj->transactions[0]->item_list->shipping_address);
|
||||||
|
|
||||||
$line2 = null;
|
$line2 = null;
|
||||||
|
|
||||||
@@ -330,9 +439,6 @@ class PaypalController extends Controller
|
|||||||
$userId = Auth::user()->id;
|
$userId = Auth::user()->id;
|
||||||
$user_email = Auth::user()->email;
|
$user_email = Auth::user()->email;
|
||||||
|
|
||||||
$items = $m->myCart($cartKey); // item from cart_tmp
|
|
||||||
$getSubtotal = $m->getSubtotal($cartKey);
|
|
||||||
|
|
||||||
$payment_details = array(
|
$payment_details = array(
|
||||||
|
|
||||||
'UserId' => $userId,
|
'UserId' => $userId,
|
||||||
@@ -471,4 +577,47 @@ class PaypalController extends Controller
|
|||||||
|
|
||||||
return redirect()->route('cart');
|
return redirect()->route('cart');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function createWebProfile()
|
||||||
|
{
|
||||||
|
$UserModel = new UserModel;
|
||||||
|
$userId = Auth::user()->id;
|
||||||
|
$array_address_book = $UserModel->selectAddresBook('UserId', $userId);
|
||||||
|
if (count($array_address_book) <= 0) {
|
||||||
|
$message = 'Please add Shipping address.';
|
||||||
|
Session::flash('cartkeyError', $message);
|
||||||
|
return Redirect::back();
|
||||||
|
}
|
||||||
|
|
||||||
|
// $shippingAddress = [
|
||||||
|
// "recipient_name" => ,
|
||||||
|
|
||||||
|
$flowConfig = PayPal::FlowConfig();
|
||||||
|
$presentation = PayPal::Presentation();
|
||||||
|
$inputFields = PayPal::InputFields();
|
||||||
|
$webProfile = PayPal::WebProfile();
|
||||||
|
|
||||||
|
|
||||||
|
// $presentation->setLogoImage("https://www.crewsportswear.com/beta/public/images/logo.png")->setBrandName("Merchbay"); //NB: Paypal recommended to use https for the logo's address and the size set to 190x60.
|
||||||
|
$presentation->setBrandName("Merchbay"); //NB: Paypal recommended to use https for the logo's address and the size set to 190x60.
|
||||||
|
|
||||||
|
if ($array_address_book[0]->CountryCode == "CA") {
|
||||||
|
$flowConfig->setLandingPageType("Billing"); //Set the page type
|
||||||
|
$inputFields->setAllowNote(true)->setAddressOverride(1);
|
||||||
|
} else {
|
||||||
|
$inputFields->setAllowNote(true)->setAddressOverride(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$webProfile->setName("Merchbay " . uniqid())
|
||||||
|
->setFlowConfig($flowConfig)
|
||||||
|
// Parameters for style and presentation.
|
||||||
|
->setPresentation($presentation)
|
||||||
|
// Parameters for input field customization.
|
||||||
|
->setInputFields($inputFields);
|
||||||
|
|
||||||
|
$createProfileResponse = $webProfile->create($this->_apiContext);
|
||||||
|
|
||||||
|
return $createProfileResponse->getId(); //The new webprofile's id
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -586,6 +586,14 @@ class TeamStoreController extends Controller
|
|||||||
{
|
{
|
||||||
|
|
||||||
$m = new TeamStoreModel;
|
$m = new TeamStoreModel;
|
||||||
|
$UserModel = new UserModel;
|
||||||
|
|
||||||
|
$userId = Auth::user()->id;
|
||||||
|
$array_address_book = $UserModel->selectAddresBook('UserId', $userId);
|
||||||
|
if (count($array_address_book) <= 0) {
|
||||||
|
$array_address_book = null;
|
||||||
|
}
|
||||||
|
|
||||||
$cartKey = $request->session()->get('cartkey');
|
$cartKey = $request->session()->get('cartkey');
|
||||||
$items = $m->myCart($cartKey);
|
$items = $m->myCart($cartKey);
|
||||||
$getSubtotal = $m->getSubtotal($cartKey);
|
$getSubtotal = $m->getSubtotal($cartKey);
|
||||||
@@ -640,12 +648,25 @@ class TeamStoreController extends Controller
|
|||||||
$finalSubTotal = $getSubtotal[0]->Subtotal;
|
$finalSubTotal = $getSubtotal[0]->Subtotal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($cartKey != null) {
|
||||||
|
$shippingFee = app(\App\Http\Controllers\paypal\PaypalController::class)->getShippingFee($cartKey);
|
||||||
|
$tax = app(\App\Http\Controllers\paypal\PaypalController::class)->getTax($cartKey);
|
||||||
|
}else{
|
||||||
|
$shippingFee = 0;
|
||||||
|
$tax = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return view('merchbay.cart')
|
return view('merchbay.cart')
|
||||||
->with('item_group', $items_group)
|
->with('item_group', $items_group)
|
||||||
->with('row', $items)
|
->with('row', $items)
|
||||||
->with('img_thumb', $item_thumbs)
|
->with('img_thumb', $item_thumbs)
|
||||||
->with('getSubtotal', $finalSubTotal)
|
->with('getSubtotal', $finalSubTotal)
|
||||||
->with('store_array', $store_array);
|
->with('store_array', $store_array)
|
||||||
|
->with('store_array', $store_array)
|
||||||
|
->with('shipping_fee', $shippingFee)
|
||||||
|
->with('tax', $tax)
|
||||||
|
->with('address_book', $array_address_book);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function addVoucher(Request $request)
|
public function addVoucher(Request $request)
|
||||||
@@ -821,7 +842,8 @@ class TeamStoreController extends Controller
|
|||||||
->with('row', $data);
|
->with('row', $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function contactUsSend(Request $request) {
|
public function contactUsSend(Request $request)
|
||||||
|
{
|
||||||
$post = $request->all();
|
$post = $request->all();
|
||||||
|
|
||||||
$post['captcha'] = $this->captchaCheck();
|
$post['captcha'] = $this->captchaCheck();
|
||||||
|
|||||||
@@ -81,7 +81,9 @@ class UserController extends Controller {
|
|||||||
'Address' => $post['address'],
|
'Address' => $post['address'],
|
||||||
'State' => $post['state'],
|
'State' => $post['state'],
|
||||||
'City' => $post['city'],
|
'City' => $post['city'],
|
||||||
'ZipCode' => $post['zipcode']
|
'ZipCode' => $post['zipcode'],
|
||||||
|
'CountryCode' => $post['countryCode'],
|
||||||
|
'Country' => $post['country']
|
||||||
);
|
);
|
||||||
|
|
||||||
echo $i = $m->insertAddressBook($data);
|
echo $i = $m->insertAddressBook($data);
|
||||||
@@ -118,7 +120,9 @@ class UserController extends Controller {
|
|||||||
'Address' => $post['address'],
|
'Address' => $post['address'],
|
||||||
'State' => $post['state'],
|
'State' => $post['state'],
|
||||||
'City' => $post['city'],
|
'City' => $post['city'],
|
||||||
'ZipCode' => $post['zipcode']
|
'ZipCode' => $post['zipcode'],
|
||||||
|
'CountryCode' => $post['countryCode'],
|
||||||
|
'Country' => $post['country']
|
||||||
);
|
);
|
||||||
|
|
||||||
echo $i = $m->saveUpdateAddressBook($data, $id);
|
echo $i = $m->saveUpdateAddressBook($data, $id);
|
||||||
@@ -937,7 +941,7 @@ class UserController extends Controller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$data = array(
|
$data = array(
|
||||||
'StoreUrl' => $store_url,
|
// 'StoreUrl' => $store_url,
|
||||||
// 'ImageFolder' => $store_url,
|
// 'ImageFolder' => $store_url,
|
||||||
'Password' => $store_password,
|
'Password' => $store_password,
|
||||||
'HashId' => md5($store_url),
|
'HashId' => md5($store_url),
|
||||||
@@ -1184,4 +1188,12 @@ class UserController extends Controller {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getAddressBook() {
|
||||||
|
$UserModel = new UserModel;
|
||||||
|
$userId = Auth::user()->id;
|
||||||
|
$array_address_book = $UserModel->selectAddresBook('UserId', $userId);
|
||||||
|
|
||||||
|
return $array_address_book;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,10 +59,10 @@ return [
|
|||||||
// ],
|
// ],
|
||||||
|
|
||||||
// sandbox crew
|
// sandbox crew
|
||||||
// 'paypal_sandbox' => [
|
'paypal_sandbox' => [
|
||||||
// 'client_id' => 'AQuz-HKzQiL7FygkG8skSekaWf-RP6Rgj4f1XeX1Ghp86bUFj7tQXVT1xbpluu5_WCGRbQpOVGtlJKVB',
|
'client_id' => 'AQuz-HKzQiL7FygkG8skSekaWf-RP6Rgj4f1XeX1Ghp86bUFj7tQXVT1xbpluu5_WCGRbQpOVGtlJKVB',
|
||||||
// 'secret' => 'EJAMKxQsl-mFkL_4J_90cvTamYfcsgswqgIxz9wQPiRAwJ6sy_wNsttMlmrXIpxI96JpYzdMXkLCHAPz'
|
'secret' => 'EJAMKxQsl-mFkL_4J_90cvTamYfcsgswqgIxz9wQPiRAwJ6sy_wNsttMlmrXIpxI96JpYzdMXkLCHAPz'
|
||||||
// ],
|
],
|
||||||
|
|
||||||
// live crew
|
// live crew
|
||||||
'paypal_live' => [
|
'paypal_live' => [
|
||||||
|
|||||||
372
public/api/canada.json
Normal file
372
public/api/canada.json
Normal file
@@ -0,0 +1,372 @@
|
|||||||
|
{
|
||||||
|
"Alberta": [
|
||||||
|
"Airdrie",
|
||||||
|
"Grande Prairie",
|
||||||
|
"Red Deer",
|
||||||
|
"Beaumont",
|
||||||
|
"Hanna",
|
||||||
|
"St. Albert",
|
||||||
|
"Bonnyville",
|
||||||
|
"Hinton",
|
||||||
|
"Spruce Grove",
|
||||||
|
"Brazeau",
|
||||||
|
"Irricana",
|
||||||
|
"Strathcona County",
|
||||||
|
"Breton",
|
||||||
|
"Lacombe",
|
||||||
|
"Strathmore",
|
||||||
|
"Calgary",
|
||||||
|
"Leduc",
|
||||||
|
"Sylvan Lake",
|
||||||
|
"Camrose",
|
||||||
|
"Lethbridge",
|
||||||
|
"Swan Hills",
|
||||||
|
"Canmore",
|
||||||
|
"McLennan",
|
||||||
|
"Taber",
|
||||||
|
"Didzbury",
|
||||||
|
"Medicine Hat",
|
||||||
|
"Turner Valley",
|
||||||
|
"Drayton Valley",
|
||||||
|
"Olds",
|
||||||
|
"Vermillion",
|
||||||
|
"Edmonton",
|
||||||
|
"Onoway",
|
||||||
|
"Wood Buffalo",
|
||||||
|
"Ft. Saskatchewan",
|
||||||
|
"Provost"
|
||||||
|
],
|
||||||
|
"British Columbia": [
|
||||||
|
"Burnaby",
|
||||||
|
"Lumby",
|
||||||
|
"City of Port Moody",
|
||||||
|
"Cache Creek",
|
||||||
|
"Maple Ridge",
|
||||||
|
"Prince George",
|
||||||
|
"Castlegar",
|
||||||
|
"Merritt",
|
||||||
|
"Prince Rupert",
|
||||||
|
"Chemainus",
|
||||||
|
"Mission",
|
||||||
|
"Richmond",
|
||||||
|
"Chilliwack",
|
||||||
|
"Nanaimo",
|
||||||
|
"Saanich",
|
||||||
|
"Clearwater",
|
||||||
|
"Nelson",
|
||||||
|
"Sooke",
|
||||||
|
"Colwood",
|
||||||
|
"New Westminster",
|
||||||
|
"Sparwood",
|
||||||
|
"Coquitlam",
|
||||||
|
"North Cowichan",
|
||||||
|
"Surrey",
|
||||||
|
"Cranbrook",
|
||||||
|
"North Vancouver",
|
||||||
|
"Terrace",
|
||||||
|
"Dawson Creek",
|
||||||
|
"North Vancouver",
|
||||||
|
"Tumbler",
|
||||||
|
"Delta",
|
||||||
|
"Osoyoos",
|
||||||
|
"Vancouver",
|
||||||
|
"Fernie",
|
||||||
|
"Parksville",
|
||||||
|
"Vancouver",
|
||||||
|
"Invermere",
|
||||||
|
"Peace River",
|
||||||
|
"Vernon",
|
||||||
|
"Kamloops",
|
||||||
|
"Penticton",
|
||||||
|
"Victoria",
|
||||||
|
"Kaslo",
|
||||||
|
"Port Alberni",
|
||||||
|
"Whistler",
|
||||||
|
"Langley",
|
||||||
|
"Port Hardy"
|
||||||
|
],
|
||||||
|
"Manitoba": [
|
||||||
|
"Birtle",
|
||||||
|
"Flin Flon",
|
||||||
|
"Swan River",
|
||||||
|
"Brandon",
|
||||||
|
"Snow Lake",
|
||||||
|
"The Pas",
|
||||||
|
"Cranberry Portage",
|
||||||
|
"Steinbach",
|
||||||
|
"Thompson",
|
||||||
|
"Dauphin",
|
||||||
|
"Stonewall",
|
||||||
|
"Winnipeg"
|
||||||
|
],
|
||||||
|
"New Brunswick": [
|
||||||
|
"Cap-Pele",
|
||||||
|
"Miramichi",
|
||||||
|
"Saint John",
|
||||||
|
"Fredericton",
|
||||||
|
"Moncton",
|
||||||
|
"Saint Stephen",
|
||||||
|
"Grand Bay-Westfield",
|
||||||
|
"Oromocto",
|
||||||
|
"Shippagan",
|
||||||
|
"Grand Falls",
|
||||||
|
"Port Elgin",
|
||||||
|
"Sussex",
|
||||||
|
"Memramcook",
|
||||||
|
"Sackville",
|
||||||
|
"Tracadie-Sheila"
|
||||||
|
],
|
||||||
|
"Newfoundland And Labrador": [
|
||||||
|
"Argentia",
|
||||||
|
"Corner Brook",
|
||||||
|
"Paradise",
|
||||||
|
"Bishop's Falls",
|
||||||
|
"Labrador City",
|
||||||
|
"Portaux Basques",
|
||||||
|
"Botwood",
|
||||||
|
"Mount Pearl",
|
||||||
|
"St. John's",
|
||||||
|
"Brigus"
|
||||||
|
],
|
||||||
|
"Northwest Territories": [
|
||||||
|
"Town of Hay River",
|
||||||
|
"Town of Inuvik",
|
||||||
|
"Yellowknife"
|
||||||
|
],
|
||||||
|
"Nova Scotia": [
|
||||||
|
"Amherst",
|
||||||
|
"Hants County",
|
||||||
|
"Pictou",
|
||||||
|
"Annapolis",
|
||||||
|
"Inverness County",
|
||||||
|
"Pictou County",
|
||||||
|
"Argyle",
|
||||||
|
"Kentville",
|
||||||
|
"Queens",
|
||||||
|
"Baddeck",
|
||||||
|
"County of Kings",
|
||||||
|
"Richmond",
|
||||||
|
"Bridgewater",
|
||||||
|
"Lunenburg",
|
||||||
|
"Shelburne",
|
||||||
|
"Cape Breton",
|
||||||
|
"Lunenburg County",
|
||||||
|
"Stellarton",
|
||||||
|
"Chester",
|
||||||
|
"Mahone Bay",
|
||||||
|
"Truro",
|
||||||
|
"Cumberland County",
|
||||||
|
"New Glasgow",
|
||||||
|
"Windsor",
|
||||||
|
"East Hants",
|
||||||
|
"New Minas",
|
||||||
|
"Yarmouth",
|
||||||
|
"Halifax",
|
||||||
|
"Parrsboro"
|
||||||
|
],
|
||||||
|
"Ontario": [
|
||||||
|
"Ajax",
|
||||||
|
"Halton",
|
||||||
|
"Peterborough",
|
||||||
|
"Atikokan",
|
||||||
|
"Halton Hills",
|
||||||
|
"Pickering",
|
||||||
|
"Barrie",
|
||||||
|
"Hamilton",
|
||||||
|
"Port Bruce",
|
||||||
|
"Belleville",
|
||||||
|
"Hamilton-Wentworth",
|
||||||
|
"Port Burwell",
|
||||||
|
"Blandford-Blenheim",
|
||||||
|
"Hearst",
|
||||||
|
"Port Colborne",
|
||||||
|
"Blind River",
|
||||||
|
"Huntsville",
|
||||||
|
"Port Hope",
|
||||||
|
"Brampton",
|
||||||
|
"Ingersoll",
|
||||||
|
"Prince Edward",
|
||||||
|
"Brant",
|
||||||
|
"James",
|
||||||
|
"Quinte West",
|
||||||
|
"Brantford",
|
||||||
|
"Kanata",
|
||||||
|
"Renfrew",
|
||||||
|
"Brock",
|
||||||
|
"Kincardine",
|
||||||
|
"Richmond Hill",
|
||||||
|
"Brockville",
|
||||||
|
"King",
|
||||||
|
"Sarnia",
|
||||||
|
"Burlington",
|
||||||
|
"Kingston",
|
||||||
|
"Sault Ste. Marie",
|
||||||
|
"Caledon",
|
||||||
|
"Kirkland Lake",
|
||||||
|
"Scarborough",
|
||||||
|
"Cambridge",
|
||||||
|
"Kitchener",
|
||||||
|
"Scugog",
|
||||||
|
"Chatham-Kent",
|
||||||
|
"Larder Lake",
|
||||||
|
"Souix Lookout CoC Sioux Lookout",
|
||||||
|
"Chesterville",
|
||||||
|
"Leamington",
|
||||||
|
"Smiths Falls",
|
||||||
|
"Clarington",
|
||||||
|
"Lennox-Addington",
|
||||||
|
"South-West Oxford",
|
||||||
|
"Cobourg",
|
||||||
|
"Lincoln",
|
||||||
|
"St. Catharines",
|
||||||
|
"Cochrane",
|
||||||
|
"Lindsay",
|
||||||
|
"St. Thomas",
|
||||||
|
"Collingwood",
|
||||||
|
"London",
|
||||||
|
"Stoney Creek",
|
||||||
|
"Cornwall",
|
||||||
|
"Loyalist Township",
|
||||||
|
"Stratford",
|
||||||
|
"Cumberland",
|
||||||
|
"Markham",
|
||||||
|
"Sudbury",
|
||||||
|
"Deep River",
|
||||||
|
"Metro Toronto",
|
||||||
|
"Temagami",
|
||||||
|
"Dundas",
|
||||||
|
"Merrickville",
|
||||||
|
"Thorold",
|
||||||
|
"Durham",
|
||||||
|
"Milton",
|
||||||
|
"Thunder Bay",
|
||||||
|
"Dymond",
|
||||||
|
"Nepean",
|
||||||
|
"Tillsonburg",
|
||||||
|
"Ear Falls",
|
||||||
|
"Newmarket",
|
||||||
|
"Timmins",
|
||||||
|
"East Gwillimbury",
|
||||||
|
"Niagara",
|
||||||
|
"Toronto",
|
||||||
|
"East Zorra-Tavistock",
|
||||||
|
"Niagara Falls",
|
||||||
|
"Uxbridge",
|
||||||
|
"Elgin",
|
||||||
|
"Niagara-on-the-Lake",
|
||||||
|
"Vaughan",
|
||||||
|
"Elliot Lake",
|
||||||
|
"North Bay",
|
||||||
|
"Wainfleet",
|
||||||
|
"Flamborough",
|
||||||
|
"North Dorchester",
|
||||||
|
"Wasaga Beach",
|
||||||
|
"Fort Erie",
|
||||||
|
"North Dumfries",
|
||||||
|
"Waterloo",
|
||||||
|
"Fort Frances",
|
||||||
|
"North York",
|
||||||
|
"Waterloo",
|
||||||
|
"Gananoque",
|
||||||
|
"Norwich",
|
||||||
|
"Welland",
|
||||||
|
"Georgina",
|
||||||
|
"Oakville",
|
||||||
|
"Wellesley",
|
||||||
|
"Glanbrook",
|
||||||
|
"Orangeville",
|
||||||
|
"West Carleton",
|
||||||
|
"Gloucester",
|
||||||
|
"Orillia",
|
||||||
|
"West Lincoln",
|
||||||
|
"Goulbourn",
|
||||||
|
"Osgoode",
|
||||||
|
"Whitby",
|
||||||
|
"Gravenhurst",
|
||||||
|
"Oshawa",
|
||||||
|
"Wilmot",
|
||||||
|
"Grimsby",
|
||||||
|
"Ottawa",
|
||||||
|
"Windsor",
|
||||||
|
"Guelph",
|
||||||
|
"Ottawa-Carleton",
|
||||||
|
"Woolwich",
|
||||||
|
"Haldimand-Norfork",
|
||||||
|
"Owen Sound",
|
||||||
|
"York"
|
||||||
|
],
|
||||||
|
"Prince Edward Island": [
|
||||||
|
"Alberton",
|
||||||
|
"Montague",
|
||||||
|
"Stratford",
|
||||||
|
"Charlottetown",
|
||||||
|
"Souris",
|
||||||
|
"Summerside",
|
||||||
|
"Cornwall"
|
||||||
|
],
|
||||||
|
"Quebec": [
|
||||||
|
"Alma",
|
||||||
|
"Fleurimont",
|
||||||
|
"Longueuil",
|
||||||
|
"Amos",
|
||||||
|
"Gaspe",
|
||||||
|
"Marieville",
|
||||||
|
"Anjou",
|
||||||
|
"Gatineau",
|
||||||
|
"Mount Royal",
|
||||||
|
"Aylmer",
|
||||||
|
"Hull",
|
||||||
|
"Montreal",
|
||||||
|
"Beauport",
|
||||||
|
"Joliette",
|
||||||
|
"Montreal Region",
|
||||||
|
"Bromptonville",
|
||||||
|
"Jonquiere",
|
||||||
|
"Montreal-Est",
|
||||||
|
"Brosssard",
|
||||||
|
"Lachine",
|
||||||
|
"Quebec",
|
||||||
|
"Chateauguay",
|
||||||
|
"Lasalle",
|
||||||
|
"Saint-Leonard",
|
||||||
|
"Chicoutimi",
|
||||||
|
"Laurentides",
|
||||||
|
"Sherbrooke",
|
||||||
|
"Coaticook",
|
||||||
|
"LaSalle",
|
||||||
|
"Sorel",
|
||||||
|
"Coaticook",
|
||||||
|
"Laval",
|
||||||
|
"Thetford Mines",
|
||||||
|
"Dorval",
|
||||||
|
"Lennoxville",
|
||||||
|
"Victoriaville",
|
||||||
|
"Drummondville",
|
||||||
|
"Levis"
|
||||||
|
],
|
||||||
|
"Saskatchewan": [
|
||||||
|
"Avonlea",
|
||||||
|
"Melfort",
|
||||||
|
"Swift Current",
|
||||||
|
"Colonsay",
|
||||||
|
"Nipawin",
|
||||||
|
"Tisdale",
|
||||||
|
"Craik",
|
||||||
|
"Prince Albert",
|
||||||
|
"Unity",
|
||||||
|
"Creighton",
|
||||||
|
"Regina",
|
||||||
|
"Weyburn",
|
||||||
|
"Eastend",
|
||||||
|
"Saskatoon",
|
||||||
|
"Wynyard",
|
||||||
|
"Esterhazy",
|
||||||
|
"Shell Lake",
|
||||||
|
"Yorkton",
|
||||||
|
"Gravelbourg"
|
||||||
|
],
|
||||||
|
"Yukon": [
|
||||||
|
"Carcross",
|
||||||
|
"Whitehorse"
|
||||||
|
]
|
||||||
|
}
|
||||||
238
public/api/usa.json
Normal file
238
public/api/usa.json
Normal file
@@ -0,0 +1,238 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"name": "Alabama",
|
||||||
|
"abbreviation": "AL"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Alaska",
|
||||||
|
"abbreviation": "AK"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "American Samoa",
|
||||||
|
"abbreviation": "AS"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Arizona",
|
||||||
|
"abbreviation": "AZ"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Arkansas",
|
||||||
|
"abbreviation": "AR"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "California",
|
||||||
|
"abbreviation": "CA"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Colorado",
|
||||||
|
"abbreviation": "CO"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Connecticut",
|
||||||
|
"abbreviation": "CT"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Delaware",
|
||||||
|
"abbreviation": "DE"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "District Of Columbia",
|
||||||
|
"abbreviation": "DC"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Federated States Of Micronesia",
|
||||||
|
"abbreviation": "FM"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Florida",
|
||||||
|
"abbreviation": "FL"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Georgia",
|
||||||
|
"abbreviation": "GA"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Guam",
|
||||||
|
"abbreviation": "GU"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Hawaii",
|
||||||
|
"abbreviation": "HI"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Idaho",
|
||||||
|
"abbreviation": "ID"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Illinois",
|
||||||
|
"abbreviation": "IL"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Indiana",
|
||||||
|
"abbreviation": "IN"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Iowa",
|
||||||
|
"abbreviation": "IA"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Kansas",
|
||||||
|
"abbreviation": "KS"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Kentucky",
|
||||||
|
"abbreviation": "KY"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Louisiana",
|
||||||
|
"abbreviation": "LA"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Maine",
|
||||||
|
"abbreviation": "ME"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Marshall Islands",
|
||||||
|
"abbreviation": "MH"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Maryland",
|
||||||
|
"abbreviation": "MD"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Massachusetts",
|
||||||
|
"abbreviation": "MA"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Michigan",
|
||||||
|
"abbreviation": "MI"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Minnesota",
|
||||||
|
"abbreviation": "MN"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Mississippi",
|
||||||
|
"abbreviation": "MS"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Missouri",
|
||||||
|
"abbreviation": "MO"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Montana",
|
||||||
|
"abbreviation": "MT"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Nebraska",
|
||||||
|
"abbreviation": "NE"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Nevada",
|
||||||
|
"abbreviation": "NV"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "New Hampshire",
|
||||||
|
"abbreviation": "NH"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "New Jersey",
|
||||||
|
"abbreviation": "NJ"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "New Mexico",
|
||||||
|
"abbreviation": "NM"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "New York",
|
||||||
|
"abbreviation": "NY"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "North Carolina",
|
||||||
|
"abbreviation": "NC"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "North Dakota",
|
||||||
|
"abbreviation": "ND"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Northern Mariana Islands",
|
||||||
|
"abbreviation": "MP"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Ohio",
|
||||||
|
"abbreviation": "OH"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Oklahoma",
|
||||||
|
"abbreviation": "OK"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Oregon",
|
||||||
|
"abbreviation": "OR"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Palau",
|
||||||
|
"abbreviation": "PW"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Pennsylvania",
|
||||||
|
"abbreviation": "PA"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Puerto Rico",
|
||||||
|
"abbreviation": "PR"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Rhode Island",
|
||||||
|
"abbreviation": "RI"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "South Carolina",
|
||||||
|
"abbreviation": "SC"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "South Dakota",
|
||||||
|
"abbreviation": "SD"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Tennessee",
|
||||||
|
"abbreviation": "TN"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Texas",
|
||||||
|
"abbreviation": "TX"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Utah",
|
||||||
|
"abbreviation": "UT"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Vermont",
|
||||||
|
"abbreviation": "VT"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Virgin Islands",
|
||||||
|
"abbreviation": "VI"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Virginia",
|
||||||
|
"abbreviation": "VA"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Washington",
|
||||||
|
"abbreviation": "WA"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "West Virginia",
|
||||||
|
"abbreviation": "WV"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Wisconsin",
|
||||||
|
"abbreviation": "WI"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Wyoming",
|
||||||
|
"abbreviation": "WY"
|
||||||
|
}
|
||||||
|
]
|
||||||
@@ -12,6 +12,7 @@
|
|||||||
.cart-store-logo {
|
.cart-store-logo {
|
||||||
border: 1px solid #e2e2e2;
|
border: 1px solid #e2e2e2;
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<div class="wrapper pb-5">
|
<div class="wrapper pb-5">
|
||||||
@@ -25,7 +26,9 @@
|
|||||||
<nav aria-label="breadcrumb">
|
<nav aria-label="breadcrumb">
|
||||||
<ol class="breadcrumb">
|
<ol class="breadcrumb">
|
||||||
@if (isset($store_array[0]->StoreUrl))
|
@if (isset($store_array[0]->StoreUrl))
|
||||||
<li class="breadcrumb-item"><a href="{{ url('store') . '/' . $store_array[0]->StoreUrl }}">{{ $store_array[0]->StoreName }}</a></li>
|
<li class="breadcrumb-item"><a
|
||||||
|
href="{{ url('store') . '/' . $store_array[0]->StoreUrl }}">{{ $store_array[0]->StoreName }}</a>
|
||||||
|
</li>
|
||||||
@else
|
@else
|
||||||
<li class="breadcrumb-item"><a href="{{ url('/') }}">Home</a></li>
|
<li class="breadcrumb-item"><a href="{{ url('/') }}">Home</a></li>
|
||||||
@endif
|
@endif
|
||||||
@@ -48,7 +51,8 @@
|
|||||||
|
|
||||||
<div class="alert alert-danger alert-dismissible fade show" role="alert">
|
<div class="alert alert-danger alert-dismissible fade show" role="alert">
|
||||||
<strong>Error!</strong> {!! Session::get('cartkeyError') !!}
|
<strong>Error!</strong> {!! Session::get('cartkeyError') !!}
|
||||||
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
<button type="button" class="btn-close" data-bs-dismiss="alert"
|
||||||
|
aria-label="Close"></button>
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
@@ -58,7 +62,9 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-8 col-md-pull-4">
|
<div class="col-md-8 col-md-pull-4">
|
||||||
<div style="border: 1px solid #e2e2e2; padding: 10px;">
|
<div style="border: 1px solid #e2e2e2; padding: 10px;">
|
||||||
<h6><img height="30px" class="cart-store-logo" src="{{ config('site_config.uploads') . 'teamstore/'. $store_array[0]->ImageFolder . '/' . $store_array[0]->StoreLogo }}"> {{ $store_array[0]->StoreName }}</h6>
|
<h6><img height="30px" class="cart-store-logo"
|
||||||
|
src="{{ config('site_config.uploads') . 'teamstore/' . $store_array[0]->ImageFolder . '/' . $store_array[0]->StoreLogo }}">
|
||||||
|
{{ $store_array[0]->StoreName }}</h6>
|
||||||
</div>
|
</div>
|
||||||
@foreach ($item_group as $item)
|
@foreach ($item_group as $item)
|
||||||
@if ($item->VoucherId == null)
|
@if ($item->VoucherId == null)
|
||||||
@@ -68,20 +74,24 @@
|
|||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
@foreach ($img_thumb as $img)
|
@foreach ($img_thumb as $img)
|
||||||
@if ($img->ProductId == $item->ProductId)
|
@if ($img->ProductId == $item->ProductId)
|
||||||
<img class="previewImage" src="{{ config('site_config.images_url') }}/{{ $img->Image }}">
|
<img class="previewImage"
|
||||||
|
src="{{ config('site_config.images_url') }}/{{ $img->Image }}">
|
||||||
@endif
|
@endif
|
||||||
@endforeach
|
@endforeach
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-9">
|
<div class="col-md-9">
|
||||||
<h4>
|
<h4>
|
||||||
<a href="{{ url('store') . '/' . $item->StoreURL . '/' . 'product/' . $item->ProductURL }}">{{ $item->ProductName }}</a>
|
<a
|
||||||
|
href="{{ url('store') . '/' . $item->StoreURL . '/' . 'product/' . $item->ProductURL }}">{{ $item->ProductName }}</a>
|
||||||
</h4>
|
</h4>
|
||||||
<p>Total Price: {{ $item->total_price . ' ' . $store_array[0]->StoreCurrency }} • Row(s): {{ $item->qty }} </p>
|
<p>Total Price:
|
||||||
|
{{ $item->total_price . ' ' . $store_array[0]->StoreCurrency }}
|
||||||
|
• Row(s): {{ $item->qty }} </p>
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table class="table table-striped table-condensed">
|
<table class="table table-striped table-condensed">
|
||||||
|
|
||||||
@if($item->FormUsed=="jersey-and-shorts-form")
|
@if ($item->FormUsed == 'jersey-and-shorts-form')
|
||||||
<tr>
|
<tr>
|
||||||
<th>Name</th>
|
<th>Name</th>
|
||||||
<th>Number</th>
|
<th>Number</th>
|
||||||
@@ -174,86 +184,116 @@
|
|||||||
@foreach ($row as $sub_item)
|
@foreach ($row as $sub_item)
|
||||||
@if ($sub_item->ProductId == $item->ProductId)
|
@if ($sub_item->ProductId == $item->ProductId)
|
||||||
|
|
||||||
@if($item->FormUsed=="jersey-and-shorts-form")
|
@if ($item->FormUsed == 'jersey-and-shorts-form')
|
||||||
<tr>
|
<tr>
|
||||||
<td> @if ($sub_item->Name != '') {{ $sub_item->Name }} @else -- @endif </td>
|
<td> @if ($sub_item->Name != '') {{ $sub_item->Name }} @else -- @endif </td>
|
||||||
<td>{{ $sub_item->Number }}</td>
|
<td>{{ $sub_item->Number }}</td>
|
||||||
<td>{{ $sub_item->JerseySize }}</td>
|
<td>{{ $sub_item->JerseySize }}</td>
|
||||||
<td>{{ $sub_item->ShortsSize }}</td>
|
<td>{{ $sub_item->ShortsSize }}</td>
|
||||||
<td>{{ $sub_item->Price . ' ' . $store_array[0]->StoreCurrency }}</td>
|
<td>{{ $sub_item->Price . ' ' . $store_array[0]->StoreCurrency }}
|
||||||
|
</td>
|
||||||
<td>{{ $sub_item->Quantity }}</td>
|
<td>{{ $sub_item->Quantity }}</td>
|
||||||
<td><a class="btn btn-xs btn-link pull-right" href="{{ url('removeitem') }}/{{ $sub_item->Id }}"><i class="fa fa-times"></i></a></td>
|
<td><a class="btn btn-xs btn-link pull-right"
|
||||||
|
href="{{ url('removeitem') }}/{{ $sub_item->Id }}"><i
|
||||||
|
class="fa fa-times"></i></a></td>
|
||||||
</tr>
|
</tr>
|
||||||
@elseif($item->FormUsed=="tshirt-form")
|
@elseif($item->FormUsed=="tshirt-form")
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ $sub_item->Size }}</td>
|
<td>{{ $sub_item->Size }}</td>
|
||||||
<td>{{ $sub_item->Price . ' ' . $store_array[0]->StoreCurrency }}</td>
|
<td>{{ $sub_item->Price . ' ' . $store_array[0]->StoreCurrency }}
|
||||||
|
</td>
|
||||||
<td>{{ $sub_item->Quantity }}</td>
|
<td>{{ $sub_item->Quantity }}</td>
|
||||||
<td><a class="btn btn-xs btn-link pull-right" href="{{ url('removeitem') }}/{{ $sub_item->Id }}"><i class="fa fa-times"></i></a></td>
|
<td><a class="btn btn-xs btn-link pull-right"
|
||||||
|
href="{{ url('removeitem') }}/{{ $sub_item->Id }}"><i
|
||||||
|
class="fa fa-times"></i></a></td>
|
||||||
</tr>
|
</tr>
|
||||||
@elseif($item->FormUsed=="quantity-form")
|
@elseif($item->FormUsed=="quantity-form")
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ $sub_item->Price . ' ' . $store_array[0]->StoreCurrency }}</td>
|
<td>{{ $sub_item->Price . ' ' . $store_array[0]->StoreCurrency }}
|
||||||
|
</td>
|
||||||
<td>{{ $sub_item->Quantity }}</td>
|
<td>{{ $sub_item->Quantity }}</td>
|
||||||
<td><a class="btn btn-xs btn-link pull-right" href="{{ url('removeitem') }}/{{ $sub_item->Id }}"><i class="fa fa-times"></i></a></td>
|
<td><a class="btn btn-xs btn-link pull-right"
|
||||||
|
href="{{ url('removeitem') }}/{{ $sub_item->Id }}"><i
|
||||||
|
class="fa fa-times"></i></a></td>
|
||||||
</tr>
|
</tr>
|
||||||
@elseif($item->FormUsed=="name-number-form")
|
@elseif($item->FormUsed=="name-number-form")
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ $sub_item->Name }}</td>
|
<td>{{ $sub_item->Name }}</td>
|
||||||
<td>{{ $sub_item->Number }}</td>
|
<td>{{ $sub_item->Number }}</td>
|
||||||
<td>{{ $sub_item->Price . ' ' . $store_array[0]->StoreCurrency }}</td>
|
<td>{{ $sub_item->Price . ' ' . $store_array[0]->StoreCurrency }}
|
||||||
|
</td>
|
||||||
<td>{{ $sub_item->Quantity }}</td>
|
<td>{{ $sub_item->Quantity }}</td>
|
||||||
<td><a class="btn btn-xs btn-link pull-right" href="{{ url('removeitem') }}/{{ $sub_item->Id }}"><i class="fa fa-times"></i></a></td>
|
<td><a class="btn btn-xs btn-link pull-right"
|
||||||
|
href="{{ url('removeitem') }}/{{ $sub_item->Id }}"><i
|
||||||
|
class="fa fa-times"></i></a></td>
|
||||||
</tr>
|
</tr>
|
||||||
@elseif($item->FormUsed=="name-number-size-form")
|
@elseif($item->FormUsed=="name-number-size-form")
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ $sub_item->Name }}</td>
|
<td>{{ $sub_item->Name }}</td>
|
||||||
<td>{{ $sub_item->Number }}</td>
|
<td>{{ $sub_item->Number }}</td>
|
||||||
<td>{{ $sub_item->Size }}</td>
|
<td>{{ $sub_item->Size }}</td>
|
||||||
<td>{{ $sub_item->Price . ' ' . $store_array[0]->StoreCurrency }}</td>
|
<td>{{ $sub_item->Price . ' ' . $store_array[0]->StoreCurrency }}
|
||||||
|
</td>
|
||||||
<td>{{ $sub_item->Quantity }}</td>
|
<td>{{ $sub_item->Quantity }}</td>
|
||||||
<td><a class="btn btn-xs btn-link pull-right" href="{{ url('removeitem') }}/{{ $sub_item->Id }}"><i class="fa fa-times"></i></a></td>
|
<td><a class="btn btn-xs btn-link pull-right"
|
||||||
|
href="{{ url('removeitem') }}/{{ $sub_item->Id }}"><i
|
||||||
|
class="fa fa-times"></i></a></td>
|
||||||
</tr>
|
</tr>
|
||||||
@elseif($item->FormUsed=="number-form")
|
@elseif($item->FormUsed=="number-form")
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ $sub_item->Number }}</td>
|
<td>{{ $sub_item->Number }}</td>
|
||||||
<td>{{ $sub_item->Price . ' ' . $store_array[0]->StoreCurrency }}</td>
|
<td>{{ $sub_item->Price . ' ' . $store_array[0]->StoreCurrency }}
|
||||||
|
</td>
|
||||||
<td>{{ $sub_item->Quantity }}</td>
|
<td>{{ $sub_item->Quantity }}</td>
|
||||||
<td><a class="btn btn-xs btn-link pull-right" href="{{ url('removeitem') }}/{{ $sub_item->Id }}"><i class="fa fa-times"></i></a></td>
|
<td><a class="btn btn-xs btn-link pull-right"
|
||||||
|
href="{{ url('removeitem') }}/{{ $sub_item->Id }}"><i
|
||||||
|
class="fa fa-times"></i></a></td>
|
||||||
</tr>
|
</tr>
|
||||||
@elseif($item->FormUsed=="name-name2-size-form")
|
@elseif($item->FormUsed=="name-name2-size-form")
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ $sub_item->Name }}</td>
|
<td>{{ $sub_item->Name }}</td>
|
||||||
<td>{{ $sub_item->Name2 }}</td>
|
<td>{{ $sub_item->Name2 }}</td>
|
||||||
<td>{{ $sub_item->Size }}</td>
|
<td>{{ $sub_item->Size }}</td>
|
||||||
<td>{{ $sub_item->Price . ' ' . $store_array[0]->StoreCurrency }}</td>
|
<td>{{ $sub_item->Price . ' ' . $store_array[0]->StoreCurrency }}
|
||||||
|
</td>
|
||||||
<td>{{ $sub_item->Quantity }}</td>
|
<td>{{ $sub_item->Quantity }}</td>
|
||||||
<td><a class="btn btn-xs btn-link pull-right" href="{{ url('removeitem') }}/{{ $sub_item->Id }}"><i class="fa fa-times"></i></a></td>
|
<td><a class="btn btn-xs btn-link pull-right"
|
||||||
|
href="{{ url('removeitem') }}/{{ $sub_item->Id }}"><i
|
||||||
|
class="fa fa-times"></i></a></td>
|
||||||
</tr>
|
</tr>
|
||||||
@elseif($item->FormUsed=="name-size-form")
|
@elseif($item->FormUsed=="name-size-form")
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ $sub_item->Name }}</td>
|
<td>{{ $sub_item->Name }}</td>
|
||||||
<td>{{ $sub_item->Size }}</td>
|
<td>{{ $sub_item->Size }}</td>
|
||||||
<td>{{ $sub_item->Price . ' ' . $store_array[0]->StoreCurrency }}</td>
|
<td>{{ $sub_item->Price . ' ' . $store_array[0]->StoreCurrency }}
|
||||||
|
</td>
|
||||||
<td>{{ $sub_item->Quantity }}</td>
|
<td>{{ $sub_item->Quantity }}</td>
|
||||||
<td><a class="btn btn-xs btn-link pull-right" href="{{ url('removeitem') }}/{{ $sub_item->Id }}"><i class="fa fa-times"></i></a></td>
|
<td><a class="btn btn-xs btn-link pull-right"
|
||||||
|
href="{{ url('removeitem') }}/{{ $sub_item->Id }}"><i
|
||||||
|
class="fa fa-times"></i></a></td>
|
||||||
</tr>
|
</tr>
|
||||||
@elseif($item->FormUsed=="jersey-and-shorts-quantity-form")
|
@elseif($item->FormUsed=="jersey-and-shorts-quantity-form")
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ $sub_item->JerseySize }}</td>
|
<td>{{ $sub_item->JerseySize }}</td>
|
||||||
<td>{{ $sub_item->ShortsSize }}</td>
|
<td>{{ $sub_item->ShortsSize }}</td>
|
||||||
<td>{{ $sub_item->Price . ' ' . $store_array[0]->StoreCurrency }}</td>
|
<td>{{ $sub_item->Price . ' ' . $store_array[0]->StoreCurrency }}
|
||||||
|
</td>
|
||||||
<td>{{ $sub_item->Quantity }}</td>
|
<td>{{ $sub_item->Quantity }}</td>
|
||||||
<td><a class="btn btn-xs btn-link pull-right" href="{{ url('removeitem') }}/{{ $sub_item->Id }}"><i class="fa fa-times"></i></a></td>
|
<td><a class="btn btn-xs btn-link pull-right"
|
||||||
|
href="{{ url('removeitem') }}/{{ $sub_item->Id }}"><i
|
||||||
|
class="fa fa-times"></i></a></td>
|
||||||
</tr>
|
</tr>
|
||||||
@elseif($item->FormUsed=="number-jersey-shorts-form")
|
@elseif($item->FormUsed=="number-jersey-shorts-form")
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ $sub_item->Number }}</td>
|
<td>{{ $sub_item->Number }}</td>
|
||||||
<td>{{ $sub_item->JerseySize }}</td>
|
<td>{{ $sub_item->JerseySize }}</td>
|
||||||
<td>{{ $sub_item->ShortsSize }}</td>
|
<td>{{ $sub_item->ShortsSize }}</td>
|
||||||
<td>{{ $sub_item->Price . ' ' . $store_array[0]->StoreCurrency }}</td>
|
<td>{{ $sub_item->Price . ' ' . $store_array[0]->StoreCurrency }}
|
||||||
|
</td>
|
||||||
<td>{{ $sub_item->Quantity }}</td>
|
<td>{{ $sub_item->Quantity }}</td>
|
||||||
<td><a class="btn btn-xs btn-link pull-right" href="{{ url('removeitem') }}/{{ $sub_item->Id }}"><i class="fa fa-times"></i></a></td>
|
<td><a class="btn btn-xs btn-link pull-right"
|
||||||
|
href="{{ url('removeitem') }}/{{ $sub_item->Id }}"><i
|
||||||
|
class="fa fa-times"></i></a></td>
|
||||||
</tr>
|
</tr>
|
||||||
@else
|
@else
|
||||||
|
|
||||||
@@ -274,7 +314,8 @@
|
|||||||
<div style="border: 1px solid #e2e2e2; padding: 10px; border-bottom: none;">
|
<div style="border: 1px solid #e2e2e2; padding: 10px; border-bottom: none;">
|
||||||
@if (Session::has('msg'))
|
@if (Session::has('msg'))
|
||||||
<div class="alert alert-warning alert-dismissible">
|
<div class="alert alert-warning 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="fa fa-exclamation-triangle"></i> Warning:</h4>
|
<h4><i class="fa fa-exclamation-triangle"></i> Warning:</h4>
|
||||||
{!! Session::get('msg') !!}
|
{!! Session::get('msg') !!}
|
||||||
</div>
|
</div>
|
||||||
@@ -283,19 +324,47 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style="border: 1px solid #e2e2e2; padding: 10px; border-bottom: none;">
|
<div style="border: 1px solid #e2e2e2; padding: 10px; border-bottom: none;">
|
||||||
<h3>Subtotal: <span id="my_subtotal">{{ round($getSubtotal, 2) }}</span> <small>{{ $store_array[0]->StoreCurrency }}</small></h3>
|
<p><strong>Ship to:</strong></p>
|
||||||
|
@if ($address_book === null)
|
||||||
|
<a href="{{ url('user/address-book') }}">[ Add ]</a>
|
||||||
|
@else
|
||||||
|
<div>{{ $address_book[0]->Fullname }}</div>
|
||||||
|
<div>{{ $address_book[0]->ContactNumber }}</div>
|
||||||
|
<div>
|
||||||
|
{{ $address_book[0]->Address . ', ' . $address_book[0]->State . ', ' . $address_book[0]->City . ', ' . $address_book[0]->Country . ', ' . $address_book[0]->CountryCode . ' ' . $address_book[0]->ZipCode }}
|
||||||
|
<a href="{{ url('user/address-book') }}">[ Edit ]</a> </div>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="border: 1px solid #e2e2e2; padding: 10px; border-bottom: none;">
|
||||||
|
<h5>Subtotal: <small>{{ number_format($tax['order_grandtotal'] , 2) . ' ' . $store_array[0]->StoreCurrency }}</small> </h5>
|
||||||
|
<h5>Shipping Fee: <small>{{ number_format($shipping_fee , 2) . ' ' . $store_array[0]->StoreCurrency }}</small> </h5>
|
||||||
|
<h5>Tax: <small>{{ number_format($tax['tax'] , 2) . ' ' . $store_array[0]->StoreCurrency }}</small> </h5>
|
||||||
|
<hr>
|
||||||
|
<h3>Total: <span id="my_subtotal">{{ number_format($tax['order_grandtotal'] + $shipping_fee + $tax['tax'], 2) }}</span>
|
||||||
|
<small>{{ $store_array[0]->StoreCurrency }}</small></h3>
|
||||||
|
|
||||||
|
{{-- {{ var_dump($tax) }}
|
||||||
|
{{ var_dump($shipping_fee) }} --}}
|
||||||
<hr>
|
<hr>
|
||||||
<div class="form-group" id="voucher_list">
|
<div class="form-group" id="voucher_list">
|
||||||
@foreach ($row as $item)
|
@foreach ($row as $item)
|
||||||
@if ($item->VoucherId != null)
|
@if ($item->VoucherId != null)
|
||||||
<div class="btn-group mb-2">
|
<div class="btn-group mb-2">
|
||||||
@if($item->VoucherType == "Percentage")
|
@if ($item->VoucherType == 'Percentage')
|
||||||
<button type="button" class="btn btn-black btn-sm dropdown-toggle" data-bs-toggle="dropdown">{{ $item->VoucherCode . ' ' . $item->VoucherValue . '%' }} OFF</button>
|
<button type="button" class="btn btn-black btn-sm dropdown-toggle"
|
||||||
|
data-bs-toggle="dropdown">{{ $item->VoucherCode . ' ' . $item->VoucherValue . '%' }}
|
||||||
|
OFF</button>
|
||||||
@else
|
@else
|
||||||
<button type="button" class="btn btn-black btn-sm dropdown-toggle" data-bs-toggle="dropdown">{{ $item->VoucherCode . ' ' . $item->VoucherValue . ' ' . $store_array[0]->StoreCurrency }} OFF</button>
|
<button type="button" class="btn btn-black btn-sm dropdown-toggle"
|
||||||
|
data-bs-toggle="dropdown">{{ $item->VoucherCode . ' ' . $item->VoucherValue . ' ' . $store_array[0]->StoreCurrency }}
|
||||||
|
OFF</button>
|
||||||
@endif
|
@endif
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li><a class="dropdown-item" href="{{ url('removeitem') . '/' . $item->Id }}">Remove</a></li>
|
<li><a class="dropdown-item"
|
||||||
|
href="{{ url('removeitem') . '/' . $item->Id }}">Remove</a>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
@@ -304,9 +373,11 @@
|
|||||||
</div>
|
</div>
|
||||||
<form id="frm_voucher">
|
<form id="frm_voucher">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input type="text" class="form-control" name="voucher" data-error="#error_voucher" placeholder="Enter Voucher Code">
|
<input type="text" class="form-control" name="voucher" data-error="#error_voucher"
|
||||||
|
placeholder="Enter Voucher Code">
|
||||||
<span class="input-group-btn">
|
<span class="input-group-btn">
|
||||||
<button class="btn btn-default" id="btn_apply_voucher" type="submit" >Apply</button>
|
<button class="btn btn-default" id="btn_apply_voucher"
|
||||||
|
type="submit">Apply</button>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<span id="error_voucher" style="color: #dd4b39"></span>
|
<span id="error_voucher" style="color: #dd4b39"></span>
|
||||||
@@ -315,7 +386,10 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style="border: 1px solid #e2e2e2; padding: 10px;">
|
<div style="border: 1px solid #e2e2e2; padding: 10px;">
|
||||||
<a @if($getSubtotal <= 0 ) disabled @endif href="{{ url('getCheckout') }}" class="btn btn-primary w-100" style="background-color: #ffc300; border-color: #e2ad00; text-align: -webkit-center;" ><img src="{{asset('/public/images/paypal1.png')}}" class="img img-responsive" style="height:30px;"></a><br>
|
<a @if ($getSubtotal <= 0) disabled @endif href="{{ url('getCheckout') }}" class="btn btn-primary w-100"
|
||||||
|
style="background-color: #ffc300; border-color: #e2ad00; text-align: -webkit-center;"><img
|
||||||
|
src="{{ asset('/public/images/paypal1.png') }}" class="img img-responsive"
|
||||||
|
style="height:30px;"></a><br>
|
||||||
<!-- <div class="my-2">
|
<!-- <div class="my-2">
|
||||||
<button class="btn btn-lg btn-info w-100">Checkout with Voucher</button>
|
<button class="btn btn-lg btn-info w-100">Checkout with Voucher</button>
|
||||||
</div> -->
|
</div> -->
|
||||||
@@ -325,7 +399,8 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="py-4">
|
<div class="py-4">
|
||||||
<a href="{{ url('store') . '/' . $store_array[0]->StoreUrl }}" class="btn btn-black w-100" type="submit">Continue Shopping</a>
|
<a href="{{ url('store') . '/' . $store_array[0]->StoreUrl }}"
|
||||||
|
class="btn btn-black w-100" type="submit">Continue Shopping</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -33,12 +33,12 @@
|
|||||||
<div class="carousel-item active" data-bs-interval="10000">
|
<div class="carousel-item active" data-bs-interval="10000">
|
||||||
<img src="https://crewsportswear.app:5955/merchbay/slider/krut-merch.jpg" class="d-block w-100" alt="...">
|
<img src="https://crewsportswear.app:5955/merchbay/slider/krut-merch.jpg" class="d-block w-100" alt="...">
|
||||||
</div>
|
</div>
|
||||||
<div class="carousel-item" data-bs-interval="10000">
|
<!-- <div class="carousel-item" 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="...">
|
||||||
</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="...">
|
||||||
</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="...">
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -34,15 +34,13 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th>Full name</th>
|
<th>Full name</th>
|
||||||
<th>Address</th>
|
<th>Address</th>
|
||||||
<th>Postcode</th>
|
|
||||||
<th>Phone Number</th>
|
<th>Phone Number</th>
|
||||||
<th class="text-center">Action</th>
|
<th class="text-center">Action</th>
|
||||||
</tr>
|
</tr>
|
||||||
@foreach($array_address_book as $row)
|
@foreach($array_address_book as $row)
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ $row->Fullname }}</td>
|
<td>{{ $row->Fullname }}</td>
|
||||||
<td>{{ $row->Address }}</td>
|
<td>{{ $row->Address }}, {{ $row->State }}, {{ $row->City }}, {{ $row->Country}} {{ $row->CountryCode}}, {{ $row->ZipCode }}</td>
|
||||||
<td>{{ $row->State }}, {{ $row->City }}, {{ $row->ZipCode }}</td>
|
|
||||||
<td>{{ $row->ContactNumber }}</td>
|
<td>{{ $row->ContactNumber }}</td>
|
||||||
<td class="text-center">
|
<td class="text-center">
|
||||||
<a href="{{ url('user/address-book/edit/') }}/{{ $row->Id }}" class="btn btn-default btn-xs"><i class="fa fa-edit"></i> Edit</a>
|
<a href="{{ url('user/address-book/edit/') }}/{{ $row->Id }}" class="btn btn-default btn-xs"><i class="fa fa-edit"></i> Edit</a>
|
||||||
|
|||||||
@@ -46,11 +46,15 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>House Number, Building and Street Name</label>
|
<label>Country</label>
|
||||||
<input type="text" class="form-control" name="address" placeholder="Please enter your House Number, Building and Street Name">
|
<select class="form-control" name="countryCode" id="select_country" onchange="selectCountry(this)">
|
||||||
|
<option value="">Select Country</option>
|
||||||
|
<option value="US">United State</option>
|
||||||
|
<option value="CA">Canada</option>
|
||||||
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>State</label>
|
<label>State / Province</label>
|
||||||
<select class="form-control" name="state" id="lst-states">
|
<select class="form-control" name="state" id="lst-states">
|
||||||
<option value="">Select State</option>
|
<option value="">Select State</option>
|
||||||
</select>
|
</select>
|
||||||
@@ -61,6 +65,10 @@
|
|||||||
<option value="">Select City</option>
|
<option value="">Select City</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label>House Number, Building and Street Name</label>
|
||||||
|
<textarea type="text" class="form-control" name="address" placeholder="Please enter your House Number, Building and Street Name"></textarea>
|
||||||
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Zip Code</label>
|
<label>Zip Code</label>
|
||||||
<input type="text" class="form-control" name="zipcode" placeholder="Please enter your zip code">
|
<input type="text" class="form-control" name="zipcode" placeholder="Please enter your zip code">
|
||||||
|
|||||||
@@ -46,8 +46,12 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>House Number, Building and Street Name</label>
|
<label>Country</label>
|
||||||
<input type="text" class="form-control" name="address" placeholder="Please enter your House Number, Building and Street Name" value="{{ $array_address_book[0]->Address }}">
|
<select class="form-control" name="countryCode" id="select_country" onchange="selectCountry(this)" data-selected="{{ $array_address_book[0]->CountryCode }}">
|
||||||
|
<option value="">Select Country</option>
|
||||||
|
<option value="US">United State</option>
|
||||||
|
<option value="CA">Canada</option>
|
||||||
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>State</label>
|
<label>State</label>
|
||||||
@@ -61,6 +65,10 @@
|
|||||||
<option value="">Select City</option>
|
<option value="">Select City</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label>House Number, Building and Street Name</label>
|
||||||
|
<input type="text" class="form-control" name="address" placeholder="Please enter your House Number, Building and Street Name" value="{{ $array_address_book[0]->Address }}">
|
||||||
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Zip Code</label>
|
<label>Zip Code</label>
|
||||||
<input type="text" class="form-control" name="zipcode" placeholder="Please enter your zip code" value="{{ $array_address_book[0]->ZipCode }}">
|
<input type="text" class="form-control" name="zipcode" placeholder="Please enter your zip code" value="{{ $array_address_book[0]->ZipCode }}">
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-4 control-label">Store URL</label>
|
<label class="col-sm-4 control-label">Store URL</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<input type="text" class="form-control" id="store_url" value="{{ $store_array[0]->StoreUrl }}" name="store_url" placeholder="Store URL" reqiured="required" />
|
<input type="text" class="form-control" disabled value="{{ $store_array[0]->StoreUrl }}" name="store_url" placeholder="Store URL" reqiured="required" />
|
||||||
<input type="hidden" class="form-control" value="{{ $store_array[0]->StoreUrl }}" name="orig_store_url" reqiured="required" />
|
<input type="hidden" class="form-control" value="{{ $store_array[0]->StoreUrl }}" name="orig_store_url" reqiured="required" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
|
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
@@ -51,47 +52,66 @@
|
|||||||
<![endif]-->
|
<![endif]-->
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.skin-black-light .wrapper, .skin-black-light .main-sidebar, .skin-black-light .left-side{
|
.skin-black-light .wrapper,
|
||||||
|
.skin-black-light .main-sidebar,
|
||||||
|
.skin-black-light .left-side {
|
||||||
background-color: #222d32;
|
background-color: #222d32;
|
||||||
}
|
}
|
||||||
|
|
||||||
.skin-black-light .sidebar-menu>li:hover>a, .skin-black-light .sidebar-menu>li.active>a{
|
.skin-black-light .sidebar-menu>li:hover>a,
|
||||||
|
.skin-black-light .sidebar-menu>li.active>a {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
background: #1e282c;
|
background: #1e282c;
|
||||||
border-left-color: #fff;
|
border-left-color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.skin-black-light .sidebar-menu>li.header {
|
.skin-black-light .sidebar-menu>li.header {
|
||||||
color: #4b646f;
|
color: #4b646f;
|
||||||
background: #1a2226;
|
background: #1a2226;
|
||||||
}
|
}
|
||||||
|
|
||||||
.skin-black-light .sidebar a {
|
.skin-black-light .sidebar a {
|
||||||
color: rgb(184, 199, 206);
|
color: rgb(184, 199, 206);
|
||||||
}
|
}
|
||||||
.skin-black-light .user-panel>.info, .skin-black-light .user-panel>.info>a {
|
|
||||||
|
.skin-black-light .user-panel>.info,
|
||||||
|
.skin-black-light .user-panel>.info>a {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.skin-black-light .sidebar-menu>li>.treeview-menu {
|
.skin-black-light .sidebar-menu>li>.treeview-menu {
|
||||||
margin: 0 1px;
|
margin: 0 1px;
|
||||||
background: #2c3b41;
|
background: #2c3b41;
|
||||||
}
|
}
|
||||||
.skin-black-light .treeview-menu>li.active>a, .skin-black-light .treeview-menu>li>a:hover{
|
|
||||||
|
.skin-black-light .treeview-menu>li.active>a,
|
||||||
|
.skin-black-light .treeview-menu>li>a:hover {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.skin-black .treeview-menu>li>a {
|
.skin-black .treeview-menu>li>a {
|
||||||
color: #8aa4af;
|
color: #8aa4af;
|
||||||
}
|
}
|
||||||
|
|
||||||
.box.box-custom-color {
|
.box.box-custom-color {
|
||||||
border-top-color: #222d32;
|
border-top-color: #222d32;
|
||||||
}
|
}
|
||||||
|
|
||||||
.carousel-inner>.item>a>img, .carousel-inner>.item>img, .img-responsive, .thumbnail a>img, .thumbnail>img, .product-center{
|
.carousel-inner>.item>a>img,
|
||||||
|
.carousel-inner>.item>img,
|
||||||
|
.img-responsive,
|
||||||
|
.thumbnail a>img,
|
||||||
|
.thumbnail>img,
|
||||||
|
.product-center {
|
||||||
margin: auto;
|
margin: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sports-border {
|
.sports-border {
|
||||||
border: 1px solid #e2e2e2;
|
border: 1px solid #e2e2e2;
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sport-edit-btn {
|
.sport-edit-btn {
|
||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
}
|
}
|
||||||
@@ -159,7 +179,9 @@
|
|||||||
z-index: 1;
|
z-index: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wizard .nav-tabs > li.active > a, .wizard .nav-tabs > li.active > a:hover, .wizard .nav-tabs > li.active > a:focus {
|
.wizard .nav-tabs>li.active>a,
|
||||||
|
.wizard .nav-tabs>li.active>a:hover,
|
||||||
|
.wizard .nav-tabs>li.active>a:focus {
|
||||||
color: #555555;
|
color: #555555;
|
||||||
cursor: default;
|
cursor: default;
|
||||||
border: 0;
|
border: 0;
|
||||||
@@ -180,14 +202,17 @@
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 25px;
|
font-size: 25px;
|
||||||
}
|
}
|
||||||
|
|
||||||
span.round-tab i {
|
span.round-tab i {
|
||||||
color: #555555;
|
color: #555555;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wizard li.active span.round-tab {
|
.wizard li.active span.round-tab {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
border: 2px solid #5bc0de;
|
border: 2px solid #5bc0de;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.wizard li.active span.round-tab i {
|
.wizard li.active span.round-tab i {
|
||||||
color: #5bc0de;
|
color: #5bc0de;
|
||||||
}
|
}
|
||||||
@@ -271,14 +296,17 @@
|
|||||||
left: 35%;
|
left: 35%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*end*/
|
/*end*/
|
||||||
|
|
||||||
.custom-panel-footer.panel-footer {
|
.custom-panel-footer.panel-footer {
|
||||||
padding: 2px 2px;
|
padding: 2px 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.custom-panel-body.panel-body {
|
.custom-panel-body.panel-body {
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.obj-container {
|
.obj-container {
|
||||||
height: 254px;
|
height: 254px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -287,7 +315,8 @@
|
|||||||
|
|
||||||
|
|
||||||
/*add pattern Select custom css*/
|
/*add pattern Select custom css*/
|
||||||
.select2-container--default.select2-container--open.select2-container--below .select2-selection--single, .select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple{
|
.select2-container--default.select2-container--open.select2-container--below .select2-selection--single,
|
||||||
|
.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple {
|
||||||
|
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
border-color: #d2d6de;
|
border-color: #d2d6de;
|
||||||
@@ -318,6 +347,7 @@
|
|||||||
color: #c5c5c5;
|
color: #c5c5c5;
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*end add pattern Select custom css*/
|
/*end add pattern Select custom css*/
|
||||||
|
|
||||||
#template-img-preview {
|
#template-img-preview {
|
||||||
@@ -339,6 +369,7 @@
|
|||||||
div.list-group-item.active small {
|
div.list-group-item.active small {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.stars {
|
.stars {
|
||||||
margin: 20px auto 1px;
|
margin: 20px auto 1px;
|
||||||
}
|
}
|
||||||
@@ -360,6 +391,7 @@
|
|||||||
.btn-custom-save {
|
.btn-custom-save {
|
||||||
width: 150px;
|
width: 150px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.error {
|
.error {
|
||||||
color: #F44336;
|
color: #F44336;
|
||||||
}
|
}
|
||||||
@@ -535,9 +567,11 @@
|
|||||||
position: relative;
|
position: relative;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.grid-divider>[class*='col-'] {
|
.grid-divider>[class*='col-'] {
|
||||||
position: static;
|
position: static;
|
||||||
}
|
}
|
||||||
|
|
||||||
.grid-divider>[class*='col-']:nth-child(n+2):before {
|
.grid-divider>[class*='col-']:nth-child(n+2):before {
|
||||||
content: "";
|
content: "";
|
||||||
border-left: 1px solid #DDD;
|
border-left: 1px solid #DDD;
|
||||||
@@ -545,10 +579,12 @@
|
|||||||
top: 0;
|
top: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.col-padding {
|
.col-padding {
|
||||||
padding: 0 15px;
|
padding: 0 15px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* table.dataTable td,table.dataTable th {
|
/* table.dataTable td,table.dataTable th {
|
||||||
padding: 3px 10px;
|
padding: 3px 10px;
|
||||||
width: 1px;
|
width: 1px;
|
||||||
@@ -560,7 +596,10 @@
|
|||||||
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-136108155-1"></script>
|
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-136108155-1"></script>
|
||||||
<script>
|
<script>
|
||||||
window.dataLayer = window.dataLayer || [];
|
window.dataLayer = window.dataLayer || [];
|
||||||
function gtag(){dataLayer.push(arguments);}
|
|
||||||
|
function gtag() {
|
||||||
|
dataLayer.push(arguments);
|
||||||
|
}
|
||||||
gtag('js', new Date());
|
gtag('js', new Date());
|
||||||
|
|
||||||
gtag('config', 'UA-136108155-1');
|
gtag('config', 'UA-136108155-1');
|
||||||
@@ -666,22 +705,41 @@
|
|||||||
var min = $('#min').datepicker("getDate");
|
var min = $('#min').datepicker("getDate");
|
||||||
var max = $('#max').datepicker("getDate");
|
var max = $('#max').datepicker("getDate");
|
||||||
var startDate = new Date(data[10]);
|
var startDate = new Date(data[10]);
|
||||||
if (min == null && max == null) { return true; }
|
if (min == null && max == null) {
|
||||||
if (min == null && startDate <= max) { return true;}
|
return true;
|
||||||
if(max == null && startDate >= min) {return true;}
|
}
|
||||||
if (startDate <= max && startDate >= min) { return true; }
|
if (min == null && startDate <= max) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (max == null && startDate >= min) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (startDate <= max && startDate >= min) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
$("#min").datepicker({ onSelect: function () { table.draw(); }, changeMonth: true, changeYear: true });
|
$("#min").datepicker({
|
||||||
$("#max").datepicker({ onSelect: function () { table.draw(); }, changeMonth: true, changeYear: true });
|
onSelect: function() {
|
||||||
|
table.draw();
|
||||||
|
},
|
||||||
|
changeMonth: true,
|
||||||
|
changeYear: true
|
||||||
|
});
|
||||||
|
$("#max").datepicker({
|
||||||
|
onSelect: function() {
|
||||||
|
table.draw();
|
||||||
|
},
|
||||||
|
changeMonth: true,
|
||||||
|
changeYear: true
|
||||||
|
});
|
||||||
|
|
||||||
var table = $('#tbl_store_orders').DataTable({
|
var table = $('#tbl_store_orders').DataTable({
|
||||||
scrollX: true,
|
scrollX: true,
|
||||||
dom: 'Bfrtip',
|
dom: 'Bfrtip',
|
||||||
buttons: [
|
buttons: [{
|
||||||
{
|
|
||||||
extend: 'csv',
|
extend: 'csv',
|
||||||
exportOptions: {
|
exportOptions: {
|
||||||
// columns: [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 ]
|
// columns: [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 ]
|
||||||
@@ -734,9 +792,15 @@
|
|||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
],
|
],
|
||||||
columnDefs: [
|
columnDefs: [{
|
||||||
{ targets: 10, type: 'date', visible: false },
|
targets: 10,
|
||||||
{ targets: 10, type: 'date' }
|
type: 'date',
|
||||||
|
visible: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
targets: 10,
|
||||||
|
type: 'date'
|
||||||
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
});
|
});
|
||||||
@@ -955,57 +1019,6 @@
|
|||||||
|
|
||||||
resend_timer();
|
resend_timer();
|
||||||
|
|
||||||
$.getJSON("{{ asset('/public/api/usaCities.json') }}", function(data) {
|
|
||||||
var states = [];
|
|
||||||
|
|
||||||
for(i = 0 ; i < data.length ; i++){
|
|
||||||
states.push(data[i]['state']);
|
|
||||||
}
|
|
||||||
var uniqueStates = Array.from(new Set(states));
|
|
||||||
// console.log(uniqueItems.sort())
|
|
||||||
var selectedState = $('#lst-states').data('selected');
|
|
||||||
uniqueStates.sort().forEach(function(key) {
|
|
||||||
if(selectedState == key){
|
|
||||||
$('#lst-states').append('<option value="'+key+'" selected>'+ key + '</option>');
|
|
||||||
//
|
|
||||||
var cities = [];
|
|
||||||
for(i = 0 ; i < data.length ; i++){
|
|
||||||
cities.push(data[i]);
|
|
||||||
}
|
|
||||||
var city = getCities(cities, key);
|
|
||||||
var uniqueCities = Array.from(new Set(city));
|
|
||||||
var selectedCity = $('#lst-cities').data('selected');
|
|
||||||
$('.dynamic-city').remove();
|
|
||||||
uniqueCities.sort().forEach(function(key) {
|
|
||||||
if(selectedCity == key){
|
|
||||||
$('#lst-cities').append('<option value="'+key+'" class="dynamic-city" selected>'+ key + '</option>');
|
|
||||||
}else{
|
|
||||||
$('#lst-cities').append('<option value="'+key+'" class="dynamic-city">'+ key + '</option>');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
}else{
|
|
||||||
$('#lst-states').append('<option value="'+key+'">'+ key + '</option>');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$(document).on('select change', '#lst-states', function(){
|
|
||||||
var cities = [];
|
|
||||||
for(i = 0 ; i < data.length ; i++){
|
|
||||||
cities.push(data[i]);
|
|
||||||
}
|
|
||||||
var city = getCities(cities, $(this).val());
|
|
||||||
var uniqueCities = Array.from(new Set(city));
|
|
||||||
$('.dynamic-city').remove();
|
|
||||||
uniqueCities.sort().forEach(function(key) {
|
|
||||||
|
|
||||||
$('#lst-cities').append('<option value="'+key+'" class="dynamic-city">'+ key + '</option>');
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
$("#frm-create-address-book").validate({
|
$("#frm-create-address-book").validate({
|
||||||
rules: {
|
rules: {
|
||||||
@@ -1026,6 +1039,9 @@
|
|||||||
},
|
},
|
||||||
zipcode: {
|
zipcode: {
|
||||||
required: true
|
required: true
|
||||||
|
},
|
||||||
|
countryCode: {
|
||||||
|
required: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -1054,17 +1070,20 @@
|
|||||||
mobilenumber: {
|
mobilenumber: {
|
||||||
required: true
|
required: true
|
||||||
},
|
},
|
||||||
address: {
|
|
||||||
required: true
|
|
||||||
},
|
|
||||||
state: {
|
state: {
|
||||||
required: true
|
required: true
|
||||||
},
|
},
|
||||||
city: {
|
city: {
|
||||||
required: true
|
required: true
|
||||||
},
|
},
|
||||||
|
address: {
|
||||||
|
required: true
|
||||||
|
},
|
||||||
zipcode: {
|
zipcode: {
|
||||||
required: true
|
required: true
|
||||||
|
},
|
||||||
|
countryCode: {
|
||||||
|
required: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
messages: {},
|
messages: {},
|
||||||
@@ -1515,8 +1534,15 @@
|
|||||||
// /[\\]/g matches backward slashes.
|
// /[\\]/g matches backward slashes.
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#list').click(function(event){event.preventDefault();$('#products .item').addClass('list-group-item');});
|
$('#list').click(function(event) {
|
||||||
$('#grid').click(function(event){event.preventDefault();$('#products .item').removeClass('list-group-item');$('#products .item').addClass('grid-group-item');});
|
event.preventDefault();
|
||||||
|
$('#products .item').addClass('list-group-item');
|
||||||
|
});
|
||||||
|
$('#grid').click(function(event) {
|
||||||
|
event.preventDefault();
|
||||||
|
$('#products .item').removeClass('list-group-item');
|
||||||
|
$('#products .item').addClass('grid-group-item');
|
||||||
|
});
|
||||||
|
|
||||||
$('input[name="setActive"]').change(function() {
|
$('input[name="setActive"]').change(function() {
|
||||||
if ($(this).prop('checked')) {
|
if ($(this).prop('checked')) {
|
||||||
@@ -1697,11 +1723,143 @@
|
|||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// fetchUSA()
|
||||||
|
// fetchCanada()
|
||||||
|
getSelectedCountry()
|
||||||
}); //end document ready
|
}); //end document ready
|
||||||
|
|
||||||
// function
|
// function
|
||||||
|
|
||||||
|
function getSelectedCountry() {
|
||||||
|
var selectedState = $('#select_country').data('selected');
|
||||||
|
if (selectedState) {
|
||||||
|
// console.log(selectedState)
|
||||||
|
$("#select_country").val(selectedState).change();
|
||||||
|
// selectCountry()
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectCountry(item) {
|
||||||
|
|
||||||
|
const country = item.options[item.selectedIndex].text;
|
||||||
|
const countryCode = item.options[item.selectedIndex].value
|
||||||
|
console.log(countryCode)
|
||||||
|
|
||||||
|
if (countryCode === "US") {
|
||||||
|
fetchUSA()
|
||||||
|
}
|
||||||
|
|
||||||
|
if (countryCode === "CA") {
|
||||||
|
fetchCanada()
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function fetchCanada() {
|
||||||
|
$.getJSON("{{ asset('/public/api/canada.json') }}", function(items) {
|
||||||
|
var states = [];
|
||||||
|
|
||||||
|
Object.keys(items).forEach(function(state) {
|
||||||
|
states.push(state)
|
||||||
|
});
|
||||||
|
|
||||||
|
var uniqueStates = Array.from(new Set(states));
|
||||||
|
var selectedState = $('#lst-states').data('selected');
|
||||||
|
|
||||||
|
$('.dynamic-state').remove();
|
||||||
|
$('.dynamic-city').remove();
|
||||||
|
uniqueStates.sort().forEach(function(key) {
|
||||||
|
if (selectedState == key) {
|
||||||
|
$('#lst-states').append('<option value="' + key + '" selected class="dynamic-state">' + key + '</option>');
|
||||||
|
|
||||||
|
var cities = [];
|
||||||
|
cities = items[selectedState];
|
||||||
|
var uniqueCities = Array.from(new Set(cities));
|
||||||
|
var selectedCity = $('#lst-cities').data('selected');
|
||||||
|
$('.dynamic-city').remove();
|
||||||
|
uniqueCities.sort().forEach(function(key) {
|
||||||
|
if (selectedCity == key) {
|
||||||
|
$('#lst-cities').append('<option value="' + key + '" class="dynamic-city" selected>' + key + '</option>');
|
||||||
|
} else {
|
||||||
|
$('#lst-cities').append('<option value="' + key + '" class="dynamic-city">' + key + '</option>');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
} else {
|
||||||
|
$('#lst-states').append('<option value="' + key + '" class="dynamic-state">' + key + '</option>');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
$(document).on('select change', '#lst-states', function() {
|
||||||
|
var cities = [];
|
||||||
|
var selectedState = $(this).val()
|
||||||
|
cities = items[selectedState];
|
||||||
|
var uniqueCities = Array.from(new Set(cities));
|
||||||
|
$('.dynamic-city').remove();
|
||||||
|
uniqueCities.sort().forEach(function(key) {
|
||||||
|
$('#lst-cities').append('<option value="' + key + '" class="dynamic-city">' + key + '</option>');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function fetchUSA() {
|
||||||
|
$.getJSON("{{ asset('/public/api/usaCities.json') }}", function(data) {
|
||||||
|
var states = [];
|
||||||
|
|
||||||
|
for (i = 0; i < data.length; i++) {
|
||||||
|
states.push(data[i]['state']);
|
||||||
|
}
|
||||||
|
var uniqueStates = Array.from(new Set(states));
|
||||||
|
var selectedState = $('#lst-states').data('selected');
|
||||||
|
$('.dynamic-state').remove();
|
||||||
|
$('.dynamic-city').remove();
|
||||||
|
uniqueStates.sort().forEach(function(key) {
|
||||||
|
if (selectedState == key) {
|
||||||
|
$('#lst-states').append('<option value="' + key + '" selected class="dynamic-state">' + key + '</option>');
|
||||||
|
//
|
||||||
|
var cities = [];
|
||||||
|
for (i = 0; i < data.length; i++) {
|
||||||
|
console.log(data[i])
|
||||||
|
cities.push(data[i]);
|
||||||
|
}
|
||||||
|
var city = getCities(cities, key);
|
||||||
|
var uniqueCities = Array.from(new Set(city));
|
||||||
|
var selectedCity = $('#lst-cities').data('selected');
|
||||||
|
$('.dynamic-city').remove();
|
||||||
|
uniqueCities.sort().forEach(function(key) {
|
||||||
|
if (selectedCity == key) {
|
||||||
|
$('#lst-cities').append('<option value="' + key + '" class="dynamic-city" selected>' + key + '</option>');
|
||||||
|
} else {
|
||||||
|
$('#lst-cities').append('<option value="' + key + '" class="dynamic-city">' + key + '</option>');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
} else {
|
||||||
|
$('#lst-states').append('<option value="' + key + '" class="dynamic-state">' + key + '</option>');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$(document).on('select change', '#lst-states', function() {
|
||||||
|
var cities = [];
|
||||||
|
for (i = 0; i < data.length; i++) {
|
||||||
|
cities.push(data[i]);
|
||||||
|
}
|
||||||
|
var city = getCities(cities, $(this).val());
|
||||||
|
var uniqueCities = Array.from(new Set(city));
|
||||||
|
$('.dynamic-city').remove();
|
||||||
|
uniqueCities.sort().forEach(function(key) {
|
||||||
|
|
||||||
|
$('#lst-cities').append('<option value="' + key + '" class="dynamic-city">' + key + '</option>');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function submitFormAnnouncement() {
|
function submitFormAnnouncement() {
|
||||||
@@ -1767,7 +1925,9 @@
|
|||||||
'</div>').fadeIn().delay(5000).fadeOut();
|
'</div>').fadeIn().delay(5000).fadeOut();
|
||||||
}
|
}
|
||||||
|
|
||||||
$("html, body").animate({ scrollTop: 0 }, "slow");
|
$("html, body").animate({
|
||||||
|
scrollTop: 0
|
||||||
|
}, "slow");
|
||||||
$("#btn_update_store").attr('disabled', false);
|
$("#btn_update_store").attr('disabled', false);
|
||||||
$("#btn_update_store").html('Save Changes');
|
$("#btn_update_store").html('Save Changes');
|
||||||
|
|
||||||
@@ -1788,6 +1948,7 @@
|
|||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getCities(arr, q) {
|
function getCities(arr, q) {
|
||||||
var sd = [];
|
var sd = [];
|
||||||
arr.find(function(element) {
|
arr.find(function(element) {
|
||||||
@@ -1799,7 +1960,11 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function submitFormCreateAddressBook() {
|
function submitFormCreateAddressBook() {
|
||||||
var data = $("#frm-create-address-book").serialize();
|
var data = $("#frm-create-address-book").serializeArray();
|
||||||
|
data.push({
|
||||||
|
name: "country",
|
||||||
|
value: $("#select_country option:selected").text()
|
||||||
|
});
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
url: "{{ url('user/address-book/save') }}",
|
url: "{{ url('user/address-book/save') }}",
|
||||||
@@ -1827,8 +1992,11 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function submitFormEditAddressBook() {
|
function submitFormEditAddressBook() {
|
||||||
var data = $("#frm-edit-address-book").serialize();
|
var data = $("#frm-edit-address-book").serializeArray();
|
||||||
// console.log(data);
|
data.push({
|
||||||
|
name: "country",
|
||||||
|
value: $("#select_country option:selected").text()
|
||||||
|
});
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
url: "{{ url('user/address-book/update') }}",
|
url: "{{ url('user/address-book/update') }}",
|
||||||
@@ -2159,4 +2327,5 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
Reference in New Issue
Block a user