Compare commits
61 Commits
shipping_f
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3dac8ee685 | ||
|
|
09974721f3 | ||
|
|
8215ad8337 | ||
|
|
368ac50729 | ||
|
|
8f094ee89c | ||
|
|
0551cb078f | ||
|
|
26620fc043 | ||
|
|
f10d6daa6f | ||
|
|
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 |
6
.env.local
Normal file
6
.env.local
Normal file
@@ -0,0 +1,6 @@
|
||||
# Local Development MinIO Configuration
|
||||
# Copy to .env.local and update with your MinIO credentials
|
||||
|
||||
# MinIO credentials (get from your production server)
|
||||
MINIO_KEY=secret_key
|
||||
MINIO_SECRET=your_minio_root_password
|
||||
6
.env.local.example
Normal file
6
.env.local.example
Normal file
@@ -0,0 +1,6 @@
|
||||
# Local Development MinIO Configuration
|
||||
# Copy to .env.local and update with your MinIO credentials
|
||||
|
||||
# MinIO credentials (get from your production server)
|
||||
MINIO_KEY=your_minio_root_user
|
||||
MINIO_SECRET=your_minio_root_password
|
||||
21
.env.minio.example
Normal file
21
.env.minio.example
Normal file
@@ -0,0 +1,21 @@
|
||||
# MinIO S3 Storage Configuration
|
||||
# Add these to your production .env file
|
||||
|
||||
# MinIO Endpoint (internal Docker network)
|
||||
MINIO_ENDPOINT=http://crew-minio-prod:9000
|
||||
|
||||
# MinIO Credentials (get from /var/www/apps/minio-storage/.env)
|
||||
MINIO_KEY=your_minio_root_user
|
||||
MINIO_SECRET=your_minio_root_password
|
||||
|
||||
# Bucket name
|
||||
MINIO_BUCKET=crewsportswear
|
||||
|
||||
# Region (required for S3 compatibility)
|
||||
MINIO_REGION=us-east-1
|
||||
|
||||
# Use path-style endpoint (required for MinIO)
|
||||
MINIO_USE_PATH_STYLE=true
|
||||
|
||||
# Public URL for accessing files (use your actual domain)
|
||||
MINIO_URL=https://minio.crewsportswear.app
|
||||
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
|
||||
@@ -6,7 +6,7 @@
|
||||
# Redirect Trailing Slashes...
|
||||
RewriteRule ^(.*)/$public /$1 [L,R=301]
|
||||
RewriteCond %{SERVER_PORT} 80
|
||||
#RewriteRule ^(.*)$ https://www.crewsportswear.com/beta/$1 [R,L]
|
||||
RewriteRule ^(.*)$ https://www.crewsportswear.com/beta/$1 [R,L]
|
||||
# Handle Front Controller...
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
|
||||
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 {
|
||||
|
||||
@@ -31,7 +31,7 @@ class MainController extends Controller {
|
||||
foreach ($fetchData as $row) {
|
||||
?>
|
||||
<div class="col-md-3 col-sm-6 col-xs-12 list-sport">
|
||||
<a href="<?php echo url('sports') . "/" . $row->URL; ?>"><img src="<?php echo config('site_config.uploads') . 'sports-thumbnails/' . $row->Thumbnail; ?>" alt="" class="img img-responsive product-center" /></a>
|
||||
<a href="<?php echo url('sports') . "/" . $row->URL; ?>"><img src="<?php echo minio_url('uploads/images/sports-thumbnails/' . $row->Thumbnail); ?>" alt="" class="img img-responsive product-center" /></a>
|
||||
<h3 class="text-center sports-title"><?php echo $row->SportsName ?></h3>
|
||||
</div>
|
||||
<?php
|
||||
|
||||
@@ -367,14 +367,11 @@ class DesignerController extends Controller {
|
||||
?>
|
||||
<div class="form-group col-md-3">
|
||||
<div class="thumbnail clipart-thumnail">
|
||||
<a href="#" class="img-clipart" data-link="<?php echo $row->SVGFilename; ?>"><img src="<?php echo config('site_config.uploads') . 'cliparts/'. $row->SVGFilename; ?>" width="100%"></a>
|
||||
<a href="#" class="img-clipart" data-link="<?php echo $row->SVGFilename; ?>"><img src="<?php echo minio_url('uploads/images/cliparts/') . $row->SVGFilename; ?>" width="100%"></a>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public function clipartProperties(Request $request)
|
||||
@@ -829,8 +826,9 @@ class DesignerController extends Controller {
|
||||
}
|
||||
|
||||
$arr = array(
|
||||
'small' => config('site_config.uploads') . $small ,
|
||||
'large' => config('site_config.uploads') . $large
|
||||
|
||||
'small' => minio_url('uploads/images') . $small ,
|
||||
'large' => minio_url('uploads/images') . $large
|
||||
);
|
||||
|
||||
return json_encode($arr);
|
||||
|
||||
@@ -2,35 +2,54 @@
|
||||
|
||||
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
|
||||
{
|
||||
|
||||
private $_apiContext;
|
||||
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->_apiContext = Paypal::ApiContext(
|
||||
config('services.paypal.client_id'),
|
||||
config('services.paypal.secret')
|
||||
$paypal_env = "live";
|
||||
$paypal_apiUrl = 'https://api.paypal.com'; // default
|
||||
|
||||
if ($paypal_env == 'live') {
|
||||
$paypal_apiUrl = 'https://api.paypal.com';
|
||||
} else {
|
||||
$paypal_apiUrl = 'https://api.sandbox.paypal.com';
|
||||
}
|
||||
|
||||
$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' => 'sandbox',
|
||||
'service.EndPoint' => 'https://api.sandbox.paypal.com',
|
||||
'mode' => $paypal_env,
|
||||
'service.EndPoint' => $paypal_apiUrl,
|
||||
'http.ConnectionTimeOut' => 30,
|
||||
'log.LogEnabled' => true,
|
||||
'log.FileName' => storage_path('logs/paypal.log'),
|
||||
@@ -39,7 +58,7 @@ class PaypalController extends Controller
|
||||
|
||||
// live
|
||||
// $this->_apiContext->setConfig(array(
|
||||
// 'mode' => 'live',
|
||||
// 'mode' => 'sandbox',
|
||||
// 'service.EndPoint' => 'https://api.paypal.com',
|
||||
// 'http.ConnectionTimeOut' => 30,
|
||||
// 'log.LogEnabled' => true,
|
||||
@@ -57,71 +76,112 @@ class PaypalController extends Controller
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
$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);
|
||||
$shipping_charges = 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'
|
||||
);
|
||||
}
|
||||
}
|
||||
$shippingFee = $this->getShippingFee($cartKey);
|
||||
|
||||
$shipping_charges += $item->ShippingFee * $item->Quantity;
|
||||
}
|
||||
$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 || $grouped_item[0]->StoreId == 111 || $grouped_item[0]->StoreId == 131 || $grouped_item[0]->StoreId == 30 || $grouped_item[0]->StoreId == 141) {
|
||||
$tax_value = 0;
|
||||
} else {
|
||||
$tax_value = 0.10;
|
||||
}
|
||||
|
||||
$tax = $order_grandtotal * $tax_value;
|
||||
|
||||
foreach ($updated_items as $key => $item) {
|
||||
|
||||
@@ -139,15 +199,37 @@ class PaypalController extends Controller
|
||||
$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($shipping_charges);
|
||||
$amount_details->setShipping($shippingFee);
|
||||
|
||||
$amount = PayPal::Amount();
|
||||
$amount->setCurrency($store_array[0]->StoreCurrency);
|
||||
$amount->setDetails($amount_details);
|
||||
$amount->setTotal($order_grandtotal + $tax + $shipping_charges);
|
||||
$amount->setTotal($order_grandtotal + $tax + $shippingFee);
|
||||
|
||||
$transaction = PayPal::Transaction();
|
||||
$transaction->setAmount($amount);
|
||||
@@ -159,9 +241,10 @@ class PaypalController extends Controller
|
||||
$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);
|
||||
@@ -200,19 +283,306 @@ class PaypalController extends Controller
|
||||
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
|
||||
$paypal_model = new PayPalModel;
|
||||
$m = new TeamStoreModel;
|
||||
$cartKey = $request->session()->get('cartkey');
|
||||
$userId = Auth::user()->id;
|
||||
$user_email = Auth::user()->email;
|
||||
|
||||
|
||||
$checkCartKey = $paypal_model->checkCartKey($cartKey);
|
||||
|
||||
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');
|
||||
}
|
||||
|
||||
$id = $request->get('paymentId');
|
||||
$token = $request->get('token');
|
||||
$payer_id = $request->get('PayerID');
|
||||
|
||||
try {
|
||||
$payment = PayPal::getById($id, $this->_apiContext);
|
||||
|
||||
$payment = PayPal::getById($id, $this->_apiContext);
|
||||
$paymentExecution = PayPal::PaymentExecution();
|
||||
|
||||
$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');
|
||||
}
|
||||
|
||||
$paymentExecution->setPayerId($payer_id);
|
||||
$executePayment = $payment->execute($paymentExecution, $this->_apiContext);
|
||||
|
||||
// print_r($executePayment);
|
||||
// if ($executePayment->getState() == 'approved') {
|
||||
@@ -224,151 +594,9 @@ class PaypalController extends Controller
|
||||
// // 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;
|
||||
$shipping_cost = $obj->transactions[0]->amount->details->shipping;
|
||||
|
||||
$relatedResources = $obj->transactions[0]->related_resources[0];
|
||||
$saleId = $relatedResources->sale->id; // transaction_id
|
||||
//
|
||||
// $sale = $relatedResources[0]->getSale();
|
||||
// echo $saleId = $sale->getId();
|
||||
|
||||
$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;
|
||||
$cartKey = $request->session()->get('cartkey');
|
||||
$userId = Auth::user()->id;
|
||||
$user_email = Auth::user()->email;
|
||||
|
||||
$items = $m->myCart($cartKey); // item from cart_tmp
|
||||
$getSubtotal = $m->getSubtotal($cartKey);
|
||||
|
||||
$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_cost,
|
||||
'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(", ", $other_email);
|
||||
$email_cc = "orders@crewsportswear.com" . "," . $other_email;
|
||||
} else {
|
||||
$email_cc = "orders@crewsportswear.com";
|
||||
}
|
||||
|
||||
// $explode_other_email = explode(",", $email_cc);
|
||||
$explode_other_email = "orders@crewsportswear.com"; // test_email
|
||||
|
||||
$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
|
||||
$m->delete_cartTmp("CartKey", $cartKey);
|
||||
$request->session()->forget('cartkey'); // clear session for cartkey
|
||||
|
||||
// redirect to thank you page.
|
||||
return view('paypal.get_done')
|
||||
->with('currency', $currency)
|
||||
->with('total', $total);
|
||||
|
||||
// var_dump($obj->payer->payer_info->shipping_address);
|
||||
// var_dump($obj->transactions[0]->item_list->shipping_address);
|
||||
}
|
||||
|
||||
|
||||
@@ -380,6 +608,10 @@ class PaypalController extends Controller
|
||||
$items = $m->myCart($cartKey);
|
||||
$getSubtotal = $m->getSubtotal($cartKey);
|
||||
|
||||
if ($items == null) {
|
||||
return redirect()->route('cart');
|
||||
}
|
||||
|
||||
foreach ($items as $item) {
|
||||
if ($item->VoucherId != null) {
|
||||
$voucherIds[] = $item->VoucherId;
|
||||
@@ -402,4 +634,47 @@ class PaypalController extends Controller
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,11 +6,14 @@ 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
|
||||
@@ -20,6 +23,8 @@ class TeamStoreController extends Controller
|
||||
{
|
||||
// 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 = '';
|
||||
@@ -48,6 +53,7 @@ class TeamStoreController extends Controller
|
||||
}
|
||||
}
|
||||
|
||||
$displayThumbnails = 'product-image-placeholder.png';
|
||||
|
||||
foreach ($product_array as $p => $pr_arr) {
|
||||
|
||||
@@ -80,11 +86,24 @@ class TeamStoreController extends Controller
|
||||
);
|
||||
}
|
||||
}
|
||||
$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('announcement', $data)
|
||||
->with('thumbnails', $thumbnails);
|
||||
}
|
||||
|
||||
@@ -151,9 +170,10 @@ class TeamStoreController extends Controller
|
||||
|
||||
public function checkTeamStorePassword(Request $request)
|
||||
{
|
||||
$m = new TeamStoreModel;
|
||||
$post = $request->all();
|
||||
$store_array = $m->selectTeamStore('Password', $post['password']);
|
||||
$m = new TeamStoreModel;
|
||||
$post = $request->all();
|
||||
|
||||
$store_array = $m->checkStorePassword($post['store_id'], $post['password']);
|
||||
|
||||
if ($store_array) {
|
||||
$request->session()->put('teamstore_data_array', $store_array);
|
||||
@@ -183,6 +203,7 @@ class TeamStoreController extends Controller
|
||||
'ImageClass' => 'active'
|
||||
);
|
||||
|
||||
|
||||
$thumbnails_array[] = $data;
|
||||
}
|
||||
|
||||
@@ -246,7 +267,7 @@ class TeamStoreController extends Controller
|
||||
}
|
||||
|
||||
if ($item[0]->ProductAvailableQty != null) {
|
||||
$soldQty = $m->getSoldQty($product_array[0]->Id);
|
||||
$soldQty = $TeamStoreModel->getSoldQty($item[0]->Id);
|
||||
$availableQty = $item[0]->ProductAvailableQty - $soldQty[0]->SoldQty;
|
||||
} else {
|
||||
// echo 'no qty';
|
||||
@@ -282,7 +303,7 @@ class TeamStoreController extends Controller
|
||||
$product_form = $product_array[0]->ProductForm;
|
||||
$design_code = $product_array[0]->DesignCode;
|
||||
$product_name = $product_array[0]->ProductName;
|
||||
$shipping_fee = $product_array[0]->ShippingFee;
|
||||
$shipping_cost_id = $product_array[0]->ShippingCostId;
|
||||
|
||||
$teamstore_array = $m->selectTeamStore('Id', $TeamStoreId);
|
||||
|
||||
@@ -318,7 +339,7 @@ class TeamStoreController extends Controller
|
||||
'ShortsSize' => $order_shorts_size[$key],
|
||||
'Price' => $final_price,
|
||||
'Quantity' => 1,
|
||||
'ShippingFee' => $shipping_fee
|
||||
'ShippingCostId' => $shipping_cost_id
|
||||
);
|
||||
}
|
||||
} elseif ($product_form == "tshirt-form") {
|
||||
@@ -335,7 +356,7 @@ class TeamStoreController extends Controller
|
||||
'Size' => $post['uniformSize'],
|
||||
'Price' => $ProductPrice,
|
||||
'Quantity' => $post['quantity'],
|
||||
'ShippingFee' => $shipping_fee
|
||||
'ShippingCostId' => $shipping_cost_id
|
||||
);
|
||||
} elseif ($product_form == "quantity-form") {
|
||||
|
||||
@@ -350,7 +371,7 @@ class TeamStoreController extends Controller
|
||||
'ProductName' => $product_name,
|
||||
'Price' => $ProductPrice,
|
||||
'Quantity' => $post['quantity'],
|
||||
'ShippingFee' => $shipping_fee
|
||||
'ShippingCostId' => $shipping_cost_id
|
||||
);
|
||||
} elseif ($product_form == "name-number-form") {
|
||||
|
||||
@@ -371,7 +392,7 @@ class TeamStoreController extends Controller
|
||||
'Number' => $order_number[$key],
|
||||
'Price' => $ProductPrice,
|
||||
'Quantity' => 1,
|
||||
'ShippingFee' => $shipping_fee
|
||||
'ShippingCostId' => $shipping_cost_id
|
||||
);
|
||||
}
|
||||
} elseif ($product_form == "name-number-size-form") {
|
||||
@@ -395,7 +416,7 @@ class TeamStoreController extends Controller
|
||||
'Number' => $order_number[$key],
|
||||
'Price' => $ProductPrice,
|
||||
'Quantity' => 1,
|
||||
'ShippingFee' => $shipping_fee
|
||||
'ShippingCostId' => $shipping_cost_id
|
||||
);
|
||||
}
|
||||
} elseif ($product_form == "number-form") {
|
||||
@@ -415,7 +436,7 @@ class TeamStoreController extends Controller
|
||||
'Number' => $order_number[$key],
|
||||
'Price' => $ProductPrice,
|
||||
'Quantity' => 1,
|
||||
'ShippingFee' => $shipping_fee
|
||||
'ShippingCostId' => $shipping_cost_id
|
||||
);
|
||||
}
|
||||
} elseif ($product_form == "name-name2-size-form") {
|
||||
@@ -439,7 +460,7 @@ class TeamStoreController extends Controller
|
||||
'Size' => $order_size[$key],
|
||||
'Price' => $ProductPrice,
|
||||
'Quantity' => 1,
|
||||
'ShippingFee' => $shipping_fee
|
||||
'ShippingCostId' => $shipping_cost_id
|
||||
);
|
||||
}
|
||||
} elseif ($product_form == "name-size-form") {
|
||||
@@ -461,7 +482,7 @@ class TeamStoreController extends Controller
|
||||
'Size' => $order_size[$key],
|
||||
'Price' => $ProductPrice,
|
||||
'Quantity' => 1,
|
||||
'ShippingFee' => $shipping_fee
|
||||
'ShippingCostId' => $shipping_cost_id
|
||||
);
|
||||
}
|
||||
} elseif ($product_form == "jersey-and-shorts-quantity-form") {
|
||||
@@ -492,7 +513,7 @@ class TeamStoreController extends Controller
|
||||
'ShortsSize' => $order_shorts_size[$key],
|
||||
'Price' => $final_price,
|
||||
'Quantity' => $quantity[$key],
|
||||
'ShippingFee' => $shipping_fee
|
||||
'ShippingCostId' => $shipping_cost_id
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -524,7 +545,7 @@ class TeamStoreController extends Controller
|
||||
'ShortsSize' => $order_shorts_size[$key],
|
||||
'Price' => $final_price,
|
||||
'Quantity' => 1,
|
||||
'ShippingFee' => $shipping_fee
|
||||
'ShippingCostId' => $shipping_cost_id
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -548,6 +569,21 @@ class TeamStoreController extends Controller
|
||||
{
|
||||
|
||||
$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);
|
||||
@@ -562,7 +598,7 @@ class TeamStoreController extends Controller
|
||||
|
||||
$item_thumbs = $m->selectDisplayCartThumb();
|
||||
$store_array = $m->selectTeamStore('Id', $defId);
|
||||
$shipping_cost = 0;
|
||||
|
||||
|
||||
if ($items) {
|
||||
$voucherIds = array();
|
||||
@@ -570,8 +606,6 @@ class TeamStoreController extends Controller
|
||||
if ($item->VoucherId != null) {
|
||||
$voucherIds[] = $item->VoucherId;
|
||||
}
|
||||
|
||||
$shipping_cost += $item->ShippingFee * $item->Quantity;
|
||||
}
|
||||
$vouchers = $m->selectVoucherWhereIn($voucherIds);
|
||||
}
|
||||
@@ -603,6 +637,15 @@ class TeamStoreController extends Controller
|
||||
} 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)
|
||||
@@ -610,7 +653,10 @@ class TeamStoreController extends Controller
|
||||
->with('img_thumb', $item_thumbs)
|
||||
->with('getSubtotal', $finalSubTotal)
|
||||
->with('store_array', $store_array)
|
||||
->with('shipping_cost', $shipping_cost);
|
||||
->with('store_array', $store_array)
|
||||
->with('shipping_fee', $shippingFee)
|
||||
->with('tax', $tax)
|
||||
->with('address_book', $array_address_book);
|
||||
}
|
||||
|
||||
public function addVoucher(Request $request)
|
||||
@@ -636,7 +682,7 @@ class TeamStoreController extends Controller
|
||||
);
|
||||
|
||||
$getVoucher = $TeamStoreModel->selectVoucher($data);
|
||||
|
||||
$now = Carbon::now();
|
||||
if ($getVoucher) {
|
||||
$items = $TeamStoreModel->myCart($cartKey);
|
||||
|
||||
@@ -648,6 +694,20 @@ class TeamStoreController extends Controller
|
||||
'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
|
||||
|
||||
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')
|
||||
@@ -219,10 +228,4 @@ class TeamStoreModel extends Model {
|
||||
return $i;
|
||||
}
|
||||
|
||||
function delete_cartTmp($field, $cartKey){
|
||||
$i = DB::table('cart_tmp')
|
||||
->where($field, $cartKey)
|
||||
->delete();
|
||||
return $i;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
33
app/helpers.php
Normal file
33
app/helpers.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
if (!function_exists('minio_url')) {
|
||||
/**
|
||||
* Generate MinIO URL for a file
|
||||
*
|
||||
* @param string $path File path relative to bucket
|
||||
* @return string Full MinIO URL
|
||||
*/
|
||||
function minio_url($path)
|
||||
{
|
||||
$bucket = env('MINIO_BUCKET', 'crewsportswear');
|
||||
$baseUrl = env('MINIO_URL', 'https://minio.crewsportswear.app');
|
||||
|
||||
// Remove leading slash if present
|
||||
$path = ltrim($path, '/');
|
||||
|
||||
return $baseUrl . '/' . $bucket . '/' . $path;
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('minio_image_url')) {
|
||||
/**
|
||||
* Generate MinIO URL for an image in uploads/images/
|
||||
*
|
||||
* @param string $filename Image filename
|
||||
* @return string Full MinIO URL
|
||||
*/
|
||||
function minio_image_url($filename)
|
||||
{
|
||||
return minio_url('uploads/images/' . $filename);
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,8 @@
|
||||
"guzzlehttp/guzzle": "~5.0",
|
||||
"google/recaptcha": "~1.1",
|
||||
"spatie/laravel-analytics": "^1.4",
|
||||
"league/flysystem-sftp": "^1.0"
|
||||
"league/flysystem-sftp": "^1.0",
|
||||
"aws/aws-sdk-php": "~3.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~4.0",
|
||||
@@ -24,7 +25,10 @@
|
||||
],
|
||||
"psr-4": {
|
||||
"App\\": "app/"
|
||||
}
|
||||
},
|
||||
"files": [
|
||||
"app/helpers.php"
|
||||
]
|
||||
},
|
||||
"autoload-dev": {
|
||||
"classmap": [
|
||||
|
||||
@@ -26,7 +26,7 @@ return [
|
||||
|
|
||||
*/
|
||||
|
||||
'url' => 'http://localhost',
|
||||
'url' => env('APP_URL', 'http://localhost'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
||||
@@ -86,6 +86,18 @@ return [
|
||||
'driver' => 'local',
|
||||
'root' => '/var/www/html/uploads/images',
|
||||
],
|
||||
|
||||
'minio' => [
|
||||
'driver' => 's3',
|
||||
'key' => env('MINIO_KEY'),
|
||||
'secret' => env('MINIO_SECRET'),
|
||||
'region' => env('MINIO_REGION', 'us-east-1'),
|
||||
'bucket' => env('MINIO_BUCKET', 'crewsportswear'),
|
||||
'endpoint' => env('MINIO_ENDPOINT'),
|
||||
'use_path_style_endpoint' => env('MINIO_USE_PATH_STYLE', true),
|
||||
'url' => env('MINIO_URL', 'https://minio.crewsportswear.app'),
|
||||
],
|
||||
|
||||
],
|
||||
|
||||
];
|
||||
];
|
||||
@@ -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' => 'AR1FObcz7lD_p53BJpOw1Frf0hIJ1-VOArYoDnsNJXVvoxjYv6mOKBBvdvZBzQcpBPfB_AJnofdalO0t',
|
||||
'secret' => 'EK0CB8Re802HTxLQawwjAYzOu-SxrFOwuVG7qZ_nSovwgkp77wVs6k4XelXj2v5Il5llCFzsWs_Eb4o-'
|
||||
],
|
||||
'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_'
|
||||
],
|
||||
];
|
||||
|
||||
@@ -17,6 +17,7 @@ return [
|
||||
// 'company_email' => env('COMPANY_email','contact@acme.inc'),
|
||||
|
||||
'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
|
||||
89
docker-compose.local.yml
Normal file
89
docker-compose.local.yml
Normal file
@@ -0,0 +1,89 @@
|
||||
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=
|
||||
# MinIO S3 Storage (connect to production MinIO for testing)
|
||||
- MINIO_ENDPOINT=https://minio.crewsportswear.app
|
||||
- MINIO_KEY=${MINIO_KEY:-minioadmin}
|
||||
- MINIO_SECRET=${MINIO_SECRET:-minioadmin}
|
||||
- MINIO_BUCKET=crewsportswear
|
||||
- MINIO_REGION=us-east-1
|
||||
- MINIO_USE_PATH_STYLE=false
|
||||
- MINIO_URL=https://minio.crewsportswear.app
|
||||
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://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"
|
||||
# Production environment (crewsportswear.com) - Uses paid SSL certificate
|
||||
- "traefik.http.routers.crewsportswear-prod.rule=Host(`crewsportswear.com`)"
|
||||
- "traefik.http.routers.crewsportswear-prod.entrypoints=websecure"
|
||||
- "traefik.http.routers.crewsportswear-prod.tls=true"
|
||||
- "traefik.http.services.crewsportswear-prod.loadbalancer.server.port=80"
|
||||
# HTTP to HTTPS redirect
|
||||
- "traefik.http.routers.crewsportswear-prod-http.rule=Host(`crewsportswear.com`)"
|
||||
- "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
84
readme.md
84
readme.md
@@ -1,23 +1,79 @@
|
||||
## Laravel PHP Framework
|
||||
# Crew Sportswear
|
||||
|
||||
[](https://travis-ci.org/laravel/framework)
|
||||
[](https://packagist.org/packages/laravel/framework)
|
||||
[](https://packagist.org/packages/laravel/framework)
|
||||
[](https://packagist.org/packages/laravel/framework)
|
||||
[](https://packagist.org/packages/laravel/framework)
|
||||
A custom sportswear and apparel e-commerce platform built with Laravel.
|
||||
|
||||
Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable, creative experience to be truly fulfilling. Laravel attempts to take the pain out of development by easing common tasks used in the majority of web projects, such as authentication, routing, sessions, queueing, and caching.
|
||||
## Production URL
|
||||
|
||||
Laravel is accessible, yet powerful, providing powerful tools needed for large, robust applications. A superb inversion of control container, expressive migration system, and tightly integrated unit testing support give you the tools you need to build any application with which you are tasked.
|
||||
https://crewsportswear.com
|
||||
|
||||
## Official Documentation
|
||||
## Requirements
|
||||
|
||||
Documentation for the framework can be found on the [Laravel website](http://laravel.com/docs).
|
||||
- Docker & Docker Compose
|
||||
- PHP 7.4+
|
||||
- MySQL 5.7+
|
||||
- Composer
|
||||
- Node.js & NPM
|
||||
|
||||
## Contributing
|
||||
## Installation
|
||||
|
||||
Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](http://laravel.com/docs/contributions).
|
||||
1. Clone the repository
|
||||
2. Copy `.env.example` to `.env` and configure your environment variables
|
||||
3. Install PHP dependencies:
|
||||
```bash
|
||||
composer install
|
||||
```
|
||||
4. Install Node dependencies:
|
||||
```bash
|
||||
npm install
|
||||
```
|
||||
5. Generate application key:
|
||||
```bash
|
||||
php artisan key:generate
|
||||
```
|
||||
6. Run migrations:
|
||||
```bash
|
||||
php artisan migrate
|
||||
```
|
||||
|
||||
### License
|
||||
## Docker Deployment
|
||||
|
||||
The Laravel framework is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)
|
||||
### Local Development
|
||||
```bash
|
||||
docker-compose -f docker-compose.local.yml up -d
|
||||
```
|
||||
|
||||
### Development Environment
|
||||
```bash
|
||||
docker-compose -f docker-compose.dev.yml up -d
|
||||
```
|
||||
|
||||
### Production Environment
|
||||
```bash
|
||||
docker-compose -f docker-compose.prod.yml up -d
|
||||
```
|
||||
|
||||
The production environment uses Traefik as a reverse proxy with paid SSL certificate for crewsportswear.com.
|
||||
|
||||
## Features
|
||||
|
||||
- Custom sportswear design interface
|
||||
- Product catalog and management
|
||||
- Order processing and tracking
|
||||
- User authentication and profiles
|
||||
- Analytics integration
|
||||
- Email notifications
|
||||
- reCAPTCHA integration
|
||||
|
||||
## Environment Variables
|
||||
|
||||
Key environment variables (see `.env.example` for full list):
|
||||
- `APP_ENV` - Application environment (local, development, production)
|
||||
- `APP_URL` - Application URL
|
||||
- `DB_*` - Database configuration
|
||||
- `MAIL_*` - Mail server configuration
|
||||
- `ANALYTICS_*` - Google Analytics configuration
|
||||
- `CAPTCHA_*` - reCAPTCHA keys
|
||||
|
||||
## License
|
||||
|
||||
Proprietary - All rights reserved
|
||||
|
||||
@@ -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>
|
||||
@@ -428,7 +446,7 @@
|
||||
@foreach ($pattern_arrays as $i => $val)
|
||||
<div class="item @if ($i == 0) active @endif">
|
||||
<div class="btn-group patternBox ">
|
||||
<button type="button" data-pattern-path="{{ $val[0]->SVGPath }}" class="patternThumbs btn" data-id="{{ $val[0]->PatternId }}" style="background-image:url('{{ config('site_config.uploads') }}{{ $val[0]->PatternThumbnail }}'); background-size:cover; background-repeat: no-repeat;" @if ($i == 0) disabled @endif> @if ($i == 0) <i class="fa fa-2 fa-check" aria-hidden="true"></i> @endif</button>
|
||||
<button type="button" data-pattern-path="{{ $val[0]->SVGPath }}" class="patternThumbs btn" data-id="{{ $val[0]->PatternId }}" style="background-image:url('{{ minio_url('uploads/images/' . $val[0]->PatternThumbnail) }}'); background-size:cover; background-repeat: no-repeat;" @if ($i == 0) disabled @endif> @if ($i == 0) <i class="fa fa-2 fa-check" aria-hidden="true"></i> @endif</button>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
@@ -528,7 +546,7 @@
|
||||
@foreach ($pattern_arrays as $r => $val)
|
||||
<div class="item @if ($r == 0) active @endif">
|
||||
<div class="btn-group patternBox ">
|
||||
<button type="button" data-pattern-path="{{ $val[0]->SVGPath }}" class="patternTrimThumbs patternTrim{{ $i }} btn" data-id="{{ $val[0]->PatternId }}" data-trim="{{ $i }}" style="background-image:url('{{ config('site_config.uploads') }}{{ $val[0]->PatternThumbnail }}'); background-size:cover; background-repeat: no-repeat;" @if ($r == 0) disabled @endif> @if ($r == 0) <i class="fa fa-2 fa-check" aria-hidden="true"></i> @endif</button>
|
||||
<button type="button" data-pattern-path="{{ $val[0]->SVGPath }}" class="patternTrimThumbs patternTrim{{ $i }} btn" data-id="{{ $val[0]->PatternId }}" data-trim="{{ $i }}" style="background-image:url('{{ minio_url('uploads/images/' . $val[0]->PatternThumbnail) }}'); background-size:cover; background-repeat: no-repeat;" @if ($r == 0) disabled @endif> @if ($r == 0) <i class="fa fa-2 fa-check" aria-hidden="true"></i> @endif</button>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
@@ -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();
|
||||
}
|
||||
@@ -1288,7 +1306,7 @@
|
||||
|
||||
var patternSVGPath = $(this).attr('data-pattern-path');
|
||||
|
||||
var patternPath = "{{ config('site_config.uploads') }}" + patternSVGPath;
|
||||
var patternPath = "{{ env('MINIO_URL', 'https://minio.crewsportswear.app') }}/{{ env('MINIO_BUCKET', 'crewsportswear') }}/" + patternSVGPath;
|
||||
|
||||
var SideAndPath = {!! json_encode($templatepaths_arrays) !!};
|
||||
|
||||
@@ -1365,7 +1383,7 @@
|
||||
$(document).on('button click', '.patternTrimThumbs', function(){
|
||||
|
||||
var patternSVGPath = $(this).attr('data-pattern-path');
|
||||
var patternPath = "{{ config('site_config.uploads') }}" + patternSVGPath;
|
||||
var patternPath = "{{ env('MINIO_URL', 'https://minio.crewsportswear.app') }}/{{ env('MINIO_BUCKET', 'crewsportswear') }}/" + patternSVGPath;
|
||||
var getTrimId = $(this).attr('data-trim');
|
||||
|
||||
var SideAndPath = {!! json_encode($templatepaths_arrays) !!};
|
||||
@@ -1509,7 +1527,7 @@
|
||||
var gradientIds = sideName+"_"+type+"_Gradients";
|
||||
var gradientPrefix = sideName+"_"+type+"_";
|
||||
|
||||
var tempPath = "{{ config('site_config.uploads') }}" + pathLocation;
|
||||
var tempPath = "{{ env('MINIO_URL', 'https://minio.crewsportswear.app') }}/{{ env('MINIO_BUCKET', 'crewsportswear') }}/" + pathLocation;
|
||||
console.log(tempPath)
|
||||
if(!document.getElementById(objectId))
|
||||
return false;
|
||||
@@ -1693,7 +1711,7 @@
|
||||
var type = SideAndPath[i]['Type'];
|
||||
var pathLocation = SideAndPath[i]['Path'];
|
||||
var canvasName = "canvas_" + type + "_" + sideName;
|
||||
var tempPath = "{{ config('site_config.uploads') }}" + pathLocation;
|
||||
var tempPath = "{{ env('MINIO_URL', 'https://minio.crewsportswear.app') }}/{{ env('MINIO_BUCKET', 'crewsportswear') }}/" + pathLocation;
|
||||
|
||||
window['canvas_' + type + '_' + sideName] = new fabric.Canvas(canvasName);
|
||||
var templateFormat = SideAndPath[i]['TemplateFormat'];
|
||||
@@ -2025,9 +2043,9 @@
|
||||
|
||||
if(objType == "curvedText"){
|
||||
if(obj.effect == "curved"){
|
||||
$('#teamname_text_shape').html('Text Shape: <br><img src="{{ config('site_config.uploads') }}text-shapes-logo/curve-logo.png" height="30px">');
|
||||
$('#teamname_text_shape').html('Text Shape: <br><img src="{{ minio_url('uploads/images/text-shapes-logo/curve-logo.png') }}" height="30px">');
|
||||
}else if(obj.effect == "arc"){
|
||||
$('#teamname_text_shape').html('Text Shape: <br><img src="{{ config('site_config.uploads') }}text-shapes-logo/arch-logo.png" height="30px">');
|
||||
$('#teamname_text_shape').html('Text Shape: <br><img src="{{ minio_url('uploads/images/text-shapes-logo/arch-logo.png') }}" height="30px">');
|
||||
}else{
|
||||
$('#teamname_text_shape').html('Add text Shape');
|
||||
}
|
||||
@@ -3327,7 +3345,7 @@
|
||||
function loadSVGClipart(dataUrl){
|
||||
var k = 0;
|
||||
var arrayPathId = [];
|
||||
var svgUrl = "{{ config('site_config.uploads') }}cliparts/" + dataUrl;
|
||||
var svgUrl = "{{ env('MINIO_URL', 'https://minio.crewsportswear.app') }}/{{ env('MINIO_BUCKET', 'crewsportswear') }}/uploads/images/cliparts/" + dataUrl;
|
||||
fabric.loadSVGFromURL(svgUrl, function(objects, options) {
|
||||
var clipart = fabric.util.groupSVGElements(objects, options );
|
||||
clipart.set({
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -387,10 +387,6 @@
|
||||
<td class="col-md-3">Tax</td>
|
||||
<td>{{ $array_payment_details[0]->Tax . ' ' . $array_payment_details[0]->Currency }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="col-md-3">Shipping Fee</td>
|
||||
<td>{{ $array_payment_details[0]->ShippingCost . ' ' . $array_payment_details[0]->Currency }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="col-md-3">Total</td>
|
||||
<td>{{ $array_payment_details[0]->Total . ' ' . $array_payment_details[0]->Currency }}</td>
|
||||
@@ -411,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>
|
||||
|
||||
@@ -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,18 +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')}}" />
|
||||
@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> --}}
|
||||
</a>
|
||||
|
||||
</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>
|
||||
|
||||
@@ -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,39 +51,49 @@
|
||||
@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> --}}
|
||||
<div class="alert alert-info">
|
||||
<a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>
|
||||
<p>Free Shipping on orders with subtotal over 150.00 {{ $store_array[0]->StoreCurrency }}</p>
|
||||
</div>
|
||||
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<th>Subtotal</th>
|
||||
<td>{{ round($getSubtotal, 2) }}</span> <small>{{ $store_array[0]->StoreCurrency }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Tax</th>
|
||||
<td>{{ round($getSubtotal, 2) * 0.10 }}</span> <small>{{ $store_array[0]->StoreCurrency }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Shipping Fee</th>
|
||||
<td>{{ round($shipping_cost, 2) }}</span> <small>{{ $store_array[0]->StoreCurrency }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><h5>Total<h5></th>
|
||||
<td><h5>{{ round($getSubtotal + $shipping_cost + ($getSubtotal * 0.10), 2) }}</span> <small>{{ $store_array[0]->StoreCurrency }}</h5></td>
|
||||
</tr>
|
||||
</table>
|
||||
<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)
|
||||
@if($item->VoucherId != null)
|
||||
<div class="btn-group">
|
||||
@if($item->VoucherType == "Percentage")
|
||||
<button type="button" class="btn btn-default btn-xs">{{ $item->VoucherCode . ' ' . $item->VoucherValue . '%' }} OFF</button>
|
||||
<button type="button" class="btn btn-default btn-xs">{{ $item->VoucherCode . ' ' . $item->VoucherValue . '%' }} OFF</button>
|
||||
@else
|
||||
<button type="button" class="btn btn-default btn-xs">{{ $item->VoucherCode . ' ' . $item->VoucherValue . ' ' . $store_array[0]->StoreCurrency }} OFF</button>
|
||||
@endif
|
||||
@@ -105,13 +122,13 @@
|
||||
</div>
|
||||
|
||||
<div style="border: 1px solid #e2e2e2; padding: 10px;">
|
||||
<a @if($getSubtotal <= 0 ) disabled @endif href="{{ url('getCheckout') }}" class="btn btn-primary btn-block" style="background-color: #ffc300; border-color: #e2ad00; text-align: -webkit-center;" ><img src="{{asset('/public/images/paypal1.png')}}" class="img img-responsive" style="height:30px;"></a><br>
|
||||
<a @if($getSubtotal <= 0 ) disabled @endif href="{{ url('getCheckout') }}" class="btn btn-primary btn-block" style="background-color: #ffc300; border-color: #e2ad00; text-align: -webkit-center;" ><img src="{{asset('/images/paypal1.png')}}" class="img img-responsive" style="height:30px;"></a><br>
|
||||
<a href="{{ url('teamstore') . '/' . $store_array[0]->StoreUrl }}" class="btn btn-default btn-block" type="submit">Continue Shopping</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-8 col-md-pull-4">
|
||||
<div style="border: 1px solid #e2e2e2; padding: 10px;">
|
||||
<h4><img height="30px" class="store-logo" src="{{ config('site_config.uploads') . 'teamstore/'. $store_array[0]->ImageFolder . '/' . $store_array[0]->StoreLogo }}"> {{ $store_array[0]->StoreName }}</h4>
|
||||
<h4><img height="30px" class="store-logo" src="{{ minio_url('uploads/images/teamstore/' . $store_array[0]->ImageFolder . '/' . $store_array[0]->StoreLogo) }}"> {{ $store_array[0]->StoreName }}</h4>
|
||||
</div>
|
||||
@foreach($item_group as $item)
|
||||
@if($item->VoucherId == null)
|
||||
@@ -121,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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<div class="col-md-3 col-sm-6 col-xs-12 list-sport">
|
||||
<div class="thumb-border">
|
||||
<a href="{{ url() }}/{{ Request::path() }}/{{ $r->Id }}">
|
||||
<img src="{{ config('site_config.uploads') . 'sports-category/' . $r->Thumbnail }}" alt="{{ $r->Category }}" class="image" />
|
||||
<img src="{{ minio_url('uploads/images/sports-category/' . $r->Thumbnail) }}" alt="{{ $r->Category }}" class="image" />
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-center">
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
<div class="thumb-border" style="border:1px solid #e2e2e2; padding: 5px;">
|
||||
<a href="{{ url('/designer') }}/{{ md5($r->TemplateCode) }}">
|
||||
<img src="{{ config('site_config.uploads') . $r->Thumbnail}}" alt="" class="image" />
|
||||
<img src="{{ minio_url('uploads/images/' . $r->Thumbnail) }}" alt="" class="image" />
|
||||
</a>
|
||||
<!-- <div class="overlay">
|
||||
<div class="text" style="font-family:Academic M54;"><a href="">{{$r->TemplateName}}</a></div>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
@extends('teamstore-layout.main')
|
||||
@section('content')
|
||||
@if ($store_array[0]->IsHibernated)
|
||||
<script>
|
||||
window.location = "../";
|
||||
</script>
|
||||
@endif
|
||||
|
||||
<style>
|
||||
h2 {
|
||||
width: 100%;
|
||||
@@ -80,9 +86,9 @@
|
||||
padding-top: 20px;
|
||||
padding-bottom: 20px;
|
||||
@if($store_array[0]->StoreBanner == null)
|
||||
background-image: url("{{ config('site_config.uploads') . 'teamstore/store-banner-dark.png' }}");
|
||||
background-image: url("{{ minio_url('uploads/images/teamstore/store-banner-dark.png') }}");
|
||||
@else
|
||||
background-image: url("{{ config('site_config.uploads') . 'teamstore/' . $store_array[0]->ImageFolder . '/' . $store_array[0]->StoreBanner }}");
|
||||
background-image: url("{{ minio_url('uploads/images/teamstore/' . $store_array[0]->ImageFolder . '/' . $store_array[0]->StoreBanner) }}");
|
||||
@endif
|
||||
background-color: #f3f3f3;
|
||||
background-position: center;
|
||||
@@ -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,13 +81,13 @@
|
||||
<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 }}">
|
||||
<img class="store-logo" src="{{ config('site_config.uploads') . 'teamstore/'. $store->ImageFolder . '/' . $store->StoreLogo }}">
|
||||
<a class="thumbnail password-protected" href="#" data-store-id="{{ $store->Id }}" data-store-url="{{ $store->StoreUrl }}">
|
||||
<img class="store-logo" src="{{ minio_url('uploads/images/teamstore/' . $store->ImageFolder . '/' . $store->StoreLogo) }}">
|
||||
</a>
|
||||
<h4 style="border-top: 1px solid #dddddd; padding: 10px; font-size: 16px; font-weight: bold; text-transform: uppercase;" class="text-center">{{ $store->StoreName }} <i class="fa fa-lock" title="This store is password protected."></i></h4>
|
||||
@else
|
||||
<a class="thumbnail" href="{{ url('teamstore') . '/' . $store->StoreUrl }}">
|
||||
<img class="store-logo" src="{{ config('site_config.uploads') . 'teamstore/' . $store->ImageFolder . '/' . $store->StoreLogo }}">
|
||||
<img class="store-logo" src="{{ minio_url('uploads/images/teamstore/' . $store->ImageFolder . '/' . $store->StoreLogo) }}">
|
||||
</a>
|
||||
<h4 style="border-top: 1px solid #dddddd; padding: 10px; font-size: 16px; font-weight: bold; text-transform: uppercase;" class="text-center">{{ $store->StoreName }}</h4>
|
||||
@endif
|
||||
@@ -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>
|
||||
|
||||
@@ -119,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 }}">
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<!-- Control Sidebar Toggle Button -->
|
||||
<li class="user user-menu">
|
||||
<a href="#">
|
||||
<img src="{{ config('site_config.uploads') . 'user/default-user.png' }}" class="user-image" alt="User Image">
|
||||
<img src="{{ minio_url('uploads/images/user/default-user.png') }}" class="user-image" alt="User Image">
|
||||
<span class="hidden-xs">{{ Auth::user()->username }}</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<!-- Sidebar user panel -->
|
||||
<div class="user-panel">
|
||||
<div class="pull-left image">
|
||||
<img src="{{ config('site_config.uploads') . 'user/default-user.png' }}" class="img-circle" alt="User Image">
|
||||
<img src="{{ minio_url('uploads/images/user/default-user.png') }}" class="img-circle" alt="User Image">
|
||||
</div>
|
||||
<div class="pull-left info">
|
||||
<p>{{ Auth::user()->name }}</p>
|
||||
@@ -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">
|
||||
|
||||
@@ -63,8 +63,8 @@
|
||||
<div class="col-sm-8">
|
||||
<p>Store Logo Preview:</p>
|
||||
<div class="store-logo-holder">
|
||||
<a href="{{ config('site_config.uploads') . 'teamstore/' . $store_array[0]->ImageFolder . '/' . $store_array[0]->StoreLogo }}?v={{ time() }}" class="img_store_logo_href" data-toggle="lightbox">
|
||||
<img class="img_store_logo_img" id="img_store_logo" src="{{ config('site_config.uploads') . 'teamstore/' . $store_array[0]->ImageFolder . '/' . $store_array[0]->StoreLogo }}?v={{ time() }}" style="max-width: 100%; max-height: 100%; ">
|
||||
<a href="{{ minio_url('uploads/images/teamstore/' . $store_array[0]->ImageFolder . '/' . $store_array[0]->StoreLogo) }}?v={{ time() }}" class="img_store_logo_href" data-toggle="lightbox">
|
||||
<img class="img_store_logo_img" id="img_store_logo" src="{{ minio_url('uploads/images/teamstore/' . $store_array[0]->ImageFolder . '/' . $store_array[0]->StoreLogo) }}?v={{ time() }}" style="max-width: 100%; max-height: 100%; ">
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
@@ -82,8 +82,8 @@
|
||||
<div class="col-sm-8">
|
||||
<p>Store Banner Preview:</p>
|
||||
<div class="store-banner-holder">
|
||||
<a href="{{ config('site_config.uploads') . 'teamstore/' . $store_array[0]->ImageFolder . '/' . $store_array[0]->StoreBanner }}?v={{ time() }}" class="img_store_banner_href" data-toggle="lightbox">
|
||||
<img class="img_store_banner_img" id="img_store_banner" src="{{ config('site_config.uploads') . 'teamstore/' . $store_array[0]->ImageFolder . '/' . $store_array[0]->StoreBanner }}?v={{ time() }}" style="max-width: 100%; max-height: 100%;">
|
||||
<a href="{{ minio_url('uploads/images/teamstore/' . $store_array[0]->ImageFolder . '/' . $store_array[0]->StoreBanner) }}?v={{ time() }}" class="img_store_banner_href" data-toggle="lightbox">
|
||||
<img class="img_store_banner_img" id="img_store_banner" src="{{ minio_url('uploads/images/teamstore/' . $store_array[0]->ImageFolder . '/' . $store_array[0]->StoreBanner) }}?v={{ time() }}" style="max-width: 100%; max-height: 100%;">
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
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">
|
||||
@@ -138,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>
|
||||
@@ -146,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>
|
||||
@@ -187,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