Compare commits
82 Commits
local_dev
...
ab0d370225
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ab0d370225 | ||
|
|
ee7b52feb2 | ||
|
|
4cb77e9312 | ||
|
|
43e66c7ac4 | ||
|
|
685a49cf57 | ||
|
|
f6617f6d70 | ||
|
|
7c6108e0a7 | ||
|
|
b8aa48a0bb | ||
|
|
8fc0b1076a | ||
|
|
71e1fca6fe | ||
|
|
8dc23e4e67 | ||
|
|
729d0e72e6 | ||
|
|
0b8856d3a0 | ||
|
|
6aa0587a69 | ||
|
|
08c274f5bd | ||
|
|
148df27117 | ||
|
|
e552037e2c | ||
|
|
7011b28542 | ||
|
|
2ac9cb6420 | ||
|
|
9c403b7207 | ||
|
|
11960d6bad | ||
|
|
25f80cb16f | ||
|
|
72773a517a | ||
|
|
d1f5d38480 | ||
|
|
f5f1693f55 | ||
|
|
39165cc7f9 | ||
|
|
20b4e06ee7 | ||
|
|
18e11ac3d0 | ||
|
|
0013b2a025 | ||
|
|
acf9c2e931 | ||
|
|
c144810352 | ||
|
|
b1ed52f7a6 | ||
|
|
70b250a64e | ||
|
|
1eb7e6632f | ||
|
|
98e7652e6b | ||
|
|
852593ecfb | ||
|
|
43de35a66c | ||
|
|
ad57e218af | ||
|
|
d2a20c4831 | ||
|
|
36ad67a37a | ||
|
|
6c55194c9a | ||
|
|
77ee1b9ccc | ||
|
|
6cc68cd56b | ||
|
|
3e328b83a4 | ||
|
|
d82832043c | ||
|
|
da89856e95 | ||
|
|
bf88584dcd | ||
|
|
3eb4078d19 | ||
|
|
5918eded8c | ||
|
|
02361ca64e | ||
|
|
1ca40ce1d7 | ||
|
|
59e52125f7 | ||
|
|
bb139cb0df | ||
|
|
bca94e54cc | ||
|
|
e57209bc64 | ||
|
|
5eeefa5587 | ||
|
|
80094cfdf0 | ||
|
|
587819be9a | ||
|
|
67b52fcc1a | ||
|
|
f7b402fe7a | ||
|
|
8408695473 | ||
|
|
99f89a968b | ||
|
|
3f96f82090 | ||
|
|
942af1f0a8 | ||
|
|
4610fb526b | ||
|
|
c29936f6b9 | ||
|
|
7c12b0e2bf | ||
|
|
a5dab36a14 | ||
|
|
55f135f66c | ||
|
|
6631690f93 | ||
|
|
dd26b1dd4b | ||
|
|
155bc2ce53 | ||
|
|
ef81f0bf25 | ||
|
|
bf078c82bf | ||
|
|
2e29677b90 | ||
|
|
03ea4e84a2 | ||
|
|
3f8c116293 | ||
|
|
9bf1a888a6 | ||
|
|
542f2c64e0 | ||
|
|
1d4c9a5445 | ||
|
|
3698312664 | ||
|
|
a9145ea484 |
57
.gitea/workflows/build-push.yml
Normal file
57
.gitea/workflows/build-push.yml
Normal file
@@ -0,0 +1,57 @@
|
||||
name: Build and Push Docker Image
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
tag:
|
||||
description: 'Docker image tag (e.g., v1.0.0, latest)'
|
||||
required: false
|
||||
default: 'latest'
|
||||
push_to_registry:
|
||||
description: 'Push to registry?'
|
||||
required: false
|
||||
default: 'true'
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: catthehacker/ubuntu:act-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: Login to Docker Registry
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ${{ secrets.DOCKER_REGISTRY_URL }}
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Extract metadata
|
||||
id: meta
|
||||
uses: docker/metadata-action@v4
|
||||
with:
|
||||
images: ${{ secrets.DOCKER_REGISTRY_URL }}/crewsportswear
|
||||
tags: |
|
||||
type=semver,pattern={{version}}
|
||||
type=semver,pattern={{major}}.{{minor}}
|
||||
type=semver,pattern={{major}}
|
||||
type=raw,value=latest
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
cache-from: type=registry,ref=${{ secrets.DOCKER_REGISTRY_URL }}/crewsportswear:buildcache
|
||||
cache-to: type=registry,ref=${{ secrets.DOCKER_REGISTRY_URL }}/crewsportswear:buildcache,mode=max
|
||||
152
.gitea/workflows/deploy-dev.yml
Normal file
152
.gitea/workflows/deploy-dev.yml
Normal file
@@ -0,0 +1,152 @@
|
||||
name: Deploy Development
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- dev
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: catthehacker/ubuntu:act-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
shell: sh
|
||||
run: |
|
||||
git clone $GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git /workspace/repo
|
||||
cd /workspace/repo
|
||||
git checkout $GITHUB_REF_NAME
|
||||
|
||||
- name: Build Docker image
|
||||
shell: sh
|
||||
run: |
|
||||
cd /workspace/repo
|
||||
docker build -t crewsportswear:dev .
|
||||
docker save crewsportswear:dev | gzip > crewsportswear_dev.tar.gz
|
||||
|
||||
- name: Setup SSH
|
||||
shell: sh
|
||||
env:
|
||||
DEPLOY_SSH_KEY: ${{ secrets.DEPLOY_SSH_KEY }}
|
||||
DEPLOY_HOST: ${{ secrets.DEPLOY_HOST }}
|
||||
run: |
|
||||
mkdir -p ~/.ssh
|
||||
chmod 700 ~/.ssh
|
||||
echo "$DEPLOY_SSH_KEY" > ~/.ssh/id_ed25519
|
||||
chmod 600 ~/.ssh/id_ed25519
|
||||
ssh-keyscan -H "$DEPLOY_HOST" >> ~/.ssh/known_hosts
|
||||
|
||||
- name: Upload image and compose
|
||||
shell: sh
|
||||
env:
|
||||
DEPLOY_USER: ${{ secrets.DEPLOY_USER }}
|
||||
DEPLOY_HOST: ${{ secrets.DEPLOY_HOST }}
|
||||
run: |
|
||||
scp -i ~/.ssh/id_ed25519 \
|
||||
/workspace/repo/crewsportswear_dev.tar.gz \
|
||||
/workspace/repo/docker-compose.dev.yml \
|
||||
${DEPLOY_USER}@${DEPLOY_HOST}:/tmp/
|
||||
|
||||
- name: Deploy on server
|
||||
shell: sh
|
||||
env:
|
||||
DEPLOY_USER: ${{ secrets.DEPLOY_USER }}
|
||||
DEPLOY_HOST: ${{ secrets.DEPLOY_HOST }}
|
||||
|
||||
run: |
|
||||
ssh -i ~/.ssh/id_ed25519 $DEPLOY_USER@$DEPLOY_HOST << 'EOF'
|
||||
set -e
|
||||
|
||||
DEPLOY_DIR="/var/www/apps/crewsportswear_dev"
|
||||
mkdir -p "$DEPLOY_DIR"
|
||||
|
||||
echo "Loading image"
|
||||
docker load < /tmp/crewsportswear_dev.tar.gz
|
||||
|
||||
echo "Removing old crewsportswear images"
|
||||
docker images | grep crewsportswear | grep -v "$(docker images crewsportswear:dev -q)" | awk '{print $3}' | xargs -r docker rmi -f || true
|
||||
|
||||
echo "Updating compose file"
|
||||
cp /tmp/docker-compose.dev.yml "$DEPLOY_DIR/docker-compose.yml"
|
||||
|
||||
cd "$DEPLOY_DIR"
|
||||
|
||||
echo "Checking .env file"
|
||||
if [ ! -f .env ]; then
|
||||
echo ".env file not found at $DEPLOY_DIR/.env"
|
||||
echo "Please create it first with required variables:"
|
||||
echo " - DB_*, PROD_PRIVATE, IMAGES_URL, UPLOAD_URL"
|
||||
echo " - MAIL_*, CAPTCHA_*, ANALYTICS_*"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Fixing .env permissions"
|
||||
sudo chown $USER:$USER .env
|
||||
sudo chmod 600 .env
|
||||
|
||||
echo "Ensure networks"
|
||||
docker network inspect traefik-public >/dev/null 2>&1 || \
|
||||
docker network create traefik-public
|
||||
docker network inspect crew-app-net >/dev/null 2>&1 || \
|
||||
docker network create crew-app-net
|
||||
|
||||
echo "Starting containers (env vars from .env file)"
|
||||
docker compose up -d
|
||||
|
||||
echo "Waiting for app container"
|
||||
sleep 15
|
||||
|
||||
if docker ps --format '{{.Names}}' | grep -q crewsportswear_app; then
|
||||
echo "Clearing and rebuilding config cache"
|
||||
docker compose exec -T app php artisan config:clear
|
||||
docker compose exec -T app php artisan config:cache
|
||||
else
|
||||
echo "App container not running"
|
||||
docker compose logs
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Cleanup"
|
||||
rm -f /tmp/crewsportswear_dev.tar.gz /tmp/docker-compose.dev.yml
|
||||
|
||||
echo "Aggressive Docker cleanup to reclaim space"
|
||||
docker image prune -af --filter "until=24h" || true
|
||||
docker container prune -f || true
|
||||
docker volume prune -f || true
|
||||
docker builder prune -af --filter "until=48h" || true
|
||||
echo "Docker space usage:"
|
||||
docker system df
|
||||
|
||||
echo "Deployment completed"
|
||||
EOF
|
||||
|
||||
|
||||
- name: Health check
|
||||
shell: sh
|
||||
run: |
|
||||
echo "Waiting for app to be ready..."
|
||||
sleep 20
|
||||
|
||||
echo "Testing health check (ignoring SSL cert for now)..."
|
||||
HTTP_CODE=$(curl -k -s -o /dev/null -w "%{http_code}" --max-time 30 https://dev.crewsportswear.app || echo "000")
|
||||
|
||||
if [ "$HTTP_CODE" = "200" ] || [ "$HTTP_CODE" = "302" ] || [ "$HTTP_CODE" = "301" ]; then
|
||||
echo "Health check passed! (HTTP $HTTP_CODE)"
|
||||
echo "Note: Using -k to ignore SSL cert. Check Traefik logs if cert not ready."
|
||||
else
|
||||
echo "Health check failed! (HTTP $HTTP_CODE)"
|
||||
echo ""
|
||||
echo "Troubleshooting:"
|
||||
echo " 1. Check if container is running:"
|
||||
echo " docker ps | grep crewsportswear_app"
|
||||
echo " 2. Check container logs:"
|
||||
echo " docker logs crewsportswear_app_dev"
|
||||
echo " 3. Check Traefik routing:"
|
||||
echo " docker logs traefik 2>&1 | grep crewsportswear"
|
||||
echo " 4. Verify network connectivity:"
|
||||
echo " docker network inspect traefik-public"
|
||||
exit 1
|
||||
fi
|
||||
145
.gitea/workflows/deploy.yml
Normal file
145
.gitea/workflows/deploy.yml
Normal file
@@ -0,0 +1,145 @@
|
||||
name: Deploy Production (crewsportswear.com)
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- master
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: catthehacker/ubuntu:act-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
shell: sh
|
||||
run: |
|
||||
git clone $GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git /workspace/repo
|
||||
cd /workspace/repo
|
||||
git checkout $GITHUB_REF_NAME
|
||||
|
||||
- name: Build Docker image
|
||||
shell: sh
|
||||
run: |
|
||||
cd /workspace/repo
|
||||
docker build -t crewsportswear:latest .
|
||||
docker save crewsportswear:latest | gzip > crewsportswear.tar.gz
|
||||
|
||||
- name: Setup SSH
|
||||
shell: sh
|
||||
env:
|
||||
DEPLOY_SSH_KEY: ${{ secrets.DEPLOY_SSH_KEY }}
|
||||
DEPLOY_HOST: ${{ secrets.DEPLOY_HOST }}
|
||||
run: |
|
||||
mkdir -p ~/.ssh
|
||||
chmod 700 ~/.ssh
|
||||
echo "$DEPLOY_SSH_KEY" > ~/.ssh/id_ed25519
|
||||
chmod 600 ~/.ssh/id_ed25519
|
||||
ssh-keyscan -H "$DEPLOY_HOST" >> ~/.ssh/known_hosts
|
||||
|
||||
- name: Upload image and compose
|
||||
shell: sh
|
||||
env:
|
||||
DEPLOY_USER: ${{ secrets.DEPLOY_USER }}
|
||||
DEPLOY_HOST: ${{ secrets.DEPLOY_HOST }}
|
||||
run: |
|
||||
scp -i ~/.ssh/id_ed25519 \
|
||||
/workspace/repo/crewsportswear.tar.gz \
|
||||
/workspace/repo/docker-compose.prod.yml \
|
||||
${DEPLOY_USER}@${DEPLOY_HOST}:/tmp/
|
||||
|
||||
- name: Deploy on server
|
||||
shell: sh
|
||||
env:
|
||||
DEPLOY_USER: ${{ secrets.DEPLOY_USER }}
|
||||
DEPLOY_HOST: ${{ secrets.DEPLOY_HOST }}
|
||||
|
||||
run: |
|
||||
ssh -i ~/.ssh/id_ed25519 $DEPLOY_USER@$DEPLOY_HOST << 'EOF'
|
||||
set -e
|
||||
|
||||
DEPLOY_DIR="/var/www/apps/crewsportswear"
|
||||
sudo mkdir -p "$DEPLOY_DIR"
|
||||
sudo chown $USER:$USER "$DEPLOY_DIR"
|
||||
|
||||
echo "Stopping dev environment"
|
||||
DEV_DIR="/var/www/apps/crewsportswear_dev"
|
||||
if [ -d "$DEV_DIR" ]; then
|
||||
cd "$DEV_DIR"
|
||||
docker compose down || true
|
||||
cd -
|
||||
echo "Dev environment stopped"
|
||||
echo "Copying .env from dev to production"
|
||||
if [ -f "$DEV_DIR/.env" ]; then
|
||||
cp "$DEV_DIR/.env" "$DEPLOY_DIR/.env"
|
||||
echo ".env file copied from dev to production"
|
||||
else
|
||||
echo "No .env file found in dev directory"
|
||||
fi else
|
||||
echo "No dev environment found"
|
||||
fi
|
||||
|
||||
echo "Loading image"
|
||||
docker load < /tmp/crewsportswear.tar.gz
|
||||
|
||||
echo "Removing dev images and old crewsportswear images"
|
||||
docker images | grep "crewsportswear:dev" | awk '{print $3}' | xargs -r docker rmi -f || true
|
||||
docker images | grep crewsportswear | grep -v "$(docker images crewsportswear:latest -q)" | awk '{print $3}' | xargs -r docker rmi -f || true
|
||||
|
||||
echo "Updating compose file"
|
||||
cp /tmp/docker-compose.prod.yml "$DEPLOY_DIR/docker-compose.yml"
|
||||
|
||||
cd "$DEPLOY_DIR"
|
||||
|
||||
echo "Checking .env file"
|
||||
if [ ! -f .env ]; then
|
||||
echo ".env file not found at $DEPLOY_DIR/.env"
|
||||
echo "Please create it first with required variables:"
|
||||
echo " - DB_*, PROD_PRIVATE, IMAGES_URL, UPLOAD_URL"
|
||||
echo " - MAIL_*, CAPTCHA_*, ANALYTICS_*"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Fixing .env permissions"
|
||||
sudo chown $USER:$USER .env
|
||||
sudo chmod 600 .env
|
||||
|
||||
echo "Ensure networks"
|
||||
docker network inspect traefik-public >/dev/null 2>&1 || \
|
||||
docker network create traefik-public
|
||||
docker network inspect crew-app-net >/dev/null 2>&1 || \
|
||||
docker network create crew-app-net
|
||||
|
||||
echo "Starting containers (env vars from .env file)"
|
||||
docker compose up -d
|
||||
|
||||
echo "Waiting for app container"
|
||||
sleep 15
|
||||
|
||||
if docker ps --format '{{.Names}}' | grep -q crewsportswear_app; then
|
||||
echo "Clearing and rebuilding config cache"
|
||||
docker compose exec -T app php artisan config:clear
|
||||
docker compose exec -T app php artisan config:cache
|
||||
else
|
||||
echo "App container not running"
|
||||
docker compose logs
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Cleanup"
|
||||
rm -f /tmp/crewsportswear.tar.gz /tmp/docker-compose.prod.yml
|
||||
|
||||
echo "Aggressive Docker cleanup to reclaim space"
|
||||
docker image prune -af --filter "until=24h" || true
|
||||
docker container prune -f || true
|
||||
docker volume prune -f || true
|
||||
docker builder prune -af --filter "until=48h" || true
|
||||
echo "Docker space usage:"
|
||||
docker system df
|
||||
|
||||
echo "Production deployment completed!"
|
||||
echo "Application available at: https://crewsportswear.com"
|
||||
EOF
|
||||
@@ -2,14 +2,13 @@
|
||||
<IfModule mod_negotiation.c>
|
||||
Options -MultiViews
|
||||
</IfModule>
|
||||
|
||||
RewriteEngine On
|
||||
|
||||
# Redirect Trailing Slashes...
|
||||
RewriteRule ^(.*)/$public /$1 [L,R=301]
|
||||
|
||||
RewriteCond %{SERVER_PORT} 80
|
||||
RewriteRule ^(.*)$ https://www.crewsportswear.com/beta/$1 [R,L]
|
||||
# Handle Front Controller...
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteRule ^ index.php [L]
|
||||
RewriteRule ^ index.php [L]
|
||||
</IfModule>
|
||||
|
||||
86
Dockerfile
Normal file
86
Dockerfile
Normal file
@@ -0,0 +1,86 @@
|
||||
# Use PHP 7.0 with Apache (has native mcrypt support for Laravel 5.0)
|
||||
FROM php:7.0-apache
|
||||
|
||||
# Update to use archived Debian repositories
|
||||
RUN sed -i 's|deb.debian.org|archive.debian.org|g' /etc/apt/sources.list \
|
||||
&& sed -i 's|security.debian.org|archive.debian.org|g' /etc/apt/sources.list \
|
||||
&& sed -i '/stretch-updates/d' /etc/apt/sources.list
|
||||
|
||||
# Install system dependencies
|
||||
RUN apt-get update && apt-get install -y --allow-unauthenticated \
|
||||
git \
|
||||
curl \
|
||||
libpng-dev \
|
||||
libxml2-dev \
|
||||
libmcrypt-dev \
|
||||
zip \
|
||||
unzip \
|
||||
libfreetype6-dev \
|
||||
libjpeg62-turbo-dev \
|
||||
openssh-client \
|
||||
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
|
||||
&& docker-php-ext-install -j$(nproc) gd
|
||||
|
||||
# Install PHP extensions (mcrypt is built-in for PHP 7.0)
|
||||
RUN docker-php-ext-install pdo_mysql mbstring exif pcntl bcmath mcrypt tokenizer zip
|
||||
|
||||
# Enable Apache mod_rewrite
|
||||
RUN a2enmod rewrite
|
||||
|
||||
# Install Composer (version 1.x for better compatibility with Laravel 5.0)
|
||||
COPY --from=composer:1.10 /usr/bin/composer /usr/bin/composer
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /var/www/html
|
||||
|
||||
# Copy existing application directory contents
|
||||
COPY . /var/www/html
|
||||
|
||||
# Create storage directories and set permissions
|
||||
RUN mkdir -p storage/framework/views \
|
||||
storage/framework/cache \
|
||||
storage/framework/sessions \
|
||||
storage/logs \
|
||||
bootstrap/cache
|
||||
|
||||
# Set proper ownership and permissions
|
||||
RUN chown -R www-data:www-data /var/www/html \
|
||||
&& chmod -R 775 /var/www/html/storage \
|
||||
&& chmod -R 775 /var/www/html/bootstrap/cache
|
||||
|
||||
# Create .env file if it doesn't exist
|
||||
RUN if [ ! -f .env ]; then cp .env.example .env; fi
|
||||
|
||||
# Install PHP dependencies (Laravel 5.0 compatible)
|
||||
RUN composer install --no-dev --no-interaction --prefer-dist
|
||||
|
||||
# Generate application key
|
||||
RUN php artisan key:generate || true
|
||||
|
||||
# Run Laravel 5.0 optimization
|
||||
RUN php artisan clear-compiled && php artisan optimize
|
||||
|
||||
# Note: yakpro-po obfuscation requires PHP 7.1+, incompatible with PHP 7.0
|
||||
# For code protection with PHP 7.0, consider:
|
||||
# 1. ionCube Encoder (commercial, most secure)
|
||||
# 2. Keeping source code private and using proper access controls
|
||||
# 3. Using --optimize flag in composer (already done above)
|
||||
|
||||
# Configure Apache DocumentRoot to point to Laravel's public directory
|
||||
ENV APACHE_DOCUMENT_ROOT=/var/www/html/public
|
||||
RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf
|
||||
RUN sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf
|
||||
|
||||
# Suppress Apache ServerName warning
|
||||
RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf
|
||||
|
||||
# Copy entrypoint script
|
||||
COPY docker-entrypoint.sh /usr/local/bin/
|
||||
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
|
||||
|
||||
# Expose port 80
|
||||
EXPOSE 80
|
||||
|
||||
# Use entrypoint to set up permissions before starting Apache
|
||||
ENTRYPOINT ["docker-entrypoint.sh"]
|
||||
CMD ["apache2-foreground"]
|
||||
149
app/Http/Controllers/ApiController.php
Normal file
149
app/Http/Controllers/ApiController.php
Normal file
@@ -0,0 +1,149 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Http\Requests;
|
||||
use App\Http\Controllers\Controller;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use App\Models\ApiModel;
|
||||
use ArrayObject;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Support\Facades\Input;
|
||||
|
||||
class ApiController extends Controller
|
||||
{
|
||||
|
||||
public function login(Request $request)
|
||||
{
|
||||
$ApiModel = new ApiModel;
|
||||
$post = $request->all();
|
||||
$response = $ApiModel->loginProductionUser($post['username'], $post['password']);
|
||||
|
||||
|
||||
if (!$response) {
|
||||
return response()->json(['status' => false, 'message' => "Invalid user"], 401);
|
||||
}
|
||||
|
||||
$selectTrackingStepLabel = $ApiModel->selectTrackingStepLabel($response[0]->StepId);
|
||||
$response[0]->AssignedStep = $selectTrackingStepLabel[0]->StepLabel;
|
||||
return response()->json(['status' => true, 'data' => $response[0]], 200);
|
||||
}
|
||||
|
||||
public function insert(Request $request)
|
||||
{
|
||||
$ApiModel = new ApiModel;
|
||||
$post = $request->json()->all();
|
||||
|
||||
$data = array(
|
||||
"StepId" => $post['StepId'],
|
||||
"ScannedBy" => $post['ScannedBy'],
|
||||
"InvoiceNumber" => $post['invoice'],
|
||||
"OrdersId" => $post['ordersId'],
|
||||
"ProductId" => $post['productId'],
|
||||
"QuantityCounter" => $post['quantityCounter'],
|
||||
"Timezone" => $post['timezone'],
|
||||
"TimezoneOffset" => date('H:i:s', strtotime($post['timezoneOffset'])),
|
||||
"DeviceId" => $post['deviceId'],
|
||||
"created_at" => date('Y-m-d H:i:s', strtotime($post['datetime']))
|
||||
);
|
||||
|
||||
|
||||
$checkIfTrackExist = $ApiModel->checkIfTrackExist($post['StepId'], $post['productId'], $post['ordersId'], $post['invoice'], $post['quantityCounter']);
|
||||
if ($checkIfTrackExist) {
|
||||
return response()->json(['status' => false, 'message' => "Already scanned."], 500);
|
||||
}
|
||||
|
||||
// $selectNextStep = $ApiModel->selectNextStep($post['invoice']);
|
||||
|
||||
// if(($selectNextStep->StepId + 1) != $post['StepId']){
|
||||
// return response()->json(['status' => false, 'message' => "Your account is not allowed to update this item."], 401);
|
||||
// }
|
||||
|
||||
$response = $ApiModel->insertTracking($data);
|
||||
|
||||
if (!$response) {
|
||||
return response()->json(['status' => false, 'message' => "Something went wrong."], 500);
|
||||
}
|
||||
|
||||
return response()->json(['status' => true, 'message' => 'Successfully updated.'], 201);
|
||||
}
|
||||
|
||||
// public function getTrackingStatus()
|
||||
// {
|
||||
// $ApiModel = new ApiModel;
|
||||
// $invoice = Input::get('invoice');
|
||||
// $response = $ApiModel->getTrackingStatus($invoice);
|
||||
// return response()->json(['status' => true, 'data' => $response], 200);
|
||||
// }
|
||||
|
||||
public function getTrackingStatus()
|
||||
{
|
||||
$ApiModel = new ApiModel;
|
||||
$invoice = Input::get('invoice');
|
||||
$getStep = Input::get('step');
|
||||
|
||||
|
||||
// $response = $ApiModel->getTrackingStatus($invoice);
|
||||
$selectPaymentDetails = $ApiModel->selectPaymentDetails($invoice);
|
||||
if (!$selectPaymentDetails) {
|
||||
return response()->json(['status' => false, 'message' => "Not found."], 404);
|
||||
}
|
||||
|
||||
$selectOrderList = $ApiModel->selectOrderList($selectPaymentDetails[0]->CartKey);
|
||||
$getCurrentTrackingSteps = $ApiModel->getCurrentTrackingSteps($invoice);
|
||||
$selectPaymentDetails[0]->tracking_steps = $getCurrentTrackingSteps;
|
||||
$currentStep = $ApiModel->selectCurrentStep($invoice);
|
||||
$selectPaymentDetails[0]->current_step = $currentStep;
|
||||
|
||||
$stp = ($getStep != "") ? $getStep : $currentStep->Order; // check if step
|
||||
foreach ($selectOrderList as $k => $order) {
|
||||
$table_fields[] = $ApiModel->selectOrderListTableFields($order->CartKey, $order->ProductId, $stp);
|
||||
$product_images[] = $ApiModel->selectProductImages($order->ProductId);
|
||||
|
||||
$selectOrderList[$k]->table_fields = $table_fields[$k];
|
||||
$selectOrderList[$k]->product_images = $product_images[$k];
|
||||
}
|
||||
|
||||
return response()->json([
|
||||
'status' => true,
|
||||
'payment_details' => $selectPaymentDetails[0],
|
||||
'order_list' => $selectOrderList
|
||||
], 200);
|
||||
}
|
||||
|
||||
public function getOrderStatus()
|
||||
{
|
||||
$ApiModel = new ApiModel;
|
||||
$invoice = Input::get('invoice');
|
||||
$productid = Input::get('productid');
|
||||
$orderid = Input::get('orderid');
|
||||
$qcounter = Input::get('qcounter');
|
||||
|
||||
$getStatus = $ApiModel->getStatus($invoice, $productid, $orderid, $qcounter);
|
||||
|
||||
if (!$getStatus) {
|
||||
return response()->json(['status' => false, 'data' => ""], 404);
|
||||
}
|
||||
|
||||
return response()->json([
|
||||
'status' => true,
|
||||
'data' => $getStatus[0]
|
||||
], 200);
|
||||
}
|
||||
|
||||
public function getSteps(){
|
||||
$ApiModel = new ApiModel;
|
||||
$selectSteps = $ApiModel->selectSteps();
|
||||
|
||||
if (!$selectSteps) {
|
||||
return response()->json(['status' => false, 'data' => ""], 404);
|
||||
}
|
||||
|
||||
return response()->json([
|
||||
'status' => true,
|
||||
'data' => $selectSteps
|
||||
], 200);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,24 +1,29 @@
|
||||
<?php namespace App\Http\Controllers;
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Http\Requests;
|
||||
use App\Http\Controllers\Controller;
|
||||
use Auth;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use App\Traits\CaptchaTrait;
|
||||
use App\User;
|
||||
use Validator;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use App\Models\user\UserModel;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class CustomAuthController extends Controller {
|
||||
class CustomAuthController extends Controller
|
||||
{
|
||||
use CaptchaTrait;
|
||||
|
||||
public function authenticate(Request $request){
|
||||
public function authenticate(Request $request)
|
||||
{
|
||||
|
||||
$post = $request->all();
|
||||
$email = $post['email'];
|
||||
$password = $post['password'];
|
||||
|
||||
if (Auth::attempt(['email' => $email, 'password' => $password])){
|
||||
if (Auth::attempt(['email' => $email, 'password' => $password])) {
|
||||
|
||||
if (Auth::user()->role == 'admin') {
|
||||
$message = '
|
||||
@@ -27,83 +32,101 @@ class CustomAuthController extends Controller {
|
||||
<h4><i class="icon fa fa-ban"></i> ERROR:</h4>
|
||||
You are not allowed to enter to this site.
|
||||
</div>';
|
||||
return response()->json(array('success' => false, 'message'=>$message));
|
||||
}
|
||||
|
||||
|
||||
return response()->json(array('success' => false, 'message' => $message));
|
||||
}
|
||||
|
||||
|
||||
$message = "success";
|
||||
$navbar = view('layout.navbar', compact('view'))->render();
|
||||
$save_design_button = ' <button type="button" class="btn btn-lg btn-primary pull-right" data-toggle="modal" data-target="#modalDesignName"><i class="fa fa-floppy-o" aria-hidden="true"></i> Save Design</button>';
|
||||
|
||||
|
||||
return response()->json(array(
|
||||
'success' => true,
|
||||
'message'=>$message,
|
||||
'navbar'=>$navbar,
|
||||
'success' => true,
|
||||
'message' => $message,
|
||||
'navbar' => $navbar,
|
||||
'save_design_button' => $save_design_button
|
||||
));
|
||||
}else{
|
||||
|
||||
} else {
|
||||
|
||||
$message = '
|
||||
<div class="alert alert-danger alert-dismissible">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<h4><i class="icon fa fa-ban"></i> ERROR:</h4>
|
||||
Username or Password is incorrect.
|
||||
</div>';
|
||||
|
||||
return response()->json(array('success' => false, 'message'=>$message));
|
||||
|
||||
return response()->json(array('success' => false, 'message' => $message));
|
||||
}
|
||||
}
|
||||
|
||||
public function postRegister(Request $request){
|
||||
public function postRegister(Request $request)
|
||||
{
|
||||
$post = $request->all();
|
||||
|
||||
$userModel = new UserModel;
|
||||
$post['captcha'] = $this->captchaCheck();
|
||||
|
||||
$validator = Validator::make($post, [
|
||||
'username' => 'unique:user_logins',
|
||||
'email' => 'unique:user_logins',
|
||||
'g-recaptcha-response' => 'required',
|
||||
'captcha' => 'required|min:1'
|
||||
],
|
||||
[
|
||||
'g-recaptcha-response.required' => 'Captcha is required',
|
||||
'captcha.min' => 'Wrong captcha, please try again.'
|
||||
]);
|
||||
|
||||
|
||||
if ($validator->fails())
|
||||
{
|
||||
$validator = Validator::make(
|
||||
$post,
|
||||
[
|
||||
'username' => 'unique:user_logins',
|
||||
'email' => 'unique:user_logins',
|
||||
'g-recaptcha-response' => 'required',
|
||||
'captcha' => 'required|min:1'
|
||||
],
|
||||
[
|
||||
'g-recaptcha-response.required' => 'Captcha is required',
|
||||
'captcha.min' => 'Wrong captcha, please try again.'
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
if ($validator->fails()) {
|
||||
$errors = "";
|
||||
foreach($validator->errors()->all() as $error){
|
||||
$errors .= "<li>".$error."</li>";
|
||||
foreach ($validator->errors()->all() as $error) {
|
||||
$errors .= "<li>" . $error . "</li>";
|
||||
}
|
||||
|
||||
$message = '
|
||||
<div class="alert alert-danger alert-dismissible">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<h4><i class="icon fa fa-ban"></i> ERROR:</h4>
|
||||
'.$errors.
|
||||
'</div>';
|
||||
' . $errors .
|
||||
'</div>';
|
||||
|
||||
return response()->json(array(
|
||||
return response()->json(array(
|
||||
'success' => false,
|
||||
'message' => $message
|
||||
));
|
||||
}
|
||||
|
||||
User::create([
|
||||
'name' => $post['name'],
|
||||
'username' => $post['username'],
|
||||
}
|
||||
|
||||
$user = User::create([
|
||||
'name' => $post['firstname'] . ' ' . $post['lastname'],
|
||||
'username' => $post['email'],
|
||||
'email' => $post['email'],
|
||||
'password' => bcrypt($post['password']),
|
||||
'role' => 'user'
|
||||
]);
|
||||
|
||||
$data = array(
|
||||
'UserId' => $user->id,
|
||||
'Fullname' => $post['firstname'] . ' ' . $post['lastname'],
|
||||
'ContactNumber' => $post['mobilenumber'],
|
||||
// 'OtherNotes' => $post['othernotes'],
|
||||
'Address' => $post['address'],
|
||||
'Address2' => $post['address2'],
|
||||
'State' => $post['state'],
|
||||
'City' => $post['city'],
|
||||
'ZipCode' => $post['zipcode'],
|
||||
'CountryCode' => $post['countryCode'],
|
||||
'Country' => $post['country']
|
||||
);
|
||||
$userModel->insertAddressBook($data);
|
||||
|
||||
Auth::attempt(['email' => $post['email'], 'password' => $post['password']]);
|
||||
|
||||
return response()->json(array(
|
||||
'success' => true
|
||||
'success' => true,
|
||||
'redirect' => $post['redirect']
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ use Illuminate\Http\Request;
|
||||
use App\Models\MainModel;
|
||||
// use Illuminate\Support\Facades\Request;
|
||||
use Analytics;
|
||||
use Session;
|
||||
use Illuminate\Support\Facades\Session;
|
||||
|
||||
class MainController extends Controller {
|
||||
|
||||
|
||||
@@ -1,129 +1,192 @@
|
||||
<?php namespace App\Http\Controllers\paypal;
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\paypal;
|
||||
|
||||
use App\Http\Requests;
|
||||
use App\Http\Controllers\Controller;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Paypal;
|
||||
// use Paypal;
|
||||
use Netshell\Paypal\Facades\Paypal;
|
||||
use App\Models\teamstore\TeamStoreModel;
|
||||
use App\Models\user\UserModel;
|
||||
use App\Models\ApiModel;
|
||||
use App\Models\paypal\PayPalModel;
|
||||
use Auth;
|
||||
use Session;
|
||||
use Redirect;
|
||||
use Mail;
|
||||
// use Auth;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
// use Session;
|
||||
use Illuminate\Support\Facades\Session;
|
||||
// use Redirect;
|
||||
use Illuminate\Support\Facades\Redirect;
|
||||
// use Mail;
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
use PayPal\Exception\PayPalConnectionException;
|
||||
|
||||
|
||||
|
||||
class PaypalController extends Controller {
|
||||
class PaypalController extends Controller
|
||||
{
|
||||
|
||||
private $_apiContext;
|
||||
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->_apiContext = PayPal::ApiContext(
|
||||
config('services.paypal.client_id'),
|
||||
config('services.paypal.secret'));
|
||||
|
||||
|
||||
$this->_apiContext->setConfig(array(
|
||||
'mode' => 'sandbox',
|
||||
'service.EndPoint' => 'https://api.sandbox.paypal.com',
|
||||
'http.ConnectionTimeOut' => 30,
|
||||
'log.LogEnabled' => true,
|
||||
'log.FileName' => storage_path('logs/paypal.log'),
|
||||
'log.LogLevel' => 'FINE'
|
||||
));
|
||||
|
||||
// live
|
||||
// $this->_apiContext->setConfig(array(
|
||||
// 'mode' => 'live',
|
||||
// 'service.EndPoint' => 'https://api.paypal.com',
|
||||
// 'http.ConnectionTimeOut' => 30,
|
||||
// 'log.LogEnabled' => true,
|
||||
// 'log.FileName' => storage_path('logs/paypal.log'),
|
||||
// 'log.LogLevel' => 'FINE'
|
||||
// ));
|
||||
}
|
||||
|
||||
|
||||
public function payPremium()
|
||||
{
|
||||
return view('payPremium');
|
||||
}
|
||||
|
||||
|
||||
public function getCheckout(Request $request)
|
||||
public function __construct()
|
||||
{
|
||||
$paypal_env = "live";
|
||||
$paypal_apiUrl = 'https://api.paypal.com'; // default
|
||||
|
||||
if(Auth::guest()){
|
||||
if ($paypal_env == 'live') {
|
||||
$paypal_apiUrl = 'https://api.paypal.com';
|
||||
} else {
|
||||
$paypal_apiUrl = 'https://api.sandbox.paypal.com';
|
||||
}
|
||||
|
||||
$message = 'Please <a href="'. url('auth/login'). '">Sign in</a> to your account to proceed.';
|
||||
$this->_apiContext = PayPal::ApiContext(
|
||||
config('services.paypal_' . $paypal_env . '.client_id'),
|
||||
config('services.paypal_' . $paypal_env . '.secret')
|
||||
|
||||
// config('services.paypal_live.client_id'),
|
||||
// config('services.paypal_live.secret')
|
||||
);
|
||||
|
||||
|
||||
$this->_apiContext->setConfig(array(
|
||||
'mode' => $paypal_env,
|
||||
'service.EndPoint' => $paypal_apiUrl,
|
||||
'http.ConnectionTimeOut' => 30,
|
||||
'log.LogEnabled' => true,
|
||||
'log.FileName' => storage_path('logs/paypal.log'),
|
||||
'log.LogLevel' => 'FINE'
|
||||
));
|
||||
|
||||
// live
|
||||
// $this->_apiContext->setConfig(array(
|
||||
// 'mode' => 'sandbox',
|
||||
// 'service.EndPoint' => 'https://api.paypal.com',
|
||||
// 'http.ConnectionTimeOut' => 30,
|
||||
// 'log.LogEnabled' => true,
|
||||
// 'log.FileName' => storage_path('logs/paypal.log'),
|
||||
// 'log.LogLevel' => 'FINE'
|
||||
// ));
|
||||
}
|
||||
|
||||
|
||||
public function payPremium()
|
||||
{
|
||||
return view('payPremium');
|
||||
}
|
||||
|
||||
|
||||
public function getCheckout(Request $request)
|
||||
{
|
||||
$UserModel = new UserModel;
|
||||
|
||||
if (Auth::guest()) {
|
||||
$message = 'Please <a href="' . url('auth/login') . '">Sign in</a> to your account to proceed.';
|
||||
Session::flash('msg', $message);
|
||||
return Redirect::back();
|
||||
}
|
||||
|
||||
$payer = PayPal::Payer();
|
||||
$payer->setPaymentMethod('paypal');
|
||||
$userId = Auth::user()->id;
|
||||
$array_address_book = $UserModel->selectAddresBook('UserId', $userId);
|
||||
|
||||
|
||||
if (count($array_address_book) <= 0) {
|
||||
$message = 'Please complete your shipping address. <a href="user/address-book/create"> <strong> <u>click here</u> </strong></a>.';
|
||||
Session::flash('cartkeyError', $message);
|
||||
return Redirect::back();
|
||||
}
|
||||
|
||||
$shipping_address_url = "user/address-book/edit/" . $array_address_book[0]->Id;
|
||||
|
||||
if (
|
||||
count($array_address_book) <= 0 ||
|
||||
$array_address_book[0]->Fullname == null ||
|
||||
$array_address_book[0]->ContactNumber == null ||
|
||||
$array_address_book[0]->Address == null ||
|
||||
$array_address_book[0]->State == null ||
|
||||
$array_address_book[0]->City == null ||
|
||||
$array_address_book[0]->ZipCode == null
|
||||
|
||||
) {
|
||||
$message = 'Please complete your shipping address. <a href="' . url($shipping_address_url) . '"> <strong> <u>click here</u> </strong></a>.';
|
||||
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');
|
||||
if (!$request->session()->has('cartkey')) {
|
||||
$message = 'Your cart is empty';
|
||||
Session::flash('cartkeyError', $message);
|
||||
return Redirect::back();
|
||||
}
|
||||
|
||||
$payer = PayPal::Payer();
|
||||
$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;
|
||||
$paypal_model = new PayPalModel;
|
||||
$last_id = $paypal_model->getLastIdPaymentDetails();
|
||||
$invoice_num = str_pad($last_id[0]->Id, 4,'0',STR_PAD_LEFT);
|
||||
// var_dump(count($last_id));
|
||||
if (count($last_id) > 0) {
|
||||
$lastId = $last_id[0]->Id + 1;
|
||||
} else {
|
||||
$lastId = 1;
|
||||
}
|
||||
$invoice_num = str_pad($lastId, 6, '0', STR_PAD_LEFT);
|
||||
// var_dump($invoice_num);
|
||||
$cartKey = $request->session()->get('cartkey');
|
||||
|
||||
|
||||
$items = $m->myCart($cartKey);
|
||||
|
||||
$getSubtotal = $m->getSubtotal($cartKey);
|
||||
|
||||
$grouped_item = $m->selectTeamStoreGroupByCartKey($cartKey);
|
||||
$store_array = $m->selectTeamStore('Id', $grouped_item[0]->StoreId);
|
||||
|
||||
|
||||
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'
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
$shippingFee = $this->getShippingFee($cartKey);
|
||||
|
||||
$tax = $this->getTax($cartKey)['tax'];
|
||||
$order_grandtotal = $this->getTax($cartKey)['order_grandtotal'];
|
||||
|
||||
$order_items = array();
|
||||
$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){
|
||||
$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) {
|
||||
|
||||
// $descriptions = "Name: " . $item->Name . " Number: " . $item->Number . " Size: " . $item->Size;"?"
|
||||
|
||||
|
||||
$order_items[$key] = PayPal::Item();
|
||||
$order_items[$key]->setName($item->ProductName);
|
||||
$order_items[$key]->setCurrency($store_array[0]->StoreCurrency);
|
||||
@@ -131,44 +194,68 @@ class PaypalController extends Controller {
|
||||
// $order_items[$key]->setDescription($descriptions);
|
||||
// $order_items[$key]->setTax(10);
|
||||
$order_items[$key]->setPrice($item->Price);
|
||||
|
||||
}
|
||||
|
||||
|
||||
$item_list = PayPal::ItemList();
|
||||
$item_list->setItems($order_items);
|
||||
|
||||
$payment = PayPal::Payment();
|
||||
|
||||
// var_dump(array($transaction));
|
||||
if ($array_address_book[0]->CountryCode == "CA") {
|
||||
|
||||
$shipping = PayPal::ShippingAddress();
|
||||
$shipping->setRecipientName($array_address_book[0]->Fullname);
|
||||
$shipping->setLine1($array_address_book[0]->Address);
|
||||
$shipping->setLine2($array_address_book[0]->Address2);
|
||||
$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);
|
||||
|
||||
$payment->setExperienceProfileId($this->createWebProfile());
|
||||
}
|
||||
|
||||
|
||||
// var_dump($item_list);
|
||||
|
||||
$amount_details = PayPal::Details();
|
||||
$amount_details->setSubtotal($order_grandtotal);
|
||||
$amount_details->setTax($tax);
|
||||
$amount_details->setShipping($shippingFee);
|
||||
|
||||
$amount = PayPal::Amount();
|
||||
$amount->setCurrency($store_array[0]->StoreCurrency);
|
||||
$amount->setDetails($amount_details);
|
||||
$amount->setTotal($order_grandtotal + $tax);
|
||||
|
||||
$amount->setTotal($order_grandtotal + $tax + $shippingFee);
|
||||
|
||||
$transaction = PayPal::Transaction();
|
||||
$transaction->setAmount($amount);
|
||||
$transaction->setItemList($item_list);
|
||||
|
||||
|
||||
// $transaction->setDescription('Your transaction description');
|
||||
$transaction->setInvoiceNumber(date('Ymd') . '-' . $invoice_num);
|
||||
|
||||
$redirectUrls = PayPal:: RedirectUrls();
|
||||
$redirectUrls->setReturnUrl(route('getDone'));
|
||||
$redirectUrls->setCancelUrl(route('getCancel'));
|
||||
|
||||
$redirectUrls = PayPal::RedirectUrls();
|
||||
$redirectUrls->setReturnUrl(route('getDone'));
|
||||
$redirectUrls->setCancelUrl(route('getCancel'));
|
||||
// var_dump($shippingAddress)
|
||||
|
||||
|
||||
$payment = PayPal::Payment();
|
||||
$payment->setIntent('sale');
|
||||
$payment->setPayer($payer);
|
||||
$payment->setRedirectUrls($redirectUrls);
|
||||
$payment->setTransactions(array($transaction));
|
||||
|
||||
$payment->setIntent('sale');
|
||||
$payment->setPayer($payer);
|
||||
$payment->setRedirectUrls($redirectUrls);
|
||||
$payment->setTransactions(array($transaction));
|
||||
|
||||
|
||||
$response = $payment->create($this->_apiContext);
|
||||
$redirectUrl = $response->links[1]->href;
|
||||
$response = $payment->create($this->_apiContext);
|
||||
$redirectUrl = $response->links[1]->href;
|
||||
|
||||
|
||||
return redirect()->to( $redirectUrl );
|
||||
return redirect()->to($redirectUrl);
|
||||
}
|
||||
|
||||
public function getDoneTest()
|
||||
@@ -193,65 +280,117 @@ class PaypalController extends Controller {
|
||||
// echo $ex;
|
||||
// }
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public function getShippingFee($cartKey)
|
||||
{
|
||||
|
||||
$m = new TeamStoreModel;
|
||||
$UserModel = new UserModel;
|
||||
$userId = 0;
|
||||
if (!Auth::guest()) {
|
||||
$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 || $grouped_item[0]->StoreId == 251) {
|
||||
$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)
|
||||
{
|
||||
$id = $request->get('paymentId');
|
||||
$token = $request->get('token');
|
||||
$payer_id = $request->get('PayerID');
|
||||
|
||||
|
||||
$payment = PayPal::getById($id, $this->_apiContext);
|
||||
|
||||
$paymentExecution = PayPal::PaymentExecution();
|
||||
|
||||
$paymentExecution->setPayerId($payer_id);
|
||||
$executePayment = $payment->execute($paymentExecution, $this->_apiContext);
|
||||
|
||||
// print_r($executePayment);
|
||||
// if ($executePayment->getState() == 'approved') {
|
||||
|
||||
// /** it's all right **/
|
||||
// /** Here Write your database logic like that insert record or value in database if you want **/
|
||||
|
||||
// // \Session::put('success','Payment success');
|
||||
// // return Redirect::route('paywithpaypal');
|
||||
// echo 'Payment success';
|
||||
// }
|
||||
$obj = json_decode($executePayment);
|
||||
|
||||
|
||||
$line2 = null;
|
||||
|
||||
//details
|
||||
$total = $obj->transactions[0]->amount->total;
|
||||
$sub_total = $obj->transactions[0]->amount->details->subtotal;
|
||||
$tax = $obj->transactions[0]->amount->details->tax;
|
||||
|
||||
$currency = $obj->transactions[0]->amount->currency;
|
||||
$invoice_number = $obj->transactions[0]->invoice_number;
|
||||
|
||||
//shipping address details
|
||||
$recipient_name = $obj->transactions[0]->item_list->shipping_address->recipient_name;
|
||||
$line1 = $obj->transactions[0]->item_list->shipping_address->line1;
|
||||
if(isset($obj->transactions[0]->item_list->shipping_address->line2)){
|
||||
$line2 = $obj->transactions[0]->item_list->shipping_address->line2;
|
||||
}
|
||||
$city = $obj->transactions[0]->item_list->shipping_address->city;
|
||||
$state = $obj->transactions[0]->item_list->shipping_address->state;
|
||||
$postal_code = $obj->transactions[0]->item_list->shipping_address->postal_code;
|
||||
$country_code = $obj->transactions[0]->item_list->shipping_address->country_code;
|
||||
|
||||
// payer info
|
||||
$payment_method = $obj->payer->payment_method;
|
||||
$email = $obj->payer->payer_info->email;
|
||||
$first_name = $obj->payer->payer_info->first_name;
|
||||
$last_name = $obj->payer->payer_info->last_name;
|
||||
$_payer_id = $obj->payer->payer_info->payer_id;
|
||||
|
||||
/// end paypal codes
|
||||
|
||||
$paypal_model = new PayPalModel;
|
||||
$m = new TeamStoreModel;
|
||||
@@ -259,103 +398,205 @@ class PaypalController extends Controller {
|
||||
$userId = Auth::user()->id;
|
||||
$user_email = Auth::user()->email;
|
||||
|
||||
$items = $m->myCart($cartKey); // item from cart_tmp
|
||||
$getSubtotal = $m->getSubtotal($cartKey);
|
||||
|
||||
$payment_details = array(
|
||||
$checkCartKey = $paypal_model->checkCartKey($cartKey);
|
||||
|
||||
'UserId' => $userId,
|
||||
'CartKey' => $cartKey,
|
||||
'PaymentId' => $id,
|
||||
'Token' => $token,
|
||||
'PayerId' => $payer_id,
|
||||
'InvoiceNumber' => $invoice_number,
|
||||
'Currency' => $currency,
|
||||
'Total' => $total,
|
||||
'SubTotal' => $sub_total,
|
||||
'Tax' => $tax,
|
||||
'Payer_Email' => $email,
|
||||
'Payer_Firstname' => $first_name,
|
||||
'Payer_Lastname' => $last_name,
|
||||
'PaymentMethod' =>$payment_method
|
||||
|
||||
);
|
||||
|
||||
$p_id = $paypal_model->insertToPaypalDetails($payment_details);
|
||||
|
||||
$shipping_address = array(
|
||||
'PaymentDetail_Id' => $p_id,
|
||||
'recipient_name' => $recipient_name,
|
||||
'line1' => $line1,
|
||||
'line2' => $line2,
|
||||
'city' => $city,
|
||||
'state' => $state,
|
||||
'postal_code' => $postal_code,
|
||||
'country_code' => $country_code,
|
||||
);
|
||||
// iinsert shipping address
|
||||
$paypal_model->insertShippingAddress($shipping_address);
|
||||
|
||||
// insert order from cart_tmp to orders table
|
||||
$l = $paypal_model->insertToOrders($cartKey); // insert to orders table
|
||||
|
||||
//email sending
|
||||
$newUserModel = new UserModel;
|
||||
$order_item_array = $newUserModel->selectOrderItem($cartKey);
|
||||
$item_goup_array = $newUserModel->itemGroup($cartKey);
|
||||
$item_thumbs = $newUserModel->selectDisplayItemThumb();
|
||||
$array_payment_details = $newUserModel->selectPaymentDetails('CartKey', $cartKey);
|
||||
$array_storename = $newUserModel->selectTeamStoreName($cartKey); // email subject
|
||||
|
||||
|
||||
foreach($array_storename as $storname){
|
||||
|
||||
$sName[] = $storname->StoreName;
|
||||
$sid[] = $storname->Id;
|
||||
}
|
||||
$sName = implode (", ", $sName);
|
||||
|
||||
|
||||
$user_loginsArray = $newUserModel->selectUserLoginsWhereIn($sid);
|
||||
|
||||
foreach($user_loginsArray as $userdata){
|
||||
|
||||
$other_email[] = $userdata->other_email;
|
||||
if (count($checkCartKey) > 0) {
|
||||
$message = 'You already paid for this order. Please check your Order Page. <a href="user/orders"> <strong> <u>click here</u> </strong></a>.';
|
||||
Session::put('cartkeyError', $message);
|
||||
return Redirect::route('cart');
|
||||
}
|
||||
|
||||
if($other_email[0] != null){
|
||||
$other_email = implode (", ", $other_email);
|
||||
$email_cc = "orders@crewsportswear.com" . "," . $other_email;
|
||||
}else{
|
||||
$email_cc = "orders@crewsportswear.com";
|
||||
$id = $request->get('paymentId');
|
||||
$token = $request->get('token');
|
||||
$payer_id = $request->get('PayerID');
|
||||
|
||||
try {
|
||||
$payment = PayPal::getById($id, $this->_apiContext);
|
||||
|
||||
$paymentExecution = PayPal::PaymentExecution();
|
||||
|
||||
$paymentExecution->setPayerId($payer_id);
|
||||
$executePayment = $payment->execute($paymentExecution, $this->_apiContext);
|
||||
$obj = json_decode($executePayment);
|
||||
// var_dump($obj);
|
||||
|
||||
if ($executePayment->getState() == 'approved') {
|
||||
|
||||
/** it's all right **/
|
||||
/** Here Write your database logic like that insert record or value in database if you want **/
|
||||
|
||||
// \Session::put('success','Payment success');
|
||||
// return Redirect::route('paywithpaypal');
|
||||
$line2 = null;
|
||||
|
||||
//details
|
||||
$total = $obj->transactions[0]->amount->total;
|
||||
$sub_total = $obj->transactions[0]->amount->details->subtotal;
|
||||
$tax = $obj->transactions[0]->amount->details->tax;
|
||||
$shipping = $obj->transactions[0]->amount->details->shipping;
|
||||
|
||||
$relatedResources = $obj->transactions[0]->related_resources[0];
|
||||
$saleId = $relatedResources->sale->id; // transaction_id
|
||||
|
||||
$currency = $obj->transactions[0]->amount->currency;
|
||||
$invoice_number = $obj->transactions[0]->invoice_number;
|
||||
// var_dump( $obj->transactions[0]->item_list->phone);
|
||||
//shipping address details
|
||||
$recipient_name = $obj->transactions[0]->item_list->shipping_address->recipient_name;
|
||||
$line1 = $obj->transactions[0]->item_list->shipping_address->line1;
|
||||
if (isset($obj->transactions[0]->item_list->shipping_address->line2)) {
|
||||
$line2 = $obj->transactions[0]->item_list->shipping_address->line2;
|
||||
}
|
||||
$city = $obj->transactions[0]->item_list->shipping_address->city;
|
||||
$state = $obj->transactions[0]->item_list->shipping_address->state;
|
||||
$postal_code = $obj->transactions[0]->item_list->shipping_address->postal_code;
|
||||
$country_code = $obj->transactions[0]->item_list->shipping_address->country_code;
|
||||
|
||||
// payer info
|
||||
$payment_method = $obj->payer->payment_method;
|
||||
$email = $obj->payer->payer_info->email;
|
||||
$first_name = $obj->payer->payer_info->first_name;
|
||||
$last_name = $obj->payer->payer_info->last_name;
|
||||
$_payer_id = $obj->payer->payer_info->payer_id;
|
||||
|
||||
/// end paypal codes
|
||||
|
||||
|
||||
|
||||
$payment_details = array(
|
||||
|
||||
'UserId' => $userId,
|
||||
'CartKey' => $cartKey,
|
||||
'PaymentId' => $id,
|
||||
'Token' => $token,
|
||||
'PayerId' => $payer_id,
|
||||
'InvoiceNumber' => $invoice_number,
|
||||
'Currency' => $currency,
|
||||
'Total' => $total,
|
||||
'SubTotal' => $sub_total,
|
||||
'Tax' => $tax,
|
||||
'Payer_Email' => $email,
|
||||
'Payer_Firstname' => $first_name,
|
||||
'Payer_Lastname' => $last_name,
|
||||
'PaymentMethod' => $payment_method,
|
||||
'ShippingCost' => $shipping,
|
||||
'TransactionId' => $saleId
|
||||
);
|
||||
|
||||
$p_id = $paypal_model->insertToPaypalDetails($payment_details);
|
||||
|
||||
$shipping_address = array(
|
||||
'PaymentDetail_Id' => $p_id,
|
||||
'recipient_name' => $recipient_name,
|
||||
'line1' => $line1,
|
||||
'line2' => $line2,
|
||||
'city' => $city,
|
||||
'state' => $state,
|
||||
'postal_code' => $postal_code,
|
||||
'country_code' => $country_code,
|
||||
);
|
||||
// iinsert shipping address
|
||||
$paypal_model->insertShippingAddress($shipping_address);
|
||||
|
||||
// insert order from cart_tmp to orders table
|
||||
$l = $paypal_model->insertToOrders($cartKey); // insert to orders table
|
||||
|
||||
//email sending
|
||||
$newUserModel = new UserModel;
|
||||
$order_item_array = $newUserModel->selectOrderItem($cartKey);
|
||||
$item_goup_array = $newUserModel->itemGroup($cartKey);
|
||||
$item_thumbs = $newUserModel->selectDisplayItemThumb();
|
||||
$array_payment_details = $newUserModel->selectPaymentDetails('CartKey', $cartKey);
|
||||
$array_storename = $newUserModel->selectTeamStoreName($cartKey); // email subject
|
||||
|
||||
|
||||
foreach ($array_storename as $storname) {
|
||||
|
||||
$sName[] = $storname->StoreName;
|
||||
$sid[] = $storname->Id;
|
||||
}
|
||||
$sName = implode(", ", $sName);
|
||||
|
||||
|
||||
$user_loginsArray = $newUserModel->selectUserLoginsWhereIn($sid);
|
||||
|
||||
foreach ($user_loginsArray as $userdata) {
|
||||
|
||||
$other_email[] = $userdata->other_email;
|
||||
}
|
||||
|
||||
if ($other_email[0] != null) {
|
||||
$other_email = implode(", ", array_filter($other_email, function ($value) {
|
||||
return !is_null($value) && $value !== '';
|
||||
}));
|
||||
$email_cc = "orders@crewsportswear.com" . "," . $other_email;
|
||||
} else {
|
||||
$email_cc = "orders@crewsportswear.com";
|
||||
}
|
||||
|
||||
$explode_other_email = explode(",", $email_cc);
|
||||
|
||||
$data = array(
|
||||
'order_item_array' => $order_item_array,
|
||||
'item_goup_array' => $item_goup_array,
|
||||
'img_thumb' => $item_thumbs,
|
||||
'array_payment_details' => $array_payment_details,
|
||||
'receiver' => $user_email,
|
||||
'email_cc' => $explode_other_email,
|
||||
'subject' => $sName . ' ORDERS',
|
||||
);
|
||||
|
||||
Mail::send('emails.orders', $data, function ($message) use ($data) {
|
||||
$message->from('no-reply@crewsportswear.com', 'CREW Sportswear');
|
||||
$message->bcc($data['email_cc'], 'Orders From CREW Sportswear');
|
||||
$message->to($data['receiver'])->subject($data['subject']);
|
||||
});
|
||||
// end email sending
|
||||
|
||||
|
||||
$insertTracking = array(
|
||||
"StepId" => 1,
|
||||
"ScannedBy" => 1,
|
||||
"InvoiceNumber" => $invoice_number,
|
||||
"created_at" => date('Y-m-d H:i:s')
|
||||
);
|
||||
|
||||
$ApiModel = new ApiModel;
|
||||
$ApiModel->insertTracking($insertTracking);
|
||||
|
||||
$request->session()->forget('cartkey'); // clear session for cartkey
|
||||
|
||||
// redirect to thank you page.
|
||||
return view('paypal.get_done')
|
||||
->with('currency', $currency)
|
||||
->with('total', $total);
|
||||
} else {
|
||||
Session::put('cartkeyError', 'Something went wrong. Please try again.');
|
||||
return Redirect::route('cart');
|
||||
}
|
||||
} catch (PayPalConnectionException $e) {
|
||||
//throw $th;
|
||||
// echo $e->getCode();
|
||||
echo $e->getData();
|
||||
Session::put('cartkeyError', 'Invalid payment.');
|
||||
return Redirect::route('cart');
|
||||
}
|
||||
|
||||
$explode_other_email = explode(",", $email_cc);
|
||||
|
||||
$data = array(
|
||||
'order_item_array' => $order_item_array,
|
||||
'item_goup_array' => $item_goup_array,
|
||||
'img_thumb' => $item_thumbs,
|
||||
'array_payment_details' => $array_payment_details,
|
||||
'receiver' => $user_email,
|
||||
'email_cc' => $explode_other_email,
|
||||
'subject' => $sName . ' ORDERS',
|
||||
);
|
||||
|
||||
Mail::send('emails.orders', $data, function($message) use ($data) {
|
||||
$message->from('no-reply@crewsportswear.com', 'CREW Sportswear');
|
||||
$message->bcc($data['email_cc'], 'Orders From CREW Sportswear');
|
||||
$message->to($data['receiver'])->subject($data['subject']);
|
||||
});
|
||||
// end email sending
|
||||
|
||||
$request->session()->forget('cartkey'); // clear session for cartkey
|
||||
|
||||
// redirect to thank you page.
|
||||
return view('paypal.get_done')
|
||||
->with('currency', $currency)
|
||||
->with('total', $total);
|
||||
// print_r($executePayment);
|
||||
// if ($executePayment->getState() == 'approved') {
|
||||
|
||||
// /** it's all right **/
|
||||
// /** Here Write your database logic like that insert record or value in database if you want **/
|
||||
|
||||
// // \Session::put('success','Payment success');
|
||||
// // return Redirect::route('paywithpaypal');
|
||||
// echo 'Payment success';
|
||||
// }
|
||||
|
||||
// var_dump($obj->payer->payer_info->shipping_address);
|
||||
// var_dump($obj->transactions[0]->item_list->shipping_address);
|
||||
}
|
||||
|
||||
|
||||
@@ -363,31 +604,77 @@ class PaypalController extends Controller {
|
||||
{
|
||||
$m = new TeamStoreModel;
|
||||
$cartKey = $request->session()->get('cartkey');
|
||||
|
||||
|
||||
$items = $m->myCart($cartKey);
|
||||
$getSubtotal = $m->getSubtotal($cartKey);
|
||||
|
||||
foreach($items as $item){
|
||||
if($item->VoucherId != null){
|
||||
if ($items == null) {
|
||||
return redirect()->route('cart');
|
||||
}
|
||||
|
||||
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"){
|
||||
if ($voucher[0]->VoucherType == "Percentage") {
|
||||
$data = array(
|
||||
'Price' => '00.00'
|
||||
);
|
||||
$m->updateVoucherValueInCart($data, $item_id);
|
||||
}else{
|
||||
} else {
|
||||
$voucherData = array(
|
||||
'totalValue'=> $totalValue,
|
||||
'type'=>'Flat'
|
||||
'totalValue' => $totalValue,
|
||||
'type' => 'Flat'
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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("Crewsportswear"); //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("Crewsportswear " . 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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,90 +1,110 @@
|
||||
<?php namespace App\Http\Controllers\teamstore;
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\teamstore;
|
||||
|
||||
use App\Http\Requests;
|
||||
use App\Http\Controllers\Controller;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Auth;
|
||||
// use Auth;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use App\Models\teamstore\TeamStoreModel;
|
||||
use App\Models\user\UserModel;
|
||||
use Mail;
|
||||
// use Mail;
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
use Analytics;
|
||||
use Carbon\Carbon;
|
||||
|
||||
|
||||
class TeamStoreController extends Controller {
|
||||
|
||||
class TeamStoreController extends Controller
|
||||
{
|
||||
|
||||
public function index(Request $request, $teamStoreURL)
|
||||
{
|
||||
// var_dump($teamStoreURL);
|
||||
$m = new TeamStoreModel;
|
||||
$UserModel = new UserModel;
|
||||
|
||||
$store_array = $m->selectTeamStore('StoreUrl', $teamStoreURL);
|
||||
$product_array = $m->selectTeamStoreProducts('TeamStoreId', $store_array[0]->Id);
|
||||
$user_role = '';
|
||||
|
||||
if (Auth::check()){
|
||||
|
||||
if (Auth::check()) {
|
||||
$user_role = Auth::user()->role;
|
||||
$store_id = Auth::user()->store_id;
|
||||
}else{
|
||||
} else {
|
||||
$user_role = null;
|
||||
$store_id = null;
|
||||
}
|
||||
|
||||
|
||||
if($store_array[0]->Password != null){
|
||||
if($request->session()->get('teamstore_data_array') == null){
|
||||
if($store_id != $store_array[0]->Id){
|
||||
|
||||
if ($store_array[0]->Password != null) {
|
||||
if ($request->session()->get('teamstore_data_array') == null) {
|
||||
if ($store_id != $store_array[0]->Id) {
|
||||
return redirect('teamstore');
|
||||
}
|
||||
}else{
|
||||
|
||||
if($user_role != "store_owner"){
|
||||
if($request->session()->get('teamstore_data_array')[0]->StoreUrl != $store_array[0]->StoreUrl){
|
||||
return redirect()->back();
|
||||
} else {
|
||||
|
||||
if ($user_role != "store_owner") {
|
||||
if ($request->session()->get('teamstore_data_array')[0]->StoreUrl != $store_array[0]->StoreUrl) {
|
||||
return redirect()->back();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
$displayThumbnails = 'product-image-placeholder.png';
|
||||
|
||||
foreach ($product_array as $p => $pr_arr) {
|
||||
|
||||
$thumbnails_array = $m->getProductThumbnails($pr_arr->Id);
|
||||
if(!empty($thumbnails_array)){
|
||||
if (!empty($thumbnails_array)) {
|
||||
foreach ($thumbnails_array as $t => $thumb) {
|
||||
|
||||
if($thumb->ImageClass == 'custom'){
|
||||
|
||||
if ($thumb->ImageClass == 'custom') {
|
||||
$displayThumbnails = $thumb->Image;
|
||||
break;
|
||||
}
|
||||
|
||||
if($thumb->ImageClass == 'active'){
|
||||
if ($thumb->ImageClass == 'active') {
|
||||
$displayThumbnails = $thumb->Image;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$thumbnails[] = array(
|
||||
'folder' => $store_array[0]->ImageFolder,
|
||||
'product_id' => $pr_arr->Id,
|
||||
'thumb' => $displayThumbnails
|
||||
|
||||
);
|
||||
'folder' => $store_array[0]->ImageFolder,
|
||||
'product_id' => $pr_arr->Id,
|
||||
'thumb' => $displayThumbnails
|
||||
|
||||
}else{
|
||||
);
|
||||
} else {
|
||||
$thumbnails[] = array(
|
||||
'folder' => $store_array[0]->ImageFolder,
|
||||
'product_id' => $pr_arr->Id,
|
||||
'thumb' => "product-image-placeholder.png"
|
||||
'folder' => $store_array[0]->ImageFolder,
|
||||
'product_id' => $pr_arr->Id,
|
||||
'thumb' => "product-image-placeholder.png"
|
||||
);
|
||||
}
|
||||
}
|
||||
$getAnnouncement = $UserModel->getAnnouncement($store_array[0]->Id);
|
||||
|
||||
if (count($getAnnouncement) > 0) {
|
||||
$data = $getAnnouncement[0];
|
||||
} else {
|
||||
$data = (object) array(
|
||||
'Id' => 0,
|
||||
'StoreId' => "",
|
||||
'Announcement' => "",
|
||||
'IsActive' => 0,
|
||||
'DateCreated' => ""
|
||||
);
|
||||
}
|
||||
|
||||
// var_dump($thumbnails);
|
||||
return view('teamstore-sublayouts.index')
|
||||
->with('store_array', $store_array)
|
||||
->with('product_array', $product_array)
|
||||
->with('thumbnails', $thumbnails);
|
||||
->with('store_array', $store_array)
|
||||
->with('product_array', $product_array)
|
||||
->with('announcement', $data)
|
||||
->with('thumbnails', $thumbnails);
|
||||
}
|
||||
|
||||
public function storelist(Request $request)
|
||||
@@ -99,86 +119,84 @@ class TeamStoreController extends Controller {
|
||||
|
||||
// foreach($teamstore as $t){
|
||||
// $sad = explode('/', $t);
|
||||
|
||||
|
||||
// if(count($sad) == 4){
|
||||
// $arr_teamstore[] = explode('?', $sad['3'])['0'];
|
||||
|
||||
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
// var_dump(array_unique($arr_teamstore));
|
||||
|
||||
$m = new TeamStoreModel;
|
||||
$q = $request->input('q');
|
||||
$sort = $request->input('s');
|
||||
|
||||
if(isset($q) && isset($sort)){
|
||||
|
||||
if($sort == "latest"){
|
||||
|
||||
if (isset($q) && isset($sort)) {
|
||||
|
||||
if ($sort == "latest") {
|
||||
$field = "Id";
|
||||
$sort_value = "DESC";
|
||||
}elseif($sort == "al-desc"){
|
||||
$field = "StoreName";
|
||||
$sort_value = "DESC";
|
||||
}elseif($sort == "oldest"){
|
||||
} elseif ($sort == "al-desc") {
|
||||
$field = "StoreName";
|
||||
$sort_value = "DESC";
|
||||
} elseif ($sort == "oldest") {
|
||||
$field = "Id";
|
||||
$sort_value = "ASC";
|
||||
}else{
|
||||
$sort_value = "ASC";
|
||||
} else {
|
||||
$field = "StoreName";
|
||||
$sort_value = "ASC";
|
||||
}
|
||||
|
||||
if($q != ""){
|
||||
// keyword and sort
|
||||
$stores_array = $m->selectTeamstoreSearch($field, $sort_value, $q);
|
||||
}else{
|
||||
// sort only
|
||||
$stores_array = $m->selectTeamstoreFilter($field, $sort_value);
|
||||
}
|
||||
}
|
||||
|
||||
}else{
|
||||
if ($q != "") {
|
||||
// keyword and sort
|
||||
$stores_array = $m->selectTeamstoreSearch($field, $sort_value, $q);
|
||||
} else {
|
||||
// sort only
|
||||
$stores_array = $m->selectTeamstoreFilter($field, $sort_value);
|
||||
}
|
||||
} else {
|
||||
$field = "StoreName";
|
||||
$sort_value = "ASC";
|
||||
$sort = "al-asc";
|
||||
$stores_array = $m->selectTeamstoreFilter($field, $sort_value);
|
||||
}
|
||||
|
||||
|
||||
return view('teamstore-sublayouts.stores')
|
||||
->with('stores_array', $stores_array)
|
||||
->with('keyword', $q)
|
||||
->with('filter', $sort);
|
||||
->with('stores_array', $stores_array)
|
||||
->with('keyword', $q)
|
||||
->with('filter', $sort);
|
||||
}
|
||||
|
||||
public function checkTeamStorePassword(Request $request)
|
||||
{
|
||||
$m = new TeamStoreModel;
|
||||
$post = $request->all();
|
||||
$store_array = $m->selectTeamStore('Password', $post['password']);
|
||||
$m = new TeamStoreModel;
|
||||
$post = $request->all();
|
||||
|
||||
if($store_array){
|
||||
$store_array = $m->checkStorePassword($post['store_id'], $post['password']);
|
||||
|
||||
if ($store_array) {
|
||||
$request->session()->put('teamstore_data_array', $store_array);
|
||||
return redirect('teamstore/'. $store_array[0]->StoreUrl);
|
||||
|
||||
}else{
|
||||
return redirect()->back()->with('errors', 'Invalid Password.');
|
||||
return redirect('teamstore/' . $store_array[0]->StoreUrl);
|
||||
} else {
|
||||
return redirect()->back()->with('errors', 'Invalid Password.');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private $teams_array;
|
||||
|
||||
public function productDetails($teamStoreURL, $productURL)
|
||||
{
|
||||
{
|
||||
$m = new TeamStoreModel;
|
||||
$teams_array = array();
|
||||
$store_array = $m->selectTeamStore('StoreUrl', $teamStoreURL);
|
||||
$product_array = $m->selectTeamStoreProducts('ProductURL', $productURL);
|
||||
|
||||
|
||||
$thumbnails_array = $m->getThumbnails($product_array[0]->Id);
|
||||
$teams_array = $m->getTeams($product_array[0]->Id);
|
||||
// $sizes_array = $m->getSizes();
|
||||
|
||||
if(empty($thumbnails_array)){
|
||||
|
||||
if (empty($thumbnails_array)) {
|
||||
|
||||
$data = (object) array(
|
||||
'Image' => 'product-image-placeholder.png',
|
||||
@@ -188,49 +206,48 @@ class TeamStoreController extends Controller {
|
||||
|
||||
$thumbnails_array[] = $data;
|
||||
}
|
||||
|
||||
|
||||
$x = explode(",", $product_array[0]->AvailableSizes );
|
||||
foreach($x as $s){
|
||||
|
||||
$x = explode(",", $product_array[0]->AvailableSizes);
|
||||
foreach ($x as $s) {
|
||||
$h[] = $m->getSizesByBracket($s);
|
||||
}
|
||||
|
||||
foreach($h as $d){
|
||||
foreach($d as $g){
|
||||
foreach ($h as $d) {
|
||||
foreach ($d as $g) {
|
||||
$sizes_array[] = $g;
|
||||
}
|
||||
}
|
||||
|
||||
if($product_array[0]->ProductAvailableQty != null){
|
||||
if ($product_array[0]->ProductAvailableQty != null) {
|
||||
$soldQty = $m->getSoldQty($product_array[0]->Id);
|
||||
$availableQty = $product_array[0]->ProductAvailableQty - $soldQty[0]->SoldQty;
|
||||
}else{
|
||||
} else {
|
||||
// echo 'no qty';
|
||||
$availableQty = null;
|
||||
}
|
||||
// $product_array[0]->ProductAvailableQty
|
||||
|
||||
|
||||
return view('teamstore-sublayouts.product-details')
|
||||
->with('store_array', $store_array)
|
||||
->with('product_array', $product_array)
|
||||
->with('thumbnails_array', $thumbnails_array)
|
||||
->with('teams_array', $teams_array)
|
||||
->with('sizes_array', $sizes_array)
|
||||
->with('available_qty', $availableQty);
|
||||
|
||||
->with('store_array', $store_array)
|
||||
->with('product_array', $product_array)
|
||||
->with('thumbnails_array', $thumbnails_array)
|
||||
->with('teams_array', $teams_array)
|
||||
->with('sizes_array', $sizes_array)
|
||||
->with('available_qty', $availableQty);
|
||||
}
|
||||
|
||||
|
||||
public function login(Request $request)
|
||||
{
|
||||
{
|
||||
return view('teamstore-sublayouts.login');
|
||||
}
|
||||
|
||||
public function clearSession(Request $request)
|
||||
{
|
||||
{
|
||||
$request->session()->forget('teamstore_data_array');
|
||||
return redirect("{{ url('/') }}");
|
||||
}
|
||||
|
||||
|
||||
public function addNewRow(Request $request)
|
||||
{
|
||||
$post = $request->all();
|
||||
@@ -239,47 +256,45 @@ class TeamStoreController extends Controller {
|
||||
$item = $TeamStoreModel->selectTeamStoreProductByIdHash($post['p_id']);
|
||||
$x = explode(",", $item[0]->AvailableSizes);
|
||||
|
||||
foreach($x as $s){
|
||||
foreach ($x as $s) {
|
||||
$h[] = $TeamStoreModel->getSizesByBracket($s);
|
||||
}
|
||||
|
||||
foreach($h as $d){
|
||||
foreach($d as $g){
|
||||
foreach ($h as $d) {
|
||||
foreach ($d as $g) {
|
||||
$sizes_array[] = $g;
|
||||
}
|
||||
}
|
||||
|
||||
if($item[0]->ProductAvailableQty != null){
|
||||
$soldQty = $m->getSoldQty($product_array[0]->Id);
|
||||
if ($item[0]->ProductAvailableQty != null) {
|
||||
$soldQty = $TeamStoreModel->getSoldQty($item[0]->Id);
|
||||
$availableQty = $item[0]->ProductAvailableQty - $soldQty[0]->SoldQty;
|
||||
}else{
|
||||
} else {
|
||||
// echo 'no qty';
|
||||
$availableQty = null;
|
||||
}
|
||||
|
||||
$handle_form = view('teamstore-sublayouts.forms.' . $item[0]->ProductForm )
|
||||
->with('sizes_array', $sizes_array)
|
||||
->with('availableQty', $availableQty)
|
||||
->render();
|
||||
$handle_form = view('teamstore-sublayouts.forms.' . $item[0]->ProductForm)
|
||||
->with('sizes_array', $sizes_array)
|
||||
->with('availableQty', $availableQty)
|
||||
->render();
|
||||
|
||||
return $handle_form;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function addToCart(Request $request)
|
||||
{
|
||||
$post = $request->all();
|
||||
$m = new TeamStoreModel;
|
||||
$hash_product_id = $post['p_id'];
|
||||
|
||||
if($request->session()->has('cartkey')){
|
||||
|
||||
if ($request->session()->has('cartkey')) {
|
||||
$cartKey = $request->session()->get('cartkey');
|
||||
}else{
|
||||
} else {
|
||||
$request->session()->put('cartkey', sha1(time() . str_random(6)));
|
||||
$cartKey = $cartKey = $request->session()->get('cartkey');
|
||||
}
|
||||
|
||||
|
||||
$product_array = $m->selectTeamStoreProductByIdHash($hash_product_id);
|
||||
$product_id = $product_array[0]->Id;
|
||||
$TeamStoreId = $product_array[0]->TeamStoreId;
|
||||
@@ -287,27 +302,28 @@ class TeamStoreController extends Controller {
|
||||
$ProductURL = $product_array[0]->ProductURL;
|
||||
$product_form = $product_array[0]->ProductForm;
|
||||
$design_code = $product_array[0]->DesignCode;
|
||||
$product_name = $product_array[0]->ProductName;
|
||||
$product_name = $product_array[0]->ProductName;
|
||||
$shipping_cost_id = $product_array[0]->ShippingCostId;
|
||||
|
||||
$teamstore_array = $m->selectTeamStore('Id', $TeamStoreId);
|
||||
|
||||
|
||||
$store_url = $teamstore_array[0]->StoreUrl;
|
||||
$store_id = $teamstore_array[0]->Id;
|
||||
|
||||
if($product_form == "jersey-and-shorts-form"){
|
||||
if ($product_form == "jersey-and-shorts-form") {
|
||||
$order_names = $post['order_names'];
|
||||
$order_number = $post['order_number'];
|
||||
$order_jersey_size = $post['order_jersey_size'];
|
||||
$order_shorts_size = $post['order_shorts_size'];
|
||||
|
||||
foreach($order_names as $key => $val){
|
||||
|
||||
if($order_jersey_size[$key] == "none" || $order_shorts_size[$key] == "none"){
|
||||
foreach ($order_names as $key => $val) {
|
||||
|
||||
if ($order_jersey_size[$key] == "none" || $order_shorts_size[$key] == "none") {
|
||||
$final_price = $ProductPrice / 2;
|
||||
}else{
|
||||
} else {
|
||||
$final_price = $ProductPrice;
|
||||
}
|
||||
|
||||
|
||||
$items[] = array(
|
||||
'ProductId' => $product_id,
|
||||
'StoreURL' => $store_url,
|
||||
@@ -322,10 +338,11 @@ class TeamStoreController extends Controller {
|
||||
'JerseySize' => $order_jersey_size[$key],
|
||||
'ShortsSize' => $order_shorts_size[$key],
|
||||
'Price' => $final_price,
|
||||
'Quantity' => 1
|
||||
'Quantity' => 1,
|
||||
'ShippingCostId' => $shipping_cost_id
|
||||
);
|
||||
}
|
||||
}elseif($product_form == "tshirt-form"){
|
||||
} elseif ($product_form == "tshirt-form") {
|
||||
|
||||
$items[] = array(
|
||||
'ProductId' => $product_id,
|
||||
@@ -338,9 +355,10 @@ class TeamStoreController extends Controller {
|
||||
'ProductName' => $product_name,
|
||||
'Size' => $post['uniformSize'],
|
||||
'Price' => $ProductPrice,
|
||||
'Quantity' => $post['quantity']
|
||||
'Quantity' => $post['quantity'],
|
||||
'ShippingCostId' => $shipping_cost_id
|
||||
);
|
||||
}elseif($product_form == "quantity-form"){
|
||||
} elseif ($product_form == "quantity-form") {
|
||||
|
||||
$items[] = array(
|
||||
'ProductId' => $product_id,
|
||||
@@ -352,16 +370,15 @@ class TeamStoreController extends Controller {
|
||||
'ProductURL' => $ProductURL,
|
||||
'ProductName' => $product_name,
|
||||
'Price' => $ProductPrice,
|
||||
'Quantity' => $post['quantity']
|
||||
'Quantity' => $post['quantity'],
|
||||
'ShippingCostId' => $shipping_cost_id
|
||||
);
|
||||
|
||||
|
||||
}elseif($product_form == "name-number-form"){
|
||||
} elseif ($product_form == "name-number-form") {
|
||||
|
||||
$order_names = $post['order_names'];
|
||||
$order_number = $post['order_number'];
|
||||
|
||||
foreach($order_names as $key => $val){
|
||||
foreach ($order_names as $key => $val) {
|
||||
$items[] = array(
|
||||
'ProductId' => $product_id,
|
||||
'StoreURL' => $store_url,
|
||||
@@ -374,16 +391,17 @@ class TeamStoreController extends Controller {
|
||||
'Name' => $order_names[$key],
|
||||
'Number' => $order_number[$key],
|
||||
'Price' => $ProductPrice,
|
||||
'Quantity' => 1
|
||||
'Quantity' => 1,
|
||||
'ShippingCostId' => $shipping_cost_id
|
||||
);
|
||||
}
|
||||
}elseif($product_form == "name-number-size-form"){
|
||||
} elseif ($product_form == "name-number-size-form") {
|
||||
|
||||
$order_names = $post['order_names'];
|
||||
$order_number = $post['order_number'];
|
||||
$order_size = $post['order_size'];
|
||||
|
||||
foreach($order_names as $key => $val){
|
||||
foreach ($order_names as $key => $val) {
|
||||
$items[] = array(
|
||||
'ProductId' => $product_id,
|
||||
'StoreURL' => $store_url,
|
||||
@@ -397,15 +415,15 @@ class TeamStoreController extends Controller {
|
||||
'Size' => $order_size[$key],
|
||||
'Number' => $order_number[$key],
|
||||
'Price' => $ProductPrice,
|
||||
'Quantity' => 1
|
||||
'Quantity' => 1,
|
||||
'ShippingCostId' => $shipping_cost_id
|
||||
);
|
||||
}
|
||||
|
||||
}elseif($product_form == "number-form"){
|
||||
} elseif ($product_form == "number-form") {
|
||||
|
||||
$order_number = $post['order_number'];
|
||||
|
||||
foreach($order_number as $key => $val){
|
||||
foreach ($order_number as $key => $val) {
|
||||
$items[] = array(
|
||||
'ProductId' => $product_id,
|
||||
'StoreURL' => $store_url,
|
||||
@@ -417,16 +435,17 @@ class TeamStoreController extends Controller {
|
||||
'ProductName' => $product_name,
|
||||
'Number' => $order_number[$key],
|
||||
'Price' => $ProductPrice,
|
||||
'Quantity' => 1
|
||||
'Quantity' => 1,
|
||||
'ShippingCostId' => $shipping_cost_id
|
||||
);
|
||||
}
|
||||
}elseif($product_form == "name-name2-size-form"){
|
||||
} elseif ($product_form == "name-name2-size-form") {
|
||||
|
||||
$order_names = $post['order_names'];
|
||||
$order_names2 = $post['order_names2'];
|
||||
$order_size = $post['order_size'];
|
||||
|
||||
foreach($order_names as $key => $val){
|
||||
foreach ($order_names as $key => $val) {
|
||||
$items[] = array(
|
||||
'ProductId' => $product_id,
|
||||
'StoreURL' => $store_url,
|
||||
@@ -440,15 +459,16 @@ class TeamStoreController extends Controller {
|
||||
'Name2' => $order_names2[$key],
|
||||
'Size' => $order_size[$key],
|
||||
'Price' => $ProductPrice,
|
||||
'Quantity' => 1
|
||||
'Quantity' => 1,
|
||||
'ShippingCostId' => $shipping_cost_id
|
||||
);
|
||||
}
|
||||
}elseif($product_form == "name-size-form"){
|
||||
} elseif ($product_form == "name-size-form") {
|
||||
|
||||
$order_names = $post['order_names'];
|
||||
$order_size = $post['order_size'];
|
||||
|
||||
foreach($order_names as $key => $val){
|
||||
foreach ($order_names as $key => $val) {
|
||||
$items[] = array(
|
||||
'ProductId' => $product_id,
|
||||
'StoreURL' => $store_url,
|
||||
@@ -461,14 +481,78 @@ class TeamStoreController extends Controller {
|
||||
'Name' => $order_names[$key],
|
||||
'Size' => $order_size[$key],
|
||||
'Price' => $ProductPrice,
|
||||
'Quantity' => 1
|
||||
'Quantity' => 1,
|
||||
'ShippingCostId' => $shipping_cost_id
|
||||
);
|
||||
}
|
||||
} elseif ($product_form == "jersey-and-shorts-quantity-form") {
|
||||
|
||||
$order_shorts_size = $post['order_shorts_size'];
|
||||
$order_jersey_size = $post['order_jersey_size'];
|
||||
$quantity = $post['quantity'];
|
||||
|
||||
foreach ($order_jersey_size as $key => $val) {
|
||||
if ($order_jersey_size[$key] != "none" || $order_shorts_size[$key] != "none") {
|
||||
|
||||
if ($order_jersey_size[$key] == "none" || $order_shorts_size[$key] == "none") {
|
||||
$final_price = $ProductPrice / 2;
|
||||
} else {
|
||||
$final_price = $ProductPrice;
|
||||
}
|
||||
|
||||
$items[] = array(
|
||||
'ProductId' => $product_id,
|
||||
'StoreURL' => $store_url,
|
||||
'StoreId' => $store_id,
|
||||
'FormUsed' => $product_form,
|
||||
'CartKey' => $cartKey,
|
||||
'DesignCode' => $design_code,
|
||||
'ProductURL' => $ProductURL,
|
||||
'ProductName' => $product_name,
|
||||
'JerseySize' => $order_jersey_size[$key],
|
||||
'ShortsSize' => $order_shorts_size[$key],
|
||||
'Price' => $final_price,
|
||||
'Quantity' => $quantity[$key],
|
||||
'ShippingCostId' => $shipping_cost_id
|
||||
);
|
||||
}
|
||||
}
|
||||
} elseif ($product_form == "number-jersey-shorts-form") {
|
||||
|
||||
$order_number = $post['order_number'];
|
||||
$order_jersey_size = $post['order_jersey_size'];
|
||||
$order_shorts_size = $post['order_shorts_size'];
|
||||
|
||||
foreach ($order_number as $key => $val) {
|
||||
|
||||
if ($order_jersey_size[$key] == "none" || $order_shorts_size[$key] == "none") {
|
||||
$final_price = $ProductPrice / 2;
|
||||
} else {
|
||||
$final_price = $ProductPrice;
|
||||
}
|
||||
|
||||
$items[] = array(
|
||||
'ProductId' => $product_id,
|
||||
'StoreURL' => $store_url,
|
||||
'StoreId' => $store_id,
|
||||
'FormUsed' => $product_form,
|
||||
'CartKey' => $cartKey,
|
||||
'DesignCode' => $design_code,
|
||||
'ProductURL' => $ProductURL,
|
||||
'ProductName' => $product_name,
|
||||
'Number' => $order_number[$key],
|
||||
'JerseySize' => $order_jersey_size[$key],
|
||||
'ShortsSize' => $order_shorts_size[$key],
|
||||
'Price' => $final_price,
|
||||
'Quantity' => 1,
|
||||
'ShippingCostId' => $shipping_cost_id
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$i = $m->insertToCart($items);
|
||||
|
||||
if($i['i']){
|
||||
|
||||
if ($i['i']) {
|
||||
return response()->json(array(
|
||||
'success' => true
|
||||
));
|
||||
@@ -478,107 +562,152 @@ class TeamStoreController extends Controller {
|
||||
return response()->json(array(
|
||||
'success' => false,
|
||||
'message' => "Something went wrong. Please refresh the page."
|
||||
));
|
||||
));
|
||||
}
|
||||
|
||||
public function cart(Request $request){
|
||||
|
||||
public function cart(Request $request)
|
||||
{
|
||||
|
||||
$m = new TeamStoreModel;
|
||||
$UserModel = new UserModel;
|
||||
$array_address_book = null;
|
||||
|
||||
if(!Auth::guest()){
|
||||
$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');
|
||||
$items = $m->myCart($cartKey);
|
||||
$getSubtotal = $m->getSubtotal($cartKey);
|
||||
$items_group = $m->myCartGroup($cartKey);
|
||||
//var_dump($items_group);
|
||||
$grouped_item = $m->selectTeamStoreGroupByCartKey($cartKey);
|
||||
if($grouped_item){
|
||||
if ($grouped_item) {
|
||||
$defId = $grouped_item[0]->StoreId;
|
||||
}else{
|
||||
} else {
|
||||
$defId = 0;
|
||||
}
|
||||
|
||||
$item_thumbs = $m->selectDisplayCartThumb();
|
||||
$store_array = $m->selectTeamStore('Id', $defId);
|
||||
|
||||
|
||||
if($items){
|
||||
$item_thumbs = $m->selectDisplayCartThumb();
|
||||
$store_array = $m->selectTeamStore('Id', $defId);
|
||||
|
||||
|
||||
if ($items) {
|
||||
$voucherIds = array();
|
||||
foreach($items as $item){
|
||||
if($item->VoucherId != null){
|
||||
foreach ($items as $item) {
|
||||
if ($item->VoucherId != null) {
|
||||
$voucherIds[] = $item->VoucherId;
|
||||
}
|
||||
}
|
||||
$vouchers = $m->selectVoucherWhereIn($voucherIds);
|
||||
$vouchers = $m->selectVoucherWhereIn($voucherIds);
|
||||
}
|
||||
|
||||
|
||||
$totalValue = 0;
|
||||
if(!empty($vouchers)){
|
||||
foreach($vouchers as $voucher){
|
||||
if (!empty($vouchers)) {
|
||||
foreach ($vouchers as $voucher) {
|
||||
$totalValue = $totalValue + $voucher->VoucherValue;
|
||||
if($voucher->VoucherType == "Percentage"){
|
||||
if ($voucher->VoucherType == "Percentage") {
|
||||
$voucherData = array(
|
||||
'totalValue'=> $totalValue,
|
||||
'type'=>'Percentage'
|
||||
'totalValue' => $totalValue,
|
||||
'type' => 'Percentage'
|
||||
);
|
||||
}else{
|
||||
} else {
|
||||
$voucherData = array(
|
||||
'totalValue'=> $totalValue,
|
||||
'type'=>'Flat'
|
||||
'totalValue' => $totalValue,
|
||||
'type' => 'Flat'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if($voucherData['type'] == "Percentage"){
|
||||
|
||||
if ($voucherData['type'] == "Percentage") {
|
||||
$getPercentageValue = $voucherData['totalValue'] / 100;
|
||||
$getDiscountValue = ($getSubtotal[0]->Subtotal * $getPercentageValue);
|
||||
$finalSubTotal = $getSubtotal[0]->Subtotal - $getDiscountValue;
|
||||
}else{
|
||||
} else {
|
||||
//Flat voucher computation here..
|
||||
}
|
||||
}else{
|
||||
} else {
|
||||
$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('sublayouts.cart')
|
||||
->with('item_group', $items_group)
|
||||
->with('row', $items)
|
||||
->with('img_thumb', $item_thumbs)
|
||||
->with('getSubtotal', $finalSubTotal)
|
||||
->with('store_array', $store_array);
|
||||
->with('item_group', $items_group)
|
||||
->with('row', $items)
|
||||
->with('img_thumb', $item_thumbs)
|
||||
->with('getSubtotal', $finalSubTotal)
|
||||
->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)
|
||||
{
|
||||
$cartKey = $request->session()->get('cartkey');
|
||||
|
||||
if($cartKey == ""){
|
||||
if ($cartKey == "") {
|
||||
return false;
|
||||
}
|
||||
|
||||
$TeamStoreModel = new TeamStoreModel;
|
||||
$post = $request->all();
|
||||
|
||||
|
||||
$grouped_item = $TeamStoreModel->selectTeamStoreGroupByCartKey($cartKey);
|
||||
$store_id = $grouped_item[0]->StoreId;
|
||||
$vocher = $post['voucher'];
|
||||
$store_array = $TeamStoreModel->selectTeamStore('Id', $grouped_item[0]->StoreId);
|
||||
$getSubtotal = $TeamStoreModel->getSubtotal($cartKey);
|
||||
|
||||
|
||||
$data = array(
|
||||
'store_id' => $store_id,
|
||||
'voucher' => $vocher
|
||||
);
|
||||
|
||||
$getVoucher = $TeamStoreModel->selectVoucher($data);
|
||||
|
||||
if($getVoucher){
|
||||
$now = Carbon::now();
|
||||
if ($getVoucher) {
|
||||
$items = $TeamStoreModel->myCart($cartKey);
|
||||
|
||||
// check if if voucher is already in used;
|
||||
foreach($items as $item){
|
||||
if($getVoucher[0]->Id == $item->VoucherId){
|
||||
foreach ($items as $item) {
|
||||
if ($getVoucher[0]->Id == $item->VoucherId) {
|
||||
return response()->json(array(
|
||||
'success' => false,
|
||||
'message' => 'This voucher is already in used.'
|
||||
));
|
||||
}
|
||||
|
||||
if ($getVoucher[0]->Status == 'Inactive') {
|
||||
return response()->json(array(
|
||||
'success' => false,
|
||||
'message' => 'This voucher is inactive.'
|
||||
));
|
||||
}
|
||||
|
||||
if ($getVoucher[0]->VoucherExpiryDate < $now) {
|
||||
return response()->json(array(
|
||||
'success' => false,
|
||||
'message' => 'This voucher has expired.'
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
// insert vocuher to cart_tmp
|
||||
@@ -598,73 +727,69 @@ class TeamStoreController extends Controller {
|
||||
|
||||
//get all voucher used.
|
||||
$updated_items = $TeamStoreModel->myCart($cartKey);
|
||||
foreach($updated_items as $item){
|
||||
if($item->VoucherId != null){
|
||||
foreach ($updated_items as $item) {
|
||||
if ($item->VoucherId != null) {
|
||||
$voucherIds[] = $item->VoucherId;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$vouchers = $TeamStoreModel->selectVoucherWhereIn($voucherIds);
|
||||
|
||||
|
||||
$vouchers = $TeamStoreModel->selectVoucherWhereIn($voucherIds);
|
||||
|
||||
$totalValue = 0;
|
||||
if(!empty($vouchers)){
|
||||
foreach($vouchers as $voucher){
|
||||
if (!empty($vouchers)) {
|
||||
foreach ($vouchers as $voucher) {
|
||||
$totalValue = $totalValue + $voucher->VoucherValue;
|
||||
if($voucher->VoucherType == "Percentage"){
|
||||
if ($voucher->VoucherType == "Percentage") {
|
||||
$voucherData = array(
|
||||
'totalValue'=> $totalValue,
|
||||
'type'=>'Percentage'
|
||||
'totalValue' => $totalValue,
|
||||
'type' => 'Percentage'
|
||||
);
|
||||
}else{
|
||||
} else {
|
||||
$voucherData = array(
|
||||
'totalValue'=> $totalValue,
|
||||
'type'=>'Flat'
|
||||
'totalValue' => $totalValue,
|
||||
'type' => 'Flat'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if($voucherData['type'] == "Percentage"){
|
||||
|
||||
if ($voucherData['type'] == "Percentage") {
|
||||
$getPercentageValue = $voucherData['totalValue'] / 100;
|
||||
$getDiscountValue = ($getSubtotal[0]->Subtotal * $getPercentageValue);
|
||||
$finalSubTotal = $getSubtotal[0]->Subtotal - $getDiscountValue;
|
||||
}else{
|
||||
} else {
|
||||
//Flat voucher computation here..
|
||||
}
|
||||
}else{
|
||||
} else {
|
||||
$finalSubTotal = $getSubtotal[0]->Subtotal;
|
||||
}
|
||||
|
||||
if($getVoucher[0]->VoucherType == "Percentage"){
|
||||
if ($getVoucher[0]->VoucherType == "Percentage") {
|
||||
$offData = $getVoucher[0]->VoucherValue . '%';
|
||||
}else{
|
||||
} else {
|
||||
$offData = $getVoucher[0]->VoucherValue . ' ' . $store_array[0]->StoreCurrency;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$message = '<div class="btn-group">
|
||||
<button type="button" class="btn btn-default btn-xs">'.$getVoucher[0]->VoucherCode. ' ' .$offData. ' OFF</button>
|
||||
<button type="button" class="btn btn-default btn-xs">' . $getVoucher[0]->VoucherCode . ' ' . $offData . ' OFF</button>
|
||||
<button type="button" class="btn btn-default dropdown-toggle btn-xs" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<span class="caret"></span>
|
||||
<span class="sr-only"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="'.$removeItemURL.'"><i class="fa fa-times"></i> Remove</a></li>
|
||||
<li><a href="' . $removeItemURL . '"><i class="fa fa-times"></i> Remove</a></li>
|
||||
</ul>
|
||||
</div>';
|
||||
|
||||
|
||||
// return success
|
||||
return response()->json(array(
|
||||
'success' => true,
|
||||
'message' => $message,
|
||||
'subtotal' =>$finalSubTotal
|
||||
'subtotal' => $finalSubTotal
|
||||
));
|
||||
} else {
|
||||
|
||||
|
||||
|
||||
}else{
|
||||
|
||||
return response()->json(array(
|
||||
'success' => false,
|
||||
'message' => "Sorry, the voucher code is invalid. Please try again."
|
||||
@@ -676,10 +801,10 @@ class TeamStoreController extends Controller {
|
||||
{
|
||||
$m = new TeamStoreModel;
|
||||
$cartKey = $request->session()->get('cartkey');
|
||||
|
||||
|
||||
$usermodel = new UserModel;
|
||||
$userId = Auth::user()->id;
|
||||
|
||||
|
||||
$array_address_book = $usermodel->selectAddresBook('UserId', $userId);
|
||||
|
||||
// var_dump($array_address_book);
|
||||
@@ -689,10 +814,9 @@ class TeamStoreController extends Controller {
|
||||
$getSubtotal = $m->getSubtotal($cartKey);
|
||||
|
||||
return view('sublayouts.checkout')
|
||||
->with('row', $items)
|
||||
->with('getSubtotal', $getSubtotal)
|
||||
->with('array_address_book', $array_address_book);
|
||||
|
||||
->with('row', $items)
|
||||
->with('getSubtotal', $getSubtotal)
|
||||
->with('array_address_book', $array_address_book);
|
||||
}
|
||||
|
||||
public function mail()
|
||||
@@ -708,13 +832,10 @@ class TeamStoreController extends Controller {
|
||||
|
||||
|
||||
// dd('Mail Send Successfully');
|
||||
Mail::raw('Text to e-mail', function($message)
|
||||
{
|
||||
Mail::raw('Text to e-mail', function ($message) {
|
||||
$message->from('us@example.com', 'Laravel');
|
||||
|
||||
$message->to('frank.begornia@yahoo.com')->subject('sample email');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -30,6 +30,8 @@ class Kernel extends HttpKernel {
|
||||
'teamstoresession' => 'App\Http\Middleware\CheckTeamStorePassword',
|
||||
'admin' => '\App\Http\Middleware\IsAdmin',
|
||||
'normaluser' => '\App\Http\Middleware\IsUser',
|
||||
'isAuthorized' => '\App\Http\Middleware\isAuthorized',
|
||||
'cors' => 'App\Http\Middleware\Cors',
|
||||
];
|
||||
|
||||
}
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
<?php namespace App\Http\Middleware;
|
||||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Closure;
|
||||
use Illuminate\Contracts\Auth\Guard;
|
||||
use Illuminate\Support\Facades\URL;
|
||||
|
||||
class Authenticate {
|
||||
class Authenticate
|
||||
{
|
||||
|
||||
/**
|
||||
* The Guard implementation.
|
||||
@@ -32,19 +36,19 @@ class Authenticate {
|
||||
*/
|
||||
public function handle($request, Closure $next)
|
||||
{
|
||||
if ($this->auth->guest())
|
||||
{
|
||||
if ($request->ajax())
|
||||
{
|
||||
if ($this->auth->guest()) {
|
||||
if ($request->ajax()) {
|
||||
return response('Unauthorized.', 401);
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$prev = URL::previous();
|
||||
if (str_contains($prev, ['cart'])) {
|
||||
return redirect()->guest('auth/register?redirectUrl='. $prev);
|
||||
}
|
||||
|
||||
return redirect()->guest('auth/login');
|
||||
}
|
||||
}
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
28
app/Http/Middleware/Cors.php
Normal file
28
app/Http/Middleware/Cors.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Closure;
|
||||
|
||||
class Cors
|
||||
{
|
||||
|
||||
/**
|
||||
* Handle an incoming request.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure $next
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle($request, Closure $next)
|
||||
{
|
||||
header("Access-Control-Allow-Origin: *");
|
||||
header('Access-Control-Allow-Methods: GET, POST, OPTIONS');
|
||||
header("Access-Control-Allow-Headers: *");
|
||||
// header('Access-Control-Allow-Credentials: true');
|
||||
|
||||
if (!$request->isMethod('options')) {
|
||||
return $next($request);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -13,9 +13,23 @@ class VerifyCsrfToken extends BaseVerifier {
|
||||
* @return mixed
|
||||
*/
|
||||
|
||||
protected $except = [
|
||||
"api/*",
|
||||
];
|
||||
|
||||
// public function handle($request, Closure $next)
|
||||
// {
|
||||
// return parent::handle($request, $next);
|
||||
// }
|
||||
|
||||
public function handle($request, Closure $next)
|
||||
{
|
||||
return parent::handle($request, $next);
|
||||
foreach($this->except as $route) {
|
||||
if ($request->is($route)) {
|
||||
return $next($request);
|
||||
}
|
||||
}
|
||||
return parent::handle($request, $next);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
23
app/Http/Middleware/isAuthorized.php
Normal file
23
app/Http/Middleware/isAuthorized.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php namespace App\Http\Middleware;
|
||||
|
||||
use Closure;
|
||||
|
||||
class isAuthorized {
|
||||
|
||||
/**
|
||||
* Handle an incoming request.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure $next
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle($request, Closure $next)
|
||||
{
|
||||
if(isset(getallheaders()['token']) && getallheaders()['token']=="1HHIaIsT4pvO2S39vMzlVfGWi3AhAz6F5xGBNKil") {
|
||||
return $next($request);
|
||||
}else{
|
||||
return response()->json(['status' => false,'error' => "Invalid request"], 503);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Route;
|
||||
// use Spatie\LaravelAnalytics\LaravelAnalytics;
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application Routes
|
||||
@@ -35,7 +37,7 @@ Route::post('/custom/register', 'CustomAuthController@postRegister');
|
||||
|
||||
// Route::get('/cart', 'teamstore\TeamStoreController@cart');
|
||||
|
||||
Route::get('cart', ['as'=>'cart','uses'=>'teamstore\TeamStoreController@cart']);
|
||||
Route::get('cart', ['as' => 'cart', 'uses' => 'teamstore\TeamStoreController@cart']);
|
||||
Route::get('/checkout', 'teamstore\TeamStoreController@checkout');
|
||||
Route::get('/mail', 'teamstore\TeamStoreController@mail');
|
||||
|
||||
@@ -73,14 +75,14 @@ Route::get('/teamstore', 'teamstore\TeamStoreController@storelist'); // old
|
||||
|
||||
|
||||
// Route::group(['middleware' => 'teamstoresession'], function () {
|
||||
|
||||
Route::get('/teamstore/{storename}', 'teamstore\TeamStoreController@index');
|
||||
Route::get('/teamstore/{storename}/product/{producurl}', 'teamstore\TeamStoreController@productDetails');
|
||||
// Route::post('/teamstore/q/addnewrow', 'teamstore\TeamStoreController@addNewRow');
|
||||
Route::post('/teamstore/q/add-to-cart', 'teamstore\TeamStoreController@addToCart');
|
||||
Route::get('/teamstore/q/clearsession', 'teamstore\TeamStoreController@clearSession');
|
||||
Route::post('/teamstore/q/add-voucher', 'teamstore\TeamStoreController@addVoucher');
|
||||
Route::post('/teamstore/q/add-new-row', 'teamstore\TeamStoreController@addNewRow');
|
||||
|
||||
Route::get('/teamstore/{storename}', 'teamstore\TeamStoreController@index');
|
||||
Route::get('/teamstore/{storename}/product/{producurl}', 'teamstore\TeamStoreController@productDetails');
|
||||
// Route::post('/teamstore/q/addnewrow', 'teamstore\TeamStoreController@addNewRow');
|
||||
Route::post('/teamstore/q/add-to-cart', 'teamstore\TeamStoreController@addToCart');
|
||||
Route::get('/teamstore/q/clearsession', 'teamstore\TeamStoreController@clearSession');
|
||||
Route::post('/teamstore/q/add-voucher', 'teamstore\TeamStoreController@addVoucher');
|
||||
Route::post('/teamstore/q/add-new-row', 'teamstore\TeamStoreController@addNewRow');
|
||||
// });
|
||||
|
||||
Route::post('/teamstore/checkpassword', 'teamstore\TeamStoreController@checkTeamStorePassword');
|
||||
@@ -129,17 +131,21 @@ Route::group(['middleware' => 'normaluser'], function () {
|
||||
Route::post('user/my-designs/addstoreitem', 'user\UserController@saveNewStoreItem');
|
||||
|
||||
Route::get('user/my-designs/buy-design/{designCode}', 'user\UserController@buyDesign');
|
||||
|
||||
|
||||
Route::get('user/store-orders', 'user\UserController@storeOrders');
|
||||
|
||||
Route::get('user/announcement', 'user\UserController@announcementIndex');
|
||||
Route::post('user/announcement/updateSave', 'user\UserController@announcementUpdateSave');
|
||||
Route::post('user/announcement/status/update', 'user\UserController@announcementUpdateStatus');
|
||||
});
|
||||
|
||||
Route::group(['middleware' => 'auth'], function() {
|
||||
Route::group(['middleware' => 'auth'], function () {
|
||||
// PAYPAL ROUTES
|
||||
Route::get('payPremium', ['as'=>'payPremium','uses'=>'paypal\PaypalController@payPremium']);
|
||||
Route::get('getCheckout', ['as'=>'getCheckout','uses'=>'paypal\PaypalController@getCheckout']);
|
||||
Route::get('getDone', ['as'=>'getDone','uses'=>'paypal\PaypalController@getDone']);
|
||||
Route::get('getCancel', ['as'=>'getCancel','uses'=>'paypal\PaypalController@getCancel']);
|
||||
Route::get('getDoneTest', ['as'=>'getDoneTest','uses'=>'paypal\PaypalController@getDoneTest']);
|
||||
Route::get('payPremium', ['as' => 'payPremium', 'uses' => 'paypal\PaypalController@payPremium']);
|
||||
Route::get('getCheckout', ['as' => 'getCheckout', 'uses' => 'paypal\PaypalController@getCheckout']);
|
||||
Route::get('getDone', ['as' => 'getDone', 'uses' => 'paypal\PaypalController@getDone']);
|
||||
Route::get('getCancel', ['as' => 'getCancel', 'uses' => 'paypal\PaypalController@getCancel']);
|
||||
Route::get('getDoneTest', ['as' => 'getDoneTest', 'uses' => 'paypal\PaypalController@getDoneTest']);
|
||||
// END PAYPAL ROUTES
|
||||
});
|
||||
|
||||
@@ -147,14 +153,14 @@ Route::group(['middleware' => 'admin'], function () {
|
||||
Route::get('admin', function () {
|
||||
return view('sub_pages.index');
|
||||
});
|
||||
|
||||
|
||||
Route::get('admin/sports/', 'SportsController@displayAllSports');
|
||||
Route::get('admin/sports/add', 'SportsController@displayAddSportPage');
|
||||
Route::post('admin/sports/save', 'SportsController@saveNewSports');
|
||||
Route::get('admin/sports/edit/{sportsname}', 'SportsController@sportsDetails');
|
||||
Route::post('admin/sports/update', 'SportsController@updateSports');
|
||||
Route::get('admin/sports/sportsname', 'SportsController@selectSportsName');
|
||||
|
||||
|
||||
Route::get('admin/templates/', 'TemplatesController@displayTemplates');
|
||||
Route::post('admin/templates/id/{id}', 'TemplatesController@getTemplates');
|
||||
Route::get('admin/templates/add', 'TemplatesController@displayAddTemplatePage');
|
||||
@@ -164,17 +170,24 @@ Route::group(['middleware' => 'admin'], function () {
|
||||
Route::get('admin/templates/edit/{tempcode}', 'TemplatesController@displayEditTemplatePage');
|
||||
Route::post('admin/templates/update', 'TemplatesController@updateTemplate');
|
||||
Route::get('admin/templates/edit/{tempcode}/p-add', 'PrintPatternController@displayAddPrintTemplatePage');
|
||||
|
||||
|
||||
Route::get('admin/pattern/get', 'PatternsController@getPatterns');
|
||||
Route::post('admin/pattern/get/withvalue', 'PatternsController@getPatternsWithPostValue');
|
||||
|
||||
|
||||
Route::post('admin/print-template/save', 'PrintPatternController@savePrintPattern');
|
||||
|
||||
});
|
||||
|
||||
|
||||
Route::get('cliparts/index', 'cliparts\ClipartsController@index');
|
||||
|
||||
Route::get('analytics', function (){
|
||||
$analyticsData = LaravelAnalytics::getVisitorsAndPageViews(7);
|
||||
});
|
||||
// Route::get('analytics', function (){
|
||||
// $analyticsData = LaravelAnalytics::getVisitorsAndPageViews(7);
|
||||
// });
|
||||
|
||||
Route::group(array('middleware' => ['isAuthorized', 'cors'], 'prefix' => 'api'), function () {
|
||||
Route::post('login', 'ApiController@login');
|
||||
Route::post('insert', 'ApiController@insert');
|
||||
Route::get('tracking', 'ApiController@getTrackingStatus');
|
||||
Route::get('order-status', 'ApiController@getOrderStatus');
|
||||
Route::get('steps', 'ApiController@getSteps');
|
||||
});
|
||||
|
||||
152
app/Models/ApiModel.php
Normal file
152
app/Models/ApiModel.php
Normal file
@@ -0,0 +1,152 @@
|
||||
<?php
|
||||
|
||||
namespace App\models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class ApiModel extends Model
|
||||
{
|
||||
|
||||
function loginProductionUser($username, $password)
|
||||
{
|
||||
$i = DB::table('production_user')
|
||||
->where('Username', $username)
|
||||
->where('Password', $password)
|
||||
->get();
|
||||
return $i;
|
||||
}
|
||||
|
||||
function selectTrackingStepLabel($id)
|
||||
{
|
||||
$i = DB::table('tracking_steps')->select('StepLabel')
|
||||
->where('Id', $id)
|
||||
->get();
|
||||
return $i;
|
||||
}
|
||||
|
||||
function getTrackingStatus($invoice)
|
||||
{
|
||||
$i = DB::table('tracking')->select('tracking.Id', 'tracking.InvoiceNumber', 'tracking_steps.StepLabel', 'production_user.Name', DB::raw('DATE_FORMAT(tracking.created_at, "%b %d, %Y") AS date'), DB::raw('DATE_FORMAT(tracking.created_at, "%H:%i") AS time'))
|
||||
->leftjoin('tracking_steps', 'tracking_steps.Id', '=', 'tracking.StepId')
|
||||
->leftjoin('production_user', 'production_user.Id', '=', 'tracking.ScannedBy')
|
||||
->where('tracking.InvoiceNumber', '=', $invoice)
|
||||
->orderBy('tracking.created_at', 'DESC')
|
||||
->get();
|
||||
return $i;
|
||||
}
|
||||
|
||||
function selectPaymentDetails($invoice)
|
||||
{
|
||||
$i = DB::table('payment_details')
|
||||
->where('InvoiceNumber', $invoice)
|
||||
->get();
|
||||
return $i;
|
||||
}
|
||||
|
||||
function selectOrderList($cartKey)
|
||||
{
|
||||
$i = DB::table('orders')->select('ProductId', 'ProductName', 'CartKey')
|
||||
->where('CartKey', $cartKey)
|
||||
->groupBy('ProductId')
|
||||
->get();
|
||||
return $i;
|
||||
}
|
||||
|
||||
function selectProductImages($productId)
|
||||
{
|
||||
$i = DB::table('teamstore_product_thumbnails')
|
||||
->where('ProductId', $productId)
|
||||
->get();
|
||||
return $i;
|
||||
}
|
||||
|
||||
function selectOrderListTableFields($cartKey, $productId, $stepid)
|
||||
{
|
||||
// $i = DB::table('orders')->select('Id', 'Name', 'Name2', 'Number', 'Size', 'JerseySize', 'ShortsSize', 'Quantity')
|
||||
// ->where('CartKey', $cartKey)
|
||||
// ->where('ProductId', $productId)
|
||||
// ->get();
|
||||
// return $i;
|
||||
|
||||
$i = DB::table('orders')->select('orders.Id', 'orders.Name', 'orders.Name2', 'orders.Number', 'orders.Size', 'orders.JerseySize',
|
||||
'orders.ShortsSize', 'orders.Quantity', DB::raw('(SELECT COUNT(*) FROM tracking WHERE StepId = '.$stepid.' AND OrdersId = orders.Id) AS Status'))
|
||||
// ->leftjoin('tracking', 'orders.Id', '=', 'tracking.OrdersId')
|
||||
// ->where('tracking.StepId', $stepid)
|
||||
->where('orders.CartKey', $cartKey)
|
||||
->where('orders.ProductId', $productId)
|
||||
->groupBy('orders.Id')
|
||||
->get();
|
||||
return $i;
|
||||
}
|
||||
|
||||
function insertTracking($data)
|
||||
{
|
||||
$i = DB::table('tracking')->insert($data);
|
||||
return $i;
|
||||
}
|
||||
|
||||
// function selectNextStep($invoice)
|
||||
// {
|
||||
// $i = DB::table('tracking')->select('StepId')
|
||||
// ->where('InvoiceNumber', $invoice)
|
||||
// ->orderBy('StepId', 'DESC')->first();
|
||||
// return $i;
|
||||
// }
|
||||
|
||||
function checkIfTrackExist($stepid, $productid, $orderid, $invoice, $qcounter)
|
||||
{
|
||||
$i = DB::table('tracking')
|
||||
->where('StepId', $stepid)
|
||||
->where('ProductId', $productid)
|
||||
->where('OrdersId', $orderid)
|
||||
->where('InvoiceNumber', $invoice)
|
||||
->where('QuantityCounter', $qcounter)
|
||||
->get();
|
||||
return $i;
|
||||
}
|
||||
|
||||
function getCurrentTrackingSteps($invoice){
|
||||
$i = DB::table('tracking')->select('StepId')
|
||||
->where('InvoiceNumber', $invoice)
|
||||
->groupBy('StepId')
|
||||
->orderBy('StepId', 'ASC')
|
||||
->get();
|
||||
return $i;
|
||||
}
|
||||
|
||||
function getStatus($invoice, $productid, $orderid, $qcounter){
|
||||
$i = DB::table('tracking')->select('production_user.Name', DB::raw('DATE_FORMAT(tracking.created_at, "%b %d, %Y - %H:%i") AS datetime'))
|
||||
->leftjoin('production_user', 'production_user.Id', '=', 'tracking.ScannedBy')
|
||||
->where('tracking.InvoiceNumber', $invoice)
|
||||
->where('tracking.ProductId', $productid)
|
||||
->where('tracking.OrdersId', $orderid)
|
||||
->where('tracking.QuantityCounter', $qcounter)
|
||||
->get();
|
||||
return $i;
|
||||
}
|
||||
|
||||
function selectSteps(){
|
||||
$i = DB::table('tracking_steps')
|
||||
->orderBy('Order', 'ASC')
|
||||
->get();
|
||||
return $i;
|
||||
}
|
||||
|
||||
function selectCurrentStep($invoice){
|
||||
$i = DB::table('tracking')->select('tracking_steps.*')
|
||||
->leftjoin('tracking_steps', 'tracking_steps.Id', '=', 'tracking.StepId')
|
||||
->where('tracking.InvoiceNumber', $invoice)
|
||||
->orderBy('tracking.StepId', 'DESC')
|
||||
->first();
|
||||
return $i;
|
||||
}
|
||||
|
||||
|
||||
function selectCurrentStepOrder($stepOrder){
|
||||
$i = DB::table('tracking_steps')
|
||||
->where('Order', $stepOrder)
|
||||
->get();
|
||||
return $i;
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php namespace App\Models;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use DB;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class MainModel extends Model {
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use DB;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
|
||||
class SizesModel extends Model {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php namespace App\Models\paypal;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use DB;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class PayPalModel extends Model {
|
||||
|
||||
@@ -38,6 +38,14 @@ class PayPalModel extends Model {
|
||||
// var_dump($i);
|
||||
return $i;
|
||||
}
|
||||
|
||||
|
||||
function checkCartKey($ck){
|
||||
|
||||
$i = DB::table('payment_details')
|
||||
->where('CartKey', $ck)
|
||||
// ->take(1)
|
||||
->get();
|
||||
// var_dump($i);
|
||||
return $i;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php namespace App\Models\teamstore;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use DB;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class TeamStoreModel extends Model {
|
||||
|
||||
@@ -39,6 +39,15 @@ class TeamStoreModel extends Model {
|
||||
return $i;
|
||||
}
|
||||
|
||||
function checkStorePassword($storeid, $password)
|
||||
{
|
||||
$i = DB::table('teamstores')
|
||||
->where('Id', $storeid)
|
||||
->where('Password', $password)
|
||||
->get();
|
||||
return $i;
|
||||
}
|
||||
|
||||
function selectTeamStoreGroupByCartKey($cartKey)
|
||||
{
|
||||
$i = DB::table('cart_tmp')
|
||||
@@ -100,7 +109,7 @@ class TeamStoreModel extends Model {
|
||||
|
||||
function getSizesByBracket($bracket){
|
||||
|
||||
$i = DB::table('sizes')->select('Size')
|
||||
$i = DB::table('sizes')->select('Size', 'SizeDisplay')
|
||||
->where('Bracket', $bracket)
|
||||
->where('IsActive', 'TRUE')
|
||||
->orderby('Ordering', 'ASC')
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php namespace App\Models\user;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use DB;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class UserModel extends Model {
|
||||
|
||||
@@ -160,8 +160,20 @@ class UserModel extends Model {
|
||||
return $i;
|
||||
}
|
||||
|
||||
// function selectStoreOrders($store_id){
|
||||
// $i = DB::table('orders')->select('orders.*', 'orders.Id as Order_Id', 'payment_details.InvoiceNumber', 'payment_details.Currency', 'payment_details.Payer_Email', 'payment_details.Payer_Firstname', 'payment_details.Payer_Lastname', 'shipping_addresses.*', 'tracking_steps.StepLabel')
|
||||
// ->leftjoin('payment_details', 'payment_details.CartKey','=','orders.CartKey')
|
||||
// ->leftjoin('shipping_addresses', 'shipping_addresses.PaymentDetail_Id','=','payment_details.Id')
|
||||
// ->leftjoin('tracking', 'tracking.InvoiceNumber','=','payment_details.InvoiceNumber')
|
||||
// ->leftjoin('tracking_steps', 'tracking_steps.Id','=','tracking.StepId')
|
||||
// ->where('orders.StoreId', $store_id)
|
||||
// ->orderby('orders.DateCreated', 'DESC')
|
||||
// ->get();
|
||||
// return $i;
|
||||
// }
|
||||
|
||||
function selectStoreOrders($store_id){
|
||||
$i = DB::table('orders')->select('orders.*', 'orders.Id as Order_Id', 'payment_details.InvoiceNumber', 'payment_details.Currency', 'payment_details.Payer_Email', 'payment_details.Payer_Firstname', 'payment_details.Payer_Lastname', 'shipping_addresses.*')
|
||||
$i = DB::table('orders')->select('orders.*', 'orders.Id as Order_Id', 'payment_details.InvoiceNumber', 'payment_details.Currency', 'payment_details.Payer_Email', 'payment_details.Payer_Firstname', 'payment_details.Payer_Lastname', 'shipping_addresses.*', DB::raw('(SELECT tracking_steps.StepLabel FROM tracking LEFT JOIN tracking_steps ON tracking_steps.Id = tracking.StepId WHERE tracking.InvoiceNumber = payment_details.InvoiceNumber ORDER BY tracking.Id DESC LIMIT 1 ) AS StepLabel'))
|
||||
->leftjoin('payment_details', 'payment_details.CartKey','=','orders.CartKey')
|
||||
->leftjoin('shipping_addresses', 'shipping_addresses.PaymentDetail_Id','=','payment_details.Id')
|
||||
->where('orders.StoreId', $store_id)
|
||||
@@ -170,6 +182,7 @@ class UserModel extends Model {
|
||||
return $i;
|
||||
}
|
||||
|
||||
|
||||
function itemGroup($cartKey){
|
||||
$pdo = DB::connection()->getPdo();
|
||||
$query = $pdo->prepare("SELECT *, COUNT(Id) AS qty, Price * SUM(Quantity) AS total_price FROM orders WHERE CartKey = :ck GROUP BY ProductId");
|
||||
@@ -310,5 +323,62 @@ class UserModel extends Model {
|
||||
return $i;
|
||||
}
|
||||
|
||||
function selectShippingCost(){
|
||||
$i = DB::table('shipping_cost')
|
||||
->get();
|
||||
return $i;
|
||||
}
|
||||
|
||||
|
||||
function countStoreOrder($storeId){
|
||||
$pdo = DB::connection()->getPdo();
|
||||
$query = $pdo->prepare("SELECT SUM(o.Quantity) AS count_order FROM orders AS o WHERE o.StoreId = :storeId");
|
||||
$query->execute([':storeId'=>$storeId]);
|
||||
$row = $query->fetchAll(\PDO::FETCH_OBJ);
|
||||
return $row;
|
||||
}
|
||||
|
||||
function storeIncome($storeId){
|
||||
$pdo = DB::connection()->getPdo();
|
||||
$query = $pdo->prepare("SELECT SUM(o.Price) AS store_income FROM orders AS o WHERE o.StoreId = :storeId");
|
||||
$query->execute([':storeId'=>$storeId]);
|
||||
$row = $query->fetchAll(\PDO::FETCH_OBJ);
|
||||
return $row;
|
||||
}
|
||||
|
||||
function countStoreProduct($storeId){
|
||||
$pdo = DB::connection()->getPdo();
|
||||
$query = $pdo->prepare("SELECT COUNT(Id) AS store_product_count FROM teamstore_products AS tp WHERE tp.TeamStoreId = :storeId");
|
||||
$query->execute([':storeId'=>$storeId]);
|
||||
$row = $query->fetchAll(\PDO::FETCH_OBJ);
|
||||
return $row;
|
||||
}
|
||||
|
||||
function countStorePublishedProduct($storeId){
|
||||
$pdo = DB::connection()->getPdo();
|
||||
$query = $pdo->prepare("SELECT COUNT(Id) AS store_published_product FROM teamstore_products AS tp WHERE tp.TeamStoreId = :storeId AND PrivacyStatus = 'public'");
|
||||
$query->execute([':storeId'=>$storeId]);
|
||||
$row = $query->fetchAll(\PDO::FETCH_OBJ);
|
||||
return $row;
|
||||
}
|
||||
|
||||
function getAnnouncement($storeId){
|
||||
$i = DB::table('store_announcement')
|
||||
->where('StoreId', $storeId)
|
||||
->get();
|
||||
return $i;
|
||||
}
|
||||
|
||||
function saveNewAnnouncement($data){
|
||||
$i = DB::table('store_announcement')
|
||||
->insert($data);
|
||||
return $i;
|
||||
}
|
||||
|
||||
function updateAnnouncement($id, $data){
|
||||
$i = DB::table('store_announcement')
|
||||
->where('Id', $id)
|
||||
->update($data);
|
||||
return $i;
|
||||
}
|
||||
}
|
||||
@@ -14,6 +14,11 @@ class AppServiceProvider extends ServiceProvider {
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
// Force HTTPS URLs when behind a proxy (Traefik)
|
||||
if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') {
|
||||
\URL::forceSchema('https');
|
||||
}
|
||||
|
||||
//
|
||||
\Blade::extend(function($value) {
|
||||
return preg_replace('/\@define(.+)/', '<?php ${1}; ?>', $value);
|
||||
|
||||
45
composer.lock
generated
45
composer.lock
generated
@@ -909,33 +909,28 @@
|
||||
},
|
||||
{
|
||||
"name": "league/flysystem-sftp",
|
||||
"version": "1.0.14",
|
||||
"version": "1.0.22",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/thephpleague/flysystem-sftp.git",
|
||||
"reference": "f28d742a3e81258417293fd9a179a350154ab8f7"
|
||||
"reference": "cab59dd2277e02fe46f5f23195672a02ed49774d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/thephpleague/flysystem-sftp/zipball/f28d742a3e81258417293fd9a179a350154ab8f7",
|
||||
"reference": "f28d742a3e81258417293fd9a179a350154ab8f7",
|
||||
"url": "https://api.github.com/repos/thephpleague/flysystem-sftp/zipball/cab59dd2277e02fe46f5f23195672a02ed49774d",
|
||||
"reference": "cab59dd2277e02fe46f5f23195672a02ed49774d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"league/flysystem": "~1.0",
|
||||
"php": ">=5.4.0",
|
||||
"php": ">=5.6.0",
|
||||
"phpseclib/phpseclib": "~2.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"mockery/mockery": "0.9.*",
|
||||
"phpunit/phpunit": "~4.0"
|
||||
"phpunit/phpunit": "^5.7.25"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.0-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"League\\Flysystem\\Sftp\\": "src/"
|
||||
@@ -952,7 +947,7 @@
|
||||
}
|
||||
],
|
||||
"description": "Flysystem adapter for SFTP",
|
||||
"time": "2017-07-11T12:29:45+00:00"
|
||||
"time": "2019-10-16T20:05:49+00:00"
|
||||
},
|
||||
{
|
||||
"name": "monolog/monolog",
|
||||
@@ -2786,22 +2781,22 @@
|
||||
},
|
||||
{
|
||||
"name": "phpdocumentor/reflection-docblock",
|
||||
"version": "3.2.2",
|
||||
"version": "3.3.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
|
||||
"reference": "4aada1f93c72c35e22fb1383b47fee43b8f1d157"
|
||||
"reference": "bf329f6c1aadea3299f08ee804682b7c45b326a2"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/4aada1f93c72c35e22fb1383b47fee43b8f1d157",
|
||||
"reference": "4aada1f93c72c35e22fb1383b47fee43b8f1d157",
|
||||
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/bf329f6c1aadea3299f08ee804682b7c45b326a2",
|
||||
"reference": "bf329f6c1aadea3299f08ee804682b7c45b326a2",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.5",
|
||||
"phpdocumentor/reflection-common": "^1.0@dev",
|
||||
"phpdocumentor/type-resolver": "^0.3.0",
|
||||
"php": "^5.6 || ^7.0",
|
||||
"phpdocumentor/reflection-common": "^1.0.0",
|
||||
"phpdocumentor/type-resolver": "^0.4.0",
|
||||
"webmozart/assert": "^1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
@@ -2827,20 +2822,20 @@
|
||||
}
|
||||
],
|
||||
"description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
|
||||
"time": "2017-08-08T06:39:58+00:00"
|
||||
"time": "2017-11-10T14:09:06+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpdocumentor/type-resolver",
|
||||
"version": "0.3.0",
|
||||
"version": "0.4.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpDocumentor/TypeResolver.git",
|
||||
"reference": "fb3933512008d8162b3cdf9e18dba9309b7c3773"
|
||||
"reference": "9c977708995954784726e25d0cd1dddf4e65b0f7"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/fb3933512008d8162b3cdf9e18dba9309b7c3773",
|
||||
"reference": "fb3933512008d8162b3cdf9e18dba9309b7c3773",
|
||||
"url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7",
|
||||
"reference": "9c977708995954784726e25d0cd1dddf4e65b0f7",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -2874,7 +2869,7 @@
|
||||
"email": "me@mikevanriel.com"
|
||||
}
|
||||
],
|
||||
"time": "2017-06-03T08:32:36+00:00"
|
||||
"time": "2017-07-14T14:27:02+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpspec/php-diff",
|
||||
|
||||
@@ -26,7 +26,7 @@ return [
|
||||
|
|
||||
*/
|
||||
|
||||
'url' => 'http://localhost',
|
||||
'url' => env('APP_URL', 'http://localhost'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
||||
@@ -50,7 +50,7 @@ return [
|
||||
|
||||
'localdir' => [
|
||||
'driver' => 'local',
|
||||
'root' => 'C:\\wamp\\www\\images\\',
|
||||
'root' => '/var/www/html/uploads/images',
|
||||
],
|
||||
|
||||
's3' => [
|
||||
@@ -77,14 +77,14 @@ return [
|
||||
'port' => 22,
|
||||
'username' => 'root',
|
||||
'password' => '',
|
||||
'privateKey' => 'C:\\Users\\user\\Documents\\#keys\\instance2\\root.ppk',
|
||||
'privateKey' => '/var/www/html/_key/instance2/root.ppk',
|
||||
'root' => '/var/www/html/images',
|
||||
'timeout' => 10
|
||||
],
|
||||
|
||||
'uploads' => [
|
||||
'driver' => 'local',
|
||||
'root' => 'C:\\wamp\\www\\uploads\\images\\',
|
||||
'root' => '/var/www/html/uploads/images',
|
||||
],
|
||||
],
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ return [
|
||||
|
|
||||
*/
|
||||
|
||||
'from' => ['address' => 'noreply@crewsportswear.com', 'name' => 'no-reply'],
|
||||
'from' => ['address' => 'no-reply@crewsportswear.com', 'name' => 'no-reply'],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
||||
@@ -35,15 +35,14 @@ return [
|
||||
],
|
||||
|
||||
// sandbox
|
||||
'paypal' => [
|
||||
'client_id' => 'AQuz-HKzQiL7FygkG8skSekaWf-RP6Rgj4f1XeX1Ghp86bUFj7tQXVT1xbpluu5_WCGRbQpOVGtlJKVB',
|
||||
'paypal_sandbox' => [
|
||||
'client_id' => 'AQuz-HKzQiL7FygkG8skSekaWf-RP6Rgj4f1XeX1Ghp86bUFj7tQXVT1xbpluu5_WCGRbQpOVGtlJKVB',
|
||||
'secret' => 'EJAMKxQsl-mFkL_4J_90cvTamYfcsgswqgIxz9wQPiRAwJ6sy_wNsttMlmrXIpxI96JpYzdMXkLCHAPz'
|
||||
],
|
||||
],
|
||||
|
||||
// live
|
||||
// 'paypal' => [
|
||||
// 'client_id' => 'AUqBUFW5lfyYmrlBtFZA3RNw45sttM3ltbvS_d4qCVBMrkcMG9rEeivGvtNFSy8XTiEp50YyQ6khKxbq',
|
||||
// 'secret' => 'ELlnuiupoFKwGUSc2g5j-sD1EmsvKpdhth1gFV7njpfvyNtKsK8WwIKUMOS0ehJcRatV865eMhfgsnd_'
|
||||
// ],
|
||||
|
||||
'paypal_live' => [
|
||||
'client_id' => 'AUqBUFW5lfyYmrlBtFZA3RNw45sttM3ltbvS_d4qCVBMrkcMG9rEeivGvtNFSy8XTiEp50YyQ6khKxbq',
|
||||
'secret' => 'ELlnuiupoFKwGUSc2g5j-sD1EmsvKpdhth1gFV7njpfvyNtKsK8WwIKUMOS0ehJcRatV865eMhfgsnd_'
|
||||
],
|
||||
];
|
||||
|
||||
@@ -16,7 +16,9 @@ return [
|
||||
// 'company_name' => env('COMPANY_NAME','Acme Inc'),
|
||||
// 'company_email' => env('COMPANY_email','contact@acme.inc'),
|
||||
|
||||
'prod_private_server_ip' => env('http://localhost', 'http://localhost'),
|
||||
'uploads' => env('http://localhost/uploads/images/', 'http://localhost/uploads/images/'), // local
|
||||
'prod_private_server_ip' => env('https://crewsportswear.app', 'https://crewsportswear.app'),
|
||||
'images_url' => env('https://crewsportswear.app:5955', 'https://crewsportswear.app:5955'),
|
||||
'uploads' => env('https://crewsportswear.com/uploads/images/', 'https://crewsportswear.com/uploads/images/'), // local
|
||||
|
||||
|
||||
];
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateApiModelsTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('api_models', function(Blueprint $table)
|
||||
{
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('api_models');
|
||||
}
|
||||
|
||||
}
|
||||
114
docker-compose.dev.yml
Normal file
114
docker-compose.dev.yml
Normal file
@@ -0,0 +1,114 @@
|
||||
services:
|
||||
app:
|
||||
image: crewsportswear:dev
|
||||
container_name: crewsportswear_app_dev
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- APP_ENV=${APP_ENV:-development}
|
||||
- APP_DEBUG=${APP_DEBUG:-true}
|
||||
- APP_URL=${APP_URL:-https://dev.crewsportswear.app}
|
||||
- DB_CONNECTION=mysql
|
||||
- DB_HOST=${DB_HOST}
|
||||
- DB_PORT=${DB_PORT:-3306}
|
||||
- DB_DATABASE=${DB_DATABASE}
|
||||
- DB_USERNAME=${DB_USERNAME}
|
||||
- DB_PASSWORD=${DB_PASSWORD}
|
||||
- PROD_PRIVATE=${PROD_PRIVATE}
|
||||
- IMAGES_URL=${IMAGES_URL}
|
||||
- UPLOAD_URL=${UPLOAD_URL}
|
||||
- FORCE_HTTPS=true
|
||||
- MAIL_DRIVER=${MAIL_DRIVER}
|
||||
- MAIL_HOST=${MAIL_HOST}
|
||||
- MAIL_PORT=${MAIL_PORT}
|
||||
- MAIL_USERNAME=${MAIL_USERNAME}
|
||||
- MAIL_PASSWORD=${MAIL_PASSWORD}
|
||||
- MAIL_ENCRYPTION=${MAIL_ENCRYPTION}
|
||||
- CAPTCHA_SITE_KEY=${CAPTCHA_SITE_KEY}
|
||||
- CAPTCHA_SECRET_KEY=${CAPTCHA_SECRET_KEY}
|
||||
- ANALYTICS_SITE_ID=${ANALYTICS_SITE_ID}
|
||||
- ANALYTICS_CLIENT_ID=${ANALYTICS_CLIENT_ID}
|
||||
- ANALYTICS_SERVICE_EMAIL=${ANALYTICS_SERVICE_EMAIL}
|
||||
volumes:
|
||||
- ./storage:/var/www/html/storage
|
||||
- ./public/uploads:/var/www/html/public/uploads
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
# Development environment (dev.crewsportswear.app)
|
||||
- "traefik.http.routers.crewsportswear-dev.rule=Host(`dev.crewsportswear.app`)"
|
||||
- "traefik.http.routers.crewsportswear-dev.entrypoints=websecure"
|
||||
- "traefik.http.routers.crewsportswear-dev.tls=true"
|
||||
- "traefik.http.routers.crewsportswear-dev.tls.certresolver=le"
|
||||
- "traefik.http.services.crewsportswear-dev.loadbalancer.server.port=80"
|
||||
# HTTP to HTTPS redirect
|
||||
- "traefik.http.routers.crewsportswear-dev-http.rule=Host(`dev.crewsportswear.app`)"
|
||||
- "traefik.http.routers.crewsportswear-dev-http.entrypoints=web"
|
||||
- "traefik.http.routers.crewsportswear-dev-http.middlewares=https-redirect"
|
||||
- "traefik.http.middlewares.https-redirect.redirectscheme.scheme=https"
|
||||
networks:
|
||||
- traefik-public
|
||||
- crew-app-net
|
||||
- default
|
||||
|
||||
networks:
|
||||
traefik-public:
|
||||
external: true
|
||||
crew-app-net:
|
||||
external: true
|
||||
default:
|
||||
driver: bridge
|
||||
image: crewsportswear:dev
|
||||
container_name: crewsportswear_app_dev
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- APP_ENV=${APP_ENV:-development}
|
||||
- APP_DEBUG=${APP_DEBUG:-true}
|
||||
- APP_URL=${APP_URL:-https://dev.crewsportswear.com}
|
||||
- DB_CONNECTION=mysql
|
||||
- DB_HOST=${DB_HOST}
|
||||
- DB_PORT=${DB_PORT:-3306}
|
||||
- DB_DATABASE=${DB_DATABASE}
|
||||
- DB_USERNAME=${DB_USERNAME}
|
||||
- DB_PASSWORD=${DB_PASSWORD}
|
||||
- PROD_PRIVATE=${PROD_PRIVATE}
|
||||
- IMAGES_URL=${IMAGES_URL}
|
||||
- UPLOAD_URL=${UPLOAD_URL}
|
||||
- FORCE_HTTPS=true
|
||||
- MAIL_DRIVER=${MAIL_DRIVER}
|
||||
- MAIL_HOST=${MAIL_HOST}
|
||||
- MAIL_PORT=${MAIL_PORT}
|
||||
- MAIL_USERNAME=${MAIL_USERNAME}
|
||||
- MAIL_PASSWORD=${MAIL_PASSWORD}
|
||||
- MAIL_ENCRYPTION=${MAIL_ENCRYPTION}
|
||||
- CAPTCHA_SITE_KEY=${CAPTCHA_SITE_KEY}
|
||||
- CAPTCHA_SECRET_KEY=${CAPTCHA_SECRET_KEY}
|
||||
- ANALYTICS_SITE_ID=${ANALYTICS_SITE_ID}
|
||||
- ANALYTICS_CLIENT_ID=${ANALYTICS_CLIENT_ID}
|
||||
- ANALYTICS_SERVICE_EMAIL=${ANALYTICS_SERVICE_EMAIL}
|
||||
volumes:
|
||||
- ./storage:/var/www/html/storage
|
||||
- ./public/uploads:/var/www/html/public/uploads
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
# Development environment (dev.crewsportswear.com)
|
||||
- "traefik.http.routers.crewsportswear-dev.rule=Host(`dev.crewsportswear.com`)"
|
||||
- "traefik.http.routers.crewsportswear-dev.entrypoints=websecure"
|
||||
- "traefik.http.routers.crewsportswear-dev.tls=true"
|
||||
- "traefik.http.routers.crewsportswear-dev.tls.certresolver=letsencrypt"
|
||||
- "traefik.http.services.crewsportswear-dev.loadbalancer.server.port=80"
|
||||
# HTTP to HTTPS redirect
|
||||
- "traefik.http.routers.crewsportswear-dev-http.rule=Host(`dev.crewsportswear.com`)"
|
||||
- "traefik.http.routers.crewsportswear-dev-http.entrypoints=web"
|
||||
- "traefik.http.routers.crewsportswear-dev-http.middlewares=https-redirect"
|
||||
- "traefik.http.middlewares.https-redirect.redirectscheme.scheme=https"
|
||||
networks:
|
||||
- traefik-public
|
||||
- crew-app-net
|
||||
- default
|
||||
|
||||
networks:
|
||||
traefik-public:
|
||||
external: true
|
||||
crew-app-net:
|
||||
external: true
|
||||
default:
|
||||
driver: bridge
|
||||
81
docker-compose.local.yml
Normal file
81
docker-compose.local.yml
Normal file
@@ -0,0 +1,81 @@
|
||||
services:
|
||||
db:
|
||||
image: mariadb:10.6
|
||||
platform: linux/arm64
|
||||
container_name: crewsportswear_db_local
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
MYSQL_DATABASE: crewsportswear
|
||||
MYSQL_ROOT_PASSWORD: root
|
||||
MYSQL_USER: crewsportswear
|
||||
MYSQL_PASSWORD: secret
|
||||
ports:
|
||||
- "3307:3306"
|
||||
volumes:
|
||||
- db_data:/var/lib/mysql
|
||||
networks:
|
||||
- crewsportswear-local
|
||||
|
||||
app:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
container_name: crewsportswear_app_local
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "8082:80"
|
||||
environment:
|
||||
- APP_ENV=local
|
||||
- APP_DEBUG=true
|
||||
- APP_URL=http://localhost:8082
|
||||
- DB_CONNECTION=mysql
|
||||
- DB_HOST=db
|
||||
- DB_PORT=3306
|
||||
- DB_DATABASE=crewsportswear
|
||||
- DB_USERNAME=crewsportswear
|
||||
- DB_PASSWORD=secret
|
||||
- PROD_PRIVATE=http://localhost:8082
|
||||
- IMAGES_URL=http://localhost:8082
|
||||
- UPLOAD_URL=http://localhost:8082/uploads/
|
||||
- MAIL_DRIVER=log
|
||||
- MAIL_HOST=localhost
|
||||
- MAIL_PORT=1025
|
||||
- MAIL_USERNAME=null
|
||||
- MAIL_PASSWORD=null
|
||||
- MAIL_ENCRYPTION=null
|
||||
- CAPTCHA_SITE_KEY=test_key
|
||||
- CAPTCHA_SECRET_KEY=test_secret
|
||||
- ANALYTICS_SITE_ID=
|
||||
- ANALYTICS_CLIENT_ID=
|
||||
- ANALYTICS_SERVICE_EMAIL=
|
||||
volumes:
|
||||
- ./:/var/www/html
|
||||
- ./storage:/var/www/html/storage
|
||||
- ./public/uploads:/var/www/html/public/uploads
|
||||
depends_on:
|
||||
- db
|
||||
networks:
|
||||
- crewsportswear-local
|
||||
|
||||
phpmyadmin:
|
||||
image: arm64v8/phpmyadmin
|
||||
platform: linux/arm64
|
||||
container_name: crewsportswear_phpmyadmin
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "8083:80"
|
||||
environment:
|
||||
PMA_HOST: db
|
||||
PMA_PORT: 3306
|
||||
MYSQL_ROOT_PASSWORD: root
|
||||
depends_on:
|
||||
- db
|
||||
networks:
|
||||
- crewsportswear-local
|
||||
|
||||
networks:
|
||||
crewsportswear-local:
|
||||
driver: bridge
|
||||
|
||||
volumes:
|
||||
db_data:
|
||||
58
docker-compose.prod.yml
Normal file
58
docker-compose.prod.yml
Normal file
@@ -0,0 +1,58 @@
|
||||
services:
|
||||
app:
|
||||
image: crewsportswear:latest
|
||||
container_name: crewsportswear_app_prod
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- APP_ENV=${APP_ENV:-production}
|
||||
- APP_DEBUG=${APP_DEBUG:-false}
|
||||
- APP_URL=${APP_URL:-https://dev-crew.crewsportswear.app}
|
||||
- DB_CONNECTION=mysql
|
||||
- DB_HOST=${DB_HOST}
|
||||
- DB_PORT=${DB_PORT:-3306}
|
||||
- DB_DATABASE=${DB_DATABASE}
|
||||
- DB_USERNAME=${DB_USERNAME}
|
||||
- DB_PASSWORD=${DB_PASSWORD}
|
||||
- PROD_PRIVATE=${PROD_PRIVATE}
|
||||
- IMAGES_URL=${IMAGES_URL}
|
||||
- UPLOAD_URL=${UPLOAD_URL}
|
||||
- FORCE_HTTPS=true
|
||||
- MAIL_DRIVER=${MAIL_DRIVER}
|
||||
- MAIL_HOST=${MAIL_HOST}
|
||||
- MAIL_PORT=${MAIL_PORT}
|
||||
- MAIL_USERNAME=${MAIL_USERNAME}
|
||||
- MAIL_PASSWORD=${MAIL_PASSWORD}
|
||||
- MAIL_ENCRYPTION=${MAIL_ENCRYPTION}
|
||||
- CAPTCHA_SITE_KEY=${CAPTCHA_SITE_KEY}
|
||||
- CAPTCHA_SECRET_KEY=${CAPTCHA_SECRET_KEY}
|
||||
- ANALYTICS_SITE_ID=${ANALYTICS_SITE_ID}
|
||||
- ANALYTICS_CLIENT_ID=${ANALYTICS_CLIENT_ID}
|
||||
- ANALYTICS_SERVICE_EMAIL=${ANALYTICS_SERVICE_EMAIL}
|
||||
volumes:
|
||||
- ./storage:/var/www/html/storage
|
||||
- ./public/uploads:/var/www/html/public/uploads
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
# Production environment (dev-crew.crewsportswear.app) - Uses Let's Encrypt
|
||||
- "traefik.http.routers.crewsportswear-prod.rule=Host(`dev-crew.crewsportswear.app`)"
|
||||
- "traefik.http.routers.crewsportswear-prod.entrypoints=websecure"
|
||||
- "traefik.http.routers.crewsportswear-prod.tls=true"
|
||||
- "traefik.http.routers.crewsportswear-prod.tls.certresolver=le"
|
||||
- "traefik.http.services.crewsportswear-prod.loadbalancer.server.port=80"
|
||||
# HTTP to HTTPS redirect
|
||||
- "traefik.http.routers.crewsportswear-prod-http.rule=Host(`dev-crew.crewsportswear.app`)"
|
||||
- "traefik.http.routers.crewsportswear-prod-http.entrypoints=web"
|
||||
- "traefik.http.routers.crewsportswear-prod-http.middlewares=https-redirect"
|
||||
- "traefik.http.middlewares.https-redirect.redirectscheme.scheme=https"
|
||||
networks:
|
||||
- traefik-public
|
||||
- crew-app-net
|
||||
- default
|
||||
|
||||
networks:
|
||||
traefik-public:
|
||||
external: true
|
||||
crew-app-net:
|
||||
external: true
|
||||
default:
|
||||
driver: bridge
|
||||
17
docker-entrypoint.sh
Normal file
17
docker-entrypoint.sh
Normal file
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# Create storage directory structure if it doesn't exist
|
||||
mkdir -p storage/framework/views
|
||||
mkdir -p storage/framework/cache
|
||||
mkdir -p storage/framework/sessions
|
||||
mkdir -p storage/logs
|
||||
mkdir -p storage/app/public
|
||||
mkdir -p bootstrap/cache
|
||||
|
||||
# Set proper permissions
|
||||
chown -R www-data:www-data storage bootstrap/cache
|
||||
chmod -R 775 storage bootstrap/cache
|
||||
|
||||
# Execute the main command
|
||||
exec "$@"
|
||||
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"
|
||||
}
|
||||
]
|
||||
250613
public/api/usaCities.json
250613
public/api/usaCities.json
File diff suppressed because it is too large
Load Diff
23909
public/api/usaCities.old.json
Normal file
23909
public/api/usaCities.old.json
Normal file
File diff suppressed because it is too large
Load Diff
1311
public/assets/css/jquery-ui.css
vendored
Normal file
1311
public/assets/css/jquery-ui.css
vendored
Normal file
File diff suppressed because it is too large
Load Diff
18706
public/assets/js/jquery-ui.js
vendored
Normal file
18706
public/assets/js/jquery-ui.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,12 +1,13 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>CREW Sportswear</title>
|
||||
|
||||
<link href="{{ asset('public/css/app.css') }}" rel="stylesheet">
|
||||
<link href="{{ asset('/css/app.css') }}" rel="stylesheet">
|
||||
|
||||
<!-- Fonts -->
|
||||
<link href='//fonts.googleapis.com/css?family=Roboto:400,300' rel='stylesheet' type='text/css'>
|
||||
@@ -18,8 +19,8 @@
|
||||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
|
||||
|
||||
<link href="{{asset('public/assets/css/style.css')}}" rel="stylesheet">
|
||||
|
||||
<link href="{{asset('/assets/css/style.css')}}" rel="stylesheet">
|
||||
<!-- <link href="{{asset('public/assets/login/css/style.css')}}" rel="stylesheet">
|
||||
<link href="{{asset('public/assets/login/css/form-elements.css')}}" rel="stylesheet"> -->
|
||||
<script src='https://www.google.com/recaptcha/api.js'></script>
|
||||
@@ -27,12 +28,16 @@
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-136108155-1"></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
|
||||
function gtag() {
|
||||
dataLayer.push(arguments);
|
||||
}
|
||||
gtag('js', new Date());
|
||||
|
||||
gtag('config', 'UA-136108155-1');
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- <nav class="navbar navbar-default">
|
||||
<div class="container">
|
||||
@@ -70,14 +75,14 @@
|
||||
@include('layout.navbar')
|
||||
@yield('content')
|
||||
<!-- Footer -->
|
||||
|
||||
|
||||
<!-- Scripts -->
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.1/js/bootstrap.min.js"></script>
|
||||
<script src="https://ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/jquery.validate.min.js"></script>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$('.reveal-password').click(function(e){
|
||||
$(document).ready(function() {
|
||||
$('.reveal-password').click(function(e) {
|
||||
var $pwd = $(".pwd");
|
||||
if ($pwd.attr('type') === 'password') {
|
||||
$pwd.attr('type', 'text');
|
||||
@@ -88,7 +93,7 @@
|
||||
}
|
||||
});
|
||||
|
||||
if($('.data-errors').length > 0){
|
||||
if ($('.data-errors').length > 0) {
|
||||
$('#team-store-login').modal('show')
|
||||
return false;
|
||||
}
|
||||
@@ -109,7 +114,7 @@
|
||||
var placement = $(element).data('error');
|
||||
if (placement) {
|
||||
$(placement).append(error);
|
||||
}else {
|
||||
} else {
|
||||
error.insertAfter(element);
|
||||
}
|
||||
},
|
||||
@@ -118,12 +123,15 @@
|
||||
|
||||
$("#frm-register").validate({
|
||||
rules: {
|
||||
name: {
|
||||
required : true
|
||||
firstname: {
|
||||
required: true
|
||||
},
|
||||
username: {
|
||||
required : true
|
||||
lastname: {
|
||||
required: true
|
||||
},
|
||||
// username: {
|
||||
// required: true
|
||||
// },
|
||||
email: {
|
||||
required: true,
|
||||
email: true
|
||||
@@ -131,6 +139,24 @@
|
||||
password: {
|
||||
required: true
|
||||
//minlength: 6 // <-- removed underscore
|
||||
},
|
||||
mobilenumber: {
|
||||
required: true
|
||||
},
|
||||
address: {
|
||||
required: true
|
||||
},
|
||||
state: {
|
||||
required: true
|
||||
},
|
||||
city: {
|
||||
required: true
|
||||
},
|
||||
zipcode: {
|
||||
required: true
|
||||
},
|
||||
countryCode: {
|
||||
required: true
|
||||
}
|
||||
},
|
||||
messages: {},
|
||||
@@ -138,15 +164,17 @@
|
||||
var placement = $(element).data('error');
|
||||
if (placement) {
|
||||
$(placement).append(error);
|
||||
}else {
|
||||
} else {
|
||||
error.insertAfter(element);
|
||||
}
|
||||
},
|
||||
submitHandler: submitRegisterForm
|
||||
});
|
||||
|
||||
$('.password-protected').click(function(){
|
||||
$('.password-protected').click(function() {
|
||||
|
||||
$('#_teamstore_id').val($(this).data('store-id'))
|
||||
// console.log($(this).data('store-id'))
|
||||
$('#team-store-login').modal('show')
|
||||
return false;
|
||||
|
||||
@@ -156,32 +184,173 @@
|
||||
event.preventDefault();
|
||||
$('#frm_search_store').submit();
|
||||
});
|
||||
|
||||
|
||||
|
||||
}); // end document ready
|
||||
|
||||
function submitLoginForm (){
|
||||
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('/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('/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 getCities(arr, q) {
|
||||
var sd = [];
|
||||
arr.find(function(element) {
|
||||
if (element['state'] == q) {
|
||||
sd.push(element['city']);
|
||||
}
|
||||
});
|
||||
return sd;
|
||||
}
|
||||
|
||||
function submitLoginForm() {
|
||||
// method="POST" action="{{ url('/auth/login') }}"
|
||||
var data = $("#frm-login").serialize();
|
||||
// console.log(data)
|
||||
$.ajax({
|
||||
type : 'POST',
|
||||
url : "{{ url('/custom/auth') }}",
|
||||
data : data,
|
||||
dataType : 'json',
|
||||
beforeSend: function() {
|
||||
type: 'POST',
|
||||
url: "{{ url('/custom/auth') }}",
|
||||
data: data,
|
||||
dataType: 'json',
|
||||
beforeSend: function() {
|
||||
$("#login-response-msg").fadeOut();
|
||||
$("#btn-login").html('Signing in <i class="fa fa-spinner fa-spin"></i>');
|
||||
},
|
||||
success : function(response){
|
||||
success: function(response) {
|
||||
$("#login-response-msg").html("");
|
||||
$("#login-response-msg").fadeIn(1000, function(){
|
||||
|
||||
if(response.success){
|
||||
$("#login-response-msg").fadeIn(1000, function() {
|
||||
|
||||
if (response.success) {
|
||||
// $("#login-response-msg").html(response);
|
||||
// console.log();
|
||||
location.reload();
|
||||
}else{
|
||||
} else {
|
||||
$("#login-response-msg").html(response.message);
|
||||
}
|
||||
//
|
||||
@@ -192,27 +361,35 @@
|
||||
}
|
||||
});
|
||||
return false;
|
||||
}/* login submit */
|
||||
} /* login submit */
|
||||
|
||||
function submitRegisterForm (){
|
||||
var data = $("#frm-register").serialize();
|
||||
function submitRegisterForm() {
|
||||
var data = $("#frm-register").serializeArray();
|
||||
data.push({
|
||||
name: "country",
|
||||
value: $("#select_country option:selected").text()
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
type : 'POST',
|
||||
url : "{{ url('/custom/register') }}",
|
||||
data : data,
|
||||
dataType : 'json',
|
||||
beforeSend: function() {
|
||||
type: 'POST',
|
||||
url: "{{ url('/custom/register') }}",
|
||||
data: data,
|
||||
dataType: 'json',
|
||||
beforeSend: function() {
|
||||
$("#register-response-msg").fadeOut();
|
||||
$("#btn-register").html('Please wait <i class="fa fa-spinner fa-spin"></i>');
|
||||
},
|
||||
success : function(response){
|
||||
success: function(response) {
|
||||
$("#register-response-msg").html("");
|
||||
$("#register-response-msg").fadeIn(1000, function(){
|
||||
|
||||
if(response.success){
|
||||
location.reload();
|
||||
}else{
|
||||
$("#register-response-msg").fadeIn(1000, function() {
|
||||
|
||||
if (response.success) {
|
||||
if (response.redirect != "") {
|
||||
window.location = response.redirect;
|
||||
} else {
|
||||
location.reload();
|
||||
}
|
||||
} else {
|
||||
$("#register-response-msg").html(response.message);
|
||||
}
|
||||
$("#btn-register").html('Register');
|
||||
@@ -224,8 +401,7 @@
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
</html>
|
||||
@@ -15,7 +15,7 @@
|
||||
<meta property="og:type" content="article" />
|
||||
<meta property="og:title" content="CREW Uniform Customizer" />
|
||||
<meta property="og:description" content="Custom Uniforms offered in a variety colors to match your team. Browse through our baseball, fastpitch, softball, lacrosse, football, volleyball and basketball gear." />
|
||||
<meta property="og:image" content="{{asset('public/images/fb-share-logo.png')}}" />
|
||||
<meta property="og:image" content="{{asset('/images/fb-share-logo.png')}}" />
|
||||
|
||||
<!-- favicons
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="{{asset('public/favicons/apple-touch-icon.png')}}">
|
||||
@@ -28,17 +28,17 @@
|
||||
<title>CREW Uniform Designer</title>
|
||||
|
||||
<!-- Bootstrap core CSS -->
|
||||
<link href="{{asset('public/assets/css/bootstrap.min.css')}}" rel="stylesheet">
|
||||
<link href="{{asset('/assets/css/bootstrap.min.css')}}" rel="stylesheet">
|
||||
|
||||
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
|
||||
<link href="{{asset('public/assets/css/ie10-viewport-bug-workaround.css')}}" rel="stylesheet">
|
||||
<link href="{{asset('/assets/css/ie10-viewport-bug-workaround.css')}}" rel="stylesheet">
|
||||
|
||||
<!-- Custom styles for this template -->
|
||||
<link href="{{asset('public/assets/css/style.css')}}" rel="stylesheet">
|
||||
<link href="{{asset('/assets/css/style.css')}}" rel="stylesheet">
|
||||
|
||||
<!-- Just for debugging purposes. Don't actually copy these 2 lines! -->
|
||||
<!--[if lt IE 9]><script src="../../assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
|
||||
<script src="{{asset('public/assets/js/ie-emulation-modes-warning.js')}}"></script>
|
||||
<script src="{{asset('/assets/js/ie-emulation-modes-warning.js')}}"></script>
|
||||
|
||||
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
|
||||
<!--[if lt IE 9]>
|
||||
@@ -113,9 +113,9 @@
|
||||
<!-- Bootstrap core JavaScript ================================================= !-->
|
||||
<!-- Placed at the end of the document so the pages load faster -->
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
|
||||
<script>window.jQuery || document.write('<script src="{{asset('public/assets/js/vendor/jquery.min.js')}}"><\/script>')</script>
|
||||
<script>window.jQuery || document.write('<script src="{{asset('/assets/js/vendor/jquery.min.js')}}"><\/script>')</script>
|
||||
<script src="https://ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/jquery.validate.min.js"></script>
|
||||
<script type="text/javascript" src="https://cdn.ywxi.net/js/1.js" async></script>
|
||||
<script src="{{asset('public/assets/js/crew-designer.js')}}"></script>
|
||||
<script src="{{asset('/assets/js/crew-designer.js')}}"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -2,11 +2,12 @@
|
||||
|
||||
@section('content')
|
||||
<style>
|
||||
.error{
|
||||
.error {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.g-recaptcha {
|
||||
width:100%;
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
<div class="container">
|
||||
@@ -22,25 +23,40 @@
|
||||
<div class="col-xs-12">
|
||||
<div id="register-response-msg"></div>
|
||||
<form role="form" id="frm-register">
|
||||
<div class="form-group text-center">
|
||||
<h5>Personal Information</h5>
|
||||
</div>
|
||||
<input type="hidden" name="redirect" value="{{ Request::get('redirectUrl') }}">
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label">Fullname</label>
|
||||
<input type="text" class="form-control" name="name" value="{{ old('name') }}" placeholder="Fullname">
|
||||
<label class="control-label">First name</label>
|
||||
<input type="text" class="form-control" name="firstname" placeholder="First name">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label">Last name</label>
|
||||
<input type="text" class="form-control" name="lastname" placeholder="Last name">
|
||||
</div>
|
||||
|
||||
<!-- <div class="form-group">
|
||||
<label class="control-label">Username</label>
|
||||
<input type="text" class="form-control" name="username" value="{{ old('username') }}" placeholder="Username">
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label">Email Address</label>
|
||||
<input type="email" class="form-control" name="email" value="{{ old('email') }}" placeholder="Email Address">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label">Phone Number</label>
|
||||
<input type="text" class="form-control" name="mobilenumber" placeholder="Phone Number">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label">Password</label>
|
||||
<input type="password" class="form-control" name="password" id="password" required placeholder="Password">
|
||||
<input type="password" class="form-control" name="password" id="password" required placeholder="Password">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
@@ -48,6 +64,50 @@
|
||||
<input type="password" class="form-control" name="password_confirmation" placeholder="Confirm Password" data-rule-equalTo="#password" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group text-center">
|
||||
<h5>Address Information</h5>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label">Select Country</label>
|
||||
<select name="countryCode" id="select_country" class="form-control" onchange="selectCountry(this)">
|
||||
<option value="">Select Country</option>
|
||||
<option value="US">United States</option>
|
||||
<option value="CA">Canada</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label">State / Province</label>
|
||||
<label></label>
|
||||
<select class="form-control" name="state" id="lst-states">
|
||||
<option value="">Select State</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label">City</label>
|
||||
<select class="form-control" name="city" id="lst-cities">
|
||||
<option value="">Select City</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label">Address 1</label>
|
||||
<input type="text" class="form-control" name="address" placeholder="Address 1">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label">Address 2</label>
|
||||
<input type="text" class="form-control" name="address2" placeholder="Address 2">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label">Zip Code</label>
|
||||
<input type="text" class="form-control" name="zipcode" placeholder="Please enter your zip code">
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<div class="g-recaptcha text-center" data-sitekey="{{ env('CAPTCHA_SITE_KEY') }}"></div>
|
||||
</div>
|
||||
@@ -57,7 +117,7 @@
|
||||
<div class="form-group">
|
||||
<button type="submit" id="btn-register" class="btn btn-primary btn-block">Register</button>
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@@ -74,4 +134,4 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@endsection
|
||||
@@ -16,7 +16,7 @@
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="text-center" id="homepage-logo">
|
||||
<img src="{{asset('/public/images/logo.png')}}" class="img img-responsive" />
|
||||
<img src="{{asset('/images/logo.png')}}" class="img img-responsive" />
|
||||
</div>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
|
||||
@@ -13,14 +13,14 @@
|
||||
<!-- ---- Include the above in your HEAD tag -------- -->
|
||||
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
|
||||
|
||||
<link href="{{asset('/public/designer/css/custom-style.css')}}" rel="stylesheet">
|
||||
<link href="{{asset('/public/designer/css/tab-styles.css')}}" rel="stylesheet">
|
||||
<link href="{{asset('/public/designer/css/input-range-style.css')}}" rel="stylesheet">
|
||||
<link href="{{asset('/public/designer/css/spectrum.css')}}" rel="stylesheet">
|
||||
<link href="{{asset('/public/designer/css/one-by-one-slider.css')}}" rel="stylesheet">
|
||||
<link href="{{asset('/public/designer/custom-fonts/custom-fonts.php')}}" rel='stylesheet' type='text/css'>
|
||||
<link href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css" rel="stylesheet">
|
||||
<link href="{{asset('/public/designer/css/build.css')}}" rel="stylesheet">
|
||||
<link href="{{asset('/designer/css/custom-style.css')}}" rel="stylesheet">
|
||||
<link href="{{asset('/designer/css/tab-styles.css')}}" rel="stylesheet">
|
||||
<link href="{{asset('/designer/css/input-range-style.css')}}" rel="stylesheet">
|
||||
<link href="{{asset('/designer/css/spectrum.css')}}" rel="stylesheet">
|
||||
<link href="{{asset('/designer/css/one-by-one-slider.css')}}" rel="stylesheet">
|
||||
<link href="{{asset('/designer/custom-fonts/custom-fonts.php')}}" rel='stylesheet' type='text/css'>
|
||||
<link href="{{asset('/assets/css/jquery-ui.css')}}" rel="stylesheet">
|
||||
<link href="{{asset('/designer/css/build.css')}}" rel="stylesheet">
|
||||
<style>
|
||||
.custom-navbar-brand>img {
|
||||
display: block;
|
||||
@@ -106,7 +106,7 @@
|
||||
<div class="col-md-12 text-center">
|
||||
@foreach($templatepaths_arrays as $k => $template)
|
||||
@if($k == 0)
|
||||
<img id="{{ strtolower($template->Side) }}-image-thumb" src="{{asset('/public/images/loading-please-wait.gif')}}" class="img img-responsive img-loader main-thumbnail">
|
||||
<img id="{{ strtolower($template->Side) }}-image-thumb" src="{{asset('/images/loading-please-wait.gif')}}" class="img img-responsive img-loader main-thumbnail">
|
||||
@endif
|
||||
@endforeach
|
||||
</div>
|
||||
@@ -146,11 +146,11 @@
|
||||
<!-- FABRIC JS CURVE TEXT -->
|
||||
<script src="https://rawgit.com/EffEPi/fabric.curvedText/master/fabric.curvedText.js"></script>
|
||||
<!-- SPECTRUM -->
|
||||
<script src="{{asset('/public/designer/js/spectrum.js')}}"></script>
|
||||
<script src="{{asset('/designer/js/spectrum.js')}}"></script>
|
||||
<!-- CUSTOM SCRIPT -->
|
||||
<script src="{{asset('/public/designer/js/custom-script.js')}}"></script>
|
||||
<script src="{{asset('/designer/js/custom-script.js')}}"></script>
|
||||
<!-- PRICE FORMAT -->
|
||||
<script src="{{asset('/public/designer/js/jquery.priceformat.min.js')}}"></script>
|
||||
<script src="{{asset('/designer/js/jquery.priceformat.min.js')}}"></script>
|
||||
<!-- JQUERY VALIDATE -->
|
||||
<script src="https://ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/jquery.validate.min.js"></script>
|
||||
|
||||
@@ -199,7 +199,7 @@
|
||||
$('body,html').animate({scrollTop:0},800);
|
||||
});
|
||||
|
||||
$('#custom-navbar-brand').html('<img src="{{asset("/public/images/logo.png")}}">');
|
||||
$('#custom-navbar-brand').html('<img src="{{asset("/images/logo.png")}}">');
|
||||
|
||||
|
||||
$("#frm-design-details").validate({
|
||||
@@ -348,9 +348,18 @@
|
||||
var gen_url;
|
||||
|
||||
if(template_format == "png"){
|
||||
gen_url = ip+":"+port+"/ap/{{ $client_design_array[0]->DesignCode }}";
|
||||
if(port == 5952){
|
||||
gen_url = ip+":"+port+"/ap/{{ $client_design_array[0]->DesignCode }}";
|
||||
}else{
|
||||
gen_url = ip+":"+port+"/mask/{{ $client_design_array[0]->DesignCode }}";
|
||||
}
|
||||
|
||||
}else{
|
||||
gen_url = ip+":"+port+"/tb/{{ $client_design_array[0]->DesignCode }}";
|
||||
if(port == 5953){
|
||||
gen_url = ip+":"+port+"/classic-mask/{{ $client_design_array[0]->DesignCode }}";
|
||||
}else{
|
||||
gen_url = ip+":"+port+"/tb/{{ $client_design_array[0]->DesignCode }}";
|
||||
}
|
||||
}
|
||||
|
||||
$.ajax({ //create an ajax request to load_page.php
|
||||
|
||||
@@ -13,12 +13,12 @@
|
||||
<!-- ---- Include the above in your HEAD tag -------- -->
|
||||
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
|
||||
|
||||
<link href="{{asset('/public/designer/css/custom-style.css')}}" rel="stylesheet">
|
||||
<link href="{{asset('/public/designer/css/tab-styles.css')}}" rel="stylesheet">
|
||||
<link href="{{asset('/public/designer/css/input-range-style.css')}}" rel="stylesheet">
|
||||
<link href="{{asset('/public/designer/css/spectrum.css')}}" rel="stylesheet">
|
||||
<link href="{{asset('/public/designer/css/one-by-one-slider.css')}}" rel="stylesheet">
|
||||
<link href="{{asset('/public/designer/custom-fonts/custom-fonts.php')}}" rel='stylesheet' type='text/css'>
|
||||
<link href="{{asset('/designer/css/custom-style.css')}}" rel="stylesheet">
|
||||
<link href="{{asset('/designer/css/tab-styles.css')}}" rel="stylesheet">
|
||||
<link href="{{asset('/designer/css/input-range-style.css')}}" rel="stylesheet">
|
||||
<link href="{{asset('/designer/css/spectrum.css')}}" rel="stylesheet">
|
||||
<link href="{{asset('/designer/css/one-by-one-slider.css')}}" rel="stylesheet">
|
||||
<link href="{{asset('/designer/custom-fonts/custom-fonts.php')}}" rel='stylesheet' type='text/css'>
|
||||
<link href="https://gitcdn.github.io/bootstrap-toggle/2.2.2/css/bootstrap-toggle.min.css" rel="stylesheet">
|
||||
|
||||
<style>
|
||||
@@ -153,14 +153,14 @@
|
||||
.sendSelectedObjectToFront{
|
||||
height: 45px;
|
||||
width: 45px;
|
||||
background-image: url("{{asset('/public/images/bring_forward.png')}}");
|
||||
background-image: url("{{asset('/images/bring_forward.png')}}");
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
}
|
||||
.sendSelectedObjectBack{
|
||||
height: 45px;
|
||||
width: 45px;
|
||||
background-image: url("{{asset('/public/images/send_backward.png')}}");
|
||||
background-image: url("{{asset('/images/send_backward.png')}}");
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
}
|
||||
@@ -168,7 +168,7 @@
|
||||
.btn-send-middle{
|
||||
height: 45px;
|
||||
width: 45px;
|
||||
background-image: url("{{asset('/public/images/send_to_middle.png')}}");
|
||||
background-image: url("{{asset('/images/send_to_middle.png')}}");
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
}
|
||||
@@ -176,14 +176,14 @@
|
||||
.team-name-standard{
|
||||
height: 45px;
|
||||
width: 45px;
|
||||
background-image: url("{{asset('/public/images/bring_forward.png')}}");
|
||||
background-image: url("{{asset('/images/bring_forward.png')}}");
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
}
|
||||
.center-vertical{
|
||||
height: 45px;
|
||||
width: 45px;
|
||||
background-image: url("{{asset('/public/images/align-v1.png')}}");
|
||||
background-image: url("{{asset('/images/align-v1.png')}}");
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
}
|
||||
@@ -191,7 +191,7 @@
|
||||
.center-horizontal{
|
||||
height: 45px;
|
||||
width: 45px;
|
||||
background-image: url("{{asset('/public/images/align-h1.png')}}");
|
||||
background-image: url("{{asset('/images/align-h1.png')}}");
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
}
|
||||
@@ -283,15 +283,33 @@
|
||||
@if($template->Type == "Hoodie" && $template->Side == "Back" && $template->TemplateFormat == "svg")
|
||||
<canvas id="canvas_{{ $template->Type }}_{{ $template->Side }}" width="158px" height="174px" style="margin-top:171px; margin-left:0xp;"></canvas>
|
||||
@endif
|
||||
|
||||
<!-- Hoodie All over Print -->
|
||||
@if($template->Type == "Hoodie" && $template->Side == "Front" && $template->TemplateFormat == "png")
|
||||
<canvas id="canvas_{{ $template->Type }}_{{ $template->Side }}" width="512px" height="512px" style="position:absolute; top: 50%; left: 50%;"></canvas>
|
||||
@endif
|
||||
@if($template->Type == "Hoodie" && $template->Side == "Back" && $template->TemplateFormat == "png")
|
||||
<canvas id="canvas_{{ $template->Type }}_{{ $template->Side }}" width="512px" height="512px" style="position:absolute; top: 50%; left: 50%;"></canvas>
|
||||
@endif
|
||||
|
||||
|
||||
<!-- Cake -->
|
||||
@if($template->Type == "Cake" && $template->Side == "Front" && $template->TemplateFormat == "svg")
|
||||
<canvas id="canvas_{{ $template->Type }}_{{ $template->Side }}" width="400px" height="400px" style="margin-top:60px; margin-left: -5px;"></canvas>
|
||||
@endif
|
||||
|
||||
@if($template->Type == "Cake" && $template->Side == "Back" && $template->TemplateFormat == "svg")
|
||||
<canvas id="canvas_{{ $template->Type }}_{{ $template->Side }}" width="400px" height="400px" style="margin-top:60px; margin-left: -5px;"></canvas>
|
||||
@endif
|
||||
|
||||
<!-- Mask All over Print -->
|
||||
@if($template->Type == "Mask" && $template->Side == "Front" && $template->TemplateFormat == "png")
|
||||
<canvas id="canvas_{{ $template->Type }}_{{ $template->Side }}" width="572px" height="502px" style="position:absolute; top: 50%; left: 50%;"></canvas>
|
||||
@endif
|
||||
|
||||
@if($template->Type == "Mask" && $template->Side == "Front" && $template->TemplateFormat == "svg")
|
||||
<canvas id="canvas_{{ $template->Type }}_{{ $template->Side }}" width="451.006px" height="250.56px" style="position:absolute; left: 50%; margin-top: 132px;"></canvas>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -550,37 +568,37 @@
|
||||
|
||||
</div>
|
||||
<div class="tab-pane fade" id="tab-add-text">
|
||||
<div id="addNewTextId">
|
||||
<div class="row">
|
||||
<div class="form-group col-sm-12">
|
||||
<!-- <button type="button" class="btn btn-danger pull-right btn-sm remove addMarginLeft" title="Remove object"><i class="fa fa-trash" aria-hidden="true"></i></button> -->
|
||||
<button type="button" onclick="addNewText();" class="btn btn-primary pull-right btn-sm"><i class="fa fa-plus" aria-hidden="true"></i> New Text</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="form-group col-sm-12">
|
||||
<label>Enter team name here</label>
|
||||
<textarea name="editedTextInput" id="editedTextInput" class="form-control" placeholder="Enter team name here"></textarea>
|
||||
<div id="addNewTextId">
|
||||
<div class="row">
|
||||
<div class="form-group col-sm-12">
|
||||
<!-- <button type="button" class="btn btn-danger pull-right btn-sm remove addMarginLeft" title="Remove object"><i class="fa fa-trash" aria-hidden="true"></i></button> -->
|
||||
<button type="button" onclick="addNewText();" class="btn btn-primary pull-right btn-sm"><i class="fa fa-plus" aria-hidden="true"></i> New Text</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="form-group col-sm-12">
|
||||
<label>Enter team name here</label>
|
||||
<textarea name="editedTextInput" id="editedTextInput" class="form-control" placeholder="Enter team name here"></textarea>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="enterTextId">
|
||||
<div class="row">
|
||||
<div class="form-group col-sm-12">
|
||||
<label>Enter team name here</label>
|
||||
<textarea name="textInput" id="textInput" class="form-control" placeholder="Enter team name here"></textarea>
|
||||
<!--span id="errfirstName" style="color: #dd4b39"></span> !-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="enterTextId">
|
||||
<div class="row">
|
||||
<div class="form-group col-sm-12">
|
||||
<label>Enter team name here</label>
|
||||
<textarea name="textInput" id="textInput" class="form-control" placeholder="Enter team name here"></textarea>
|
||||
<!--span id="errfirstName" style="color: #dd4b39"></span> !-->
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-12">
|
||||
<button type="button" id="okBtn" onclick="addText();" class="btn btn-primary btn-block btn-sm">OK</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="textProperties">
|
||||
@include('designer.text_properties')
|
||||
</div>
|
||||
<div class="form-group col-sm-12">
|
||||
<button type="button" id="okBtn" onclick="addText();" class="btn btn-primary btn-block btn-sm">OK</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="textProperties">
|
||||
@include('designer.text_properties')
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade" id="tab-add-number">
|
||||
@@ -613,9 +631,9 @@
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade" id="tab-clipart">
|
||||
<div id="tab-clipart-content">
|
||||
</div>
|
||||
</div>
|
||||
<div id="tab-clipart-content">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade" id="tab-upload-image">
|
||||
<!-- <div class="row">
|
||||
@@ -863,9 +881,9 @@
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/fabric.js/1.7.15/fabric.min.js"></script>
|
||||
<!-- <script src="https://rawgit.com/EffEPi/fabric.curvedText/master/fabric.curvedText.js"></script> -->
|
||||
<script src="{{asset('/public/designer/js/spectrum.js')}}"></script>
|
||||
<script src="{{asset('/designer/js/spectrum.js')}}"></script>
|
||||
|
||||
<script src="{{asset('/public/designer/js/custom-script.js')}}"></script>
|
||||
<script src="{{asset('/designer/js/custom-script.js')}}"></script>
|
||||
<script src="https://gitcdn.github.io/bootstrap-toggle/2.2.2/js/bootstrap-toggle.min.js"></script>
|
||||
<script src="https://ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/jquery.validate.min.js"></script>
|
||||
<script src="https://rawgit.com/fabricjs/fabric.js/master/lib/centering_guidelines.js"></script>
|
||||
@@ -874,7 +892,7 @@
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
$.getJSON("{{asset('/public/designer/palette.json') }}", callbackFuncWithData);
|
||||
$.getJSON("{{asset('/designer/palette.json') }}", callbackFuncWithData);
|
||||
|
||||
function callbackFuncWithData(data){
|
||||
console.log(data)
|
||||
@@ -1036,7 +1054,7 @@
|
||||
var get_template_type = "{{ $template->Type }}";
|
||||
|
||||
// if((get_template_type != "Shirts") || (get_template_type != "Hoodie")){
|
||||
if(get_template_type != "Hoodie" && get_template_type != "Shirts" && get_template_type != "Cake" ){
|
||||
if(get_template_type != "Hoodie" && get_template_type != "Shirts" && get_template_type != "Cake" && get_template_type != "Mask" ){
|
||||
addDefaultTeamText();
|
||||
addNameNumber();
|
||||
}
|
||||
|
||||
@@ -13,12 +13,12 @@
|
||||
<!-- ---- Include the above in your HEAD tag -------- -->
|
||||
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
|
||||
|
||||
<link href="{{asset('/public/designer/css/custom-style.css')}}" rel="stylesheet">
|
||||
<link href="{{asset('/public/designer/css/tab-styles.css')}}" rel="stylesheet">
|
||||
<link href="{{asset('/public/designer/css/input-range-style.css')}}" rel="stylesheet">
|
||||
<link href="{{asset('/public/designer/css/spectrum.css')}}" rel="stylesheet">
|
||||
<link href="{{asset('/public/designer/css/one-by-one-slider.css')}}" rel="stylesheet">
|
||||
<link href="{{asset('/public/designer/custom-fonts/custom-fonts.php')}}" rel='stylesheet' type='text/css'>
|
||||
<link href="{{asset('/designer/css/custom-style.css')}}" rel="stylesheet">
|
||||
<link href="{{asset('/designer/css/tab-styles.css')}}" rel="stylesheet">
|
||||
<link href="{{asset('/designer/css/input-range-style.css')}}" rel="stylesheet">
|
||||
<link href="{{asset('/designer/css/spectrum.css')}}" rel="stylesheet">
|
||||
<link href="{{asset('/designer/css/one-by-one-slider.css')}}" rel="stylesheet">
|
||||
<link href="{{asset('/designer/custom-fonts/custom-fonts.php')}}" rel='stylesheet' type='text/css'>
|
||||
|
||||
<style>
|
||||
.carousel-indicators > li,
|
||||
@@ -151,14 +151,14 @@
|
||||
.sendSelectedObjectToFront{
|
||||
height: 45px;
|
||||
width: 45px;
|
||||
background-image: url("{{asset('/public/images/bring_forward.png')}}");
|
||||
background-image: url("{{asset('/images/bring_forward.png')}}");
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
}
|
||||
.sendSelectedObjectBack{
|
||||
height: 45px;
|
||||
width: 45px;
|
||||
background-image: url("{{asset('/public/images/send_backward.png')}}");
|
||||
background-image: url("{{asset('/images/send_backward.png')}}");
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
}
|
||||
@@ -166,14 +166,14 @@
|
||||
.team-name-standard{
|
||||
height: 45px;
|
||||
width: 45px;
|
||||
background-image: url("{{asset('/public/images/bring_forward.png')}}");
|
||||
background-image: url("{{asset('/images/bring_forward.png')}}");
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
}
|
||||
.center-vertical{
|
||||
height: 45px;
|
||||
width: 45px;
|
||||
background-image: url("{{asset('/public/images/align-v1.png')}}");
|
||||
background-image: url("{{asset('/images/align-v1.png')}}");
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
}
|
||||
@@ -181,7 +181,7 @@
|
||||
.center-horizontal{
|
||||
height: 45px;
|
||||
width: 45px;
|
||||
background-image: url("{{asset('/public/images/align-h1.png')}}");
|
||||
background-image: url("{{asset('/images/align-h1.png')}}");
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
}
|
||||
@@ -673,9 +673,9 @@
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/fabric.js/1.7.15/fabric.min.js"></script>
|
||||
<script src="https://rawgit.com/EffEPi/fabric.curvedText/master/fabric.curvedText.js"></script>
|
||||
<script src="{{asset('/public/designer/js/spectrum.js')}}"></script>
|
||||
<script src="{{asset('/designer/js/spectrum.js')}}"></script>
|
||||
|
||||
<script src="{{asset('/public/designer/js/custom-script.js')}}"></script>
|
||||
<script src="{{asset('/designer/js/custom-script.js')}}"></script>
|
||||
|
||||
<script>
|
||||
|
||||
@@ -685,7 +685,7 @@
|
||||
$('body,html').animate({scrollTop:0},800);
|
||||
});
|
||||
|
||||
// $('#custom-navbar-brand').html('<img src="{{asset("/public/images/logo.png")}}">');
|
||||
// $('#custom-navbar-brand').html('<img src="{{asset("/images/logo.png")}}">');
|
||||
|
||||
// calling functions
|
||||
|
||||
|
||||
@@ -407,7 +407,7 @@
|
||||
<td align="left" style="width: 180px;">
|
||||
@foreach($img_thumb as $img)
|
||||
@if($img->ProductId == $item->ProductId)
|
||||
<img style="height: 200px; overflow: hidden; object-fit: contain;" src="{{ config('site_config.prod_private_server_ip') }}/images/{{ $img->Image }}">
|
||||
<img style="height: 200px; overflow: hidden; object-fit: contain;" src="{{ config('site_config.images_url') }}/{{ $img->Image }}">
|
||||
@endif
|
||||
@endforeach
|
||||
</td>
|
||||
@@ -474,7 +474,21 @@
|
||||
<th>Size</th>
|
||||
<th>Price</th>
|
||||
<th>Quantity</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
@elseif($item->FormUsed=="jersey-and-shorts-quantity-form")
|
||||
<tr>
|
||||
<th>Jersey Size</th>
|
||||
<th>Shorts Size</th>
|
||||
<th>Price</th>
|
||||
<th>Quantity</th>
|
||||
</tr>
|
||||
@elseif($item->FormUsed=="number-jersey-shorts-form")
|
||||
<tr>
|
||||
<td><b>Number</b></td>
|
||||
<td><b>Jersey Size</b></td>
|
||||
<td><b>Shorts Size</b></td>
|
||||
<td><b>Price</b></td>
|
||||
<td><b>Quantity</b></td>
|
||||
</tr>
|
||||
@else
|
||||
|
||||
@@ -545,6 +559,21 @@
|
||||
<td>{{ $sub_item->Price }}</td>
|
||||
<td>{{ $sub_item->Quantity }}</td>
|
||||
</tr>
|
||||
@elseif($item->FormUsed=="jersey-and-shorts-quantity-form")
|
||||
<tr>
|
||||
<td>{{ $sub_item->JerseySize }}</td>
|
||||
<td>{{ $sub_item->ShortsSize }}</td>
|
||||
<td>{{ $sub_item->Price }}</td>
|
||||
<td>{{ $sub_item->Quantity }}</td>
|
||||
</tr>
|
||||
@elseif($item->FormUsed=="number-jersey-shorts-form")
|
||||
<tr>
|
||||
<td>{{ $sub_item->Number }}</td>
|
||||
<td>{{ $sub_item->JerseySize }}</td>
|
||||
<td>{{ $sub_item->ShortsSize }}</td>
|
||||
<td>{{ $sub_item->Price }}</td>
|
||||
<td>{{ $sub_item->Quantity }}</td>
|
||||
</tr>
|
||||
@else
|
||||
|
||||
@endif
|
||||
|
||||
@@ -13,24 +13,24 @@
|
||||
|
||||
<meta property="og:url" content="https://crewsportswear.com" />
|
||||
<meta property="og:type" content="article" />
|
||||
<meta property="og:title" content="CREW Uniform Customizer" />
|
||||
<meta property="og:title" content="CREW Apparel" />
|
||||
<meta property="og:description" content="Custom Uniforms offered in a variety colors to match your team. Browse through our baseball, fastpitch, softball, lacrosse, football, volleyball and basketball gear." />
|
||||
<meta property="og:image" content="{{asset('public/images/fb-share-logo.png')}}" />
|
||||
<meta property="og:image" content="{{asset('/images/fb-share-logo.png')}}" />
|
||||
|
||||
<title>CREW Uniform Designer</title>
|
||||
|
||||
<!-- Bootstrap core CSS -->
|
||||
<link href="{{ asset('public/assets/css/bootstrap.min.css') }}" rel="stylesheet">
|
||||
<link href="{{ asset('/assets/css/bootstrap.min.css') }}" rel="stylesheet">
|
||||
|
||||
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
|
||||
<link href="{{ asset('public/assets/css/ie10-viewport-bug-workaround.css') }}" rel="stylesheet">
|
||||
<link href="{{ asset('/assets/css/ie10-viewport-bug-workaround.css') }}" rel="stylesheet">
|
||||
|
||||
<!-- Custom styles for this template -->
|
||||
<link href="{{ asset('public/assets/css/style.css')}}" rel="stylesheet">
|
||||
<link href="{{ asset('/assets/css/style.css')}}" rel="stylesheet">
|
||||
|
||||
<!-- Just for debugging purposes. Don't actually copy these 2 lines! -->
|
||||
<!--[if lt IE 9]><script src="../../assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
|
||||
<script src="{{asset('public/assets/js/ie-emulation-modes-warning.js')}}"></script>
|
||||
<script src="{{asset('/assets/js/ie-emulation-modes-warning.js')}}"></script>
|
||||
|
||||
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
|
||||
<!--[if lt IE 9]>
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
<![endif]-->
|
||||
<!-- font-awesome -->
|
||||
<link href="{{ asset('public/assets/css/font-awesome/css/font-awesome.min.css')}}" rel="stylesheet">
|
||||
<link href="{{ asset('/assets/css/font-awesome/css/font-awesome.min.css')}}" rel="stylesheet">
|
||||
|
||||
<!-- Social Media Share button
|
||||
<script type="text/javascript" src="//platform-api.sharethis.com/js/sharethis.js#property=599bc5cf6d61950012975405&product=sticky-share-buttons"></script>-->
|
||||
@@ -87,13 +87,13 @@
|
||||
<!-- Bootstrap core JavaScript ================================================= !-->
|
||||
<!-- Placed at the end of the document so the pages load faster -->
|
||||
<!-- jquery -->
|
||||
<script src="{{ asset('public/assets/js/jquery.min.js') }}"></script>
|
||||
<script src="{{ asset('/assets/js/jquery.min.js') }}"></script>
|
||||
<!-- bootstrap -->
|
||||
<script src="{{asset('public/assets/js/bootstrap.min.js')}}"></script>]
|
||||
<script src="{{asset('/assets/js/bootstrap.min.js')}}"></script>]
|
||||
<!-- validate -->
|
||||
<script src="https://ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/jquery.validate.min.js"></script>
|
||||
<!-- custom js -->
|
||||
<script src="{{ asset('public/assets/js/crew-designer.js') }}"></script>
|
||||
<script src="{{ asset('/assets/js/crew-designer.js') }}"></script>
|
||||
<script>
|
||||
$(function(){
|
||||
$(".hide-row").hide();
|
||||
|
||||
@@ -7,17 +7,29 @@
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="{{ url('/') }}">
|
||||
<img src="{{asset('public/images/logo.png')}}" />
|
||||
</a>
|
||||
@if (Request::segment(2) == "hi-five-sports-club" || Request::segment(2) == "hi-five-sports-zone")
|
||||
<a class="navbar-brand" href="#"></a>
|
||||
@else
|
||||
<a class="navbar-brand" href="{{ url('/') }}">
|
||||
<img src="{{asset('/images/logo.png')}}" />
|
||||
</a>
|
||||
@endif
|
||||
|
||||
{{-- <small>JAC Printing & Graphics Co.</small> --}}
|
||||
|
||||
</div>
|
||||
<div id="navbar" class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav navbar-right navbar-nav-custom">
|
||||
@if (Request::segment(2) == "hi-five-sports-club" || Request::segment(2) == "hi-five-sports-zone")
|
||||
<li style="font-size: 14px;"></li>
|
||||
@else
|
||||
<li style="font-size: 14px;">
|
||||
|
||||
<a href="{{ url('teamstore') }}"><span style="text-transform:uppercase;">Team Store</span></a>
|
||||
|
||||
</li>
|
||||
@endif
|
||||
|
||||
<li style="font-size: 14px;">
|
||||
<a href="{{ url('cart') }}"><span style="text-transform:uppercase;">My Cart</span> <i class="fa fa-shopping-cart"></i>
|
||||
<span class="badge" id="my-cart-count">{{ \App\Http\Controllers\MainController::getCountCart() }}</span>
|
||||
@@ -254,8 +266,15 @@
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">Contact Us</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>Coming soon.</p>
|
||||
<div class="modal-body text-center">
|
||||
<h1>Contact Us</h1>
|
||||
<hr>
|
||||
<h3>Email Address: <small><a href="#">customer-service@crewsportswear.com</a></small></h3>
|
||||
<h3>Address: <small><a href="#">1281 Humbracht Circle
|
||||
Suite J
|
||||
Bartlett, Illinois
|
||||
60103</a></small>
|
||||
</h3>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
||||
|
||||
@@ -9,26 +9,26 @@
|
||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
|
||||
<meta name="csrf_token" content="{{ csrf_token() }}" />
|
||||
<!-- Bootstrap 3.3.6 -->
|
||||
<link rel="stylesheet" href="{{asset('/public/bower_components/AdminLTE/bootstrap/css/bootstrap.min.css')}}">
|
||||
<link rel="stylesheet" href="{{asset('/bower_components/AdminLTE/bootstrap/css/bootstrap.min.css')}}">
|
||||
<!-- Font Awesome -->
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css">
|
||||
<!-- Ionicons -->
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ionicons/2.0.1/css/ionicons.min.css">
|
||||
<!-- Theme style -->
|
||||
<link rel="stylesheet" href="{{asset('/public/bower_components/AdminLTE/dist/css/AdminLTE.min.css')}}">
|
||||
<link rel="stylesheet" href="{{asset('/bower_components/AdminLTE/dist/css/AdminLTE.min.css')}}">
|
||||
<!-- AdminLTE Skins. Choose a skin from the css/skins
|
||||
folder instead of downloading all of them to reduce the load. -->
|
||||
<link rel="stylesheet" href="{{asset('/public/bower_components/AdminLTE/dist/css/skins/_all-skins.min.css')}}">
|
||||
<link rel="stylesheet" href="{{asset('/bower_components/AdminLTE/dist/css/skins/_all-skins.min.css')}}">
|
||||
<!-- iCheck -->
|
||||
<link rel="stylesheet" href="{{asset('/public/bower_components/AdminLTE/plugins/iCheck/flat/blue.css')}}">
|
||||
<link rel="stylesheet" href="{{asset('/bower_components/AdminLTE/plugins/iCheck/flat/blue.css')}}">
|
||||
<!-- Date Picker -->
|
||||
<link rel="stylesheet" href="{{asset('/public/bower_components/AdminLTE/plugins/datepicker/datepicker3.css')}}">
|
||||
<link rel="stylesheet" href="{{asset('/bower_components/AdminLTE/plugins/datepicker/datepicker3.css')}}">
|
||||
<!-- Daterange picker -->
|
||||
<link rel="stylesheet" href="{{asset('/public/bower_components/AdminLTE/plugins/daterangepicker/daterangepicker.css')}}">
|
||||
<link rel="stylesheet" href="{{asset('/bower_components/AdminLTE/plugins/daterangepicker/daterangepicker.css')}}">
|
||||
<!-- bootstrap wysihtml5 - text editor -->
|
||||
<link rel="stylesheet" href="{{asset('/public/bower_components/AdminLTE/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css')}}">
|
||||
<link rel="stylesheet" href="{{asset('/bower_components/AdminLTE/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css')}}">
|
||||
<!-- Select2 -->
|
||||
<link href="{{asset('/public/bower_components/AdminLTE/plugins/select2/select2.min.css')}}" rel="stylesheet" />
|
||||
<link href="{{asset('/bower_components/AdminLTE/plugins/select2/select2.min.css')}}" rel="stylesheet" />
|
||||
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
||||
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
||||
<!--[if lt IE 9]>
|
||||
@@ -365,29 +365,29 @@
|
||||
<!-- ./wrapper -->
|
||||
|
||||
<!-- jQuery 2.2.3 -->
|
||||
<script src="{{asset('/public/bower_components/AdminLTE/plugins/jQuery/jquery-2.2.3.min.js')}}"></script>
|
||||
<script src="{{asset('/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>
|
||||
<!-- Bootstrap 3.3.6 -->
|
||||
<script src="{{asset('/public/bower_components/AdminLTE/bootstrap/js/bootstrap.min.js')}}"></script>
|
||||
<script src="{{asset('/bower_components/AdminLTE/bootstrap/js/bootstrap.min.js')}}"></script>
|
||||
|
||||
<!-- daterangepicker -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.11.2/moment.min.js"></script>
|
||||
<script src="{{asset('/public/bower_components/AdminLTE/plugins/daterangepicker/daterangepicker.js')}}"></script>
|
||||
<script src="{{asset('/bower_components/AdminLTE/plugins/daterangepicker/daterangepicker.js')}}"></script>
|
||||
<!-- datepicker -->
|
||||
<script src="{{asset('/public/bower_components/AdminLTE/plugins/datepicker/bootstrap-datepicker.js')}}"></script>
|
||||
<script src="{{asset('/bower_components/AdminLTE/plugins/datepicker/bootstrap-datepicker.js')}}"></script>
|
||||
<!-- Bootstrap WYSIHTML5 -->
|
||||
<script src="{{asset('/public/bower_components/AdminLTE/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js')}}"></script>
|
||||
<script src="{{asset('/bower_components/AdminLTE/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js')}}"></script>
|
||||
<!-- Slimscroll -->
|
||||
<script src="{{asset('/public/bower_components/AdminLTE/plugins/slimScroll/jquery.slimscroll.min.js')}}"></script>
|
||||
<script src="{{asset('/bower_components/AdminLTE/plugins/slimScroll/jquery.slimscroll.min.js')}}"></script>
|
||||
<!-- FastClick -->
|
||||
<script src="{{asset('/public/bower_components/AdminLTE/plugins/fastclick/fastclick.js')}}"></script>
|
||||
<script src="{{asset('/bower_components/AdminLTE/plugins/fastclick/fastclick.js')}}"></script>
|
||||
<!-- AdminLTE App -->
|
||||
<script src="{{asset('/public/bower_components/AdminLTE/dist/js/app.min.js')}}"></script>
|
||||
<script src="{{asset('/bower_components/AdminLTE/dist/js/app.min.js')}}"></script>
|
||||
<!-- AdminLTE dashboard demo (This is only for demo purposes)
|
||||
<script src="{{asset('/bower_components/AdminLTE/dist/js/pages/dashboard.js')}}"></script>-->
|
||||
<!-- AdminLTE for demo purposes -->
|
||||
<script src="{{asset('/public/bower_components/AdminLTE/dist/js/demo.js')}}"></script>
|
||||
<script src="{{asset('/bower_components/AdminLTE/dist/js/demo.js')}}"></script>
|
||||
|
||||
<!-- Select2 -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.3/js/select2.min.js"></script>
|
||||
@@ -450,12 +450,12 @@
|
||||
|
||||
function clearTemplateImg(){
|
||||
$('#tempateImage').val("");
|
||||
$('#template-img-preview').attr('src', "{{asset('/public/images/no-image.jpg')}}");
|
||||
$('#template-img-preview').attr('src', "{{asset('/images/no-image.jpg')}}");
|
||||
}
|
||||
|
||||
function clearImg(){
|
||||
$('#previewImg').val("");
|
||||
$('#prev-img').attr('src', "{{asset('/public/images/no-image.jpg')}}");
|
||||
$('#prev-img').attr('src', "{{asset('/images/no-image.jpg')}}");
|
||||
}
|
||||
|
||||
function clearImgEdit(path){
|
||||
@@ -546,7 +546,7 @@
|
||||
contentType: false,
|
||||
beforeSend: function(xhr){
|
||||
$("#saveSportsBtn").attr('disabled', true);
|
||||
$("#saveSportsBtn").html('Saving <img src="{{url('public/images/ajax-loader.gif')}}">');
|
||||
$("#saveSportsBtn").html('Saving <img src="{{url('/images/ajax-loader.gif')}}">');
|
||||
|
||||
var token = $('meta[name="csrf_token"]').attr('content');
|
||||
if (token) {
|
||||
@@ -598,7 +598,7 @@
|
||||
contentType: false,
|
||||
beforeSend: function(xhr){
|
||||
$("#updateSportsBtn").attr('disabled', true);
|
||||
$("#updateSportsBtn").html('Updating <img src="{{url('public/images/ajax-loader.gif')}}">');
|
||||
$("#updateSportsBtn").html('Updating <img src="{{url('/images/ajax-loader.gif')}}">');
|
||||
|
||||
var token = $('meta[name="csrf_token"]').attr('content');
|
||||
if (token) {
|
||||
|
||||
@@ -12,9 +12,9 @@
|
||||
|
||||
<meta property="og:url" content="http://uniformnetwork.com/crew/" />
|
||||
<meta property="og:type" content="article" />
|
||||
<meta property="og:title" content="CREW Uniform Customizer" />
|
||||
<meta property="og:title" content="CREW Apparel" />
|
||||
<meta property="og:description" content="Custom Uniforms offered in a variety colors to match your team. Browse through our baseball, fastpitch, softball, lacrosse, football, volleyball and basketball gear." />
|
||||
<meta property="og:image" content="{{asset('public/images/fb-share-logo.png')}}" />
|
||||
<meta property="og:image" content="{{asset('/images/fb-share-logo.png')}}" />
|
||||
|
||||
<!-- favicons
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="{{asset('public/favicons/apple-touch-icon.png')}}">
|
||||
@@ -27,17 +27,17 @@
|
||||
<title>CREW Sportswear</title>
|
||||
|
||||
<!-- Bootstrap core CSS -->
|
||||
<link href="{{asset('public/assets/css/bootstrap.min.css')}}" rel="stylesheet">
|
||||
<link href="{{asset('/assets/css/bootstrap.min.css')}}" rel="stylesheet">
|
||||
|
||||
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
|
||||
<link href="{{asset('public/assets/css/ie10-viewport-bug-workaround.css')}}" rel="stylesheet">
|
||||
<link href="{{asset('/assets/css/ie10-viewport-bug-workaround.css')}}" rel="stylesheet">
|
||||
|
||||
<!-- Custom styles for this template -->
|
||||
<link href="{{asset('public/assets/css/style.css')}}" rel="stylesheet">
|
||||
<link href="{{asset('/assets/css/style.css')}}" rel="stylesheet">
|
||||
|
||||
<!-- Just for debugging purposes. Don't actually copy these 2 lines! -->
|
||||
<!--[if lt IE 9]><script src="../../assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
|
||||
<script src="{{asset('public/assets/js/ie-emulation-modes-warning.js')}}"></script>
|
||||
<script src="{{asset('/assets/js/ie-emulation-modes-warning.js')}}"></script>
|
||||
|
||||
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
|
||||
<!--[if lt IE 9]>
|
||||
@@ -50,7 +50,7 @@
|
||||
<!-- Social Media Share button
|
||||
<script type="text/javascript" src="//platform-api.sharethis.com/js/sharethis.js#property=599bc5cf6d61950012975405&product=sticky-share-buttons"></script>-->
|
||||
|
||||
<link href="{{asset('/public/designer/css/build.css')}}" rel="stylesheet">
|
||||
<link href="{{asset('/designer/css/build.css')}}" rel="stylesheet">
|
||||
<style>
|
||||
|
||||
</style>
|
||||
@@ -64,10 +64,10 @@
|
||||
<!-- Bootstrap core JavaScript ================================================= !-->
|
||||
<!-- Placed at the end of the document so the pages load faster -->
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
|
||||
<script src="{{asset('public/assets/js/bootstrap.min.js')}}"></script>
|
||||
<script src="{{asset('/assets/js/bootstrap.min.js')}}"></script>
|
||||
<!-- <script>window.jQuery || document.write('<script src="{{asset('public/assets/js/vendor/jquery.min.js')}}"><\/script>')</script> -->
|
||||
<!-- <script src="https://ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/jquery.validate.min.js"></script> -->
|
||||
<script src="{{asset('public/assets/js/jquery.validate.js')}}"></script>
|
||||
<script src="{{asset('/assets/js/jquery.validate.js')}}"></script>
|
||||
<!-- <script type="text/javascript" src="https://cdn.ywxi.net/js/1.js" async></script> -->
|
||||
<!-- <script src="{{asset('public/assets/js/crew-designer.js')}}"></script> -->
|
||||
<script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="text-center" id="homepage-logo">
|
||||
<img src="{{asset('/public/images/logo.png')}}" class="img img-responsive" />
|
||||
<img src="{{asset('/images/logo.png')}}" class="img img-responsive" />
|
||||
</div>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
|
||||
@@ -26,6 +26,13 @@
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<h2 style="font-size: 20px; font-weight: bold;">MY CART</h2>
|
||||
@if(Session::has('cartkeyError'))
|
||||
<div class="alert alert-danger alert-dismissible">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<h4><i class="fa fa-exclamation-circle"></i> Almost there:</h4>
|
||||
{!! Session::get('cartkeyError') !!}
|
||||
</div>
|
||||
@endif
|
||||
<hr>
|
||||
</div>
|
||||
</div>
|
||||
@@ -44,9 +51,42 @@
|
||||
@endif
|
||||
<h3>Order Summary</h3>
|
||||
</div>
|
||||
|
||||
@if (!Auth::guest())
|
||||
|
||||
<div style="border: 1px solid #e2e2e2; padding: 10px; border-bottom: none;">
|
||||
|
||||
<p><strong>Ship to:</strong></p>
|
||||
|
||||
@if ($address_book === null)
|
||||
<a href="{{ url('user/address-book/create') }}">[ Add ]</a>
|
||||
@else
|
||||
<div>{{ $address_book[0]->Fullname }}</div>
|
||||
<div>{{ $address_book[0]->ContactNumber }}</div>
|
||||
<div>
|
||||
{{ $address_book[0]->Address . ' ' . $address_book[0]->Address2 . ', ' . $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/'.$address_book[0]->Id) }}">[ Edit ]</a>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<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>
|
||||
{{-- <h3>Subtotal: <span id="my_subtotal">{{ round($getSubtotal, 2) }}</span> <small>{{ $store_array[0]->StoreCurrency }}</small></h3> --}}
|
||||
<h5><strong>Subtotal:</strong>
|
||||
<span>{{ number_format($tax['order_grandtotal'], 2) . ' ' . $store_array[0]->StoreCurrency }}</span>
|
||||
</h5>
|
||||
<h5><strong>Shipping Fee:</strong>
|
||||
<span>{{ number_format($shipping_fee, 2) . ' ' . $store_array[0]->StoreCurrency }}</span>
|
||||
</h5>
|
||||
<h5> <strong>Tax:</strong>
|
||||
<span>{{ number_format($tax['tax'], 2) . ' ' . $store_array[0]->StoreCurrency }}</span>
|
||||
</h5>
|
||||
<hr>
|
||||
<h3> <strong>Total:</strong> <span id="my_subtotal">{{ number_format($tax['order_grandtotal'] + $shipping_fee + $tax['tax'], 2) }}</span>
|
||||
<span>{{ $store_array[0]->StoreCurrency }}</span>
|
||||
</h3>
|
||||
<hr>
|
||||
<div class="form-group" id="voucher_list">
|
||||
@foreach($row as $item)
|
||||
@@ -98,7 +138,7 @@
|
||||
<div class="text-center">
|
||||
@foreach($img_thumb as $img)
|
||||
@if($img->ProductId == $item->ProductId)
|
||||
<img class="previewImage" src="{{ config('site_config.prod_private_server_ip') }}/images/{{ $img->Image }}">
|
||||
<img class="previewImage" src="{{ config('site_config.images_url') }}/{{ $img->Image }}">
|
||||
@endif
|
||||
@endforeach
|
||||
</div>
|
||||
@@ -180,11 +220,27 @@
|
||||
<th>Quantity</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
@elseif($item->FormUsed=="jersey-and-shorts-quantity-form")
|
||||
<tr>
|
||||
<th>Jersey Size</th>
|
||||
<th>Shorts Size</th>
|
||||
<th>Price</th>
|
||||
<th>Quantity</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
@elseif($item->FormUsed=="number-jersey-shorts-form")
|
||||
<tr>
|
||||
<th>Number</th>
|
||||
<th>Jersey Size</th>
|
||||
<th>Shorts Size</th>
|
||||
<th>Price</th>
|
||||
<th>Quantity</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
@else
|
||||
|
||||
@endif
|
||||
|
||||
|
||||
@foreach($row as $sub_item)
|
||||
@if($sub_item->ProductId == $item->ProductId)
|
||||
|
||||
@@ -252,6 +308,23 @@
|
||||
<td>{{ $sub_item->Quantity }}</td>
|
||||
<td><a class="btn btn-xs btn-link pull-right" href="{{ url('removeitem') }}/{{ $sub_item->Id }}"><span class="glyphicon glyphicon-remove"></span></a></td>
|
||||
</tr>
|
||||
@elseif($item->FormUsed=="jersey-and-shorts-quantity-form")
|
||||
<tr>
|
||||
<td>{{ $sub_item->JerseySize}}</td>
|
||||
<td>{{ $sub_item->ShortsSize}}</td>
|
||||
<td>{{ $sub_item->Price . ' ' . $store_array[0]->StoreCurrency }}</td>
|
||||
<td>{{ $sub_item->Quantity }}</td>
|
||||
<td><a class="btn btn-xs btn-link pull-right" href="{{ url('removeitem') }}/{{ $sub_item->Id }}"><span class="glyphicon glyphicon-remove"></span></a></td>
|
||||
</tr>
|
||||
@elseif($item->FormUsed=="number-jersey-shorts-form")
|
||||
<tr>
|
||||
<td>{{ $sub_item->Number }}</td>
|
||||
<td>{{ $sub_item->JerseySize }}</td>
|
||||
<td>{{ $sub_item->ShortsSize }}</td>
|
||||
<td>{{ $sub_item->Price . ' ' . $store_array[0]->StoreCurrency }}</td>
|
||||
<td>{{ $sub_item->Quantity }}</td>
|
||||
<td><a class="btn btn-xs btn-link pull-right" href="{{ url('removeitem') }}/{{ $sub_item->Id }}"><span class="glyphicon glyphicon-remove"></span></a></td>
|
||||
</tr>
|
||||
@else
|
||||
|
||||
@endif
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
</style>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<img src="{{asset('public/images/logo.png')}}" class="" height="100px" />
|
||||
<img src="{{asset('/images/logo.png')}}" class="" height="100px" />
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
@@ -64,7 +64,7 @@
|
||||
<table class="table">
|
||||
|
||||
<tr>
|
||||
<td rowspan="2" class="text-center"><img class="previewImage" src="http://{{ config('site_config.prod_private_server_ip') }}/images/{{ $item->Image }} "></td>
|
||||
<td rowspan="2" class="text-center"><img class="previewImage" src="http://{{ config('site_config.images_url') }}/{{ $item->Image }} "></td>
|
||||
<td colspan="5">
|
||||
<h4>{{ $item->ProductName }} {{ $itemOrder }} <br>Price: ${{ $item->Price }}</h4>
|
||||
</td>
|
||||
|
||||
@@ -13,9 +13,9 @@
|
||||
|
||||
<meta property="og:url" content="https://crewsportswear.com" />
|
||||
<meta property="og:type" content="article" />
|
||||
<meta property="og:title" content="CREW Uniform Customizer" />
|
||||
<meta property="og:title" content="CREW Apparel" />
|
||||
<meta property="og:description" content="Custom Uniforms offered in a variety colors to match your team. Browse through our baseball, fastpitch, softball, lacrosse, football, volleyball and basketball gear." />
|
||||
<meta property="og:image" content="{{asset('public/images/logo.png')}}" />
|
||||
<meta property="og:image" content="{{asset('/images/logo.png')}}" />
|
||||
|
||||
<!-- favicons
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="{{asset('public/favicons/apple-touch-icon.png')}}">
|
||||
@@ -28,17 +28,17 @@
|
||||
<title>{{ $store_array[0]->StoreName }} Team Store</title>
|
||||
|
||||
<!-- Bootstrap core CSS -->
|
||||
<link href="{{asset('public/assets/css/bootstrap.min.css')}}" rel="stylesheet">
|
||||
<link href="{{asset('/assets/css/bootstrap.min.css')}}" rel="stylesheet">
|
||||
|
||||
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
|
||||
<link href="{{asset('public/assets/css/ie10-viewport-bug-workaround.css')}}" rel="stylesheet">
|
||||
<link href="{{asset('/assets/css/ie10-viewport-bug-workaround.css')}}" rel="stylesheet">
|
||||
|
||||
<!-- Custom styles for this template -->
|
||||
<link href="{{asset('public/assets/css/style.css')}}" rel="stylesheet">
|
||||
<link href="{{asset('/assets/css/style.css')}}" rel="stylesheet">
|
||||
|
||||
<!-- Just for debugging purposes. Don't actually copy these 2 lines! -->
|
||||
<!--[if lt IE 9]><script src="../../assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
|
||||
<script src="{{asset('public/assets/js/ie-emulation-modes-warning.js')}}"></script>
|
||||
<script src="{{asset('/assets/js/ie-emulation-modes-warning.js')}}"></script>
|
||||
|
||||
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
|
||||
<!--[if lt IE 9]>
|
||||
@@ -51,7 +51,7 @@
|
||||
<!-- Social Media Share button
|
||||
<script type="text/javascript" src="//platform-api.sharethis.com/js/sharethis.js#property=599bc5cf6d61950012975405&product=sticky-share-buttons"></script>-->
|
||||
|
||||
<link href="{{asset('/public/designer/css/build.css')}}" rel="stylesheet">
|
||||
<link href="{{asset('/designer/css/build.css')}}" rel="stylesheet">
|
||||
<style>
|
||||
|
||||
</style>
|
||||
@@ -76,16 +76,16 @@
|
||||
<!-- Bootstrap core JavaScript ================================================= !-->
|
||||
<!-- Placed at the end of the document so the pages load faster -->
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
|
||||
<script src="{{asset('public/assets/js/bootstrap.min.js')}}"></script>
|
||||
<script src="{{asset('/assets/js/bootstrap.min.js')}}"></script>
|
||||
<!-- <script>window.jQuery || document.write('<script src="{{asset('public/assets/js/vendor/jquery.min.js')}}"><\/script>')</script> -->
|
||||
<!-- <script src="https://ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/jquery.validate.min.js"></script> -->
|
||||
<script src="{{asset('public/assets/js/jquery.validate.js')}}"></script>
|
||||
<script src="{{asset('/assets/js/jquery.validate.js')}}"></script>
|
||||
<!-- <script type="text/javascript" src="https://cdn.ywxi.net/js/1.js" async></script> -->
|
||||
<!-- <script src="{{asset('public/assets/js/crew-designer.js')}}"></script> -->
|
||||
<script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
|
||||
<!-- jquery.bcSwipe -->
|
||||
<script src="{{asset('public/assets/js/jquery.bcSwipe.min.js')}}"></script>
|
||||
<script src="{{asset('public/assets/js/jquery.zoom.js')}}"></script>
|
||||
<script src="{{asset('/assets/js/jquery.bcSwipe.min.js')}}"></script>
|
||||
<script src="{{asset('/assets/js/jquery.zoom.js')}}"></script>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<table class="table" id="tableRow" style="font-size:12px;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-4">Name</th>
|
||||
<th class="col-md-4">Name on Jersey</th>
|
||||
<th class="col-md-2">Number</th>
|
||||
<th class="col-md-3">Jersey Size</th>
|
||||
<th class="col-md-3">Shorts Size</th>
|
||||
@@ -12,7 +12,7 @@
|
||||
<tbody id="orderTableBody">
|
||||
<tr class="table-tr-0">
|
||||
<td>
|
||||
<input type="text" name="order_names[]" class="form-control input-sm inputName roster-input" placeholder="Name">
|
||||
<input type="text" name="order_names[]" class="form-control input-sm inputName roster-input" placeholder="Name on Jersey">
|
||||
</td>
|
||||
<td>
|
||||
<select class="form-control input-sm roster-input" name="order_number[]">
|
||||
@@ -27,7 +27,7 @@
|
||||
<select class="form-control input-sm order-size roster-input" name="order_jersey_size[]" data-row-number="1">
|
||||
<option value="none">none</option>
|
||||
@foreach($sizes_array as $size)
|
||||
<option value="{{ $size->Size }}">{{ $size->Size }}</option>
|
||||
<option value="{{ $size->Size }}">{{ $size->SizeDisplay }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</td>
|
||||
@@ -35,7 +35,7 @@
|
||||
<select class="form-control input-sm order-size roster-input" name="order_shorts_size[]" style="border-right: 1px solid #ccc;" data-row-number="1">
|
||||
<option value="none">none</option>
|
||||
@foreach($sizes_array as $size)
|
||||
<option value="{{ $size->Size }}">{{ $size->Size }}</option>
|
||||
<option value="{{ $size->Size }}">{{ $size->SizeDisplay }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</td>
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
<div class="panel-design-details" id="orderListPanel">
|
||||
<table class="table" id="tableRow" style="font-size:12px;">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th class="col-md-4">Jersey Size</th>
|
||||
<th class="col-md-4">Shorts Size</th>
|
||||
<th class="col-md-4">Quantity</th>
|
||||
<th class="text-center"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="orderTableBody">
|
||||
<tr class="table-tr-0">
|
||||
<td>
|
||||
<select class="form-control input-sm order-size roster-input" name="order_jersey_size[]" data-row-number="1">
|
||||
<!-- <option value="none">none</option> !-->
|
||||
@foreach($sizes_array as $size)
|
||||
<option value="{{ $size->Size }}">{{ $size->SizeDisplay }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<select class="form-control input-sm order-size roster-input" name="order_shorts_size[]" data-row-number="1">
|
||||
<!-- <option value="none">none</option> !-->
|
||||
@foreach($sizes_array as $size)
|
||||
<option value="{{ $size->Size }}">{{ $size->SizeDisplay }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<select class="form-control input-sm roster-input" name="quantity[]">
|
||||
@for($i = 1; $i <= 50; $i++)
|
||||
<option value="{{ $i }}">{{ $i }}</option>
|
||||
@endfor
|
||||
</select>
|
||||
</td>
|
||||
<td id="action-column" class="text-center" style="padding: 4px !important; border-top: none">
|
||||
<span class="tr-remove-btn">
|
||||
<button type="button" id="addNewRow" class="btn btn-success btn-sm btn-roster-action" data-toggle="tooltip" title="Add Another"><i class="fa fa-plus" aria-hidden="true"></i></button>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div id="addnew-btn-tbl-row">
|
||||
</div>
|
||||
</div>
|
||||
@@ -20,7 +20,7 @@
|
||||
<td>
|
||||
<select class="form-control input-sm order-size roster-input" name="order_size[]" style="border-right: 1px solid #ccc;" >
|
||||
@foreach($sizes_array as $size)
|
||||
<option value="{{ $size->Size }}">{{ $size->Size }}</option>
|
||||
<option value="{{ $size->Size }}">{{ $size->SizeDisplay }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</td>
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<td>
|
||||
<select class="form-control input-sm order-size roster-input" name="order_size[]" style="border-right: 1px solid #ccc;" data-row-number="1">
|
||||
@foreach($sizes_array as $size)
|
||||
<option value="{{ $size->Size }}">{{ $size->Size }}</option>
|
||||
<option value="{{ $size->Size }}">{{ $size->SizeDisplay }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</td>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<td>
|
||||
<select class="form-control input-sm order-size roster-input" style="border-right: 1px solid #ccc;" name="order_size[]" data-row-number="1">
|
||||
@foreach($sizes_array as $size)
|
||||
<option value="{{ $size->Size }}">{{ $size->Size }}</option>
|
||||
<option value="{{ $size->Size }}">{{ $size->SizeDisplay }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</td>
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
<div class="panel-design-details" id="orderListPanel">
|
||||
<table class="table" id="tableRow" style="font-size:12px;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-3">Number</th>
|
||||
<th class="col-md-4">Jersey Size</th>
|
||||
<th class="col-md-4">Shorts Size</th>
|
||||
<th class="text-center"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="orderTableBody">
|
||||
<tr class="table-tr-0">
|
||||
<td>
|
||||
<select class="form-control input-sm roster-input" name="order_number[]">
|
||||
<option value="none">none</option>
|
||||
@for($i = 0; $i <= 99; $i++)
|
||||
<option value="{{ $i }}">{{ $i }}</option>
|
||||
@endfor
|
||||
<option value="00">00</option>
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<select class="form-control input-sm order-size roster-input" name="order_jersey_size[]" data-row-number="1">
|
||||
<option value="none">none</option>
|
||||
@foreach($sizes_array as $size)
|
||||
<option value="{{ $size->Size }}">{{ $size->SizeDisplay }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<select class="form-control input-sm order-size roster-input" name="order_shorts_size[]" style="border-right: 1px solid #ccc;" data-row-number="1">
|
||||
<option value="none">none</option>
|
||||
@foreach($sizes_array as $size)
|
||||
<option value="{{ $size->Size }}">{{ $size->SizeDisplay }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</td>
|
||||
<td id="action-column" class="text-center" style="padding: 4px !important; border-top: none">
|
||||
<span class="tr-remove-btn">
|
||||
<button type="button" id="addNewRow" class="btn btn-success btn-sm btn-roster-action" data-toggle="tooltip" title="Add Another"><i class="fa fa-plus" aria-hidden="true"></i></button>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div id="addnew-btn-tbl-row">
|
||||
</div>
|
||||
</div>
|
||||
@@ -6,7 +6,7 @@
|
||||
<select class="form-control input-sm cls-uniformSize" name="uniformSize" data-error="#err-uniformSize" required >
|
||||
<option value="">Select Size</option>
|
||||
@foreach($sizes_array as $size)
|
||||
<option value="{{ $size->Size }}">{{ $size->Size }}</option>
|
||||
<option value="{{ $size->Size }}">{{ $size->SizeDisplay }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<span id="err-uniformSize" style="color: #dd4b39"></span>
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
@extends('teamstore-layout.main')
|
||||
@section('content')
|
||||
@if ($store_array[0]->IsHibernated)
|
||||
<script>
|
||||
window.location = "../";
|
||||
</script>
|
||||
@endif
|
||||
|
||||
<style>
|
||||
h2 {
|
||||
width: 100%;
|
||||
@@ -145,6 +151,46 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
@if ($announcement->IsActive)
|
||||
<div class="col-md-12">
|
||||
<div class="alert alert-info">
|
||||
<p><b>Shop Announcements:</b></p>
|
||||
{!! nl2br(e($announcement->Announcement)) !!}
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@if($store_array[0]->Id == 174 || $store_array[0]->Id == 175 || $store_array[0]->Id == 178 || $store_array[0]->Id == 179 || $store_array[0]->Id == 177 || $store_array[0]->Id == 189 || $store_array[0]->Id == 176 || $store_array[0]->Id == 190 || $store_array[0]->Id == 191 || $store_array[0]->Id == 192 || $store_array[0]->Id == 194)
|
||||
<div class="col-md-12">
|
||||
<div class="alert alert-warning">
|
||||
<p><b>Please read:</b></p>
|
||||
1. All orders will be batch shipped to your school for pick up.<br>
|
||||
2. Orders will be batch processed on a weekly basis, please allow 2-3 weeks for delivery.<br>
|
||||
3. Masks and gaiters sold on Crew are not intended for medical use. Crew does not make any medical or health claims.<br>
|
||||
4. Refunds and exchanges are not allowed due to the hygenic nature of the product.<br>
|
||||
@if($store_array[0]->Id == 175)
|
||||
5. $1 from every item sold will benefit the 2020-2021 Maine South Schoolwide Fundraiser.
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@else
|
||||
<div class="col-md-12">
|
||||
<div class="alert alert-warning">
|
||||
<p><b>Please read:</b></p>
|
||||
1. Items purchased are made on demand. Orders will be shipped based on dates set by your store administrator.<br>
|
||||
2. Store payments are processed through PayPal. A PayPal account is not required to make a purchase.<br>
|
||||
@if($store_array[0]->Id == 222)
|
||||
3. Orders will be batch processed on a monthly basis, please allow 4-6 weeks for delivery.<br>
|
||||
@else
|
||||
3. Orders will be batch processed on a weekly basis, please allow 2-3 weeks for delivery.<br>
|
||||
@endif
|
||||
4. We are currently only shipping to US locations. For international orders, please contact <b>orders@crewsportswear.com</b> if you'd like to place an order.<br>
|
||||
5. Expect shipping delays due to COVID-19.<br>
|
||||
6. All sales are final. No returns or exchanges will be accepted.<br><br>
|
||||
|
||||
<b>DISCLAIMER:</b> Masks and gaiters sold by Crew Sportswear are not intended for medical use. Crew Sportswear does not make any medical or health claims.
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
<!-- BEGIN PRODUCTS -->
|
||||
|
||||
@foreach($product_array as $i => $product)
|
||||
@@ -159,7 +205,7 @@
|
||||
<div class="col-md-3 col-sm-6">
|
||||
<span class="thumbnail">
|
||||
<a href="{{ url('teamstore') }}/{{ $store_array[0]->StoreUrl }}/product/{{ $product->ProductURL }}">
|
||||
<img style="height: 201.84px;" src="{{ config('site_config.prod_private_server_ip') }}/images/{{ $filename }}" alt="{{ $product->ProductName }}" >
|
||||
<img style="height: 201.84px;" src="{{ config('site_config.images_url') }}/{{ $filename }}" alt="{{ $product->ProductName }}" >
|
||||
</a>
|
||||
<h4 class="text-center product-name-holder">{{ $product->ProductName }}</h4>
|
||||
<hr class="line">
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
<strong>Whoops!</strong> {!! \Session::get('errors') !!}.<br><br>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<form class="form-horizontal" role="form" method="POST" action="teamstore/checkpassword">
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}">
|
||||
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
@extends('teamstore-layout.main')
|
||||
@section('content')
|
||||
@if ($store_array[0]->IsHibernated)
|
||||
<script>
|
||||
window.location = "../";
|
||||
</script>
|
||||
@endif
|
||||
<style>
|
||||
|
||||
p{
|
||||
@@ -229,13 +234,13 @@
|
||||
@if($thumbnail->ImageClass == 'active')
|
||||
<div class="active item text-center" data-slide-number="{{ $i }}">
|
||||
<span class="zoom img-zoom">
|
||||
<img style="height:400px;" src="{{ config('site_config.prod_private_server_ip') }}/images/{{ $thumbnail->Image }}">
|
||||
<img style="height:400px;" src="{{ config('site_config.images_url') }}/{{ $thumbnail->Image }}">
|
||||
</span>
|
||||
</div>
|
||||
@else
|
||||
<div class="item text-center" data-slide-number="{{ $i }}">
|
||||
<span class="zoom img-zoom">
|
||||
<img style="height:400px;" src="{{ config('site_config.prod_private_server_ip') }}/images/{{ $thumbnail->Image }}">
|
||||
<img style="height:400px;" src="{{ config('site_config.images_url') }}/{{ $thumbnail->Image }}">
|
||||
</span>
|
||||
</div>
|
||||
@endif
|
||||
@@ -264,7 +269,7 @@
|
||||
@foreach($thumbnails_array as $thumbnail)
|
||||
<li class="col-sm-3 col-xs-3">
|
||||
<a class="thumbnail a_thumbnail {{ $thumbnail->ImageClass }}" id="carousel-selector-{{ $j }}">
|
||||
<img class="img img-responsive product-center image-thumbnails" style="height: 59.45px;" src="{{ config('site_config.prod_private_server_ip') }}/images/{{ $thumbnail->Image }}"/>
|
||||
<img class="img img-responsive product-center image-thumbnails" style="height: 59.45px;" src="{{ config('site_config.images_url') }}/{{ $thumbnail->Image }}"/>
|
||||
</a>
|
||||
</li>
|
||||
@define $j++
|
||||
@@ -299,7 +304,7 @@
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<ul class="nav nav-tabs" role="tablist">
|
||||
<li role="presentation" class="active"><a href="#productDescription" aria-controls="productDescription" role="tab" data-toggle="tab">Desciption</a></li>
|
||||
<li role="presentation" class="active"><a href="#productDescription" aria-controls="productDescription" role="tab" data-toggle="tab">Description</a></li>
|
||||
</ul>
|
||||
<!-- Tab panes -->
|
||||
<div class="tab-content">
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
<div class="form-group">
|
||||
<label class="col-sm-7 control-label hidden-xs"> </label>
|
||||
<div class="col-sm-5">
|
||||
<label>Sory by:</label>
|
||||
<label>Sort by:</label>
|
||||
<select class="form-control" name="s" id="select_sort_stores">
|
||||
<option @if($filter == "al-asc") selected @endif value="al-asc">Store Name A → Z</option>
|
||||
<option @if($filter == "al-desc") selected @endif value="al-desc">Store Name Z → A</option>
|
||||
@@ -81,7 +81,7 @@
|
||||
<li class="li-custom col-lg-3 col-md-3 col-sm-4 col-xs-12">
|
||||
<div style="border: 1px solid #dddddd; padding: 5px;">
|
||||
@if($store->Password != null )
|
||||
<a class="thumbnail password-protected" href="#" data-store-url="{{ $store->StoreUrl }}">
|
||||
<a class="thumbnail password-protected" href="#" data-store-id="{{ $store->Id }}" data-store-url="{{ $store->StoreUrl }}">
|
||||
<img class="store-logo" src="{{ config('site_config.uploads') . 'teamstore/'. $store->ImageFolder . '/' . $store->StoreLogo }}">
|
||||
</a>
|
||||
<h4 style="border-top: 1px solid #dddddd; padding: 10px; font-size: 16px; font-weight: bold; text-transform: uppercase;" class="text-center">{{ $store->StoreName }} <i class="fa fa-lock" title="This store is password protected."></i></h4>
|
||||
@@ -124,11 +124,12 @@
|
||||
|
||||
<form class="form-horizontal" role="form" method="POST" action="{{ url('teamstore/checkpassword') }}">
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}">
|
||||
|
||||
<input type="hidden" class="form-control" id="_teamstore_id" name="store_id">
|
||||
<div class="form-group">
|
||||
<label class="col-md-4 control-label">Password</label>
|
||||
<div class="col-md-6">
|
||||
<div class="input-group">
|
||||
|
||||
<input type="password" class="form-control pwd" name="password">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default reveal-password" type="button"><i class="fa fa-eye"></i></button>
|
||||
|
||||
@@ -100,6 +100,8 @@
|
||||
<option value="name-number-size-form">Name, Number and Size Form</option>
|
||||
<option value="number-form">Number Only Form</option>
|
||||
<option value="name-size-form">Name and Size Form</option>
|
||||
<option value="jersey-and-shorts-quantity-form">Jersey, Shorts and Quantity Form</option>
|
||||
<option value="number-jersey-shorts-form">Number, Jersey and Shorts Form</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@@ -117,7 +119,10 @@
|
||||
<option value="toddler">Toddler</option>
|
||||
<option value="youth">Youth</option>
|
||||
<option value="adult">Adult</option>
|
||||
<option value="none">None</option>
|
||||
<option value="mask">Mask</option>
|
||||
<option value="gaiter">Gaiter</option>
|
||||
<option value="buckethat">Buckethat</option>
|
||||
<option value="none">None</option>
|
||||
</select>
|
||||
<span id="err_available_size"></span>
|
||||
</div>
|
||||
|
||||
@@ -34,15 +34,13 @@
|
||||
<tr>
|
||||
<th>Full name</th>
|
||||
<th>Address</th>
|
||||
<th>Postcode</th>
|
||||
<th>Phone Number</th>
|
||||
<th class="text-center">Action</th>
|
||||
</tr>
|
||||
@foreach($array_address_book as $row)
|
||||
<tr>
|
||||
<td>{{ $row->Fullname }}</td>
|
||||
<td>{{ $row->Address }}</td>
|
||||
<td>{{ $row->State }}, {{ $row->City }}, {{ $row->ZipCode }}</td>
|
||||
<td>{{ $row->Address . ' ' . $row->Address2 }}, {{ $row->State }}, {{ $row->City }}, {{ $row->Country}} {{ $row->CountryCode}}, {{ $row->ZipCode }}</td>
|
||||
<td>{{ $row->ContactNumber }}</td>
|
||||
<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>
|
||||
|
||||
51
resources/views/user-layouts/announcement.blade.php
Normal file
51
resources/views/user-layouts/announcement.blade.php
Normal file
@@ -0,0 +1,51 @@
|
||||
@extends('user-layouts.user_template')
|
||||
@section('content')
|
||||
<div class="content-wrapper" style="min-height: 916px;">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
Announcement
|
||||
<!-- <small>Control panel</small> -->
|
||||
</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ url ('user') }}"><i class="fa fa-home"></i> Home</a></li>
|
||||
<li class="active">Announcement</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">Announcement</h3>
|
||||
<div class="pull-right">
|
||||
<input type="checkbox" id="isActiveAnnouncement" @if($data->IsActive) checked @endif data-id={{ $data->Id }} name="isActiveAnnouncement" data-toggle="toggle" data-width="100px" data-on="<i class='fa fa-check-circle'></i> Active" data-off="<i class='fa fa-ban'></i> Inactive" data-size="small">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form role="form" id="form_announcement">
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
<label>Current Announcement</label>
|
||||
<textarea class="form-control" rows="5" name="announcementInput" placeholder="Announcement">{{ $data->Announcement }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<button type="submit" class="btn btn-primary btn-custom-save">Save Changes</button>
|
||||
</div>
|
||||
</form>
|
||||
{{-- {!! nl2br(e($data->Announcement)) !!} --}}
|
||||
<div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
@endsection
|
||||
@@ -42,7 +42,7 @@
|
||||
@foreach($array_client_designs as $row)
|
||||
@foreach($array_template_paths as $key => $row1)
|
||||
@if($key == 0)
|
||||
<img src="{{ config('site_config.prod_private_server_ip') }}/images/{{ $row->DesignCode }}-front-thumbnail.png" alt="{{ $row->DesignName }}" id="main-thumbnail" class="img img-responsive">
|
||||
<img src="{{ config('site_config.images_url') }}/{{ $row->DesignCode }}-front-thumbnail.png" alt="{{ $row->DesignName }}" id="main-thumbnail" class="img img-responsive">
|
||||
@endif
|
||||
@endforeach
|
||||
@endforeach
|
||||
@@ -56,7 +56,7 @@
|
||||
@if($key == 0)
|
||||
<li class="col-sm-3 col-xs-3">
|
||||
<a class="thumbnail a_thumbnail active">
|
||||
<img class="img img-responsive product-center image-thumbnails" style="height: 59.45px;" src="{{ config('site_config.prod_private_server_ip') }}/images/{{ $row->DesignCode }}-front-thumbnail.png"/>
|
||||
<img class="img img-responsive product-center image-thumbnails" style="height: 59.45px;" src="{{ config('site_config.images_url') }}/{{ $row->DesignCode }}-front-thumbnail.png"/>
|
||||
</a>
|
||||
<!-- <p>Select Default Thumbnail:</p>
|
||||
<div class="text-center">
|
||||
@@ -66,7 +66,7 @@
|
||||
@else
|
||||
<li class="col-sm-3 col-xs-3">
|
||||
<a class="thumbnail a_thumbnail">
|
||||
<img class="img img-responsive product-center image-thumbnails" style="height: 59.45px;" src="{{ config('site_config.prod_private_server_ip') }}/images/{{ $row->DesignCode }}-{{ strtolower($row1->Side) }}-thumbnail.png"/>
|
||||
<img class="img img-responsive product-center image-thumbnails" style="height: 59.45px;" src="{{ config('site_config.images_url') }}/{{ $row->DesignCode }}-{{ strtolower($row1->Side) }}-thumbnail.png"/>
|
||||
</a>
|
||||
<!-- <p> </p>
|
||||
<div class="text-center">
|
||||
|
||||
@@ -1,81 +1,93 @@
|
||||
@extends('user-layouts.user_template')
|
||||
@section('content')
|
||||
<div class="content-wrapper" style="min-height: 916px;">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
Address Book
|
||||
<!-- <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/address-book') }}""><i class="fa fa-address-book-o"></i> Address Book</a></li>
|
||||
<li class="active">Add New Address</li>
|
||||
|
||||
</ol>
|
||||
</section>
|
||||
<div class="content-wrapper" style="min-height: 916px;">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
Address Book
|
||||
<!-- <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/address-book') }}"><i class="fa fa-address-book-o"></i> Address Book</a></li>
|
||||
<li class="active">Add New Address</li>
|
||||
|
||||
<!-- 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">
|
||||
Add New Address
|
||||
</h3>
|
||||
</div>
|
||||
<form role="form" id="frm-create-address-book">
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label>Fullname</label>
|
||||
<input type="text" class="form-control" name="fullname" placeholder="Fullaname">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Mobile Number</label>
|
||||
<input type="text" class="form-control" name="mobilenumber" placeholder="Please enter your mobile number">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Other Notes</label>
|
||||
<input type="text" class="form-control" name="othernotes" placeholder="Please enter your notes">
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
</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">
|
||||
Add New Address
|
||||
</h3>
|
||||
</div>
|
||||
<form role="form" id="frm-create-address-book">
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label>Fullname</label>
|
||||
<input type="text" class="form-control" name="fullname" placeholder="Fullaname">
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<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">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>State</label>
|
||||
<select class="form-control" name="state" id="lst-states" >
|
||||
<option value="">Select State</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>City</label>
|
||||
<select class="form-control" name="city" id="lst-cities">
|
||||
<option value="">Select City</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Zip Code</label>
|
||||
<input type="text" class="form-control" name="zipcode" placeholder="Please enter your zip code">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Mobile Number</label>
|
||||
<input type="text" class="form-control" name="mobilenumber" placeholder="Please enter your mobile number">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Other Notes</label>
|
||||
<input type="text" class="form-control" name="othernotes" placeholder="Please enter your notes">
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label>Country</label>
|
||||
<select class="form-control" name="countryCode" id="select_country" onchange="selectCountry(this)">
|
||||
<option value="">Select Country</option>
|
||||
<option value="US">United States</option>
|
||||
<option value="CA">Canada</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>State / Province</label>
|
||||
<select class="form-control" name="state" id="lst-states">
|
||||
<option value="">Select State</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>City</label>
|
||||
<select class="form-control" name="city" id="lst-cities">
|
||||
<option value="">Select City</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Address 1</label>
|
||||
<textarea type="text" class="form-control" name="address" placeholder="Address 1"></textarea>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Address 2</label>
|
||||
<textarea type="text" class="form-control" name="address2" placeholder="Address 2"></textarea>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Zip Code</label>
|
||||
<input type="text" class="form-control" name="zipcode" placeholder="Please enter your zip code">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<button type="submit" class="btn btn-primary btn-custom-save">Save</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<button type="submit" class="btn btn-primary btn-custom-save">Save</button>
|
||||
</div>
|
||||
</form>
|
||||
<div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
@endsection
|
||||
</div>
|
||||
@endsection
|
||||
@@ -46,8 +46,12 @@
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<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 }}">
|
||||
<label>Country</label>
|
||||
<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 States</option>
|
||||
<option value="CA">Canada</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>State</label>
|
||||
@@ -61,6 +65,15 @@
|
||||
<option value="">Select City</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Address 1</label>
|
||||
<input type="text" class="form-control" name="address" placeholder="Address 1" value="{{ $array_address_book[0]->Address }}">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Address 2</label>
|
||||
<input type="text" class="form-control" name="address2" placeholder="Address 2" value="{{ $array_address_book[0]->Address2 }}">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Zip Code</label>
|
||||
<input type="text" class="form-control" name="zipcode" placeholder="Please enter your zip code" value="{{ $array_address_book[0]->ZipCode }}">
|
||||
|
||||
@@ -17,15 +17,81 @@
|
||||
|
||||
<section class="content">
|
||||
@if(Auth::user()->email_is_verified == "0")
|
||||
<div class="alert alert-warning alert-dismissible">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<h4><i class="icon fa fa-check"></i> To do!</h4>
|
||||
Please verify your Email Address. <a href="{{ url('user/email-verify') }}">Click here</a>
|
||||
</div>
|
||||
<div class="text-center" id="homepage-logo">
|
||||
<div class="alert alert-warning alert-dismissible">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<h4><i class="icon fa fa-check"></i> To do!</h4>
|
||||
Please verify your Email Address. <a href="{{ url('user/email-verify') }}">Click here</a>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($data['isStoreOwner'])
|
||||
<div class="row">
|
||||
<div class="col-lg-3 col-xs-6">
|
||||
<!-- small box -->
|
||||
<div class="small-box bg-aqua">
|
||||
<div class="inner">
|
||||
<h3>{{ $data['store_order'] or 0 }}</h3>
|
||||
<p>Total Item Ordered</p>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="ion ion-bag"></i>
|
||||
</div>
|
||||
<a href="./user/store-orders" class="small-box-footer">More info <i class="fa fa-arrow-circle-right"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ./col -->
|
||||
<div class="col-lg-3 col-xs-6">
|
||||
<!-- small box -->
|
||||
<div class="small-box bg-green">
|
||||
<div class="inner">
|
||||
<h3>{{ number_format($data['store_income'], 2) }}</h3>
|
||||
|
||||
<p>Store Income</p>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="ion ion-cash"></i>
|
||||
</div>
|
||||
<a href="#" class="small-box-footer">More info <i class="fa fa-arrow-circle-right"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ./col -->
|
||||
<div class="col-lg-3 col-xs-6">
|
||||
<!-- small box -->
|
||||
<div class="small-box bg-yellow">
|
||||
<div class="inner">
|
||||
<h3>{{ $data['store_product_count'] or 0 }}</h3>
|
||||
|
||||
<p>Total Products</p>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="ion ion-ios-pricetags"></i>
|
||||
</div>
|
||||
<a href="#" class="small-box-footer">More info <i class="fa fa-arrow-circle-right"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ./col -->
|
||||
<div class="col-lg-3 col-xs-6">
|
||||
<!-- small box -->
|
||||
<div class="small-box bg-red">
|
||||
<div class="inner">
|
||||
<h3>{{ $data['store_published_product'] or 0 }}</h3>
|
||||
|
||||
<p>Total Published Product</p>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="ion ion-ios-pricetags-outline"></i>
|
||||
</div>
|
||||
<a href="#" class="small-box-footer">More info <i class="fa fa-arrow-circle-right"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ./col -->
|
||||
</div>
|
||||
|
||||
@else
|
||||
<div class="text-center" id="homepage-logo">
|
||||
<img src="{{asset('/images/logo.png')}}" style="height: 200px;" class="img img-responsive" />
|
||||
</div>
|
||||
@endif
|
||||
<img src="{{asset('/public/images/logo.png')}}" style="height: 200px;" class="img img-responsive" />
|
||||
</div>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
@foreach($array_client_designs as $row)
|
||||
<div class="col-md-3 col-sm-6">
|
||||
<span class="thumbnail">
|
||||
<img src="{{ config('site_config.prod_private_server_ip') }}/images/{{ $row->DesignCode }}-front-thumbnail.png" alt="{{ $row->DesignName }}" >
|
||||
<img src="{{ config('site_config.images_url') }}/{{ $row->DesignCode }}-front-thumbnail.png" alt="{{ $row->DesignName }}" >
|
||||
<h4 class="design-name-holder">{{ $row->DesignName }}</h4>
|
||||
<small>{{ date('F j, Y g:i a', strtotime($row->DateCreated)) }}</small>
|
||||
<hr class="line">
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<div class="text-center">
|
||||
<img class="previewImage" id="active_thumbnail" src="{{ config('site_config.prod_private_server_ip') . '/images/' . $array_thumbnail_display[0]->Image }}">
|
||||
<img class="previewImage" id="active_thumbnail" src="{{ config('site_config.images_url') . '/images/' . $array_thumbnail_display[0]->Image }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-10">
|
||||
@@ -84,6 +84,36 @@
|
||||
<th>Price</th>
|
||||
<th>Quantity</th>
|
||||
</tr>
|
||||
@elseif($array_item[0]->FormUsed=="name-name2-size-form")
|
||||
<tr>
|
||||
<th>Gamer Tag</th>
|
||||
<th>Name</th>
|
||||
<th>Size</th>
|
||||
<th>Price</th>
|
||||
<th>Quantity</th>
|
||||
</tr>
|
||||
@elseif($array_item[0]->FormUsed=="name-size-form")
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Size</th>
|
||||
<th>Price</th>
|
||||
<th>Quantity</th>
|
||||
</tr>
|
||||
@elseif($array_item[0]->FormUsed=="jersey-and-shorts-quantity-form")
|
||||
<tr>
|
||||
<th>Jersey Size</th>
|
||||
<th>Shorts Size</th>
|
||||
<th>Price</th>
|
||||
<th>Quantity</th>
|
||||
</tr>
|
||||
@elseif($array_item[0]->FormUsed=="number-jersey-shorts-form")
|
||||
<tr>
|
||||
<th>Number</th>
|
||||
<th>Jersey Size</th>
|
||||
<th>Shorts Size</th>
|
||||
<th>Price</th>
|
||||
<th>Quantity</th>
|
||||
</tr>
|
||||
@else
|
||||
|
||||
@endif
|
||||
@@ -134,6 +164,37 @@
|
||||
<td>{{ $array_item[0]->Price }}</td>
|
||||
<td>{{ $array_item[0]->Quantity }}</td>
|
||||
</tr>
|
||||
|
||||
@elseif($array_item[0]->FormUsed=="name-name2-size-form")
|
||||
<tr>
|
||||
<td>{{ $array_item[0]->Name }}</td>
|
||||
<td>{{ $array_item[0]->Name2 }}</td>
|
||||
<td>{{ $array_item[0]->Size }}</td>
|
||||
<td>{{ $array_item[0]->Price . ' ' . $store_array[0]->StoreCurrency }}</td>
|
||||
<td>{{ $array_item[0]->Quantity }}</td>
|
||||
</tr>
|
||||
@elseif($array_item[0]->FormUsed=="name-size-form")
|
||||
<tr>
|
||||
<td>{{ $array_item[0]->Name }}</td>
|
||||
<td>{{ $array_item[0]->Size }}</td>
|
||||
<td>{{ $array_item[0]->Price . ' ' . $store_array[0]->StoreCurrency }}</td>
|
||||
<td>{{ $array_item[0]->Quantity }}</td>
|
||||
</tr>
|
||||
@elseif($array_item[0]->FormUsed=="jersey-and-shorts-quantity-form")
|
||||
<tr>
|
||||
<td>{{ $array_item[0]->JerseySize}}</td>
|
||||
<td>{{ $array_item[0]->ShortsSize}}</td>
|
||||
<td>{{ $array_item[0]->Price . ' ' . $store_array[0]->StoreCurrency }}</td>
|
||||
<td>{{ $array_item[0]->Quantity }}</td>
|
||||
</tr>
|
||||
@elseif($array_item[0]->FormUsed=="number-jersey-shorts-form")
|
||||
<tr>
|
||||
<td>{{ $array_item[0]->Number }}</td>
|
||||
<td>{{ $array_item[0]->JerseySize }}</td>
|
||||
<td>{{ $array_item[0]->ShortsSize }}</td>
|
||||
<td>{{ $array_item[0]->Price . ' ' . $store_array[0]->StoreCurrency }}</td>
|
||||
<td>{{ $array_item[0]->Quantity }}</td>
|
||||
</tr>
|
||||
@else
|
||||
|
||||
@endif
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
<div class="text-center">
|
||||
@foreach($img_thumb as $img)
|
||||
@if($img->ProductId == $item->ProductId)
|
||||
<img class="previewImage" src="{{ config('site_config.prod_private_server_ip') }}/images/{{ $img->Image }}">
|
||||
<img class="previewImage" src="{{ config('site_config.images_url') }}/{{ $img->Image }}">
|
||||
@endif
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
@foreach($array_client_designs as $row)
|
||||
@foreach($array_template_paths as $key => $row1)
|
||||
@if($key == 0)
|
||||
<img src="{{ config('site_config.prod_private_server_ip') }}/images/{{ $row->DesignCode }}-front-thumbnail.png" alt="{{ $row->DesignName }}" id="main-thumbnail" class="img img-responsive">
|
||||
<img src="{{ config('site_config.images_url') }}/{{ $row->DesignCode }}-front-thumbnail.png" alt="{{ $row->DesignName }}" id="main-thumbnail" class="img img-responsive">
|
||||
@endif
|
||||
@endforeach
|
||||
@endforeach
|
||||
@@ -56,7 +56,7 @@
|
||||
@if($key == 0)
|
||||
<li class="col-sm-3 col-xs-3">
|
||||
<a class="thumbnail a_thumbnail active">
|
||||
<img class="img img-responsive product-center image-thumbnails" style="height: 59.45px;" src="{{ config('site_config.prod_private_server_ip') }}/images/{{ $row->DesignCode }}-front-thumbnail.png"/>
|
||||
<img class="img img-responsive product-center image-thumbnails" style="height: 59.45px;" src="{{ config('site_config.images_url') }}/{{ $row->DesignCode }}-front-thumbnail.png"/>
|
||||
</a>
|
||||
<!-- <p>Select Default Thumbnail:</p>
|
||||
<div class="text-center">
|
||||
@@ -66,7 +66,7 @@
|
||||
@else
|
||||
<li class="col-sm-3 col-xs-3">
|
||||
<a class="thumbnail a_thumbnail">
|
||||
<img class="img img-responsive product-center image-thumbnails" style="height: 59.45px;" src="{{ config('site_config.prod_private_server_ip') }}/images/{{ $row->DesignCode }}-{{ strtolower($row1->Side) }}-thumbnail.png"/>
|
||||
<img class="img img-responsive product-center image-thumbnails" style="height: 59.45px;" src="{{ config('site_config.images_url') }}/{{ $row->DesignCode }}-{{ strtolower($row1->Side) }}-thumbnail.png"/>
|
||||
</a>
|
||||
<!-- <p> </p>
|
||||
<div class="text-center">
|
||||
@@ -144,6 +144,10 @@
|
||||
<option value="toddler">Toddler</option>
|
||||
<option value="youth">Youth</option>
|
||||
<option value="adult">Adult</option>
|
||||
<option value="mask">Mask</option>
|
||||
<option value="gaiter">Gaiter</option>
|
||||
<option value="buckethat">Buckethat</option>
|
||||
<option value="none">None</option>
|
||||
</select>
|
||||
<span id="err_available_size"></span>
|
||||
</div>
|
||||
|
||||
@@ -49,6 +49,11 @@
|
||||
</li>
|
||||
@endif
|
||||
@if(Auth::user()->role == "store_owner")
|
||||
<li class="{{ Request::is('user/announcement') ? 'active' : '' }}">
|
||||
<a href="{{ url('user/announcement') }}">
|
||||
<i class="fa fa-bullhorn"></i> <span>Announcement</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="treeview menu-open {{ Request::is('user/store-items', 'user/store-settings', 'user/store-orders') ? 'active' : '' }}">
|
||||
<a href="#">
|
||||
<i class="fa fa-cog"></i> <span>Team Store</span>
|
||||
|
||||
@@ -51,6 +51,7 @@
|
||||
<table class="table table-bordered table-condensed nowrap" id="tbl_store_orders">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Status</th>
|
||||
<th>Invoice No.</th>
|
||||
<th>Product Name</th>
|
||||
<th>Name</th>
|
||||
@@ -77,7 +78,8 @@
|
||||
<tbody>
|
||||
@foreach($array_store_orders as $item_order)
|
||||
<tr>
|
||||
<td>{{ $item_order->InvoiceNumber . ' - ' . $item_order->Order_Id }}</td>
|
||||
<td>{{ $item_order->StepLabel }}</td>
|
||||
<td>{{ $item_order->InvoiceNumber }}</td>
|
||||
<td>{{ $item_order->ProductName }}</td>
|
||||
<td>{{ $item_order->Name }}</td>
|
||||
<td>{{ $item_order->Number }}</td>
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
<div class="col-md-3 col-sm-6">
|
||||
<div class="thumbnail" >
|
||||
<a href="{{ url('user/store-items/item') }}/{{ $product->ProductURL }}">
|
||||
<img style="height:200px" src="{{ config('site_config.prod_private_server_ip') }}/images/{{ $filename . '?t=' . time() }}" alt="{{ $product->ProductName }}" >
|
||||
<img style="height:200px" src="{{ config('site_config.images_url') }}/{{ $filename . '?t=' . time() }}" alt="{{ $product->ProductName }}" >
|
||||
</a>
|
||||
<hr class="line">
|
||||
<div class="pull-right">
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
<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 }}" >
|
||||
<img style="height:200px" src="{{ config('site_config.images_url') }}/{{ $filename . '?t=' . time() }}" alt="{{ $product->ProductName }}" >
|
||||
</a>
|
||||
<hr class="line">
|
||||
<div class="pull-right">
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -39,7 +39,7 @@
|
||||
@foreach($array_client_designs as $row)
|
||||
@foreach($array_template_paths as $key => $row1)
|
||||
@if($key == 0)
|
||||
<img src="{{ config('site_config.prod_private_server_ip') }}/images/{{ $row->DesignCode }}-front-thumbnail.png" alt="{{ $row->DesignName }}" id="main-thumbnail" class="img img-responsive">
|
||||
<img src="{{ config('site_config.images_url') }}/{{ $row->DesignCode }}-front-thumbnail.png" alt="{{ $row->DesignName }}" id="main-thumbnail" class="img img-responsive">
|
||||
@endif
|
||||
@endforeach
|
||||
@endforeach
|
||||
@@ -53,13 +53,13 @@
|
||||
@if($key == 0)
|
||||
<li class="col-sm-3 col-xs-3">
|
||||
<a class="thumbnail a_thumbnail active">
|
||||
<img class="img img-responsive product-center image-thumbnails" style="height: 59.45px;" src="{{ config('site_config.prod_private_server_ip') }}/images/{{ $row->DesignCode }}-front-thumbnail.png"/>
|
||||
<img class="img img-responsive product-center image-thumbnails" style="height: 59.45px;" src="{{ config('site_config.images_url') }}/{{ $row->DesignCode }}-front-thumbnail.png"/>
|
||||
</a>
|
||||
</li>
|
||||
@else
|
||||
<li class="col-sm-3 col-xs-3">
|
||||
<a class="thumbnail a_thumbnail">
|
||||
<img class="img img-responsive product-center image-thumbnails" style="height: 59.45px;" src="{{ config('site_config.prod_private_server_ip') }}/images/{{ $row->DesignCode }}-{{ strtolower($row1->Side) }}-thumbnail.png"/>
|
||||
<img class="img img-responsive product-center image-thumbnails" style="height: 59.45px;" src="{{ config('site_config.images_url') }}/{{ $row->DesignCode }}-{{ strtolower($row1->Side) }}-thumbnail.png"/>
|
||||
</a>
|
||||
</li>
|
||||
@endif
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
<li class="active">{{ $product_array[0]->ProductName }}</li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
@@ -37,7 +36,7 @@
|
||||
<div class="col-md-12 text-center">
|
||||
@foreach($thumbnails_array as $thumbnail)
|
||||
@if($thumbnail->ImageClass == 'active')
|
||||
<img style="height:400px" src="{{ config('site_config.prod_private_server_ip') }}/images/{{ $thumbnail->Image . '?t=' . time() }}" id="main-thumbnail">
|
||||
<img style="height:400px" src="{{ config('site_config.images_url') }}/{{ $thumbnail->Image . '?t=' . time() }}" id="main-thumbnail">
|
||||
@endif
|
||||
@endforeach
|
||||
</div>
|
||||
@@ -48,7 +47,7 @@
|
||||
<li class="col-sm-3 col-xs-4">
|
||||
<a class="thumbnail btn-add-thumbnail" style="border-bottom-left-radius: 0px; border-botomt-right-radius: 0px; margin-bottom: -28px; cursor: pointer;">
|
||||
<!-- <span class="close">×</span> -->
|
||||
<img class="img img-responsive product-center " style="height: 65.45px;" src="{{ asset('/public/images/add-new-img.svg') }}"/>
|
||||
<img class="img img-responsive product-center " style="height: 65.45px;" src="{{ asset('/images/add-new-img.svg') }}"/>
|
||||
<!-- <p class="center">Add Image</p> -->
|
||||
<p class="text-center">
|
||||
Add Image
|
||||
@@ -59,7 +58,7 @@
|
||||
<li class="col-sm-3 col-xs-4">
|
||||
<a class="thumbnail a_thumbnail {{ $thumbnail->ImageClass }}" style="border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; margin-bottom: -28px;">
|
||||
<!-- <span class="close">×</span> -->
|
||||
<img class="img img-responsive product-center image-thumbnails" style="height: 59.45px;" src="{{ config('site_config.prod_private_server_ip') }}/images/{{ $thumbnail->Image . '?t=' . time() }}"/>
|
||||
<img class="img img-responsive product-center image-thumbnails" style="height: 59.45px;" src="{{ config('site_config.images_url') }}/{{ $thumbnail->Image . '?t=' . time() }}"/>
|
||||
</a>
|
||||
<div class="funkyradio">
|
||||
<div class="funkyradio-primary">
|
||||
@@ -128,6 +127,8 @@
|
||||
<option value="name-number-size-form" @if($product_array[0]->ProductForm == "name-number-size-form") selected @endif>Name, Number and Size Form</option>
|
||||
<option value="number-form" @if($product_array[0]->ProductForm == "number-form") selected @endif>Number Only Form</option>
|
||||
<option value="name-size-form" @if($product_array[0]->ProductForm == "name-size-form") selected @endif>Name and Size Form</option>
|
||||
<option value="jersey-and-shorts-quantity-form" @if($product_array[0]->ProductForm == "jersey-and-shorts-quantity-form") selected @endif>Jersey, Shorts and Quantity Form</option>
|
||||
<option value="number-jersey-shorts-form" @if($product_array[0]->ProductForm == "number-jersey-shorts-form") selected @endif>Number, Jersey and Shorts Form</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@@ -136,6 +137,9 @@
|
||||
<option value="toddler" @if(in_array("toddler", $available_size)) selected @endif>Toddler</option>
|
||||
<option value="youth" @if(in_array("youth", $available_size)) selected @endif>Youth</option>
|
||||
<option value="adult" @if(in_array("adult", $available_size)) selected @endif>Adult</option>
|
||||
<option value="mask" @if(in_array("mask", $available_size)) selected @endif>Mask</option>
|
||||
<option value="gaiter" @if(in_array("gaiter", $available_size)) selected @endif>Gaiter</option>
|
||||
<option value="buckethat" @if(in_array("buckethat", $available_size)) selected @endif>Buckethat</option>
|
||||
<option value="none" @if(in_array("none", $available_size)) selected @endif>None</option>
|
||||
</select>
|
||||
<span id="err_available_size"></span>
|
||||
@@ -144,9 +148,20 @@
|
||||
<label>Item Privacy</label>
|
||||
<select class="form-control" name="item_privacy">
|
||||
<option value="public" @if($product_array[0]->PrivacyStatus == "public") selected @endif>Public</option>
|
||||
<option value="private" @if($product_array[0]->PrivacyStatus == "private") selected @endif">Private</option>
|
||||
<option value="private" @if($product_array[0]->PrivacyStatus == "private") selected @endif>Private</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Select Shipping Category</label>
|
||||
<select class="form-control" name="shipping_cost" required>
|
||||
<option value="0">None</option>
|
||||
@foreach ($shipping_cost as $sc)
|
||||
<option value="{{ $sc->Id }}" @if($sc->Id == $product_array[0]->ShippingCostId) selected @endif>{{ $sc->DisplayName }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<span id="err_available_size"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -185,7 +200,7 @@
|
||||
|
||||
<tr id="{{ 'item-' . $thumbnail->Id }}">
|
||||
<td class="text-center" style="width: 50px"><i class="fa fa-bars"></i></td>
|
||||
<td><img class="img img-responsive product-center" style="height: 59.45px;" src="{{ config('site_config.prod_private_server_ip') }}/images/{{ $thumbnail->Image . '?t=' . time() }}"/></td>
|
||||
<td><img class="img img-responsive product-center" style="height: 59.45px;" src="{{ config('site_config.images_url') }}/{{ $thumbnail->Image . '?t=' . time() }}"/></td>
|
||||
<td class="text-center">
|
||||
<!-- <button class="btn btn-default btn-xs btn-edit-clipart" data-id="#"><i class="fa fa-edit"></i></button> -->
|
||||
<button class="btn btn-default btn-sm btn-delete-item-image" data-id="{{ $thumbnail->Id }}" data-filename="{{ $thumbnail->Image }}" title="Delete Image"><i class="fa fa-trash"></i></button>
|
||||
|
||||
0
storage/.gitignore
vendored
Normal file → Executable file
0
storage/.gitignore
vendored
Normal file → Executable file
0
storage/app/.gitignore
vendored
Normal file → Executable file
0
storage/app/.gitignore
vendored
Normal file → Executable file
0
storage/framework/.gitignore
vendored
Normal file → Executable file
0
storage/framework/.gitignore
vendored
Normal file → Executable file
0
storage/framework/cache/.gitignore
vendored
Normal file → Executable file
0
storage/framework/cache/.gitignore
vendored
Normal file → Executable file
0
storage/framework/sessions/.gitignore
vendored
Normal file → Executable file
0
storage/framework/sessions/.gitignore
vendored
Normal file → Executable file
0
storage/framework/views/.gitignore
vendored
Normal file → Executable file
0
storage/framework/views/.gitignore
vendored
Normal file → Executable file
0
storage/laravel-analytics/hardy-beach-228905-7755a62c7a35.p12
Normal file → Executable file
0
storage/laravel-analytics/hardy-beach-228905-7755a62c7a35.p12
Normal file → Executable file
0
storage/logs/.gitignore
vendored
Normal file → Executable file
0
storage/logs/.gitignore
vendored
Normal file → Executable file
Reference in New Issue
Block a user