Compare commits
1 Commits
master
...
shipping_f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a2cddafa5f |
@@ -1,6 +0,0 @@
|
|||||||
# 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
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
# 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
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
# 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
|
|
||||||
@@ -1,57 +0,0 @@
|
|||||||
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
|
|
||||||
@@ -1,152 +0,0 @@
|
|||||||
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
|
|
||||||
@@ -1,145 +0,0 @@
|
|||||||
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...
|
# Redirect Trailing Slashes...
|
||||||
RewriteRule ^(.*)/$public /$1 [L,R=301]
|
RewriteRule ^(.*)/$public /$1 [L,R=301]
|
||||||
RewriteCond %{SERVER_PORT} 80
|
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...
|
# Handle Front Controller...
|
||||||
RewriteCond %{REQUEST_FILENAME} !-d
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
RewriteCond %{REQUEST_FILENAME} !-f
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
|
|||||||
86
Dockerfile
86
Dockerfile
@@ -1,86 +0,0 @@
|
|||||||
# 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"]
|
|
||||||
@@ -1,149 +0,0 @@
|
|||||||
<?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,29 +1,24 @@
|
|||||||
<?php
|
<?php namespace App\Http\Controllers;
|
||||||
|
|
||||||
namespace App\Http\Controllers;
|
|
||||||
|
|
||||||
use App\Http\Requests;
|
use App\Http\Requests;
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
use Illuminate\Support\Facades\Auth;
|
use Auth;
|
||||||
use App\Traits\CaptchaTrait;
|
use App\Traits\CaptchaTrait;
|
||||||
use App\User;
|
use App\User;
|
||||||
use Illuminate\Support\Facades\Validator;
|
use Validator;
|
||||||
use App\Models\user\UserModel;
|
|
||||||
|
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
class CustomAuthController extends Controller
|
class CustomAuthController extends Controller {
|
||||||
{
|
|
||||||
use CaptchaTrait;
|
use CaptchaTrait;
|
||||||
|
|
||||||
public function authenticate(Request $request)
|
public function authenticate(Request $request){
|
||||||
{
|
|
||||||
|
|
||||||
$post = $request->all();
|
$post = $request->all();
|
||||||
$email = $post['email'];
|
$email = $post['email'];
|
||||||
$password = $post['password'];
|
$password = $post['password'];
|
||||||
|
|
||||||
if (Auth::attempt(['email' => $email, 'password' => $password])) {
|
if (Auth::attempt(['email' => $email, 'password' => $password])){
|
||||||
|
|
||||||
if (Auth::user()->role == 'admin') {
|
if (Auth::user()->role == 'admin') {
|
||||||
$message = '
|
$message = '
|
||||||
@@ -32,8 +27,8 @@ class CustomAuthController extends Controller
|
|||||||
<h4><i class="icon fa fa-ban"></i> ERROR:</h4>
|
<h4><i class="icon fa fa-ban"></i> ERROR:</h4>
|
||||||
You are not allowed to enter to this site.
|
You are not allowed to enter to this site.
|
||||||
</div>';
|
</div>';
|
||||||
return response()->json(array('success' => false, 'message' => $message));
|
return response()->json(array('success' => false, 'message'=>$message));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$message = "success";
|
$message = "success";
|
||||||
@@ -42,11 +37,11 @@ class CustomAuthController extends Controller
|
|||||||
|
|
||||||
return response()->json(array(
|
return response()->json(array(
|
||||||
'success' => true,
|
'success' => true,
|
||||||
'message' => $message,
|
'message'=>$message,
|
||||||
'navbar' => $navbar,
|
'navbar'=>$navbar,
|
||||||
'save_design_button' => $save_design_button
|
'save_design_button' => $save_design_button
|
||||||
));
|
));
|
||||||
} else {
|
}else{
|
||||||
|
|
||||||
$message = '
|
$message = '
|
||||||
<div class="alert alert-danger alert-dismissible">
|
<div class="alert alert-danger alert-dismissible">
|
||||||
@@ -55,78 +50,60 @@ class CustomAuthController extends Controller
|
|||||||
Username or Password is incorrect.
|
Username or Password is incorrect.
|
||||||
</div>';
|
</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();
|
$post = $request->all();
|
||||||
$userModel = new UserModel;
|
|
||||||
$post['captcha'] = $this->captchaCheck();
|
$post['captcha'] = $this->captchaCheck();
|
||||||
|
|
||||||
$validator = Validator::make(
|
$validator = Validator::make($post, [
|
||||||
$post,
|
'username' => 'unique:user_logins',
|
||||||
[
|
'email' => 'unique:user_logins',
|
||||||
'username' => 'unique:user_logins',
|
'g-recaptcha-response' => 'required',
|
||||||
'email' => 'unique:user_logins',
|
'captcha' => 'required|min:1'
|
||||||
'g-recaptcha-response' => 'required',
|
],
|
||||||
'captcha' => 'required|min:1'
|
[
|
||||||
],
|
'g-recaptcha-response.required' => 'Captcha is required',
|
||||||
[
|
'captcha.min' => 'Wrong captcha, please try again.'
|
||||||
'g-recaptcha-response.required' => 'Captcha is required',
|
]);
|
||||||
'captcha.min' => 'Wrong captcha, please try again.'
|
|
||||||
]
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
if ($validator->fails()) {
|
if ($validator->fails())
|
||||||
|
{
|
||||||
$errors = "";
|
$errors = "";
|
||||||
foreach ($validator->errors()->all() as $error) {
|
foreach($validator->errors()->all() as $error){
|
||||||
$errors .= "<li>" . $error . "</li>";
|
$errors .= "<li>".$error."</li>";
|
||||||
}
|
}
|
||||||
|
|
||||||
$message = '
|
$message = '
|
||||||
<div class="alert alert-danger alert-dismissible">
|
<div class="alert alert-danger alert-dismissible">
|
||||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||||
<h4><i class="icon fa fa-ban"></i> ERROR:</h4>
|
<h4><i class="icon fa fa-ban"></i> ERROR:</h4>
|
||||||
' . $errors .
|
'.$errors.
|
||||||
'</div>';
|
'</div>';
|
||||||
|
|
||||||
return response()->json(array(
|
return response()->json(array(
|
||||||
'success' => false,
|
'success' => false,
|
||||||
'message' => $message
|
'message' => $message
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
$user = User::create([
|
User::create([
|
||||||
'name' => $post['firstname'] . ' ' . $post['lastname'],
|
'name' => $post['name'],
|
||||||
'username' => $post['email'],
|
'username' => $post['username'],
|
||||||
'email' => $post['email'],
|
'email' => $post['email'],
|
||||||
'password' => bcrypt($post['password']),
|
'password' => bcrypt($post['password']),
|
||||||
'role' => 'user'
|
'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']]);
|
Auth::attempt(['email' => $post['email'], 'password' => $post['password']]);
|
||||||
|
|
||||||
return response()->json(array(
|
return response()->json(array(
|
||||||
'success' => true,
|
'success' => true
|
||||||
'redirect' => $post['redirect']
|
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ use Illuminate\Http\Request;
|
|||||||
use App\Models\MainModel;
|
use App\Models\MainModel;
|
||||||
// use Illuminate\Support\Facades\Request;
|
// use Illuminate\Support\Facades\Request;
|
||||||
use Analytics;
|
use Analytics;
|
||||||
use Illuminate\Support\Facades\Session;
|
use Session;
|
||||||
|
|
||||||
class MainController extends Controller {
|
class MainController extends Controller {
|
||||||
|
|
||||||
@@ -31,7 +31,7 @@ class MainController extends Controller {
|
|||||||
foreach ($fetchData as $row) {
|
foreach ($fetchData as $row) {
|
||||||
?>
|
?>
|
||||||
<div class="col-md-3 col-sm-6 col-xs-12 list-sport">
|
<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 minio_url('uploads/images/sports-thumbnails/' . $row->Thumbnail); ?>" alt="" class="img img-responsive product-center" /></a>
|
<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>
|
||||||
<h3 class="text-center sports-title"><?php echo $row->SportsName ?></h3>
|
<h3 class="text-center sports-title"><?php echo $row->SportsName ?></h3>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
|
|||||||
@@ -367,11 +367,14 @@ class DesignerController extends Controller {
|
|||||||
?>
|
?>
|
||||||
<div class="form-group col-md-3">
|
<div class="form-group col-md-3">
|
||||||
<div class="thumbnail clipart-thumnail">
|
<div class="thumbnail clipart-thumnail">
|
||||||
<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>
|
<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>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function clipartProperties(Request $request)
|
public function clipartProperties(Request $request)
|
||||||
@@ -826,9 +829,8 @@ class DesignerController extends Controller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$arr = array(
|
$arr = array(
|
||||||
|
'small' => config('site_config.uploads') . $small ,
|
||||||
'small' => minio_url('uploads/images') . $small ,
|
'large' => config('site_config.uploads') . $large
|
||||||
'large' => minio_url('uploads/images') . $large
|
|
||||||
);
|
);
|
||||||
|
|
||||||
return json_encode($arr);
|
return json_encode($arr);
|
||||||
|
|||||||
@@ -2,54 +2,35 @@
|
|||||||
|
|
||||||
namespace App\Http\Controllers\paypal;
|
namespace App\Http\Controllers\paypal;
|
||||||
|
|
||||||
|
use App\Http\Requests;
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
|
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
// use Paypal;
|
use Paypal;
|
||||||
use Netshell\Paypal\Facades\Paypal;
|
|
||||||
use App\Models\teamstore\TeamStoreModel;
|
use App\Models\teamstore\TeamStoreModel;
|
||||||
use App\Models\user\UserModel;
|
use App\Models\user\UserModel;
|
||||||
use App\Models\ApiModel;
|
|
||||||
use App\Models\paypal\PayPalModel;
|
use App\Models\paypal\PayPalModel;
|
||||||
// use Auth;
|
use Auth;
|
||||||
use Illuminate\Support\Facades\Auth;
|
use Session;
|
||||||
// use Session;
|
use Redirect;
|
||||||
use Illuminate\Support\Facades\Session;
|
use Mail;
|
||||||
// use Redirect;
|
|
||||||
use Illuminate\Support\Facades\Redirect;
|
|
||||||
// use Mail;
|
|
||||||
use Illuminate\Support\Facades\Mail;
|
|
||||||
use PayPal\Exception\PayPalConnectionException;
|
|
||||||
|
|
||||||
|
|
||||||
class PaypalController extends Controller
|
class PaypalController extends Controller
|
||||||
{
|
{
|
||||||
|
|
||||||
private $_apiContext;
|
private $_apiContext;
|
||||||
|
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$paypal_env = "live";
|
$this->_apiContext = Paypal::ApiContext(
|
||||||
$paypal_apiUrl = 'https://api.paypal.com'; // default
|
config('services.paypal.client_id'),
|
||||||
|
config('services.paypal.secret')
|
||||||
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(
|
$this->_apiContext->setConfig(array(
|
||||||
'mode' => $paypal_env,
|
'mode' => 'sandbox',
|
||||||
'service.EndPoint' => $paypal_apiUrl,
|
'service.EndPoint' => 'https://api.sandbox.paypal.com',
|
||||||
'http.ConnectionTimeOut' => 30,
|
'http.ConnectionTimeOut' => 30,
|
||||||
'log.LogEnabled' => true,
|
'log.LogEnabled' => true,
|
||||||
'log.FileName' => storage_path('logs/paypal.log'),
|
'log.FileName' => storage_path('logs/paypal.log'),
|
||||||
@@ -58,7 +39,7 @@ class PaypalController extends Controller
|
|||||||
|
|
||||||
// live
|
// live
|
||||||
// $this->_apiContext->setConfig(array(
|
// $this->_apiContext->setConfig(array(
|
||||||
// 'mode' => 'sandbox',
|
// 'mode' => 'live',
|
||||||
// 'service.EndPoint' => 'https://api.paypal.com',
|
// 'service.EndPoint' => 'https://api.paypal.com',
|
||||||
// 'http.ConnectionTimeOut' => 30,
|
// 'http.ConnectionTimeOut' => 30,
|
||||||
// 'log.LogEnabled' => true,
|
// 'log.LogEnabled' => true,
|
||||||
@@ -76,112 +57,71 @@ class PaypalController extends Controller
|
|||||||
|
|
||||||
public function getCheckout(Request $request)
|
public function getCheckout(Request $request)
|
||||||
{
|
{
|
||||||
$UserModel = new UserModel;
|
|
||||||
|
|
||||||
if (Auth::guest()) {
|
if (Auth::guest()) {
|
||||||
|
|
||||||
$message = 'Please <a href="' . url('auth/login') . '">Sign in</a> to your account to proceed.';
|
$message = 'Please <a href="' . url('auth/login') . '">Sign in</a> to your account to proceed.';
|
||||||
Session::flash('msg', $message);
|
Session::flash('msg', $message);
|
||||||
return Redirect::back();
|
return Redirect::back();
|
||||||
}
|
}
|
||||||
|
|
||||||
$userId = Auth::user()->id;
|
|
||||||
$array_address_book = $UserModel->selectAddresBook('UserId', $userId);
|
|
||||||
|
|
||||||
if (count($array_address_book) <= 0) {
|
|
||||||
$message = 'Please 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 = PayPal::Payer();
|
||||||
$payer->setPaymentMethod('paypal');
|
$payer->setPaymentMethod('paypal');
|
||||||
|
|
||||||
// $inputFields = Paypal::InputFields();
|
|
||||||
// $inputFields->setAllowNote(true)
|
|
||||||
// ->setNoShipping(1)
|
|
||||||
// ->setAddressOverride(0);
|
|
||||||
// $webProfile = Paypal::WebProfile();
|
|
||||||
// $webProfile->setName("YeowZa! T-Shirt Shop" . uniqid())
|
|
||||||
// // ->setPresentation($presentation)
|
|
||||||
// ->setInputFields($inputFields);
|
|
||||||
|
|
||||||
// $shipping = PayPal::ShippingAddress();
|
|
||||||
// $shipping->setRecipientName($array_address_book[0]->Fullname);
|
|
||||||
// $shipping->setLine1($array_address_book[0]->Address);
|
|
||||||
// $shipping->setCity($array_address_book[0]->City);
|
|
||||||
// $shipping->setCountryCode($array_address_book[0]->CountryCode);
|
|
||||||
// $shipping->setPostalCode($array_address_book[0]->ZipCode);
|
|
||||||
// $shipping->setState($array_address_book[0]->State);
|
|
||||||
// $shipping->setPhone($array_address_book[0]->ContactNumber);
|
|
||||||
|
|
||||||
// $payerInfo = Paypal::PayerInfo();
|
|
||||||
// $payerInfo->setShippingAddress($shipping);
|
|
||||||
// $payer->setPayerInfo($payerInfo);
|
|
||||||
|
|
||||||
$m = new TeamStoreModel;
|
$m = new TeamStoreModel;
|
||||||
$paypal_model = new PayPalModel;
|
$paypal_model = new PayPalModel;
|
||||||
$last_id = $paypal_model->getLastIdPaymentDetails();
|
$last_id = $paypal_model->getLastIdPaymentDetails();
|
||||||
// var_dump(count($last_id));
|
$invoice_num = str_pad($last_id[0]->Id, 4, '0', STR_PAD_LEFT);
|
||||||
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');
|
$cartKey = $request->session()->get('cartkey');
|
||||||
|
|
||||||
$items = $m->myCart($cartKey);
|
$items = $m->myCart($cartKey);
|
||||||
$getSubtotal = $m->getSubtotal($cartKey);
|
|
||||||
|
|
||||||
|
$getSubtotal = $m->getSubtotal($cartKey);
|
||||||
$grouped_item = $m->selectTeamStoreGroupByCartKey($cartKey);
|
$grouped_item = $m->selectTeamStoreGroupByCartKey($cartKey);
|
||||||
$store_array = $m->selectTeamStore('Id', $grouped_item[0]->StoreId);
|
$store_array = $m->selectTeamStore('Id', $grouped_item[0]->StoreId);
|
||||||
|
$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)
|
||||||
|
);
|
||||||
|
|
||||||
$shippingFee = $this->getShippingFee($cartKey);
|
$m->updateVoucherValueInCart($data, $item_id);
|
||||||
|
} else {
|
||||||
|
$voucherData = array(
|
||||||
|
'totalValue' => $totalValue,
|
||||||
|
'type' => 'Flat'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$tax = $this->getTax($cartKey)['tax'];
|
$shipping_charges += $item->ShippingFee * $item->Quantity;
|
||||||
$order_grandtotal = $this->getTax($cartKey)['order_grandtotal'];
|
}
|
||||||
|
|
||||||
$order_items = array();
|
$order_items = array();
|
||||||
$updated_items = $m->myCart($cartKey);
|
$updated_items = $m->myCart($cartKey);
|
||||||
|
$updated_getSubtotal = $m->getSubtotal($cartKey);
|
||||||
|
|
||||||
|
// $order_subtotal = $updated_getSubtotal[0]->Subtotal;
|
||||||
|
$order_grandtotal = $updated_getSubtotal[0]->Subtotal;
|
||||||
|
|
||||||
|
if ($grouped_item[0]->StoreId == 76 || $grouped_item[0]->StoreId == 78 || $grouped_item[0]->StoreId == 111 || $grouped_item[0]->StoreId == 131 || $grouped_item[0]->StoreId == 30 || $grouped_item[0]->StoreId == 141) {
|
||||||
|
$tax_value = 0;
|
||||||
|
} else {
|
||||||
|
$tax_value = 0.10;
|
||||||
|
}
|
||||||
|
|
||||||
|
$tax = $order_grandtotal * $tax_value;
|
||||||
|
|
||||||
foreach ($updated_items as $key => $item) {
|
foreach ($updated_items as $key => $item) {
|
||||||
|
|
||||||
@@ -199,37 +139,15 @@ class PaypalController extends Controller
|
|||||||
$item_list = PayPal::ItemList();
|
$item_list = PayPal::ItemList();
|
||||||
$item_list->setItems($order_items);
|
$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 = PayPal::Details();
|
||||||
$amount_details->setSubtotal($order_grandtotal);
|
$amount_details->setSubtotal($order_grandtotal);
|
||||||
$amount_details->setTax($tax);
|
$amount_details->setTax($tax);
|
||||||
$amount_details->setShipping($shippingFee);
|
$amount_details->setShipping($shipping_charges);
|
||||||
|
|
||||||
$amount = PayPal::Amount();
|
$amount = PayPal::Amount();
|
||||||
$amount->setCurrency($store_array[0]->StoreCurrency);
|
$amount->setCurrency($store_array[0]->StoreCurrency);
|
||||||
$amount->setDetails($amount_details);
|
$amount->setDetails($amount_details);
|
||||||
$amount->setTotal($order_grandtotal + $tax + $shippingFee);
|
$amount->setTotal($order_grandtotal + $tax + $shipping_charges);
|
||||||
|
|
||||||
$transaction = PayPal::Transaction();
|
$transaction = PayPal::Transaction();
|
||||||
$transaction->setAmount($amount);
|
$transaction->setAmount($amount);
|
||||||
@@ -241,10 +159,9 @@ class PaypalController extends Controller
|
|||||||
$redirectUrls = PayPal::RedirectUrls();
|
$redirectUrls = PayPal::RedirectUrls();
|
||||||
$redirectUrls->setReturnUrl(route('getDone'));
|
$redirectUrls->setReturnUrl(route('getDone'));
|
||||||
$redirectUrls->setCancelUrl(route('getCancel'));
|
$redirectUrls->setCancelUrl(route('getCancel'));
|
||||||
// var_dump($shippingAddress)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$payment = PayPal::Payment();
|
||||||
$payment->setIntent('sale');
|
$payment->setIntent('sale');
|
||||||
$payment->setPayer($payer);
|
$payment->setPayer($payer);
|
||||||
$payment->setRedirectUrls($redirectUrls);
|
$payment->setRedirectUrls($redirectUrls);
|
||||||
@@ -283,306 +200,19 @@ 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)
|
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');
|
$id = $request->get('paymentId');
|
||||||
$token = $request->get('token');
|
$token = $request->get('token');
|
||||||
$payer_id = $request->get('PayerID');
|
$payer_id = $request->get('PayerID');
|
||||||
|
|
||||||
try {
|
|
||||||
$payment = PayPal::getById($id, $this->_apiContext);
|
|
||||||
|
|
||||||
$paymentExecution = PayPal::PaymentExecution();
|
$payment = PayPal::getById($id, $this->_apiContext);
|
||||||
|
|
||||||
$paymentExecution->setPayerId($payer_id);
|
$paymentExecution = PayPal::PaymentExecution();
|
||||||
$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);
|
// print_r($executePayment);
|
||||||
// if ($executePayment->getState() == 'approved') {
|
// if ($executePayment->getState() == 'approved') {
|
||||||
@@ -594,9 +224,151 @@ class PaypalController extends Controller
|
|||||||
// // return Redirect::route('paywithpaypal');
|
// // return Redirect::route('paywithpaypal');
|
||||||
// echo 'Payment success';
|
// 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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -608,10 +380,6 @@ class PaypalController extends Controller
|
|||||||
$items = $m->myCart($cartKey);
|
$items = $m->myCart($cartKey);
|
||||||
$getSubtotal = $m->getSubtotal($cartKey);
|
$getSubtotal = $m->getSubtotal($cartKey);
|
||||||
|
|
||||||
if ($items == null) {
|
|
||||||
return redirect()->route('cart');
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach ($items as $item) {
|
foreach ($items as $item) {
|
||||||
if ($item->VoucherId != null) {
|
if ($item->VoucherId != null) {
|
||||||
$voucherIds[] = $item->VoucherId;
|
$voucherIds[] = $item->VoucherId;
|
||||||
@@ -634,47 +402,4 @@ class PaypalController extends Controller
|
|||||||
|
|
||||||
return redirect()->route('cart');
|
return redirect()->route('cart');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function createWebProfile()
|
|
||||||
{
|
|
||||||
$UserModel = new UserModel;
|
|
||||||
$userId = Auth::user()->id;
|
|
||||||
$array_address_book = $UserModel->selectAddresBook('UserId', $userId);
|
|
||||||
if (count($array_address_book) <= 0) {
|
|
||||||
$message = 'Please add Shipping address.';
|
|
||||||
Session::flash('cartkeyError', $message);
|
|
||||||
return Redirect::back();
|
|
||||||
}
|
|
||||||
|
|
||||||
// $shippingAddress = [
|
|
||||||
// "recipient_name" => ,
|
|
||||||
|
|
||||||
$flowConfig = PayPal::FlowConfig();
|
|
||||||
$presentation = PayPal::Presentation();
|
|
||||||
$inputFields = PayPal::InputFields();
|
|
||||||
$webProfile = PayPal::WebProfile();
|
|
||||||
|
|
||||||
|
|
||||||
// $presentation->setLogoImage("https://www.crewsportswear.com/beta/public/images/logo.png")->setBrandName("Merchbay"); //NB: Paypal recommended to use https for the logo's address and the size set to 190x60.
|
|
||||||
$presentation->setBrandName("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,14 +6,11 @@ use App\Http\Requests;
|
|||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
|
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
// use Auth;
|
use Auth;
|
||||||
use Illuminate\Support\Facades\Auth;
|
|
||||||
use App\Models\teamstore\TeamStoreModel;
|
use App\Models\teamstore\TeamStoreModel;
|
||||||
use App\Models\user\UserModel;
|
use App\Models\user\UserModel;
|
||||||
// use Mail;
|
use Mail;
|
||||||
use Illuminate\Support\Facades\Mail;
|
|
||||||
use Analytics;
|
use Analytics;
|
||||||
use Carbon\Carbon;
|
|
||||||
|
|
||||||
|
|
||||||
class TeamStoreController extends Controller
|
class TeamStoreController extends Controller
|
||||||
@@ -23,8 +20,6 @@ class TeamStoreController extends Controller
|
|||||||
{
|
{
|
||||||
// var_dump($teamStoreURL);
|
// var_dump($teamStoreURL);
|
||||||
$m = new TeamStoreModel;
|
$m = new TeamStoreModel;
|
||||||
$UserModel = new UserModel;
|
|
||||||
|
|
||||||
$store_array = $m->selectTeamStore('StoreUrl', $teamStoreURL);
|
$store_array = $m->selectTeamStore('StoreUrl', $teamStoreURL);
|
||||||
$product_array = $m->selectTeamStoreProducts('TeamStoreId', $store_array[0]->Id);
|
$product_array = $m->selectTeamStoreProducts('TeamStoreId', $store_array[0]->Id);
|
||||||
$user_role = '';
|
$user_role = '';
|
||||||
@@ -53,7 +48,6 @@ class TeamStoreController extends Controller
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$displayThumbnails = 'product-image-placeholder.png';
|
|
||||||
|
|
||||||
foreach ($product_array as $p => $pr_arr) {
|
foreach ($product_array as $p => $pr_arr) {
|
||||||
|
|
||||||
@@ -86,24 +80,11 @@ 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')
|
return view('teamstore-sublayouts.index')
|
||||||
->with('store_array', $store_array)
|
->with('store_array', $store_array)
|
||||||
->with('product_array', $product_array)
|
->with('product_array', $product_array)
|
||||||
->with('announcement', $data)
|
|
||||||
->with('thumbnails', $thumbnails);
|
->with('thumbnails', $thumbnails);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -170,10 +151,9 @@ class TeamStoreController extends Controller
|
|||||||
|
|
||||||
public function checkTeamStorePassword(Request $request)
|
public function checkTeamStorePassword(Request $request)
|
||||||
{
|
{
|
||||||
$m = new TeamStoreModel;
|
$m = new TeamStoreModel;
|
||||||
$post = $request->all();
|
$post = $request->all();
|
||||||
|
$store_array = $m->selectTeamStore('Password', $post['password']);
|
||||||
$store_array = $m->checkStorePassword($post['store_id'], $post['password']);
|
|
||||||
|
|
||||||
if ($store_array) {
|
if ($store_array) {
|
||||||
$request->session()->put('teamstore_data_array', $store_array);
|
$request->session()->put('teamstore_data_array', $store_array);
|
||||||
@@ -203,7 +183,6 @@ class TeamStoreController extends Controller
|
|||||||
'ImageClass' => 'active'
|
'ImageClass' => 'active'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
$thumbnails_array[] = $data;
|
$thumbnails_array[] = $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -267,7 +246,7 @@ class TeamStoreController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($item[0]->ProductAvailableQty != null) {
|
if ($item[0]->ProductAvailableQty != null) {
|
||||||
$soldQty = $TeamStoreModel->getSoldQty($item[0]->Id);
|
$soldQty = $m->getSoldQty($product_array[0]->Id);
|
||||||
$availableQty = $item[0]->ProductAvailableQty - $soldQty[0]->SoldQty;
|
$availableQty = $item[0]->ProductAvailableQty - $soldQty[0]->SoldQty;
|
||||||
} else {
|
} else {
|
||||||
// echo 'no qty';
|
// echo 'no qty';
|
||||||
@@ -303,7 +282,7 @@ class TeamStoreController extends Controller
|
|||||||
$product_form = $product_array[0]->ProductForm;
|
$product_form = $product_array[0]->ProductForm;
|
||||||
$design_code = $product_array[0]->DesignCode;
|
$design_code = $product_array[0]->DesignCode;
|
||||||
$product_name = $product_array[0]->ProductName;
|
$product_name = $product_array[0]->ProductName;
|
||||||
$shipping_cost_id = $product_array[0]->ShippingCostId;
|
$shipping_fee = $product_array[0]->ShippingFee;
|
||||||
|
|
||||||
$teamstore_array = $m->selectTeamStore('Id', $TeamStoreId);
|
$teamstore_array = $m->selectTeamStore('Id', $TeamStoreId);
|
||||||
|
|
||||||
@@ -339,7 +318,7 @@ class TeamStoreController extends Controller
|
|||||||
'ShortsSize' => $order_shorts_size[$key],
|
'ShortsSize' => $order_shorts_size[$key],
|
||||||
'Price' => $final_price,
|
'Price' => $final_price,
|
||||||
'Quantity' => 1,
|
'Quantity' => 1,
|
||||||
'ShippingCostId' => $shipping_cost_id
|
'ShippingFee' => $shipping_fee
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} elseif ($product_form == "tshirt-form") {
|
} elseif ($product_form == "tshirt-form") {
|
||||||
@@ -356,7 +335,7 @@ class TeamStoreController extends Controller
|
|||||||
'Size' => $post['uniformSize'],
|
'Size' => $post['uniformSize'],
|
||||||
'Price' => $ProductPrice,
|
'Price' => $ProductPrice,
|
||||||
'Quantity' => $post['quantity'],
|
'Quantity' => $post['quantity'],
|
||||||
'ShippingCostId' => $shipping_cost_id
|
'ShippingFee' => $shipping_fee
|
||||||
);
|
);
|
||||||
} elseif ($product_form == "quantity-form") {
|
} elseif ($product_form == "quantity-form") {
|
||||||
|
|
||||||
@@ -371,7 +350,7 @@ class TeamStoreController extends Controller
|
|||||||
'ProductName' => $product_name,
|
'ProductName' => $product_name,
|
||||||
'Price' => $ProductPrice,
|
'Price' => $ProductPrice,
|
||||||
'Quantity' => $post['quantity'],
|
'Quantity' => $post['quantity'],
|
||||||
'ShippingCostId' => $shipping_cost_id
|
'ShippingFee' => $shipping_fee
|
||||||
);
|
);
|
||||||
} elseif ($product_form == "name-number-form") {
|
} elseif ($product_form == "name-number-form") {
|
||||||
|
|
||||||
@@ -392,7 +371,7 @@ class TeamStoreController extends Controller
|
|||||||
'Number' => $order_number[$key],
|
'Number' => $order_number[$key],
|
||||||
'Price' => $ProductPrice,
|
'Price' => $ProductPrice,
|
||||||
'Quantity' => 1,
|
'Quantity' => 1,
|
||||||
'ShippingCostId' => $shipping_cost_id
|
'ShippingFee' => $shipping_fee
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} elseif ($product_form == "name-number-size-form") {
|
} elseif ($product_form == "name-number-size-form") {
|
||||||
@@ -416,7 +395,7 @@ class TeamStoreController extends Controller
|
|||||||
'Number' => $order_number[$key],
|
'Number' => $order_number[$key],
|
||||||
'Price' => $ProductPrice,
|
'Price' => $ProductPrice,
|
||||||
'Quantity' => 1,
|
'Quantity' => 1,
|
||||||
'ShippingCostId' => $shipping_cost_id
|
'ShippingFee' => $shipping_fee
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} elseif ($product_form == "number-form") {
|
} elseif ($product_form == "number-form") {
|
||||||
@@ -436,7 +415,7 @@ class TeamStoreController extends Controller
|
|||||||
'Number' => $order_number[$key],
|
'Number' => $order_number[$key],
|
||||||
'Price' => $ProductPrice,
|
'Price' => $ProductPrice,
|
||||||
'Quantity' => 1,
|
'Quantity' => 1,
|
||||||
'ShippingCostId' => $shipping_cost_id
|
'ShippingFee' => $shipping_fee
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} elseif ($product_form == "name-name2-size-form") {
|
} elseif ($product_form == "name-name2-size-form") {
|
||||||
@@ -460,7 +439,7 @@ class TeamStoreController extends Controller
|
|||||||
'Size' => $order_size[$key],
|
'Size' => $order_size[$key],
|
||||||
'Price' => $ProductPrice,
|
'Price' => $ProductPrice,
|
||||||
'Quantity' => 1,
|
'Quantity' => 1,
|
||||||
'ShippingCostId' => $shipping_cost_id
|
'ShippingFee' => $shipping_fee
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} elseif ($product_form == "name-size-form") {
|
} elseif ($product_form == "name-size-form") {
|
||||||
@@ -482,7 +461,7 @@ class TeamStoreController extends Controller
|
|||||||
'Size' => $order_size[$key],
|
'Size' => $order_size[$key],
|
||||||
'Price' => $ProductPrice,
|
'Price' => $ProductPrice,
|
||||||
'Quantity' => 1,
|
'Quantity' => 1,
|
||||||
'ShippingCostId' => $shipping_cost_id
|
'ShippingFee' => $shipping_fee
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} elseif ($product_form == "jersey-and-shorts-quantity-form") {
|
} elseif ($product_form == "jersey-and-shorts-quantity-form") {
|
||||||
@@ -513,7 +492,7 @@ class TeamStoreController extends Controller
|
|||||||
'ShortsSize' => $order_shorts_size[$key],
|
'ShortsSize' => $order_shorts_size[$key],
|
||||||
'Price' => $final_price,
|
'Price' => $final_price,
|
||||||
'Quantity' => $quantity[$key],
|
'Quantity' => $quantity[$key],
|
||||||
'ShippingCostId' => $shipping_cost_id
|
'ShippingFee' => $shipping_fee
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -545,7 +524,7 @@ class TeamStoreController extends Controller
|
|||||||
'ShortsSize' => $order_shorts_size[$key],
|
'ShortsSize' => $order_shorts_size[$key],
|
||||||
'Price' => $final_price,
|
'Price' => $final_price,
|
||||||
'Quantity' => 1,
|
'Quantity' => 1,
|
||||||
'ShippingCostId' => $shipping_cost_id
|
'ShippingFee' => $shipping_fee
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -569,21 +548,6 @@ class TeamStoreController extends Controller
|
|||||||
{
|
{
|
||||||
|
|
||||||
$m = new TeamStoreModel;
|
$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');
|
$cartKey = $request->session()->get('cartkey');
|
||||||
$items = $m->myCart($cartKey);
|
$items = $m->myCart($cartKey);
|
||||||
$getSubtotal = $m->getSubtotal($cartKey);
|
$getSubtotal = $m->getSubtotal($cartKey);
|
||||||
@@ -598,7 +562,7 @@ class TeamStoreController extends Controller
|
|||||||
|
|
||||||
$item_thumbs = $m->selectDisplayCartThumb();
|
$item_thumbs = $m->selectDisplayCartThumb();
|
||||||
$store_array = $m->selectTeamStore('Id', $defId);
|
$store_array = $m->selectTeamStore('Id', $defId);
|
||||||
|
$shipping_cost = 0;
|
||||||
|
|
||||||
if ($items) {
|
if ($items) {
|
||||||
$voucherIds = array();
|
$voucherIds = array();
|
||||||
@@ -606,6 +570,8 @@ class TeamStoreController extends Controller
|
|||||||
if ($item->VoucherId != null) {
|
if ($item->VoucherId != null) {
|
||||||
$voucherIds[] = $item->VoucherId;
|
$voucherIds[] = $item->VoucherId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$shipping_cost += $item->ShippingFee * $item->Quantity;
|
||||||
}
|
}
|
||||||
$vouchers = $m->selectVoucherWhereIn($voucherIds);
|
$vouchers = $m->selectVoucherWhereIn($voucherIds);
|
||||||
}
|
}
|
||||||
@@ -638,25 +604,13 @@ class TeamStoreController extends Controller
|
|||||||
$finalSubTotal = $getSubtotal[0]->Subtotal;
|
$finalSubTotal = $getSubtotal[0]->Subtotal;
|
||||||
}
|
}
|
||||||
|
|
||||||
if($cartKey != null) {
|
|
||||||
$shippingFee = app(\App\Http\Controllers\paypal\PaypalController::class)->getShippingFee($cartKey);
|
|
||||||
$tax = app(\App\Http\Controllers\paypal\PaypalController::class)->getTax($cartKey);
|
|
||||||
}else{
|
|
||||||
$shippingFee = 0;
|
|
||||||
$tax = [];
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
return view('sublayouts.cart')
|
return view('sublayouts.cart')
|
||||||
->with('item_group', $items_group)
|
->with('item_group', $items_group)
|
||||||
->with('row', $items)
|
->with('row', $items)
|
||||||
->with('img_thumb', $item_thumbs)
|
->with('img_thumb', $item_thumbs)
|
||||||
->with('getSubtotal', $finalSubTotal)
|
->with('getSubtotal', $finalSubTotal)
|
||||||
->with('store_array', $store_array)
|
->with('store_array', $store_array)
|
||||||
->with('store_array', $store_array)
|
->with('shipping_cost', $shipping_cost);
|
||||||
->with('shipping_fee', $shippingFee)
|
|
||||||
->with('tax', $tax)
|
|
||||||
->with('address_book', $array_address_book);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function addVoucher(Request $request)
|
public function addVoucher(Request $request)
|
||||||
@@ -682,7 +636,7 @@ class TeamStoreController extends Controller
|
|||||||
);
|
);
|
||||||
|
|
||||||
$getVoucher = $TeamStoreModel->selectVoucher($data);
|
$getVoucher = $TeamStoreModel->selectVoucher($data);
|
||||||
$now = Carbon::now();
|
|
||||||
if ($getVoucher) {
|
if ($getVoucher) {
|
||||||
$items = $TeamStoreModel->myCart($cartKey);
|
$items = $TeamStoreModel->myCart($cartKey);
|
||||||
|
|
||||||
@@ -694,20 +648,6 @@ class TeamStoreController extends Controller
|
|||||||
'message' => 'This voucher is already in used.'
|
'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
|
// insert vocuher to cart_tmp
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -30,8 +30,6 @@ class Kernel extends HttpKernel {
|
|||||||
'teamstoresession' => 'App\Http\Middleware\CheckTeamStorePassword',
|
'teamstoresession' => 'App\Http\Middleware\CheckTeamStorePassword',
|
||||||
'admin' => '\App\Http\Middleware\IsAdmin',
|
'admin' => '\App\Http\Middleware\IsAdmin',
|
||||||
'normaluser' => '\App\Http\Middleware\IsUser',
|
'normaluser' => '\App\Http\Middleware\IsUser',
|
||||||
'isAuthorized' => '\App\Http\Middleware\isAuthorized',
|
|
||||||
'cors' => 'App\Http\Middleware\Cors',
|
|
||||||
];
|
];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +1,9 @@
|
|||||||
<?php
|
<?php namespace App\Http\Middleware;
|
||||||
|
|
||||||
namespace App\Http\Middleware;
|
|
||||||
|
|
||||||
use Closure;
|
use Closure;
|
||||||
use Illuminate\Contracts\Auth\Guard;
|
use Illuminate\Contracts\Auth\Guard;
|
||||||
use Illuminate\Support\Facades\URL;
|
|
||||||
|
|
||||||
class Authenticate
|
class Authenticate {
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Guard implementation.
|
* The Guard implementation.
|
||||||
@@ -36,19 +32,19 @@ class Authenticate
|
|||||||
*/
|
*/
|
||||||
public function handle($request, Closure $next)
|
public function handle($request, Closure $next)
|
||||||
{
|
{
|
||||||
if ($this->auth->guest()) {
|
if ($this->auth->guest())
|
||||||
if ($request->ajax()) {
|
{
|
||||||
|
if ($request->ajax())
|
||||||
|
{
|
||||||
return response('Unauthorized.', 401);
|
return response('Unauthorized.', 401);
|
||||||
} else {
|
}
|
||||||
$prev = URL::previous();
|
else
|
||||||
if (str_contains($prev, ['cart'])) {
|
{
|
||||||
return redirect()->guest('auth/register?redirectUrl='. $prev);
|
|
||||||
}
|
|
||||||
|
|
||||||
return redirect()->guest('auth/login');
|
return redirect()->guest('auth/login');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $next($request);
|
return $next($request);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,28 +0,0 @@
|
|||||||
<?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,23 +13,9 @@ class VerifyCsrfToken extends BaseVerifier {
|
|||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
|
|
||||||
protected $except = [
|
|
||||||
"api/*",
|
|
||||||
];
|
|
||||||
|
|
||||||
// public function handle($request, Closure $next)
|
|
||||||
// {
|
|
||||||
// return parent::handle($request, $next);
|
|
||||||
// }
|
|
||||||
|
|
||||||
public function handle($request, Closure $next)
|
public function handle($request, Closure $next)
|
||||||
{
|
{
|
||||||
foreach($this->except as $route) {
|
return parent::handle($request, $next);
|
||||||
if ($request->is($route)) {
|
|
||||||
return $next($request);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return parent::handle($request, $next);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,23 +0,0 @@
|
|||||||
<?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,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Illuminate\Support\Facades\Route;
|
|
||||||
// use Spatie\LaravelAnalytics\LaravelAnalytics;
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Application Routes
|
| Application Routes
|
||||||
@@ -37,7 +35,7 @@ Route::post('/custom/register', 'CustomAuthController@postRegister');
|
|||||||
|
|
||||||
// Route::get('/cart', 'teamstore\TeamStoreController@cart');
|
// 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('/checkout', 'teamstore\TeamStoreController@checkout');
|
||||||
Route::get('/mail', 'teamstore\TeamStoreController@mail');
|
Route::get('/mail', 'teamstore\TeamStoreController@mail');
|
||||||
|
|
||||||
@@ -76,13 +74,13 @@ Route::get('/teamstore', 'teamstore\TeamStoreController@storelist'); // old
|
|||||||
|
|
||||||
// Route::group(['middleware' => 'teamstoresession'], function () {
|
// Route::group(['middleware' => 'teamstoresession'], function () {
|
||||||
|
|
||||||
Route::get('/teamstore/{storename}', 'teamstore\TeamStoreController@index');
|
Route::get('/teamstore/{storename}', 'teamstore\TeamStoreController@index');
|
||||||
Route::get('/teamstore/{storename}/product/{producurl}', 'teamstore\TeamStoreController@productDetails');
|
Route::get('/teamstore/{storename}/product/{producurl}', 'teamstore\TeamStoreController@productDetails');
|
||||||
// Route::post('/teamstore/q/addnewrow', 'teamstore\TeamStoreController@addNewRow');
|
// Route::post('/teamstore/q/addnewrow', 'teamstore\TeamStoreController@addNewRow');
|
||||||
Route::post('/teamstore/q/add-to-cart', 'teamstore\TeamStoreController@addToCart');
|
Route::post('/teamstore/q/add-to-cart', 'teamstore\TeamStoreController@addToCart');
|
||||||
Route::get('/teamstore/q/clearsession', 'teamstore\TeamStoreController@clearSession');
|
Route::get('/teamstore/q/clearsession', 'teamstore\TeamStoreController@clearSession');
|
||||||
Route::post('/teamstore/q/add-voucher', 'teamstore\TeamStoreController@addVoucher');
|
Route::post('/teamstore/q/add-voucher', 'teamstore\TeamStoreController@addVoucher');
|
||||||
Route::post('/teamstore/q/add-new-row', 'teamstore\TeamStoreController@addNewRow');
|
Route::post('/teamstore/q/add-new-row', 'teamstore\TeamStoreController@addNewRow');
|
||||||
// });
|
// });
|
||||||
|
|
||||||
Route::post('/teamstore/checkpassword', 'teamstore\TeamStoreController@checkTeamStorePassword');
|
Route::post('/teamstore/checkpassword', 'teamstore\TeamStoreController@checkTeamStorePassword');
|
||||||
@@ -133,19 +131,15 @@ Route::group(['middleware' => 'normaluser'], function () {
|
|||||||
Route::get('user/my-designs/buy-design/{designCode}', 'user\UserController@buyDesign');
|
Route::get('user/my-designs/buy-design/{designCode}', 'user\UserController@buyDesign');
|
||||||
|
|
||||||
Route::get('user/store-orders', 'user\UserController@storeOrders');
|
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
|
// PAYPAL ROUTES
|
||||||
Route::get('payPremium', ['as' => 'payPremium', 'uses' => 'paypal\PaypalController@payPremium']);
|
Route::get('payPremium', ['as'=>'payPremium','uses'=>'paypal\PaypalController@payPremium']);
|
||||||
Route::get('getCheckout', ['as' => 'getCheckout', 'uses' => 'paypal\PaypalController@getCheckout']);
|
Route::get('getCheckout', ['as'=>'getCheckout','uses'=>'paypal\PaypalController@getCheckout']);
|
||||||
Route::get('getDone', ['as' => 'getDone', 'uses' => 'paypal\PaypalController@getDone']);
|
Route::get('getDone', ['as'=>'getDone','uses'=>'paypal\PaypalController@getDone']);
|
||||||
Route::get('getCancel', ['as' => 'getCancel', 'uses' => 'paypal\PaypalController@getCancel']);
|
Route::get('getCancel', ['as'=>'getCancel','uses'=>'paypal\PaypalController@getCancel']);
|
||||||
Route::get('getDoneTest', ['as' => 'getDoneTest', 'uses' => 'paypal\PaypalController@getDoneTest']);
|
Route::get('getDoneTest', ['as'=>'getDoneTest','uses'=>'paypal\PaypalController@getDoneTest']);
|
||||||
// END PAYPAL ROUTES
|
// END PAYPAL ROUTES
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -175,19 +169,12 @@ Route::group(['middleware' => 'admin'], function () {
|
|||||||
Route::post('admin/pattern/get/withvalue', 'PatternsController@getPatternsWithPostValue');
|
Route::post('admin/pattern/get/withvalue', 'PatternsController@getPatternsWithPostValue');
|
||||||
|
|
||||||
Route::post('admin/print-template/save', 'PrintPatternController@savePrintPattern');
|
Route::post('admin/print-template/save', 'PrintPatternController@savePrintPattern');
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
Route::get('cliparts/index', 'cliparts\ClipartsController@index');
|
Route::get('cliparts/index', 'cliparts\ClipartsController@index');
|
||||||
|
|
||||||
// Route::get('analytics', function (){
|
Route::get('analytics', function (){
|
||||||
// $analyticsData = LaravelAnalytics::getVisitorsAndPageViews(7);
|
$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');
|
|
||||||
});
|
});
|
||||||
@@ -1,152 +0,0 @@
|
|||||||
<?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;
|
<?php namespace App\Models;
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
use Illuminate\Support\Facades\DB;
|
use DB;
|
||||||
|
|
||||||
class MainModel extends Model {
|
class MainModel extends Model {
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?php namespace App\Models;
|
<?php namespace App\Models;
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
use Illuminate\Support\Facades\DB;
|
use DB;
|
||||||
|
|
||||||
|
|
||||||
class SizesModel extends Model {
|
class SizesModel extends Model {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?php namespace App\Models\paypal;
|
<?php namespace App\Models\paypal;
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
use Illuminate\Support\Facades\DB;
|
use DB;
|
||||||
|
|
||||||
class PayPalModel extends Model {
|
class PayPalModel extends Model {
|
||||||
|
|
||||||
@@ -39,13 +39,5 @@ class PayPalModel extends Model {
|
|||||||
return $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;
|
<?php namespace App\Models\teamstore;
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
use Illuminate\Support\Facades\DB;
|
use DB;
|
||||||
|
|
||||||
class TeamStoreModel extends Model {
|
class TeamStoreModel extends Model {
|
||||||
|
|
||||||
@@ -39,15 +39,6 @@ class TeamStoreModel extends Model {
|
|||||||
return $i;
|
return $i;
|
||||||
}
|
}
|
||||||
|
|
||||||
function checkStorePassword($storeid, $password)
|
|
||||||
{
|
|
||||||
$i = DB::table('teamstores')
|
|
||||||
->where('Id', $storeid)
|
|
||||||
->where('Password', $password)
|
|
||||||
->get();
|
|
||||||
return $i;
|
|
||||||
}
|
|
||||||
|
|
||||||
function selectTeamStoreGroupByCartKey($cartKey)
|
function selectTeamStoreGroupByCartKey($cartKey)
|
||||||
{
|
{
|
||||||
$i = DB::table('cart_tmp')
|
$i = DB::table('cart_tmp')
|
||||||
@@ -228,4 +219,10 @@ class TeamStoreModel extends Model {
|
|||||||
return $i;
|
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;
|
<?php namespace App\Models\user;
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
use Illuminate\Support\Facades\DB;
|
use DB;
|
||||||
|
|
||||||
class UserModel extends Model {
|
class UserModel extends Model {
|
||||||
|
|
||||||
@@ -160,20 +160,8 @@ class UserModel extends Model {
|
|||||||
return $i;
|
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){
|
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.*', 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'))
|
$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.*')
|
||||||
->leftjoin('payment_details', 'payment_details.CartKey','=','orders.CartKey')
|
->leftjoin('payment_details', 'payment_details.CartKey','=','orders.CartKey')
|
||||||
->leftjoin('shipping_addresses', 'shipping_addresses.PaymentDetail_Id','=','payment_details.Id')
|
->leftjoin('shipping_addresses', 'shipping_addresses.PaymentDetail_Id','=','payment_details.Id')
|
||||||
->where('orders.StoreId', $store_id)
|
->where('orders.StoreId', $store_id)
|
||||||
@@ -182,7 +170,6 @@ class UserModel extends Model {
|
|||||||
return $i;
|
return $i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function itemGroup($cartKey){
|
function itemGroup($cartKey){
|
||||||
$pdo = DB::connection()->getPdo();
|
$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");
|
$query = $pdo->prepare("SELECT *, COUNT(Id) AS qty, Price * SUM(Quantity) AS total_price FROM orders WHERE CartKey = :ck GROUP BY ProductId");
|
||||||
@@ -323,62 +310,5 @@ class UserModel extends Model {
|
|||||||
return $i;
|
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,11 +14,6 @@ class AppServiceProvider extends ServiceProvider {
|
|||||||
*/
|
*/
|
||||||
public function boot()
|
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) {
|
\Blade::extend(function($value) {
|
||||||
return preg_replace('/\@define(.+)/', '<?php ${1}; ?>', $value);
|
return preg_replace('/\@define(.+)/', '<?php ${1}; ?>', $value);
|
||||||
|
|||||||
@@ -1,33 +0,0 @@
|
|||||||
<?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,8 +11,7 @@
|
|||||||
"guzzlehttp/guzzle": "~5.0",
|
"guzzlehttp/guzzle": "~5.0",
|
||||||
"google/recaptcha": "~1.1",
|
"google/recaptcha": "~1.1",
|
||||||
"spatie/laravel-analytics": "^1.4",
|
"spatie/laravel-analytics": "^1.4",
|
||||||
"league/flysystem-sftp": "^1.0",
|
"league/flysystem-sftp": "^1.0"
|
||||||
"aws/aws-sdk-php": "~3.0"
|
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "~4.0",
|
"phpunit/phpunit": "~4.0",
|
||||||
@@ -25,10 +24,7 @@
|
|||||||
],
|
],
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"App\\": "app/"
|
"App\\": "app/"
|
||||||
},
|
}
|
||||||
"files": [
|
|
||||||
"app/helpers.php"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"autoload-dev": {
|
"autoload-dev": {
|
||||||
"classmap": [
|
"classmap": [
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ return [
|
|||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'url' => env('APP_URL', 'http://localhost'),
|
'url' => 'http://localhost',
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -86,18 +86,6 @@ return [
|
|||||||
'driver' => 'local',
|
'driver' => 'local',
|
||||||
'root' => '/var/www/html/uploads/images',
|
'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' => 'no-reply@crewsportswear.com', 'name' => 'no-reply'],
|
'from' => ['address' => 'noreply@crewsportswear.com', 'name' => 'no-reply'],
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -35,14 +35,15 @@ return [
|
|||||||
],
|
],
|
||||||
|
|
||||||
// sandbox
|
// sandbox
|
||||||
'paypal_sandbox' => [
|
'paypal' => [
|
||||||
'client_id' => 'AQuz-HKzQiL7FygkG8skSekaWf-RP6Rgj4f1XeX1Ghp86bUFj7tQXVT1xbpluu5_WCGRbQpOVGtlJKVB',
|
'client_id' => 'AR1FObcz7lD_p53BJpOw1Frf0hIJ1-VOArYoDnsNJXVvoxjYv6mOKBBvdvZBzQcpBPfB_AJnofdalO0t',
|
||||||
'secret' => 'EJAMKxQsl-mFkL_4J_90cvTamYfcsgswqgIxz9wQPiRAwJ6sy_wNsttMlmrXIpxI96JpYzdMXkLCHAPz'
|
'secret' => 'EK0CB8Re802HTxLQawwjAYzOu-SxrFOwuVG7qZ_nSovwgkp77wVs6k4XelXj2v5Il5llCFzsWs_Eb4o-'
|
||||||
],
|
],
|
||||||
|
|
||||||
// live
|
// live
|
||||||
'paypal_live' => [
|
// 'paypal' => [
|
||||||
'client_id' => 'AUqBUFW5lfyYmrlBtFZA3RNw45sttM3ltbvS_d4qCVBMrkcMG9rEeivGvtNFSy8XTiEp50YyQ6khKxbq',
|
// 'client_id' => 'AUqBUFW5lfyYmrlBtFZA3RNw45sttM3ltbvS_d4qCVBMrkcMG9rEeivGvtNFSy8XTiEp50YyQ6khKxbq',
|
||||||
'secret' => 'ELlnuiupoFKwGUSc2g5j-sD1EmsvKpdhth1gFV7njpfvyNtKsK8WwIKUMOS0ehJcRatV865eMhfgsnd_'
|
// 'secret' => 'ELlnuiupoFKwGUSc2g5j-sD1EmsvKpdhth1gFV7njpfvyNtKsK8WwIKUMOS0ehJcRatV865eMhfgsnd_'
|
||||||
],
|
// ],
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ return [
|
|||||||
// 'company_email' => env('COMPANY_email','contact@acme.inc'),
|
// 'company_email' => env('COMPANY_email','contact@acme.inc'),
|
||||||
|
|
||||||
'prod_private_server_ip' => env('https://crewsportswear.app', 'https://crewsportswear.app'),
|
'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
|
'uploads' => env('https://crewsportswear.com/uploads/images/', 'https://crewsportswear.com/uploads/images/'), // local
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,32 +0,0 @@
|
|||||||
<?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');
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,114 +0,0 @@
|
|||||||
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
|
|
||||||
@@ -1,89 +0,0 @@
|
|||||||
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:
|
|
||||||
@@ -1,58 +0,0 @@
|
|||||||
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
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
#!/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 "$@"
|
|
||||||
@@ -1,372 +0,0 @@
|
|||||||
{
|
|
||||||
"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"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,238 +0,0 @@
|
|||||||
[
|
|
||||||
{
|
|
||||||
"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
File diff suppressed because it is too large
Load Diff
1311
public/assets/css/jquery-ui.css
vendored
1311
public/assets/css/jquery-ui.css
vendored
File diff suppressed because it is too large
Load Diff
18706
public/assets/js/jquery-ui.js
vendored
18706
public/assets/js/jquery-ui.js
vendored
File diff suppressed because it is too large
Load Diff
84
readme.md
84
readme.md
@@ -1,79 +1,23 @@
|
|||||||
# Crew Sportswear
|
## Laravel PHP Framework
|
||||||
|
|
||||||
A custom sportswear and apparel e-commerce platform built with Laravel.
|
[](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)
|
||||||
|
|
||||||
## Production URL
|
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.
|
||||||
|
|
||||||
https://crewsportswear.com
|
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.
|
||||||
|
|
||||||
## Requirements
|
## Official Documentation
|
||||||
|
|
||||||
- Docker & Docker Compose
|
Documentation for the framework can be found on the [Laravel website](http://laravel.com/docs).
|
||||||
- PHP 7.4+
|
|
||||||
- MySQL 5.7+
|
|
||||||
- Composer
|
|
||||||
- Node.js & NPM
|
|
||||||
|
|
||||||
## Installation
|
## Contributing
|
||||||
|
|
||||||
1. Clone the repository
|
Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](http://laravel.com/docs/contributions).
|
||||||
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
|
|
||||||
```
|
|
||||||
|
|
||||||
## Docker Deployment
|
### License
|
||||||
|
|
||||||
### Local Development
|
The Laravel framework is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)
|
||||||
```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,13 +1,12 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<title>CREW Sportswear</title>
|
<title>CREW Sportswear</title>
|
||||||
|
|
||||||
<link href="{{ asset('/css/app.css') }}" rel="stylesheet">
|
<link href="{{ asset('public/css/app.css') }}" rel="stylesheet">
|
||||||
|
|
||||||
<!-- Fonts -->
|
<!-- Fonts -->
|
||||||
<link href='//fonts.googleapis.com/css?family=Roboto:400,300' rel='stylesheet' type='text/css'>
|
<link href='//fonts.googleapis.com/css?family=Roboto:400,300' rel='stylesheet' type='text/css'>
|
||||||
@@ -20,7 +19,7 @@
|
|||||||
<![endif]-->
|
<![endif]-->
|
||||||
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
|
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
|
||||||
|
|
||||||
<link href="{{asset('/assets/css/style.css')}}" rel="stylesheet">
|
<link href="{{asset('public/assets/css/style.css')}}" rel="stylesheet">
|
||||||
<!-- <link href="{{asset('public/assets/login/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"> -->
|
<link href="{{asset('public/assets/login/css/form-elements.css')}}" rel="stylesheet"> -->
|
||||||
<script src='https://www.google.com/recaptcha/api.js'></script>
|
<script src='https://www.google.com/recaptcha/api.js'></script>
|
||||||
@@ -28,16 +27,12 @@
|
|||||||
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-136108155-1"></script>
|
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-136108155-1"></script>
|
||||||
<script>
|
<script>
|
||||||
window.dataLayer = window.dataLayer || [];
|
window.dataLayer = window.dataLayer || [];
|
||||||
|
function gtag(){dataLayer.push(arguments);}
|
||||||
function gtag() {
|
|
||||||
dataLayer.push(arguments);
|
|
||||||
}
|
|
||||||
gtag('js', new Date());
|
gtag('js', new Date());
|
||||||
|
|
||||||
gtag('config', 'UA-136108155-1');
|
gtag('config', 'UA-136108155-1');
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<!-- <nav class="navbar navbar-default">
|
<!-- <nav class="navbar navbar-default">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
@@ -81,8 +76,8 @@
|
|||||||
<script src="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.1/js/bootstrap.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 src="https://ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/jquery.validate.min.js"></script>
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function() {
|
$(document).ready(function(){
|
||||||
$('.reveal-password').click(function(e) {
|
$('.reveal-password').click(function(e){
|
||||||
var $pwd = $(".pwd");
|
var $pwd = $(".pwd");
|
||||||
if ($pwd.attr('type') === 'password') {
|
if ($pwd.attr('type') === 'password') {
|
||||||
$pwd.attr('type', 'text');
|
$pwd.attr('type', 'text');
|
||||||
@@ -93,7 +88,7 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if ($('.data-errors').length > 0) {
|
if($('.data-errors').length > 0){
|
||||||
$('#team-store-login').modal('show')
|
$('#team-store-login').modal('show')
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -114,7 +109,7 @@
|
|||||||
var placement = $(element).data('error');
|
var placement = $(element).data('error');
|
||||||
if (placement) {
|
if (placement) {
|
||||||
$(placement).append(error);
|
$(placement).append(error);
|
||||||
} else {
|
}else {
|
||||||
error.insertAfter(element);
|
error.insertAfter(element);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -123,15 +118,12 @@
|
|||||||
|
|
||||||
$("#frm-register").validate({
|
$("#frm-register").validate({
|
||||||
rules: {
|
rules: {
|
||||||
firstname: {
|
name: {
|
||||||
required: true
|
required : true
|
||||||
},
|
},
|
||||||
lastname: {
|
username: {
|
||||||
required: true
|
required : true
|
||||||
},
|
},
|
||||||
// username: {
|
|
||||||
// required: true
|
|
||||||
// },
|
|
||||||
email: {
|
email: {
|
||||||
required: true,
|
required: true,
|
||||||
email: true
|
email: true
|
||||||
@@ -139,24 +131,6 @@
|
|||||||
password: {
|
password: {
|
||||||
required: true
|
required: true
|
||||||
//minlength: 6 // <-- removed underscore
|
//minlength: 6 // <-- removed underscore
|
||||||
},
|
|
||||||
mobilenumber: {
|
|
||||||
required: true
|
|
||||||
},
|
|
||||||
address: {
|
|
||||||
required: true
|
|
||||||
},
|
|
||||||
state: {
|
|
||||||
required: true
|
|
||||||
},
|
|
||||||
city: {
|
|
||||||
required: true
|
|
||||||
},
|
|
||||||
zipcode: {
|
|
||||||
required: true
|
|
||||||
},
|
|
||||||
countryCode: {
|
|
||||||
required: true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
messages: {},
|
messages: {},
|
||||||
@@ -164,17 +138,15 @@
|
|||||||
var placement = $(element).data('error');
|
var placement = $(element).data('error');
|
||||||
if (placement) {
|
if (placement) {
|
||||||
$(placement).append(error);
|
$(placement).append(error);
|
||||||
} else {
|
}else {
|
||||||
error.insertAfter(element);
|
error.insertAfter(element);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
submitHandler: submitRegisterForm
|
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')
|
$('#team-store-login').modal('show')
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@@ -188,169 +160,28 @@
|
|||||||
|
|
||||||
}); // end document ready
|
}); // end document ready
|
||||||
|
|
||||||
function getSelectedCountry() {
|
function submitLoginForm (){
|
||||||
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') }}"
|
// method="POST" action="{{ url('/auth/login') }}"
|
||||||
var data = $("#frm-login").serialize();
|
var data = $("#frm-login").serialize();
|
||||||
// console.log(data)
|
// console.log(data)
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'POST',
|
type : 'POST',
|
||||||
url: "{{ url('/custom/auth') }}",
|
url : "{{ url('/custom/auth') }}",
|
||||||
data: data,
|
data : data,
|
||||||
dataType: 'json',
|
dataType : 'json',
|
||||||
beforeSend: function() {
|
beforeSend: function() {
|
||||||
$("#login-response-msg").fadeOut();
|
$("#login-response-msg").fadeOut();
|
||||||
$("#btn-login").html('Signing in <i class="fa fa-spinner fa-spin"></i>');
|
$("#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").html("");
|
||||||
$("#login-response-msg").fadeIn(1000, function() {
|
$("#login-response-msg").fadeIn(1000, function(){
|
||||||
|
|
||||||
if (response.success) {
|
if(response.success){
|
||||||
// $("#login-response-msg").html(response);
|
// $("#login-response-msg").html(response);
|
||||||
// console.log();
|
// console.log();
|
||||||
location.reload();
|
location.reload();
|
||||||
} else {
|
}else{
|
||||||
$("#login-response-msg").html(response.message);
|
$("#login-response-msg").html(response.message);
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
@@ -361,35 +192,27 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
} /* login submit */
|
}/* login submit */
|
||||||
|
|
||||||
function submitRegisterForm() {
|
function submitRegisterForm (){
|
||||||
var data = $("#frm-register").serializeArray();
|
var data = $("#frm-register").serialize();
|
||||||
data.push({
|
|
||||||
name: "country",
|
|
||||||
value: $("#select_country option:selected").text()
|
|
||||||
});
|
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'POST',
|
type : 'POST',
|
||||||
url: "{{ url('/custom/register') }}",
|
url : "{{ url('/custom/register') }}",
|
||||||
data: data,
|
data : data,
|
||||||
dataType: 'json',
|
dataType : 'json',
|
||||||
beforeSend: function() {
|
beforeSend: function() {
|
||||||
$("#register-response-msg").fadeOut();
|
$("#register-response-msg").fadeOut();
|
||||||
$("#btn-register").html('Please wait <i class="fa fa-spinner fa-spin"></i>');
|
$("#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").html("");
|
||||||
$("#register-response-msg").fadeIn(1000, function() {
|
$("#register-response-msg").fadeIn(1000, function(){
|
||||||
|
|
||||||
if (response.success) {
|
if(response.success){
|
||||||
if (response.redirect != "") {
|
location.reload();
|
||||||
window.location = response.redirect;
|
}else{
|
||||||
} else {
|
|
||||||
location.reload();
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$("#register-response-msg").html(response.message);
|
$("#register-response-msg").html(response.message);
|
||||||
}
|
}
|
||||||
$("#btn-register").html('Register');
|
$("#btn-register").html('Register');
|
||||||
@@ -401,7 +224,8 @@
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
<meta property="og:type" content="article" />
|
<meta property="og:type" content="article" />
|
||||||
<meta property="og:title" content="CREW Uniform Customizer" />
|
<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: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('/images/fb-share-logo.png')}}" />
|
<meta property="og:image" content="{{asset('public/images/fb-share-logo.png')}}" />
|
||||||
|
|
||||||
<!-- favicons
|
<!-- favicons
|
||||||
<link rel="apple-touch-icon" sizes="180x180" href="{{asset('public/favicons/apple-touch-icon.png')}}">
|
<link rel="apple-touch-icon" sizes="180x180" href="{{asset('public/favicons/apple-touch-icon.png')}}">
|
||||||
@@ -28,17 +28,17 @@
|
|||||||
<title>CREW Uniform Designer</title>
|
<title>CREW Uniform Designer</title>
|
||||||
|
|
||||||
<!-- Bootstrap core CSS -->
|
<!-- Bootstrap core CSS -->
|
||||||
<link href="{{asset('/assets/css/bootstrap.min.css')}}" rel="stylesheet">
|
<link href="{{asset('public/assets/css/bootstrap.min.css')}}" rel="stylesheet">
|
||||||
|
|
||||||
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
|
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
|
||||||
<link href="{{asset('/assets/css/ie10-viewport-bug-workaround.css')}}" rel="stylesheet">
|
<link href="{{asset('public/assets/css/ie10-viewport-bug-workaround.css')}}" rel="stylesheet">
|
||||||
|
|
||||||
<!-- Custom styles for this template -->
|
<!-- Custom styles for this template -->
|
||||||
<link href="{{asset('/assets/css/style.css')}}" rel="stylesheet">
|
<link href="{{asset('public/assets/css/style.css')}}" rel="stylesheet">
|
||||||
|
|
||||||
<!-- Just for debugging purposes. Don't actually copy these 2 lines! -->
|
<!-- 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]-->
|
<!--[if lt IE 9]><script src="../../assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
|
||||||
<script src="{{asset('/assets/js/ie-emulation-modes-warning.js')}}"></script>
|
<script src="{{asset('public/assets/js/ie-emulation-modes-warning.js')}}"></script>
|
||||||
|
|
||||||
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
|
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
|
||||||
<!--[if lt IE 9]>
|
<!--[if lt IE 9]>
|
||||||
@@ -113,9 +113,9 @@
|
|||||||
<!-- Bootstrap core JavaScript ================================================= !-->
|
<!-- Bootstrap core JavaScript ================================================= !-->
|
||||||
<!-- Placed at the end of the document so the pages load faster -->
|
<!-- 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="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
|
||||||
<script>window.jQuery || document.write('<script src="{{asset('/assets/js/vendor/jquery.min.js')}}"><\/script>')</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="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 type="text/javascript" src="https://cdn.ywxi.net/js/1.js" async></script>
|
||||||
<script src="{{asset('/assets/js/crew-designer.js')}}"></script>
|
<script src="{{asset('public/assets/js/crew-designer.js')}}"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -2,12 +2,11 @@
|
|||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
<style>
|
<style>
|
||||||
.error {
|
.error{
|
||||||
color: red;
|
color: red;
|
||||||
}
|
}
|
||||||
|
|
||||||
.g-recaptcha {
|
.g-recaptcha {
|
||||||
width: 100%;
|
width:100%;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
@@ -23,40 +22,25 @@
|
|||||||
<div class="col-xs-12">
|
<div class="col-xs-12">
|
||||||
<div id="register-response-msg"></div>
|
<div id="register-response-msg"></div>
|
||||||
<form role="form" id="frm-register">
|
<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() }}">
|
<input type="hidden" name="_token" value="{{ csrf_token() }}">
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label">First name</label>
|
<label class="control-label">Fullname</label>
|
||||||
<input type="text" class="form-control" name="firstname" placeholder="First name">
|
<input type="text" class="form-control" name="name" value="{{ old('name') }}" placeholder="Fullname">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<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>
|
<label class="control-label">Username</label>
|
||||||
<input type="text" class="form-control" name="username" value="{{ old('username') }}" placeholder="Username">
|
<input type="text" class="form-control" name="username" value="{{ old('username') }}" placeholder="Username">
|
||||||
</div> -->
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label">Email Address</label>
|
<label class="control-label">Email Address</label>
|
||||||
<input type="email" class="form-control" name="email" value="{{ old('email') }}" placeholder="Email Address">
|
<input type="email" class="form-control" name="email" value="{{ old('email') }}" placeholder="Email Address">
|
||||||
</div>
|
</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">
|
<div class="form-group">
|
||||||
<label class="control-label">Password</label>
|
<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>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@@ -64,50 +48,6 @@
|
|||||||
<input type="password" class="form-control" name="password_confirmation" placeholder="Confirm Password" data-rule-equalTo="#password" required>
|
<input type="password" class="form-control" name="password_confirmation" placeholder="Confirm Password" data-rule-equalTo="#password" required>
|
||||||
</div>
|
</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="form-group">
|
||||||
<div class="g-recaptcha text-center" data-sitekey="{{ env('CAPTCHA_SITE_KEY') }}"></div>
|
<div class="g-recaptcha text-center" data-sitekey="{{ env('CAPTCHA_SITE_KEY') }}"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
<!-- Main content -->
|
<!-- Main content -->
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="text-center" id="homepage-logo">
|
<div class="text-center" id="homepage-logo">
|
||||||
<img src="{{asset('/images/logo.png')}}" class="img img-responsive" />
|
<img src="{{asset('/public/images/logo.png')}}" class="img img-responsive" />
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<!-- /.content -->
|
<!-- /.content -->
|
||||||
|
|||||||
@@ -13,14 +13,14 @@
|
|||||||
<!-- ---- Include the above in your HEAD tag -------- -->
|
<!-- ---- 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="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
|
||||||
|
|
||||||
<link href="{{asset('/designer/css/custom-style.css')}}" rel="stylesheet">
|
<link href="{{asset('/public/designer/css/custom-style.css')}}" rel="stylesheet">
|
||||||
<link href="{{asset('/designer/css/tab-styles.css')}}" rel="stylesheet">
|
<link href="{{asset('/public/designer/css/tab-styles.css')}}" rel="stylesheet">
|
||||||
<link href="{{asset('/designer/css/input-range-style.css')}}" rel="stylesheet">
|
<link href="{{asset('/public/designer/css/input-range-style.css')}}" rel="stylesheet">
|
||||||
<link href="{{asset('/designer/css/spectrum.css')}}" rel="stylesheet">
|
<link href="{{asset('/public/designer/css/spectrum.css')}}" rel="stylesheet">
|
||||||
<link href="{{asset('/designer/css/one-by-one-slider.css')}}" rel="stylesheet">
|
<link href="{{asset('/public/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('/public/designer/custom-fonts/custom-fonts.php')}}" rel='stylesheet' type='text/css'>
|
||||||
<link href="{{asset('/assets/css/jquery-ui.css')}}" rel="stylesheet">
|
<link href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css" rel="stylesheet">
|
||||||
<link href="{{asset('/designer/css/build.css')}}" rel="stylesheet">
|
<link href="{{asset('/public/designer/css/build.css')}}" rel="stylesheet">
|
||||||
<style>
|
<style>
|
||||||
.custom-navbar-brand>img {
|
.custom-navbar-brand>img {
|
||||||
display: block;
|
display: block;
|
||||||
@@ -106,7 +106,7 @@
|
|||||||
<div class="col-md-12 text-center">
|
<div class="col-md-12 text-center">
|
||||||
@foreach($templatepaths_arrays as $k => $template)
|
@foreach($templatepaths_arrays as $k => $template)
|
||||||
@if($k == 0)
|
@if($k == 0)
|
||||||
<img id="{{ strtolower($template->Side) }}-image-thumb" src="{{asset('/images/loading-please-wait.gif')}}" class="img img-responsive img-loader main-thumbnail">
|
<img id="{{ strtolower($template->Side) }}-image-thumb" src="{{asset('/public/images/loading-please-wait.gif')}}" class="img img-responsive img-loader main-thumbnail">
|
||||||
@endif
|
@endif
|
||||||
@endforeach
|
@endforeach
|
||||||
</div>
|
</div>
|
||||||
@@ -146,11 +146,11 @@
|
|||||||
<!-- FABRIC JS CURVE TEXT -->
|
<!-- FABRIC JS CURVE TEXT -->
|
||||||
<script src="https://rawgit.com/EffEPi/fabric.curvedText/master/fabric.curvedText.js"></script>
|
<script src="https://rawgit.com/EffEPi/fabric.curvedText/master/fabric.curvedText.js"></script>
|
||||||
<!-- SPECTRUM -->
|
<!-- SPECTRUM -->
|
||||||
<script src="{{asset('/designer/js/spectrum.js')}}"></script>
|
<script src="{{asset('/public/designer/js/spectrum.js')}}"></script>
|
||||||
<!-- CUSTOM SCRIPT -->
|
<!-- CUSTOM SCRIPT -->
|
||||||
<script src="{{asset('/designer/js/custom-script.js')}}"></script>
|
<script src="{{asset('/public/designer/js/custom-script.js')}}"></script>
|
||||||
<!-- PRICE FORMAT -->
|
<!-- PRICE FORMAT -->
|
||||||
<script src="{{asset('/designer/js/jquery.priceformat.min.js')}}"></script>
|
<script src="{{asset('/public/designer/js/jquery.priceformat.min.js')}}"></script>
|
||||||
<!-- JQUERY VALIDATE -->
|
<!-- JQUERY VALIDATE -->
|
||||||
<script src="https://ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/jquery.validate.min.js"></script>
|
<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);
|
$('body,html').animate({scrollTop:0},800);
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#custom-navbar-brand').html('<img src="{{asset("/images/logo.png")}}">');
|
$('#custom-navbar-brand').html('<img src="{{asset("/public/images/logo.png")}}">');
|
||||||
|
|
||||||
|
|
||||||
$("#frm-design-details").validate({
|
$("#frm-design-details").validate({
|
||||||
@@ -348,18 +348,9 @@
|
|||||||
var gen_url;
|
var gen_url;
|
||||||
|
|
||||||
if(template_format == "png"){
|
if(template_format == "png"){
|
||||||
if(port == 5952){
|
gen_url = ip+":"+port+"/ap/{{ $client_design_array[0]->DesignCode }}";
|
||||||
gen_url = ip+":"+port+"/ap/{{ $client_design_array[0]->DesignCode }}";
|
|
||||||
}else{
|
|
||||||
gen_url = ip+":"+port+"/mask/{{ $client_design_array[0]->DesignCode }}";
|
|
||||||
}
|
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
if(port == 5953){
|
gen_url = ip+":"+port+"/tb/{{ $client_design_array[0]->DesignCode }}";
|
||||||
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
|
$.ajax({ //create an ajax request to load_page.php
|
||||||
|
|||||||
@@ -13,12 +13,12 @@
|
|||||||
<!-- ---- Include the above in your HEAD tag -------- -->
|
<!-- ---- 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="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
|
||||||
|
|
||||||
<link href="{{asset('/designer/css/custom-style.css')}}" rel="stylesheet">
|
<link href="{{asset('/public/designer/css/custom-style.css')}}" rel="stylesheet">
|
||||||
<link href="{{asset('/designer/css/tab-styles.css')}}" rel="stylesheet">
|
<link href="{{asset('/public/designer/css/tab-styles.css')}}" rel="stylesheet">
|
||||||
<link href="{{asset('/designer/css/input-range-style.css')}}" rel="stylesheet">
|
<link href="{{asset('/public/designer/css/input-range-style.css')}}" rel="stylesheet">
|
||||||
<link href="{{asset('/designer/css/spectrum.css')}}" rel="stylesheet">
|
<link href="{{asset('/public/designer/css/spectrum.css')}}" rel="stylesheet">
|
||||||
<link href="{{asset('/designer/css/one-by-one-slider.css')}}" rel="stylesheet">
|
<link href="{{asset('/public/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('/public/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">
|
<link href="https://gitcdn.github.io/bootstrap-toggle/2.2.2/css/bootstrap-toggle.min.css" rel="stylesheet">
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
@@ -153,14 +153,14 @@
|
|||||||
.sendSelectedObjectToFront{
|
.sendSelectedObjectToFront{
|
||||||
height: 45px;
|
height: 45px;
|
||||||
width: 45px;
|
width: 45px;
|
||||||
background-image: url("{{asset('/images/bring_forward.png')}}");
|
background-image: url("{{asset('/public/images/bring_forward.png')}}");
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
}
|
}
|
||||||
.sendSelectedObjectBack{
|
.sendSelectedObjectBack{
|
||||||
height: 45px;
|
height: 45px;
|
||||||
width: 45px;
|
width: 45px;
|
||||||
background-image: url("{{asset('/images/send_backward.png')}}");
|
background-image: url("{{asset('/public/images/send_backward.png')}}");
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
}
|
}
|
||||||
@@ -168,7 +168,7 @@
|
|||||||
.btn-send-middle{
|
.btn-send-middle{
|
||||||
height: 45px;
|
height: 45px;
|
||||||
width: 45px;
|
width: 45px;
|
||||||
background-image: url("{{asset('/images/send_to_middle.png')}}");
|
background-image: url("{{asset('/public/images/send_to_middle.png')}}");
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
}
|
}
|
||||||
@@ -176,14 +176,14 @@
|
|||||||
.team-name-standard{
|
.team-name-standard{
|
||||||
height: 45px;
|
height: 45px;
|
||||||
width: 45px;
|
width: 45px;
|
||||||
background-image: url("{{asset('/images/bring_forward.png')}}");
|
background-image: url("{{asset('/public/images/bring_forward.png')}}");
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
}
|
}
|
||||||
.center-vertical{
|
.center-vertical{
|
||||||
height: 45px;
|
height: 45px;
|
||||||
width: 45px;
|
width: 45px;
|
||||||
background-image: url("{{asset('/images/align-v1.png')}}");
|
background-image: url("{{asset('/public/images/align-v1.png')}}");
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
}
|
}
|
||||||
@@ -191,7 +191,7 @@
|
|||||||
.center-horizontal{
|
.center-horizontal{
|
||||||
height: 45px;
|
height: 45px;
|
||||||
width: 45px;
|
width: 45px;
|
||||||
background-image: url("{{asset('/images/align-h1.png')}}");
|
background-image: url("{{asset('/public/images/align-h1.png')}}");
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
}
|
}
|
||||||
@@ -284,33 +284,15 @@
|
|||||||
<canvas id="canvas_{{ $template->Type }}_{{ $template->Side }}" width="158px" height="174px" style="margin-top:171px; margin-left:0xp;"></canvas>
|
<canvas id="canvas_{{ $template->Type }}_{{ $template->Side }}" width="158px" height="174px" style="margin-top:171px; margin-left:0xp;"></canvas>
|
||||||
@endif
|
@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 -->
|
<!-- Cake -->
|
||||||
@if($template->Type == "Cake" && $template->Side == "Front" && $template->TemplateFormat == "svg")
|
@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>
|
<canvas id="canvas_{{ $template->Type }}_{{ $template->Side }}" width="400px" height="400px" style="margin-top:60px; margin-left: -5px;"></canvas>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@if($template->Type == "Cake" && $template->Side == "Back" && $template->TemplateFormat == "svg")
|
@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>
|
<canvas id="canvas_{{ $template->Type }}_{{ $template->Side }}" width="400px" height="400px" style="margin-top:60px; margin-left: -5px;"></canvas>
|
||||||
@endif
|
@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>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -446,7 +428,7 @@
|
|||||||
@foreach ($pattern_arrays as $i => $val)
|
@foreach ($pattern_arrays as $i => $val)
|
||||||
<div class="item @if ($i == 0) active @endif">
|
<div class="item @if ($i == 0) active @endif">
|
||||||
<div class="btn-group patternBox ">
|
<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('{{ 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>
|
<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>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@endforeach
|
@endforeach
|
||||||
@@ -546,7 +528,7 @@
|
|||||||
@foreach ($pattern_arrays as $r => $val)
|
@foreach ($pattern_arrays as $r => $val)
|
||||||
<div class="item @if ($r == 0) active @endif">
|
<div class="item @if ($r == 0) active @endif">
|
||||||
<div class="btn-group patternBox ">
|
<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('{{ 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>
|
<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>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@endforeach
|
@endforeach
|
||||||
@@ -881,9 +863,9 @@
|
|||||||
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/fabric.js/1.7.15/fabric.min.js"></script>
|
<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="https://rawgit.com/EffEPi/fabric.curvedText/master/fabric.curvedText.js"></script> -->
|
||||||
<script src="{{asset('/designer/js/spectrum.js')}}"></script>
|
<script src="{{asset('/public/designer/js/spectrum.js')}}"></script>
|
||||||
|
|
||||||
<script src="{{asset('/designer/js/custom-script.js')}}"></script>
|
<script src="{{asset('/public/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://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://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>
|
<script src="https://rawgit.com/fabricjs/fabric.js/master/lib/centering_guidelines.js"></script>
|
||||||
@@ -892,7 +874,7 @@
|
|||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
|
||||||
$.getJSON("{{asset('/designer/palette.json') }}", callbackFuncWithData);
|
$.getJSON("{{asset('/public/designer/palette.json') }}", callbackFuncWithData);
|
||||||
|
|
||||||
function callbackFuncWithData(data){
|
function callbackFuncWithData(data){
|
||||||
console.log(data)
|
console.log(data)
|
||||||
@@ -1054,7 +1036,7 @@
|
|||||||
var get_template_type = "{{ $template->Type }}";
|
var get_template_type = "{{ $template->Type }}";
|
||||||
|
|
||||||
// if((get_template_type != "Shirts") || (get_template_type != "Hoodie")){
|
// if((get_template_type != "Shirts") || (get_template_type != "Hoodie")){
|
||||||
if(get_template_type != "Hoodie" && get_template_type != "Shirts" && get_template_type != "Cake" && get_template_type != "Mask" ){
|
if(get_template_type != "Hoodie" && get_template_type != "Shirts" && get_template_type != "Cake" ){
|
||||||
addDefaultTeamText();
|
addDefaultTeamText();
|
||||||
addNameNumber();
|
addNameNumber();
|
||||||
}
|
}
|
||||||
@@ -1306,7 +1288,7 @@
|
|||||||
|
|
||||||
var patternSVGPath = $(this).attr('data-pattern-path');
|
var patternSVGPath = $(this).attr('data-pattern-path');
|
||||||
|
|
||||||
var patternPath = "{{ env('MINIO_URL', 'https://minio.crewsportswear.app') }}/{{ env('MINIO_BUCKET', 'crewsportswear') }}/" + patternSVGPath;
|
var patternPath = "{{ config('site_config.uploads') }}" + patternSVGPath;
|
||||||
|
|
||||||
var SideAndPath = {!! json_encode($templatepaths_arrays) !!};
|
var SideAndPath = {!! json_encode($templatepaths_arrays) !!};
|
||||||
|
|
||||||
@@ -1383,7 +1365,7 @@
|
|||||||
$(document).on('button click', '.patternTrimThumbs', function(){
|
$(document).on('button click', '.patternTrimThumbs', function(){
|
||||||
|
|
||||||
var patternSVGPath = $(this).attr('data-pattern-path');
|
var patternSVGPath = $(this).attr('data-pattern-path');
|
||||||
var patternPath = "{{ env('MINIO_URL', 'https://minio.crewsportswear.app') }}/{{ env('MINIO_BUCKET', 'crewsportswear') }}/" + patternSVGPath;
|
var patternPath = "{{ config('site_config.uploads') }}" + patternSVGPath;
|
||||||
var getTrimId = $(this).attr('data-trim');
|
var getTrimId = $(this).attr('data-trim');
|
||||||
|
|
||||||
var SideAndPath = {!! json_encode($templatepaths_arrays) !!};
|
var SideAndPath = {!! json_encode($templatepaths_arrays) !!};
|
||||||
@@ -1527,7 +1509,7 @@
|
|||||||
var gradientIds = sideName+"_"+type+"_Gradients";
|
var gradientIds = sideName+"_"+type+"_Gradients";
|
||||||
var gradientPrefix = sideName+"_"+type+"_";
|
var gradientPrefix = sideName+"_"+type+"_";
|
||||||
|
|
||||||
var tempPath = "{{ env('MINIO_URL', 'https://minio.crewsportswear.app') }}/{{ env('MINIO_BUCKET', 'crewsportswear') }}/" + pathLocation;
|
var tempPath = "{{ config('site_config.uploads') }}" + pathLocation;
|
||||||
console.log(tempPath)
|
console.log(tempPath)
|
||||||
if(!document.getElementById(objectId))
|
if(!document.getElementById(objectId))
|
||||||
return false;
|
return false;
|
||||||
@@ -1711,7 +1693,7 @@
|
|||||||
var type = SideAndPath[i]['Type'];
|
var type = SideAndPath[i]['Type'];
|
||||||
var pathLocation = SideAndPath[i]['Path'];
|
var pathLocation = SideAndPath[i]['Path'];
|
||||||
var canvasName = "canvas_" + type + "_" + sideName;
|
var canvasName = "canvas_" + type + "_" + sideName;
|
||||||
var tempPath = "{{ env('MINIO_URL', 'https://minio.crewsportswear.app') }}/{{ env('MINIO_BUCKET', 'crewsportswear') }}/" + pathLocation;
|
var tempPath = "{{ config('site_config.uploads') }}" + pathLocation;
|
||||||
|
|
||||||
window['canvas_' + type + '_' + sideName] = new fabric.Canvas(canvasName);
|
window['canvas_' + type + '_' + sideName] = new fabric.Canvas(canvasName);
|
||||||
var templateFormat = SideAndPath[i]['TemplateFormat'];
|
var templateFormat = SideAndPath[i]['TemplateFormat'];
|
||||||
@@ -2043,9 +2025,9 @@
|
|||||||
|
|
||||||
if(objType == "curvedText"){
|
if(objType == "curvedText"){
|
||||||
if(obj.effect == "curved"){
|
if(obj.effect == "curved"){
|
||||||
$('#teamname_text_shape').html('Text Shape: <br><img src="{{ minio_url('uploads/images/text-shapes-logo/curve-logo.png') }}" height="30px">');
|
$('#teamname_text_shape').html('Text Shape: <br><img src="{{ config('site_config.uploads') }}text-shapes-logo/curve-logo.png" height="30px">');
|
||||||
}else if(obj.effect == "arc"){
|
}else if(obj.effect == "arc"){
|
||||||
$('#teamname_text_shape').html('Text Shape: <br><img src="{{ minio_url('uploads/images/text-shapes-logo/arch-logo.png') }}" height="30px">');
|
$('#teamname_text_shape').html('Text Shape: <br><img src="{{ config('site_config.uploads') }}text-shapes-logo/arch-logo.png" height="30px">');
|
||||||
}else{
|
}else{
|
||||||
$('#teamname_text_shape').html('Add text Shape');
|
$('#teamname_text_shape').html('Add text Shape');
|
||||||
}
|
}
|
||||||
@@ -3345,7 +3327,7 @@
|
|||||||
function loadSVGClipart(dataUrl){
|
function loadSVGClipart(dataUrl){
|
||||||
var k = 0;
|
var k = 0;
|
||||||
var arrayPathId = [];
|
var arrayPathId = [];
|
||||||
var svgUrl = "{{ env('MINIO_URL', 'https://minio.crewsportswear.app') }}/{{ env('MINIO_BUCKET', 'crewsportswear') }}/uploads/images/cliparts/" + dataUrl;
|
var svgUrl = "{{ config('site_config.uploads') }}cliparts/" + dataUrl;
|
||||||
fabric.loadSVGFromURL(svgUrl, function(objects, options) {
|
fabric.loadSVGFromURL(svgUrl, function(objects, options) {
|
||||||
var clipart = fabric.util.groupSVGElements(objects, options );
|
var clipart = fabric.util.groupSVGElements(objects, options );
|
||||||
clipart.set({
|
clipart.set({
|
||||||
|
|||||||
@@ -13,12 +13,12 @@
|
|||||||
<!-- ---- Include the above in your HEAD tag -------- -->
|
<!-- ---- 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="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
|
||||||
|
|
||||||
<link href="{{asset('/designer/css/custom-style.css')}}" rel="stylesheet">
|
<link href="{{asset('/public/designer/css/custom-style.css')}}" rel="stylesheet">
|
||||||
<link href="{{asset('/designer/css/tab-styles.css')}}" rel="stylesheet">
|
<link href="{{asset('/public/designer/css/tab-styles.css')}}" rel="stylesheet">
|
||||||
<link href="{{asset('/designer/css/input-range-style.css')}}" rel="stylesheet">
|
<link href="{{asset('/public/designer/css/input-range-style.css')}}" rel="stylesheet">
|
||||||
<link href="{{asset('/designer/css/spectrum.css')}}" rel="stylesheet">
|
<link href="{{asset('/public/designer/css/spectrum.css')}}" rel="stylesheet">
|
||||||
<link href="{{asset('/designer/css/one-by-one-slider.css')}}" rel="stylesheet">
|
<link href="{{asset('/public/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('/public/designer/custom-fonts/custom-fonts.php')}}" rel='stylesheet' type='text/css'>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.carousel-indicators > li,
|
.carousel-indicators > li,
|
||||||
@@ -151,14 +151,14 @@
|
|||||||
.sendSelectedObjectToFront{
|
.sendSelectedObjectToFront{
|
||||||
height: 45px;
|
height: 45px;
|
||||||
width: 45px;
|
width: 45px;
|
||||||
background-image: url("{{asset('/images/bring_forward.png')}}");
|
background-image: url("{{asset('/public/images/bring_forward.png')}}");
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
}
|
}
|
||||||
.sendSelectedObjectBack{
|
.sendSelectedObjectBack{
|
||||||
height: 45px;
|
height: 45px;
|
||||||
width: 45px;
|
width: 45px;
|
||||||
background-image: url("{{asset('/images/send_backward.png')}}");
|
background-image: url("{{asset('/public/images/send_backward.png')}}");
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
}
|
}
|
||||||
@@ -166,14 +166,14 @@
|
|||||||
.team-name-standard{
|
.team-name-standard{
|
||||||
height: 45px;
|
height: 45px;
|
||||||
width: 45px;
|
width: 45px;
|
||||||
background-image: url("{{asset('/images/bring_forward.png')}}");
|
background-image: url("{{asset('/public/images/bring_forward.png')}}");
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
}
|
}
|
||||||
.center-vertical{
|
.center-vertical{
|
||||||
height: 45px;
|
height: 45px;
|
||||||
width: 45px;
|
width: 45px;
|
||||||
background-image: url("{{asset('/images/align-v1.png')}}");
|
background-image: url("{{asset('/public/images/align-v1.png')}}");
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
}
|
}
|
||||||
@@ -181,7 +181,7 @@
|
|||||||
.center-horizontal{
|
.center-horizontal{
|
||||||
height: 45px;
|
height: 45px;
|
||||||
width: 45px;
|
width: 45px;
|
||||||
background-image: url("{{asset('/images/align-h1.png')}}");
|
background-image: url("{{asset('/public/images/align-h1.png')}}");
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-size: cover;
|
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://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="https://rawgit.com/EffEPi/fabric.curvedText/master/fabric.curvedText.js"></script>
|
||||||
<script src="{{asset('/designer/js/spectrum.js')}}"></script>
|
<script src="{{asset('/public/designer/js/spectrum.js')}}"></script>
|
||||||
|
|
||||||
<script src="{{asset('/designer/js/custom-script.js')}}"></script>
|
<script src="{{asset('/public/designer/js/custom-script.js')}}"></script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
@@ -685,7 +685,7 @@
|
|||||||
$('body,html').animate({scrollTop:0},800);
|
$('body,html').animate({scrollTop:0},800);
|
||||||
});
|
});
|
||||||
|
|
||||||
// $('#custom-navbar-brand').html('<img src="{{asset("/images/logo.png")}}">');
|
// $('#custom-navbar-brand').html('<img src="{{asset("/public/images/logo.png")}}">');
|
||||||
|
|
||||||
// calling functions
|
// calling functions
|
||||||
|
|
||||||
|
|||||||
@@ -387,6 +387,10 @@
|
|||||||
<td class="col-md-3">Tax</td>
|
<td class="col-md-3">Tax</td>
|
||||||
<td>{{ $array_payment_details[0]->Tax . ' ' . $array_payment_details[0]->Currency }}</td>
|
<td>{{ $array_payment_details[0]->Tax . ' ' . $array_payment_details[0]->Currency }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="col-md-3">Shipping Fee</td>
|
||||||
|
<td>{{ $array_payment_details[0]->ShippingCost . ' ' . $array_payment_details[0]->Currency }}</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="col-md-3">Total</td>
|
<td class="col-md-3">Total</td>
|
||||||
<td>{{ $array_payment_details[0]->Total . ' ' . $array_payment_details[0]->Currency }}</td>
|
<td>{{ $array_payment_details[0]->Total . ' ' . $array_payment_details[0]->Currency }}</td>
|
||||||
@@ -407,7 +411,7 @@
|
|||||||
<td align="left" style="width: 180px;">
|
<td align="left" style="width: 180px;">
|
||||||
@foreach($img_thumb as $img)
|
@foreach($img_thumb as $img)
|
||||||
@if($img->ProductId == $item->ProductId)
|
@if($img->ProductId == $item->ProductId)
|
||||||
<img style="height: 200px; overflow: hidden; object-fit: contain;" src="{{ config('site_config.images_url') }}/{{ $img->Image }}">
|
<img style="height: 200px; overflow: hidden; object-fit: contain;" src="{{ config('site_config.prod_private_server_ip') }}/images/{{ $img->Image }}">
|
||||||
@endif
|
@endif
|
||||||
@endforeach
|
@endforeach
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -13,24 +13,24 @@
|
|||||||
|
|
||||||
<meta property="og:url" content="https://crewsportswear.com" />
|
<meta property="og:url" content="https://crewsportswear.com" />
|
||||||
<meta property="og:type" content="article" />
|
<meta property="og:type" content="article" />
|
||||||
<meta property="og:title" content="CREW Apparel" />
|
<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: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('/images/fb-share-logo.png')}}" />
|
<meta property="og:image" content="{{asset('public/images/fb-share-logo.png')}}" />
|
||||||
|
|
||||||
<title>CREW Uniform Designer</title>
|
<title>CREW Uniform Designer</title>
|
||||||
|
|
||||||
<!-- Bootstrap core CSS -->
|
<!-- Bootstrap core CSS -->
|
||||||
<link href="{{ asset('/assets/css/bootstrap.min.css') }}" rel="stylesheet">
|
<link href="{{ asset('public/assets/css/bootstrap.min.css') }}" rel="stylesheet">
|
||||||
|
|
||||||
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
|
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
|
||||||
<link href="{{ asset('/assets/css/ie10-viewport-bug-workaround.css') }}" rel="stylesheet">
|
<link href="{{ asset('public/assets/css/ie10-viewport-bug-workaround.css') }}" rel="stylesheet">
|
||||||
|
|
||||||
<!-- Custom styles for this template -->
|
<!-- Custom styles for this template -->
|
||||||
<link href="{{ asset('/assets/css/style.css')}}" rel="stylesheet">
|
<link href="{{ asset('public/assets/css/style.css')}}" rel="stylesheet">
|
||||||
|
|
||||||
<!-- Just for debugging purposes. Don't actually copy these 2 lines! -->
|
<!-- 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]-->
|
<!--[if lt IE 9]><script src="../../assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
|
||||||
<script src="{{asset('/assets/js/ie-emulation-modes-warning.js')}}"></script>
|
<script src="{{asset('public/assets/js/ie-emulation-modes-warning.js')}}"></script>
|
||||||
|
|
||||||
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
|
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
|
||||||
<!--[if lt IE 9]>
|
<!--[if lt IE 9]>
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
|
|
||||||
<![endif]-->
|
<![endif]-->
|
||||||
<!-- font-awesome -->
|
<!-- font-awesome -->
|
||||||
<link href="{{ asset('/assets/css/font-awesome/css/font-awesome.min.css')}}" rel="stylesheet">
|
<link href="{{ asset('public/assets/css/font-awesome/css/font-awesome.min.css')}}" rel="stylesheet">
|
||||||
|
|
||||||
<!-- Social Media Share button
|
<!-- Social Media Share button
|
||||||
<script type="text/javascript" src="//platform-api.sharethis.com/js/sharethis.js#property=599bc5cf6d61950012975405&product=sticky-share-buttons"></script>-->
|
<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 ================================================= !-->
|
<!-- Bootstrap core JavaScript ================================================= !-->
|
||||||
<!-- Placed at the end of the document so the pages load faster -->
|
<!-- Placed at the end of the document so the pages load faster -->
|
||||||
<!-- jquery -->
|
<!-- jquery -->
|
||||||
<script src="{{ asset('/assets/js/jquery.min.js') }}"></script>
|
<script src="{{ asset('public/assets/js/jquery.min.js') }}"></script>
|
||||||
<!-- bootstrap -->
|
<!-- bootstrap -->
|
||||||
<script src="{{asset('/assets/js/bootstrap.min.js')}}"></script>]
|
<script src="{{asset('public/assets/js/bootstrap.min.js')}}"></script>]
|
||||||
<!-- validate -->
|
<!-- validate -->
|
||||||
<script src="https://ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/jquery.validate.min.js"></script>
|
<script src="https://ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/jquery.validate.min.js"></script>
|
||||||
<!-- custom js -->
|
<!-- custom js -->
|
||||||
<script src="{{ asset('/assets/js/crew-designer.js') }}"></script>
|
<script src="{{ asset('public/assets/js/crew-designer.js') }}"></script>
|
||||||
<script>
|
<script>
|
||||||
$(function(){
|
$(function(){
|
||||||
$(".hide-row").hide();
|
$(".hide-row").hide();
|
||||||
|
|||||||
@@ -7,29 +7,18 @@
|
|||||||
<span class="icon-bar"></span>
|
<span class="icon-bar"></span>
|
||||||
<span class="icon-bar"></span>
|
<span class="icon-bar"></span>
|
||||||
</button>
|
</button>
|
||||||
@if (Request::segment(2) == "hi-five-sports-club" || Request::segment(2) == "hi-five-sports-zone")
|
<a class="navbar-brand" href="{{ url('/') }}">
|
||||||
<a class="navbar-brand" href="#"></a>
|
<img src="{{asset('public/images/logo.png')}}" />
|
||||||
@else
|
|
||||||
<a class="navbar-brand" href="{{ url('/') }}">
|
|
||||||
<img src="{{asset('/images/logo.png')}}" />
|
|
||||||
</a>
|
|
||||||
@endif
|
|
||||||
|
|
||||||
{{-- <small>JAC Printing & Graphics Co.</small> --}}
|
{{-- <small>JAC Printing & Graphics Co.</small> --}}
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div id="navbar" class="navbar-collapse collapse">
|
<div id="navbar" class="navbar-collapse collapse">
|
||||||
<ul class="nav navbar-nav navbar-right navbar-nav-custom">
|
<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;">
|
<li style="font-size: 14px;">
|
||||||
|
|
||||||
<a href="{{ url('teamstore') }}"><span style="text-transform:uppercase;">Team Store</span></a>
|
<a href="{{ url('teamstore') }}"><span style="text-transform:uppercase;">Team Store</span></a>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
@endif
|
|
||||||
|
|
||||||
<li style="font-size: 14px;">
|
<li style="font-size: 14px;">
|
||||||
<a href="{{ url('cart') }}"><span style="text-transform:uppercase;">My Cart</span> <i class="fa fa-shopping-cart"></i>
|
<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>
|
<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 content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
|
||||||
<meta name="csrf_token" content="{{ csrf_token() }}" />
|
<meta name="csrf_token" content="{{ csrf_token() }}" />
|
||||||
<!-- Bootstrap 3.3.6 -->
|
<!-- Bootstrap 3.3.6 -->
|
||||||
<link rel="stylesheet" href="{{asset('/bower_components/AdminLTE/bootstrap/css/bootstrap.min.css')}}">
|
<link rel="stylesheet" href="{{asset('/public/bower_components/AdminLTE/bootstrap/css/bootstrap.min.css')}}">
|
||||||
<!-- Font Awesome -->
|
<!-- Font Awesome -->
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css">
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css">
|
||||||
<!-- Ionicons -->
|
<!-- Ionicons -->
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ionicons/2.0.1/css/ionicons.min.css">
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ionicons/2.0.1/css/ionicons.min.css">
|
||||||
<!-- Theme style -->
|
<!-- Theme style -->
|
||||||
<link rel="stylesheet" href="{{asset('/bower_components/AdminLTE/dist/css/AdminLTE.min.css')}}">
|
<link rel="stylesheet" href="{{asset('/public/bower_components/AdminLTE/dist/css/AdminLTE.min.css')}}">
|
||||||
<!-- AdminLTE Skins. Choose a skin from the css/skins
|
<!-- AdminLTE Skins. Choose a skin from the css/skins
|
||||||
folder instead of downloading all of them to reduce the load. -->
|
folder instead of downloading all of them to reduce the load. -->
|
||||||
<link rel="stylesheet" href="{{asset('/bower_components/AdminLTE/dist/css/skins/_all-skins.min.css')}}">
|
<link rel="stylesheet" href="{{asset('/public/bower_components/AdminLTE/dist/css/skins/_all-skins.min.css')}}">
|
||||||
<!-- iCheck -->
|
<!-- iCheck -->
|
||||||
<link rel="stylesheet" href="{{asset('/bower_components/AdminLTE/plugins/iCheck/flat/blue.css')}}">
|
<link rel="stylesheet" href="{{asset('/public/bower_components/AdminLTE/plugins/iCheck/flat/blue.css')}}">
|
||||||
<!-- Date Picker -->
|
<!-- Date Picker -->
|
||||||
<link rel="stylesheet" href="{{asset('/bower_components/AdminLTE/plugins/datepicker/datepicker3.css')}}">
|
<link rel="stylesheet" href="{{asset('/public/bower_components/AdminLTE/plugins/datepicker/datepicker3.css')}}">
|
||||||
<!-- Daterange picker -->
|
<!-- Daterange picker -->
|
||||||
<link rel="stylesheet" href="{{asset('/bower_components/AdminLTE/plugins/daterangepicker/daterangepicker.css')}}">
|
<link rel="stylesheet" href="{{asset('/public/bower_components/AdminLTE/plugins/daterangepicker/daterangepicker.css')}}">
|
||||||
<!-- bootstrap wysihtml5 - text editor -->
|
<!-- bootstrap wysihtml5 - text editor -->
|
||||||
<link rel="stylesheet" href="{{asset('/bower_components/AdminLTE/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css')}}">
|
<link rel="stylesheet" href="{{asset('/public/bower_components/AdminLTE/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css')}}">
|
||||||
<!-- Select2 -->
|
<!-- Select2 -->
|
||||||
<link href="{{asset('/bower_components/AdminLTE/plugins/select2/select2.min.css')}}" rel="stylesheet" />
|
<link href="{{asset('/public/bower_components/AdminLTE/plugins/select2/select2.min.css')}}" rel="stylesheet" />
|
||||||
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
<!-- 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:// -->
|
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
||||||
<!--[if lt IE 9]>
|
<!--[if lt IE 9]>
|
||||||
@@ -365,29 +365,29 @@
|
|||||||
<!-- ./wrapper -->
|
<!-- ./wrapper -->
|
||||||
|
|
||||||
<!-- jQuery 2.2.3 -->
|
<!-- jQuery 2.2.3 -->
|
||||||
<script src="{{asset('/bower_components/AdminLTE/plugins/jQuery/jquery-2.2.3.min.js')}}"></script>
|
<script src="{{asset('/public/bower_components/AdminLTE/plugins/jQuery/jquery-2.2.3.min.js')}}"></script>
|
||||||
<!-- jQuery UI 1.11.4 -->
|
<!-- jQuery UI 1.11.4 -->
|
||||||
<script src="https://code.jquery.com/ui/1.11.4/jquery-ui.min.js"></script>
|
<script src="https://code.jquery.com/ui/1.11.4/jquery-ui.min.js"></script>
|
||||||
<!-- Bootstrap 3.3.6 -->
|
<!-- Bootstrap 3.3.6 -->
|
||||||
<script src="{{asset('/bower_components/AdminLTE/bootstrap/js/bootstrap.min.js')}}"></script>
|
<script src="{{asset('/public/bower_components/AdminLTE/bootstrap/js/bootstrap.min.js')}}"></script>
|
||||||
|
|
||||||
<!-- daterangepicker -->
|
<!-- daterangepicker -->
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.11.2/moment.min.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.11.2/moment.min.js"></script>
|
||||||
<script src="{{asset('/bower_components/AdminLTE/plugins/daterangepicker/daterangepicker.js')}}"></script>
|
<script src="{{asset('/public/bower_components/AdminLTE/plugins/daterangepicker/daterangepicker.js')}}"></script>
|
||||||
<!-- datepicker -->
|
<!-- datepicker -->
|
||||||
<script src="{{asset('/bower_components/AdminLTE/plugins/datepicker/bootstrap-datepicker.js')}}"></script>
|
<script src="{{asset('/public/bower_components/AdminLTE/plugins/datepicker/bootstrap-datepicker.js')}}"></script>
|
||||||
<!-- Bootstrap WYSIHTML5 -->
|
<!-- Bootstrap WYSIHTML5 -->
|
||||||
<script src="{{asset('/bower_components/AdminLTE/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js')}}"></script>
|
<script src="{{asset('/public/bower_components/AdminLTE/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js')}}"></script>
|
||||||
<!-- Slimscroll -->
|
<!-- Slimscroll -->
|
||||||
<script src="{{asset('/bower_components/AdminLTE/plugins/slimScroll/jquery.slimscroll.min.js')}}"></script>
|
<script src="{{asset('/public/bower_components/AdminLTE/plugins/slimScroll/jquery.slimscroll.min.js')}}"></script>
|
||||||
<!-- FastClick -->
|
<!-- FastClick -->
|
||||||
<script src="{{asset('/bower_components/AdminLTE/plugins/fastclick/fastclick.js')}}"></script>
|
<script src="{{asset('/public/bower_components/AdminLTE/plugins/fastclick/fastclick.js')}}"></script>
|
||||||
<!-- AdminLTE App -->
|
<!-- AdminLTE App -->
|
||||||
<script src="{{asset('/bower_components/AdminLTE/dist/js/app.min.js')}}"></script>
|
<script src="{{asset('/public/bower_components/AdminLTE/dist/js/app.min.js')}}"></script>
|
||||||
<!-- AdminLTE dashboard demo (This is only for demo purposes)
|
<!-- AdminLTE dashboard demo (This is only for demo purposes)
|
||||||
<script src="{{asset('/bower_components/AdminLTE/dist/js/pages/dashboard.js')}}"></script>-->
|
<script src="{{asset('/bower_components/AdminLTE/dist/js/pages/dashboard.js')}}"></script>-->
|
||||||
<!-- AdminLTE for demo purposes -->
|
<!-- AdminLTE for demo purposes -->
|
||||||
<script src="{{asset('/bower_components/AdminLTE/dist/js/demo.js')}}"></script>
|
<script src="{{asset('/public/bower_components/AdminLTE/dist/js/demo.js')}}"></script>
|
||||||
|
|
||||||
<!-- Select2 -->
|
<!-- Select2 -->
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.3/js/select2.min.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.3/js/select2.min.js"></script>
|
||||||
@@ -450,12 +450,12 @@
|
|||||||
|
|
||||||
function clearTemplateImg(){
|
function clearTemplateImg(){
|
||||||
$('#tempateImage').val("");
|
$('#tempateImage').val("");
|
||||||
$('#template-img-preview').attr('src', "{{asset('/images/no-image.jpg')}}");
|
$('#template-img-preview').attr('src', "{{asset('/public/images/no-image.jpg')}}");
|
||||||
}
|
}
|
||||||
|
|
||||||
function clearImg(){
|
function clearImg(){
|
||||||
$('#previewImg').val("");
|
$('#previewImg').val("");
|
||||||
$('#prev-img').attr('src', "{{asset('/images/no-image.jpg')}}");
|
$('#prev-img').attr('src', "{{asset('/public/images/no-image.jpg')}}");
|
||||||
}
|
}
|
||||||
|
|
||||||
function clearImgEdit(path){
|
function clearImgEdit(path){
|
||||||
@@ -546,7 +546,7 @@
|
|||||||
contentType: false,
|
contentType: false,
|
||||||
beforeSend: function(xhr){
|
beforeSend: function(xhr){
|
||||||
$("#saveSportsBtn").attr('disabled', true);
|
$("#saveSportsBtn").attr('disabled', true);
|
||||||
$("#saveSportsBtn").html('Saving <img src="{{url('/images/ajax-loader.gif')}}">');
|
$("#saveSportsBtn").html('Saving <img src="{{url('public/images/ajax-loader.gif')}}">');
|
||||||
|
|
||||||
var token = $('meta[name="csrf_token"]').attr('content');
|
var token = $('meta[name="csrf_token"]').attr('content');
|
||||||
if (token) {
|
if (token) {
|
||||||
@@ -598,7 +598,7 @@
|
|||||||
contentType: false,
|
contentType: false,
|
||||||
beforeSend: function(xhr){
|
beforeSend: function(xhr){
|
||||||
$("#updateSportsBtn").attr('disabled', true);
|
$("#updateSportsBtn").attr('disabled', true);
|
||||||
$("#updateSportsBtn").html('Updating <img src="{{url('/images/ajax-loader.gif')}}">');
|
$("#updateSportsBtn").html('Updating <img src="{{url('public/images/ajax-loader.gif')}}">');
|
||||||
|
|
||||||
var token = $('meta[name="csrf_token"]').attr('content');
|
var token = $('meta[name="csrf_token"]').attr('content');
|
||||||
if (token) {
|
if (token) {
|
||||||
|
|||||||
@@ -12,9 +12,9 @@
|
|||||||
|
|
||||||
<meta property="og:url" content="http://uniformnetwork.com/crew/" />
|
<meta property="og:url" content="http://uniformnetwork.com/crew/" />
|
||||||
<meta property="og:type" content="article" />
|
<meta property="og:type" content="article" />
|
||||||
<meta property="og:title" content="CREW Apparel" />
|
<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: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('/images/fb-share-logo.png')}}" />
|
<meta property="og:image" content="{{asset('public/images/fb-share-logo.png')}}" />
|
||||||
|
|
||||||
<!-- favicons
|
<!-- favicons
|
||||||
<link rel="apple-touch-icon" sizes="180x180" href="{{asset('public/favicons/apple-touch-icon.png')}}">
|
<link rel="apple-touch-icon" sizes="180x180" href="{{asset('public/favicons/apple-touch-icon.png')}}">
|
||||||
@@ -27,17 +27,17 @@
|
|||||||
<title>CREW Sportswear</title>
|
<title>CREW Sportswear</title>
|
||||||
|
|
||||||
<!-- Bootstrap core CSS -->
|
<!-- Bootstrap core CSS -->
|
||||||
<link href="{{asset('/assets/css/bootstrap.min.css')}}" rel="stylesheet">
|
<link href="{{asset('public/assets/css/bootstrap.min.css')}}" rel="stylesheet">
|
||||||
|
|
||||||
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
|
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
|
||||||
<link href="{{asset('/assets/css/ie10-viewport-bug-workaround.css')}}" rel="stylesheet">
|
<link href="{{asset('public/assets/css/ie10-viewport-bug-workaround.css')}}" rel="stylesheet">
|
||||||
|
|
||||||
<!-- Custom styles for this template -->
|
<!-- Custom styles for this template -->
|
||||||
<link href="{{asset('/assets/css/style.css')}}" rel="stylesheet">
|
<link href="{{asset('public/assets/css/style.css')}}" rel="stylesheet">
|
||||||
|
|
||||||
<!-- Just for debugging purposes. Don't actually copy these 2 lines! -->
|
<!-- 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]-->
|
<!--[if lt IE 9]><script src="../../assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
|
||||||
<script src="{{asset('/assets/js/ie-emulation-modes-warning.js')}}"></script>
|
<script src="{{asset('public/assets/js/ie-emulation-modes-warning.js')}}"></script>
|
||||||
|
|
||||||
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
|
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
|
||||||
<!--[if lt IE 9]>
|
<!--[if lt IE 9]>
|
||||||
@@ -50,7 +50,7 @@
|
|||||||
<!-- Social Media Share button
|
<!-- Social Media Share button
|
||||||
<script type="text/javascript" src="//platform-api.sharethis.com/js/sharethis.js#property=599bc5cf6d61950012975405&product=sticky-share-buttons"></script>-->
|
<script type="text/javascript" src="//platform-api.sharethis.com/js/sharethis.js#property=599bc5cf6d61950012975405&product=sticky-share-buttons"></script>-->
|
||||||
|
|
||||||
<link href="{{asset('/designer/css/build.css')}}" rel="stylesheet">
|
<link href="{{asset('/public/designer/css/build.css')}}" rel="stylesheet">
|
||||||
<style>
|
<style>
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
@@ -64,10 +64,10 @@
|
|||||||
<!-- Bootstrap core JavaScript ================================================= !-->
|
<!-- Bootstrap core JavaScript ================================================= !-->
|
||||||
<!-- Placed at the end of the document so the pages load faster -->
|
<!-- 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="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
|
||||||
<script src="{{asset('/assets/js/bootstrap.min.js')}}"></script>
|
<script src="{{asset('public/assets/js/bootstrap.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('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="https://ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/jquery.validate.min.js"></script> -->
|
||||||
<script src="{{asset('/assets/js/jquery.validate.js')}}"></script>
|
<script src="{{asset('public/assets/js/jquery.validate.js')}}"></script>
|
||||||
<!-- <script type="text/javascript" src="https://cdn.ywxi.net/js/1.js" async></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('public/assets/js/crew-designer.js')}}"></script> -->
|
||||||
<script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
|
<script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
<!-- Main content -->
|
<!-- Main content -->
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="text-center" id="homepage-logo">
|
<div class="text-center" id="homepage-logo">
|
||||||
<img src="{{asset('/images/logo.png')}}" class="img img-responsive" />
|
<img src="{{asset('/public/images/logo.png')}}" class="img img-responsive" />
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<!-- /.content -->
|
<!-- /.content -->
|
||||||
|
|||||||
@@ -26,13 +26,6 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<h2 style="font-size: 20px; font-weight: bold;">MY CART</h2>
|
<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>
|
<hr>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -52,48 +45,38 @@
|
|||||||
<h3>Order Summary</h3>
|
<h3>Order Summary</h3>
|
||||||
</div>
|
</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;">
|
<div style="border: 1px solid #e2e2e2; padding: 10px; border-bottom: none;">
|
||||||
{{-- <h3>Subtotal: <span id="my_subtotal">{{ round($getSubtotal, 2) }}</span> <small>{{ $store_array[0]->StoreCurrency }}</small></h3> --}}
|
{{-- <h3>Subtotal: <span id="my_subtotal">{{ round($getSubtotal, 2) }}</span> <small>{{ $store_array[0]->StoreCurrency }}</small></h3> --}}
|
||||||
<h5><strong>Subtotal:</strong>
|
<div class="alert alert-info">
|
||||||
<span>{{ number_format($tax['order_grandtotal'], 2) . ' ' . $store_array[0]->StoreCurrency }}</span>
|
<a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>
|
||||||
</h5>
|
<p>Free Shipping on orders with subtotal over 150.00 {{ $store_array[0]->StoreCurrency }}</p>
|
||||||
<h5><strong>Shipping Fee:</strong>
|
</div>
|
||||||
<span>{{ number_format($shipping_fee, 2) . ' ' . $store_array[0]->StoreCurrency }}</span>
|
|
||||||
</h5>
|
<table class="table table-bordered">
|
||||||
<h5> <strong>Tax:</strong>
|
<tr>
|
||||||
<span>{{ number_format($tax['tax'], 2) . ' ' . $store_array[0]->StoreCurrency }}</span>
|
<th>Subtotal</th>
|
||||||
</h5>
|
<td>{{ round($getSubtotal, 2) }}</span> <small>{{ $store_array[0]->StoreCurrency }}</td>
|
||||||
<hr>
|
</tr>
|
||||||
<h3> <strong>Total:</strong> <span id="my_subtotal">{{ number_format($tax['order_grandtotal'] + $shipping_fee + $tax['tax'], 2) }}</span>
|
<tr>
|
||||||
<span>{{ $store_array[0]->StoreCurrency }}</span>
|
<th>Tax</th>
|
||||||
</h3>
|
<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>
|
||||||
<hr>
|
<hr>
|
||||||
<div class="form-group" id="voucher_list">
|
<div class="form-group" id="voucher_list">
|
||||||
@foreach($row as $item)
|
@foreach($row as $item)
|
||||||
@if($item->VoucherId != null)
|
@if($item->VoucherId != null)
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
@if($item->VoucherType == "Percentage")
|
@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
|
@else
|
||||||
<button type="button" class="btn btn-default btn-xs">{{ $item->VoucherCode . ' ' . $item->VoucherValue . ' ' . $store_array[0]->StoreCurrency }} OFF</button>
|
<button type="button" class="btn btn-default btn-xs">{{ $item->VoucherCode . ' ' . $item->VoucherValue . ' ' . $store_array[0]->StoreCurrency }} OFF</button>
|
||||||
@endif
|
@endif
|
||||||
@@ -122,13 +105,13 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style="border: 1px solid #e2e2e2; padding: 10px;">
|
<div style="border: 1px solid #e2e2e2; padding: 10px;">
|
||||||
<a @if($getSubtotal <= 0 ) disabled @endif href="{{ url('getCheckout') }}" class="btn btn-primary 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 @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 href="{{ url('teamstore') . '/' . $store_array[0]->StoreUrl }}" class="btn btn-default btn-block" type="submit">Continue Shopping</a>
|
<a href="{{ url('teamstore') . '/' . $store_array[0]->StoreUrl }}" class="btn btn-default btn-block" type="submit">Continue Shopping</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-8 col-md-pull-4">
|
<div class="col-md-8 col-md-pull-4">
|
||||||
<div style="border: 1px solid #e2e2e2; padding: 10px;">
|
<div style="border: 1px solid #e2e2e2; padding: 10px;">
|
||||||
<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>
|
<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>
|
||||||
</div>
|
</div>
|
||||||
@foreach($item_group as $item)
|
@foreach($item_group as $item)
|
||||||
@if($item->VoucherId == null)
|
@if($item->VoucherId == null)
|
||||||
@@ -138,7 +121,7 @@
|
|||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
@foreach($img_thumb as $img)
|
@foreach($img_thumb as $img)
|
||||||
@if($img->ProductId == $item->ProductId)
|
@if($img->ProductId == $item->ProductId)
|
||||||
<img class="previewImage" src="{{ config('site_config.images_url') }}/{{ $img->Image }}">
|
<img class="previewImage" src="{{ config('site_config.prod_private_server_ip') }}/images/{{ $img->Image }}">
|
||||||
@endif
|
@endif
|
||||||
@endforeach
|
@endforeach
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
</style>
|
</style>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<img src="{{asset('/images/logo.png')}}" class="" height="100px" />
|
<img src="{{asset('public/images/logo.png')}}" class="" height="100px" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
@@ -64,7 +64,7 @@
|
|||||||
<table class="table">
|
<table class="table">
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td rowspan="2" class="text-center"><img class="previewImage" src="http://{{ config('site_config.images_url') }}/{{ $item->Image }} "></td>
|
<td rowspan="2" class="text-center"><img class="previewImage" src="http://{{ config('site_config.prod_private_server_ip') }}/images/{{ $item->Image }} "></td>
|
||||||
<td colspan="5">
|
<td colspan="5">
|
||||||
<h4>{{ $item->ProductName }} {{ $itemOrder }} <br>Price: ${{ $item->Price }}</h4>
|
<h4>{{ $item->ProductName }} {{ $itemOrder }} <br>Price: ${{ $item->Price }}</h4>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
<div class="col-md-3 col-sm-6 col-xs-12 list-sport">
|
<div class="col-md-3 col-sm-6 col-xs-12 list-sport">
|
||||||
<div class="thumb-border">
|
<div class="thumb-border">
|
||||||
<a href="{{ url() }}/{{ Request::path() }}/{{ $r->Id }}">
|
<a href="{{ url() }}/{{ Request::path() }}/{{ $r->Id }}">
|
||||||
<img src="{{ minio_url('uploads/images/sports-category/' . $r->Thumbnail) }}" alt="{{ $r->Category }}" class="image" />
|
<img src="{{ config('site_config.uploads') . 'sports-category/' . $r->Thumbnail }}" alt="{{ $r->Category }}" class="image" />
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
<div class="thumb-border" style="border:1px solid #e2e2e2; padding: 5px;">
|
<div class="thumb-border" style="border:1px solid #e2e2e2; padding: 5px;">
|
||||||
<a href="{{ url('/designer') }}/{{ md5($r->TemplateCode) }}">
|
<a href="{{ url('/designer') }}/{{ md5($r->TemplateCode) }}">
|
||||||
<img src="{{ minio_url('uploads/images/' . $r->Thumbnail) }}" alt="" class="image" />
|
<img src="{{ config('site_config.uploads') . $r->Thumbnail}}" alt="" class="image" />
|
||||||
</a>
|
</a>
|
||||||
<!-- <div class="overlay">
|
<!-- <div class="overlay">
|
||||||
<div class="text" style="font-family:Academic M54;"><a href="">{{$r->TemplateName}}</a></div>
|
<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:url" content="https://crewsportswear.com" />
|
||||||
<meta property="og:type" content="article" />
|
<meta property="og:type" content="article" />
|
||||||
<meta property="og:title" content="CREW Apparel" />
|
<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: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('/images/logo.png')}}" />
|
<meta property="og:image" content="{{asset('public/images/logo.png')}}" />
|
||||||
|
|
||||||
<!-- favicons
|
<!-- favicons
|
||||||
<link rel="apple-touch-icon" sizes="180x180" href="{{asset('public/favicons/apple-touch-icon.png')}}">
|
<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>
|
<title>{{ $store_array[0]->StoreName }} Team Store</title>
|
||||||
|
|
||||||
<!-- Bootstrap core CSS -->
|
<!-- Bootstrap core CSS -->
|
||||||
<link href="{{asset('/assets/css/bootstrap.min.css')}}" rel="stylesheet">
|
<link href="{{asset('public/assets/css/bootstrap.min.css')}}" rel="stylesheet">
|
||||||
|
|
||||||
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
|
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
|
||||||
<link href="{{asset('/assets/css/ie10-viewport-bug-workaround.css')}}" rel="stylesheet">
|
<link href="{{asset('public/assets/css/ie10-viewport-bug-workaround.css')}}" rel="stylesheet">
|
||||||
|
|
||||||
<!-- Custom styles for this template -->
|
<!-- Custom styles for this template -->
|
||||||
<link href="{{asset('/assets/css/style.css')}}" rel="stylesheet">
|
<link href="{{asset('public/assets/css/style.css')}}" rel="stylesheet">
|
||||||
|
|
||||||
<!-- Just for debugging purposes. Don't actually copy these 2 lines! -->
|
<!-- 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]-->
|
<!--[if lt IE 9]><script src="../../assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
|
||||||
<script src="{{asset('/assets/js/ie-emulation-modes-warning.js')}}"></script>
|
<script src="{{asset('public/assets/js/ie-emulation-modes-warning.js')}}"></script>
|
||||||
|
|
||||||
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
|
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
|
||||||
<!--[if lt IE 9]>
|
<!--[if lt IE 9]>
|
||||||
@@ -51,7 +51,7 @@
|
|||||||
<!-- Social Media Share button
|
<!-- Social Media Share button
|
||||||
<script type="text/javascript" src="//platform-api.sharethis.com/js/sharethis.js#property=599bc5cf6d61950012975405&product=sticky-share-buttons"></script>-->
|
<script type="text/javascript" src="//platform-api.sharethis.com/js/sharethis.js#property=599bc5cf6d61950012975405&product=sticky-share-buttons"></script>-->
|
||||||
|
|
||||||
<link href="{{asset('/designer/css/build.css')}}" rel="stylesheet">
|
<link href="{{asset('/public/designer/css/build.css')}}" rel="stylesheet">
|
||||||
<style>
|
<style>
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
@@ -76,16 +76,16 @@
|
|||||||
<!-- Bootstrap core JavaScript ================================================= !-->
|
<!-- Bootstrap core JavaScript ================================================= !-->
|
||||||
<!-- Placed at the end of the document so the pages load faster -->
|
<!-- 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="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
|
||||||
<script src="{{asset('/assets/js/bootstrap.min.js')}}"></script>
|
<script src="{{asset('public/assets/js/bootstrap.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('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="https://ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/jquery.validate.min.js"></script> -->
|
||||||
<script src="{{asset('/assets/js/jquery.validate.js')}}"></script>
|
<script src="{{asset('public/assets/js/jquery.validate.js')}}"></script>
|
||||||
<!-- <script type="text/javascript" src="https://cdn.ywxi.net/js/1.js" async></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('public/assets/js/crew-designer.js')}}"></script> -->
|
||||||
<script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
|
<script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
|
||||||
<!-- jquery.bcSwipe -->
|
<!-- jquery.bcSwipe -->
|
||||||
<script src="{{asset('/assets/js/jquery.bcSwipe.min.js')}}"></script>
|
<script src="{{asset('public/assets/js/jquery.bcSwipe.min.js')}}"></script>
|
||||||
<script src="{{asset('/assets/js/jquery.zoom.js')}}"></script>
|
<script src="{{asset('public/assets/js/jquery.zoom.js')}}"></script>
|
||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
@@ -1,11 +1,5 @@
|
|||||||
@extends('teamstore-layout.main')
|
@extends('teamstore-layout.main')
|
||||||
@section('content')
|
@section('content')
|
||||||
@if ($store_array[0]->IsHibernated)
|
|
||||||
<script>
|
|
||||||
window.location = "../";
|
|
||||||
</script>
|
|
||||||
@endif
|
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
h2 {
|
h2 {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -86,9 +80,9 @@
|
|||||||
padding-top: 20px;
|
padding-top: 20px;
|
||||||
padding-bottom: 20px;
|
padding-bottom: 20px;
|
||||||
@if($store_array[0]->StoreBanner == null)
|
@if($store_array[0]->StoreBanner == null)
|
||||||
background-image: url("{{ minio_url('uploads/images/teamstore/store-banner-dark.png') }}");
|
background-image: url("{{ config('site_config.uploads') . 'teamstore/store-banner-dark.png' }}");
|
||||||
@else
|
@else
|
||||||
background-image: url("{{ minio_url('uploads/images/teamstore/' . $store_array[0]->ImageFolder . '/' . $store_array[0]->StoreBanner) }}");
|
background-image: url("{{ config('site_config.uploads') . 'teamstore/' . $store_array[0]->ImageFolder . '/' . $store_array[0]->StoreBanner }}");
|
||||||
@endif
|
@endif
|
||||||
background-color: #f3f3f3;
|
background-color: #f3f3f3;
|
||||||
background-position: center;
|
background-position: center;
|
||||||
@@ -151,46 +145,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<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 -->
|
<!-- BEGIN PRODUCTS -->
|
||||||
|
|
||||||
@foreach($product_array as $i => $product)
|
@foreach($product_array as $i => $product)
|
||||||
@@ -205,7 +159,7 @@
|
|||||||
<div class="col-md-3 col-sm-6">
|
<div class="col-md-3 col-sm-6">
|
||||||
<span class="thumbnail">
|
<span class="thumbnail">
|
||||||
<a href="{{ url('teamstore') }}/{{ $store_array[0]->StoreUrl }}/product/{{ $product->ProductURL }}">
|
<a href="{{ url('teamstore') }}/{{ $store_array[0]->StoreUrl }}/product/{{ $product->ProductURL }}">
|
||||||
<img style="height: 201.84px;" src="{{ config('site_config.images_url') }}/{{ $filename }}" alt="{{ $product->ProductName }}" >
|
<img style="height: 201.84px;" src="{{ config('site_config.prod_private_server_ip') }}/images/{{ $filename }}" alt="{{ $product->ProductName }}" >
|
||||||
</a>
|
</a>
|
||||||
<h4 class="text-center product-name-holder">{{ $product->ProductName }}</h4>
|
<h4 class="text-center product-name-holder">{{ $product->ProductName }}</h4>
|
||||||
<hr class="line">
|
<hr class="line">
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
<strong>Whoops!</strong> {!! \Session::get('errors') !!}.<br><br>
|
<strong>Whoops!</strong> {!! \Session::get('errors') !!}.<br><br>
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
<form class="form-horizontal" role="form" method="POST" action="teamstore/checkpassword">
|
<form class="form-horizontal" role="form" method="POST" action="teamstore/checkpassword">
|
||||||
<input type="hidden" name="_token" value="{{ csrf_token() }}">
|
<input type="hidden" name="_token" value="{{ csrf_token() }}">
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,5 @@
|
|||||||
@extends('teamstore-layout.main')
|
@extends('teamstore-layout.main')
|
||||||
@section('content')
|
@section('content')
|
||||||
@if ($store_array[0]->IsHibernated)
|
|
||||||
<script>
|
|
||||||
window.location = "../";
|
|
||||||
</script>
|
|
||||||
@endif
|
|
||||||
<style>
|
<style>
|
||||||
|
|
||||||
p{
|
p{
|
||||||
@@ -234,13 +229,13 @@
|
|||||||
@if($thumbnail->ImageClass == 'active')
|
@if($thumbnail->ImageClass == 'active')
|
||||||
<div class="active item text-center" data-slide-number="{{ $i }}">
|
<div class="active item text-center" data-slide-number="{{ $i }}">
|
||||||
<span class="zoom img-zoom">
|
<span class="zoom img-zoom">
|
||||||
<img style="height:400px;" src="{{ config('site_config.images_url') }}/{{ $thumbnail->Image }}">
|
<img style="height:400px;" src="{{ config('site_config.prod_private_server_ip') }}/images/{{ $thumbnail->Image }}">
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@else
|
@else
|
||||||
<div class="item text-center" data-slide-number="{{ $i }}">
|
<div class="item text-center" data-slide-number="{{ $i }}">
|
||||||
<span class="zoom img-zoom">
|
<span class="zoom img-zoom">
|
||||||
<img style="height:400px;" src="{{ config('site_config.images_url') }}/{{ $thumbnail->Image }}">
|
<img style="height:400px;" src="{{ config('site_config.prod_private_server_ip') }}/images/{{ $thumbnail->Image }}">
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
@@ -269,7 +264,7 @@
|
|||||||
@foreach($thumbnails_array as $thumbnail)
|
@foreach($thumbnails_array as $thumbnail)
|
||||||
<li class="col-sm-3 col-xs-3">
|
<li class="col-sm-3 col-xs-3">
|
||||||
<a class="thumbnail a_thumbnail {{ $thumbnail->ImageClass }}" id="carousel-selector-{{ $j }}">
|
<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.images_url') }}/{{ $thumbnail->Image }}"/>
|
<img class="img img-responsive product-center image-thumbnails" style="height: 59.45px;" src="{{ config('site_config.prod_private_server_ip') }}/images/{{ $thumbnail->Image }}"/>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
@define $j++
|
@define $j++
|
||||||
@@ -304,7 +299,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<ul class="nav nav-tabs" role="tablist">
|
<ul class="nav nav-tabs" role="tablist">
|
||||||
<li role="presentation" class="active"><a href="#productDescription" aria-controls="productDescription" role="tab" data-toggle="tab">Description</a></li>
|
<li role="presentation" class="active"><a href="#productDescription" aria-controls="productDescription" role="tab" data-toggle="tab">Desciption</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<!-- Tab panes -->
|
<!-- Tab panes -->
|
||||||
<div class="tab-content">
|
<div class="tab-content">
|
||||||
|
|||||||
@@ -59,7 +59,7 @@
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-7 control-label hidden-xs"> </label>
|
<label class="col-sm-7 control-label hidden-xs"> </label>
|
||||||
<div class="col-sm-5">
|
<div class="col-sm-5">
|
||||||
<label>Sort by:</label>
|
<label>Sory by:</label>
|
||||||
<select class="form-control" name="s" id="select_sort_stores">
|
<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-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>
|
<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">
|
<li class="li-custom col-lg-3 col-md-3 col-sm-4 col-xs-12">
|
||||||
<div style="border: 1px solid #dddddd; padding: 5px;">
|
<div style="border: 1px solid #dddddd; padding: 5px;">
|
||||||
@if($store->Password != null )
|
@if($store->Password != null )
|
||||||
<a class="thumbnail password-protected" href="#" data-store-id="{{ $store->Id }}" data-store-url="{{ $store->StoreUrl }}">
|
<a class="thumbnail password-protected" href="#" data-store-url="{{ $store->StoreUrl }}">
|
||||||
<img class="store-logo" src="{{ minio_url('uploads/images/teamstore/' . $store->ImageFolder . '/' . $store->StoreLogo) }}">
|
<img class="store-logo" src="{{ config('site_config.uploads') . 'teamstore/'. $store->ImageFolder . '/' . $store->StoreLogo }}">
|
||||||
</a>
|
</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>
|
<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
|
@else
|
||||||
<a class="thumbnail" href="{{ url('teamstore') . '/' . $store->StoreUrl }}">
|
<a class="thumbnail" href="{{ url('teamstore') . '/' . $store->StoreUrl }}">
|
||||||
<img class="store-logo" src="{{ minio_url('uploads/images/teamstore/' . $store->ImageFolder . '/' . $store->StoreLogo) }}">
|
<img class="store-logo" src="{{ config('site_config.uploads') . 'teamstore/' . $store->ImageFolder . '/' . $store->StoreLogo }}">
|
||||||
</a>
|
</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>
|
<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
|
@endif
|
||||||
@@ -124,12 +124,11 @@
|
|||||||
|
|
||||||
<form class="form-horizontal" role="form" method="POST" action="{{ url('teamstore/checkpassword') }}">
|
<form class="form-horizontal" role="form" method="POST" action="{{ url('teamstore/checkpassword') }}">
|
||||||
<input type="hidden" name="_token" value="{{ csrf_token() }}">
|
<input type="hidden" name="_token" value="{{ csrf_token() }}">
|
||||||
<input type="hidden" class="form-control" id="_teamstore_id" name="store_id">
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-md-4 control-label">Password</label>
|
<label class="col-md-4 control-label">Password</label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
|
|
||||||
<input type="password" class="form-control pwd" name="password">
|
<input type="password" class="form-control pwd" name="password">
|
||||||
<span class="input-group-btn">
|
<span class="input-group-btn">
|
||||||
<button class="btn btn-default reveal-password" type="button"><i class="fa fa-eye"></i></button>
|
<button class="btn btn-default reveal-password" type="button"><i class="fa fa-eye"></i></button>
|
||||||
|
|||||||
@@ -119,10 +119,7 @@
|
|||||||
<option value="toddler">Toddler</option>
|
<option value="toddler">Toddler</option>
|
||||||
<option value="youth">Youth</option>
|
<option value="youth">Youth</option>
|
||||||
<option value="adult">Adult</option>
|
<option value="adult">Adult</option>
|
||||||
<option value="mask">Mask</option>
|
<option value="none">None</option>
|
||||||
<option value="gaiter">Gaiter</option>
|
|
||||||
<option value="buckethat">Buckethat</option>
|
|
||||||
<option value="none">None</option>
|
|
||||||
</select>
|
</select>
|
||||||
<span id="err_available_size"></span>
|
<span id="err_available_size"></span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -34,13 +34,15 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th>Full name</th>
|
<th>Full name</th>
|
||||||
<th>Address</th>
|
<th>Address</th>
|
||||||
|
<th>Postcode</th>
|
||||||
<th>Phone Number</th>
|
<th>Phone Number</th>
|
||||||
<th class="text-center">Action</th>
|
<th class="text-center">Action</th>
|
||||||
</tr>
|
</tr>
|
||||||
@foreach($array_address_book as $row)
|
@foreach($array_address_book as $row)
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ $row->Fullname }}</td>
|
<td>{{ $row->Fullname }}</td>
|
||||||
<td>{{ $row->Address . ' ' . $row->Address2 }}, {{ $row->State }}, {{ $row->City }}, {{ $row->Country}} {{ $row->CountryCode}}, {{ $row->ZipCode }}</td>
|
<td>{{ $row->Address }}</td>
|
||||||
|
<td>{{ $row->State }}, {{ $row->City }}, {{ $row->ZipCode }}</td>
|
||||||
<td>{{ $row->ContactNumber }}</td>
|
<td>{{ $row->ContactNumber }}</td>
|
||||||
<td class="text-center">
|
<td class="text-center">
|
||||||
<a href="{{ url('user/address-book/edit/') }}/{{ $row->Id }}" class="btn btn-default btn-xs"><i class="fa fa-edit"></i> Edit</a>
|
<a href="{{ url('user/address-book/edit/') }}/{{ $row->Id }}" class="btn btn-default btn-xs"><i class="fa fa-edit"></i> Edit</a>
|
||||||
|
|||||||
@@ -1,51 +0,0 @@
|
|||||||
@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_client_designs as $row)
|
||||||
@foreach($array_template_paths as $key => $row1)
|
@foreach($array_template_paths as $key => $row1)
|
||||||
@if($key == 0)
|
@if($key == 0)
|
||||||
<img src="{{ config('site_config.images_url') }}/{{ $row->DesignCode }}-front-thumbnail.png" alt="{{ $row->DesignName }}" id="main-thumbnail" class="img img-responsive">
|
<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">
|
||||||
@endif
|
@endif
|
||||||
@endforeach
|
@endforeach
|
||||||
@endforeach
|
@endforeach
|
||||||
@@ -56,7 +56,7 @@
|
|||||||
@if($key == 0)
|
@if($key == 0)
|
||||||
<li class="col-sm-3 col-xs-3">
|
<li class="col-sm-3 col-xs-3">
|
||||||
<a class="thumbnail a_thumbnail active">
|
<a class="thumbnail a_thumbnail active">
|
||||||
<img class="img img-responsive product-center image-thumbnails" style="height: 59.45px;" src="{{ config('site_config.images_url') }}/{{ $row->DesignCode }}-front-thumbnail.png"/>
|
<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"/>
|
||||||
</a>
|
</a>
|
||||||
<!-- <p>Select Default Thumbnail:</p>
|
<!-- <p>Select Default Thumbnail:</p>
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
@@ -66,7 +66,7 @@
|
|||||||
@else
|
@else
|
||||||
<li class="col-sm-3 col-xs-3">
|
<li class="col-sm-3 col-xs-3">
|
||||||
<a class="thumbnail a_thumbnail">
|
<a class="thumbnail a_thumbnail">
|
||||||
<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"/>
|
<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"/>
|
||||||
</a>
|
</a>
|
||||||
<!-- <p> </p>
|
<!-- <p> </p>
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
|
|||||||
@@ -1,93 +1,81 @@
|
|||||||
@extends('user-layouts.user_template')
|
@extends('user-layouts.user_template')
|
||||||
@section('content')
|
@section('content')
|
||||||
<div class="content-wrapper" style="min-height: 916px;">
|
<div class="content-wrapper" style="min-height: 916px;">
|
||||||
<!-- Content Header (Page header) -->
|
<!-- Content Header (Page header) -->
|
||||||
<section class="content-header">
|
<section class="content-header">
|
||||||
<h1>
|
<h1>
|
||||||
Address Book
|
Address Book
|
||||||
<!-- <small>Control panel</small> -->
|
<!-- <small>Control panel</small> -->
|
||||||
</h1>
|
</h1>
|
||||||
<ol class="breadcrumb">
|
<ol class="breadcrumb">
|
||||||
<li><a href="{{ url ('user') }}"><i class="fa fa-home"></i> Home</a></li>
|
<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><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>
|
<li class="active">Add New Address</li>
|
||||||
|
|
||||||
</ol>
|
</ol>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<!-- Main content -->
|
<!-- Main content -->
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="box box-primary">
|
<div class="box box-primary">
|
||||||
<div class="box-header with-border">
|
<div class="box-header with-border">
|
||||||
|
|
||||||
<h3 class="box-title">
|
<h3 class="box-title">
|
||||||
Add New Address
|
Add New Address
|
||||||
</h3>
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
<form role="form" id="frm-create-address-book">
|
<form role="form" id="frm-create-address-book">
|
||||||
<div class="box-body">
|
<div class="box-body">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Fullname</label>
|
<label>Fullname</label>
|
||||||
<input type="text" class="form-control" name="fullname" placeholder="Fullaname">
|
<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 -->
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="col-md-6">
|
||||||
<label>Mobile Number</label>
|
<div class="form-group">
|
||||||
<input type="text" class="form-control" name="mobilenumber" placeholder="Please enter your mobile number">
|
<label>House Number, Building and Street Name</label>
|
||||||
</div>
|
<input type="text" class="form-control" name="address" placeholder="Please enter your House Number, Building and Street Name">
|
||||||
<div class="form-group">
|
</div>
|
||||||
<label>Other Notes</label>
|
<div class="form-group">
|
||||||
<input type="text" class="form-control" name="othernotes" placeholder="Please enter your notes">
|
<label>State</label>
|
||||||
</div>
|
<select class="form-control" name="state" id="lst-states" >
|
||||||
<!-- /.box-body -->
|
<option value="">Select State</option>
|
||||||
</div>
|
</select>
|
||||||
<div class="col-md-6">
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Country</label>
|
<label>City</label>
|
||||||
<select class="form-control" name="countryCode" id="select_country" onchange="selectCountry(this)">
|
<select class="form-control" name="city" id="lst-cities">
|
||||||
<option value="">Select Country</option>
|
<option value="">Select City</option>
|
||||||
<option value="US">United States</option>
|
</select>
|
||||||
<option value="CA">Canada</option>
|
</div>
|
||||||
</select>
|
<div class="form-group">
|
||||||
</div>
|
<label>Zip Code</label>
|
||||||
<div class="form-group">
|
<input type="text" class="form-control" name="zipcode" placeholder="Please enter your zip code">
|
||||||
<label>State / Province</label>
|
</div>
|
||||||
<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>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="box-footer">
|
||||||
<div class="box-footer">
|
<button type="submit" class="btn btn-primary btn-custom-save">Save</button>
|
||||||
<button type="submit" class="btn btn-primary btn-custom-save">Save</button>
|
</div>
|
||||||
</div>
|
</form>
|
||||||
</form>
|
|
||||||
<div>
|
<div>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</div>
|
||||||
|
</section>
|
||||||
<!-- /.content -->
|
<!-- /.content -->
|
||||||
</div>
|
</div>
|
||||||
@endsection
|
@endsection
|
||||||
@@ -46,12 +46,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Country</label>
|
<label>House Number, Building and Street Name</label>
|
||||||
<select class="form-control" name="countryCode" id="select_country" onchange="selectCountry(this)" data-selected="{{ $array_address_book[0]->CountryCode }}">
|
<input type="text" class="form-control" name="address" placeholder="Please enter your House Number, Building and Street Name" value="{{ $array_address_book[0]->Address }}">
|
||||||
<option value="">Select Country</option>
|
|
||||||
<option value="US">United States</option>
|
|
||||||
<option value="CA">Canada</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>State</label>
|
<label>State</label>
|
||||||
@@ -65,15 +61,6 @@
|
|||||||
<option value="">Select City</option>
|
<option value="">Select City</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</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">
|
<div class="form-group">
|
||||||
<label>Zip Code</label>
|
<label>Zip Code</label>
|
||||||
<input type="text" class="form-control" name="zipcode" placeholder="Please enter your zip code" value="{{ $array_address_book[0]->ZipCode }}">
|
<input type="text" class="form-control" name="zipcode" placeholder="Please enter your zip code" value="{{ $array_address_book[0]->ZipCode }}">
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
<!-- Control Sidebar Toggle Button -->
|
<!-- Control Sidebar Toggle Button -->
|
||||||
<li class="user user-menu">
|
<li class="user user-menu">
|
||||||
<a href="#">
|
<a href="#">
|
||||||
<img src="{{ minio_url('uploads/images/user/default-user.png') }}" class="user-image" alt="User Image">
|
<img src="{{ config('site_config.uploads') . 'user/default-user.png' }}" class="user-image" alt="User Image">
|
||||||
<span class="hidden-xs">{{ Auth::user()->username }}</span>
|
<span class="hidden-xs">{{ Auth::user()->username }}</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@@ -17,81 +17,15 @@
|
|||||||
|
|
||||||
<section class="content">
|
<section class="content">
|
||||||
@if(Auth::user()->email_is_verified == "0")
|
@if(Auth::user()->email_is_verified == "0")
|
||||||
<div class="alert alert-warning alert-dismissible">
|
<div class="alert alert-warning alert-dismissible">
|
||||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||||
<h4><i class="icon fa fa-check"></i> To do!</h4>
|
<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>
|
Please verify your Email Address. <a href="{{ url('user/email-verify') }}">Click here</a>
|
||||||
</div>
|
</div>
|
||||||
@endif
|
<div class="text-center" id="homepage-logo">
|
||||||
|
|
||||||
@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
|
@endif
|
||||||
|
<img src="{{asset('/public/images/logo.png')}}" style="height: 200px;" class="img img-responsive" />
|
||||||
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<!-- /.content -->
|
<!-- /.content -->
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
@foreach($array_client_designs as $row)
|
@foreach($array_client_designs as $row)
|
||||||
<div class="col-md-3 col-sm-6">
|
<div class="col-md-3 col-sm-6">
|
||||||
<span class="thumbnail">
|
<span class="thumbnail">
|
||||||
<img src="{{ config('site_config.images_url') }}/{{ $row->DesignCode }}-front-thumbnail.png" alt="{{ $row->DesignName }}" >
|
<img src="{{ config('site_config.prod_private_server_ip') }}/images/{{ $row->DesignCode }}-front-thumbnail.png" alt="{{ $row->DesignName }}" >
|
||||||
<h4 class="design-name-holder">{{ $row->DesignName }}</h4>
|
<h4 class="design-name-holder">{{ $row->DesignName }}</h4>
|
||||||
<small>{{ date('F j, Y g:i a', strtotime($row->DateCreated)) }}</small>
|
<small>{{ date('F j, Y g:i a', strtotime($row->DateCreated)) }}</small>
|
||||||
<hr class="line">
|
<hr class="line">
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
<img class="previewImage" id="active_thumbnail" src="{{ config('site_config.images_url') . '/images/' . $array_thumbnail_display[0]->Image }}">
|
<img class="previewImage" id="active_thumbnail" src="{{ config('site_config.prod_private_server_ip') . '/images/' . $array_thumbnail_display[0]->Image }}">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-10">
|
<div class="col-md-10">
|
||||||
|
|||||||
@@ -93,7 +93,7 @@
|
|||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
@foreach($img_thumb as $img)
|
@foreach($img_thumb as $img)
|
||||||
@if($img->ProductId == $item->ProductId)
|
@if($img->ProductId == $item->ProductId)
|
||||||
<img class="previewImage" src="{{ config('site_config.images_url') }}/{{ $img->Image }}">
|
<img class="previewImage" src="{{ config('site_config.prod_private_server_ip') }}/images/{{ $img->Image }}">
|
||||||
@endif
|
@endif
|
||||||
@endforeach
|
@endforeach
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
@foreach($array_client_designs as $row)
|
@foreach($array_client_designs as $row)
|
||||||
@foreach($array_template_paths as $key => $row1)
|
@foreach($array_template_paths as $key => $row1)
|
||||||
@if($key == 0)
|
@if($key == 0)
|
||||||
<img src="{{ config('site_config.images_url') }}/{{ $row->DesignCode }}-front-thumbnail.png" alt="{{ $row->DesignName }}" id="main-thumbnail" class="img img-responsive">
|
<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">
|
||||||
@endif
|
@endif
|
||||||
@endforeach
|
@endforeach
|
||||||
@endforeach
|
@endforeach
|
||||||
@@ -56,7 +56,7 @@
|
|||||||
@if($key == 0)
|
@if($key == 0)
|
||||||
<li class="col-sm-3 col-xs-3">
|
<li class="col-sm-3 col-xs-3">
|
||||||
<a class="thumbnail a_thumbnail active">
|
<a class="thumbnail a_thumbnail active">
|
||||||
<img class="img img-responsive product-center image-thumbnails" style="height: 59.45px;" src="{{ config('site_config.images_url') }}/{{ $row->DesignCode }}-front-thumbnail.png"/>
|
<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"/>
|
||||||
</a>
|
</a>
|
||||||
<!-- <p>Select Default Thumbnail:</p>
|
<!-- <p>Select Default Thumbnail:</p>
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
@@ -66,7 +66,7 @@
|
|||||||
@else
|
@else
|
||||||
<li class="col-sm-3 col-xs-3">
|
<li class="col-sm-3 col-xs-3">
|
||||||
<a class="thumbnail a_thumbnail">
|
<a class="thumbnail a_thumbnail">
|
||||||
<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"/>
|
<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"/>
|
||||||
</a>
|
</a>
|
||||||
<!-- <p> </p>
|
<!-- <p> </p>
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
@@ -144,10 +144,6 @@
|
|||||||
<option value="toddler">Toddler</option>
|
<option value="toddler">Toddler</option>
|
||||||
<option value="youth">Youth</option>
|
<option value="youth">Youth</option>
|
||||||
<option value="adult">Adult</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>
|
</select>
|
||||||
<span id="err_available_size"></span>
|
<span id="err_available_size"></span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<!-- Sidebar user panel -->
|
<!-- Sidebar user panel -->
|
||||||
<div class="user-panel">
|
<div class="user-panel">
|
||||||
<div class="pull-left image">
|
<div class="pull-left image">
|
||||||
<img src="{{ minio_url('uploads/images/user/default-user.png') }}" class="img-circle" alt="User Image">
|
<img src="{{ config('site_config.uploads') . 'user/default-user.png' }}" class="img-circle" alt="User Image">
|
||||||
</div>
|
</div>
|
||||||
<div class="pull-left info">
|
<div class="pull-left info">
|
||||||
<p>{{ Auth::user()->name }}</p>
|
<p>{{ Auth::user()->name }}</p>
|
||||||
@@ -49,11 +49,6 @@
|
|||||||
</li>
|
</li>
|
||||||
@endif
|
@endif
|
||||||
@if(Auth::user()->role == "store_owner")
|
@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' : '' }}">
|
<li class="treeview menu-open {{ Request::is('user/store-items', 'user/store-settings', 'user/store-orders') ? 'active' : '' }}">
|
||||||
<a href="#">
|
<a href="#">
|
||||||
<i class="fa fa-cog"></i> <span>Team Store</span>
|
<i class="fa fa-cog"></i> <span>Team Store</span>
|
||||||
|
|||||||
@@ -51,7 +51,6 @@
|
|||||||
<table class="table table-bordered table-condensed nowrap" id="tbl_store_orders">
|
<table class="table table-bordered table-condensed nowrap" id="tbl_store_orders">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Status</th>
|
|
||||||
<th>Invoice No.</th>
|
<th>Invoice No.</th>
|
||||||
<th>Product Name</th>
|
<th>Product Name</th>
|
||||||
<th>Name</th>
|
<th>Name</th>
|
||||||
@@ -78,8 +77,7 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
@foreach($array_store_orders as $item_order)
|
@foreach($array_store_orders as $item_order)
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ $item_order->StepLabel }}</td>
|
<td>{{ $item_order->InvoiceNumber . ' - ' . $item_order->Order_Id }}</td>
|
||||||
<td>{{ $item_order->InvoiceNumber }}</td>
|
|
||||||
<td>{{ $item_order->ProductName }}</td>
|
<td>{{ $item_order->ProductName }}</td>
|
||||||
<td>{{ $item_order->Name }}</td>
|
<td>{{ $item_order->Name }}</td>
|
||||||
<td>{{ $item_order->Number }}</td>
|
<td>{{ $item_order->Number }}</td>
|
||||||
|
|||||||
@@ -59,7 +59,7 @@
|
|||||||
<div class="col-md-3 col-sm-6">
|
<div class="col-md-3 col-sm-6">
|
||||||
<div class="thumbnail" >
|
<div class="thumbnail" >
|
||||||
<a href="{{ url('user/store-items/item') }}/{{ $product->ProductURL }}">
|
<a href="{{ url('user/store-items/item') }}/{{ $product->ProductURL }}">
|
||||||
<img style="height:200px" src="{{ config('site_config.images_url') }}/{{ $filename . '?t=' . time() }}" alt="{{ $product->ProductName }}" >
|
<img style="height:200px" src="{{ config('site_config.prod_private_server_ip') }}/images/{{ $filename . '?t=' . time() }}" alt="{{ $product->ProductName }}" >
|
||||||
</a>
|
</a>
|
||||||
<hr class="line">
|
<hr class="line">
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
|
|||||||
@@ -63,7 +63,7 @@
|
|||||||
<div id="{{ 'order_number_' . $product->Id }}">
|
<div id="{{ 'order_number_' . $product->Id }}">
|
||||||
<div class="thumbnail" >
|
<div class="thumbnail" >
|
||||||
<a href="#">
|
<a href="#">
|
||||||
<img style="height:200px" src="{{ config('site_config.images_url') }}/{{ $filename . '?t=' . time() }}" alt="{{ $product->ProductName }}" >
|
<img style="height:200px" src="{{ config('site_config.prod_private_server_ip') }}/images/{{ $filename . '?t=' . time() }}" alt="{{ $product->ProductName }}" >
|
||||||
</a>
|
</a>
|
||||||
<hr class="line">
|
<hr class="line">
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
|
|||||||
@@ -63,8 +63,8 @@
|
|||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<p>Store Logo Preview:</p>
|
<p>Store Logo Preview:</p>
|
||||||
<div class="store-logo-holder">
|
<div class="store-logo-holder">
|
||||||
<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">
|
<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="{{ minio_url('uploads/images/teamstore/' . $store_array[0]->ImageFolder . '/' . $store_array[0]->StoreLogo) }}?v={{ time() }}" style="max-width: 100%; max-height: 100%; ">
|
<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>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -82,8 +82,8 @@
|
|||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<p>Store Banner Preview:</p>
|
<p>Store Banner Preview:</p>
|
||||||
<div class="store-banner-holder">
|
<div class="store-banner-holder">
|
||||||
<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">
|
<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="{{ minio_url('uploads/images/teamstore/' . $store_array[0]->ImageFolder . '/' . $store_array[0]->StoreBanner) }}?v={{ time() }}" style="max-width: 100%; max-height: 100%;">
|
<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>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -39,7 +39,7 @@
|
|||||||
@foreach($array_client_designs as $row)
|
@foreach($array_client_designs as $row)
|
||||||
@foreach($array_template_paths as $key => $row1)
|
@foreach($array_template_paths as $key => $row1)
|
||||||
@if($key == 0)
|
@if($key == 0)
|
||||||
<img src="{{ config('site_config.images_url') }}/{{ $row->DesignCode }}-front-thumbnail.png" alt="{{ $row->DesignName }}" id="main-thumbnail" class="img img-responsive">
|
<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">
|
||||||
@endif
|
@endif
|
||||||
@endforeach
|
@endforeach
|
||||||
@endforeach
|
@endforeach
|
||||||
@@ -53,13 +53,13 @@
|
|||||||
@if($key == 0)
|
@if($key == 0)
|
||||||
<li class="col-sm-3 col-xs-3">
|
<li class="col-sm-3 col-xs-3">
|
||||||
<a class="thumbnail a_thumbnail active">
|
<a class="thumbnail a_thumbnail active">
|
||||||
<img class="img img-responsive product-center image-thumbnails" style="height: 59.45px;" src="{{ config('site_config.images_url') }}/{{ $row->DesignCode }}-front-thumbnail.png"/>
|
<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"/>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
@else
|
@else
|
||||||
<li class="col-sm-3 col-xs-3">
|
<li class="col-sm-3 col-xs-3">
|
||||||
<a class="thumbnail a_thumbnail">
|
<a class="thumbnail a_thumbnail">
|
||||||
<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"/>
|
<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"/>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
@endif
|
@endif
|
||||||
|
|||||||
@@ -20,6 +20,7 @@
|
|||||||
<li class="active">{{ $product_array[0]->ProductName }}</li>
|
<li class="active">{{ $product_array[0]->ProductName }}</li>
|
||||||
</ol>
|
</ol>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<!-- Main content -->
|
<!-- Main content -->
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -36,7 +37,7 @@
|
|||||||
<div class="col-md-12 text-center">
|
<div class="col-md-12 text-center">
|
||||||
@foreach($thumbnails_array as $thumbnail)
|
@foreach($thumbnails_array as $thumbnail)
|
||||||
@if($thumbnail->ImageClass == 'active')
|
@if($thumbnail->ImageClass == 'active')
|
||||||
<img style="height:400px" src="{{ config('site_config.images_url') }}/{{ $thumbnail->Image . '?t=' . time() }}" id="main-thumbnail">
|
<img style="height:400px" src="{{ config('site_config.prod_private_server_ip') }}/images/{{ $thumbnail->Image . '?t=' . time() }}" id="main-thumbnail">
|
||||||
@endif
|
@endif
|
||||||
@endforeach
|
@endforeach
|
||||||
</div>
|
</div>
|
||||||
@@ -47,7 +48,7 @@
|
|||||||
<li class="col-sm-3 col-xs-4">
|
<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;">
|
<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> -->
|
<!-- <span class="close">×</span> -->
|
||||||
<img class="img img-responsive product-center " style="height: 65.45px;" src="{{ asset('/images/add-new-img.svg') }}"/>
|
<img class="img img-responsive product-center " style="height: 65.45px;" src="{{ asset('/public/images/add-new-img.svg') }}"/>
|
||||||
<!-- <p class="center">Add Image</p> -->
|
<!-- <p class="center">Add Image</p> -->
|
||||||
<p class="text-center">
|
<p class="text-center">
|
||||||
Add Image
|
Add Image
|
||||||
@@ -58,7 +59,7 @@
|
|||||||
<li class="col-sm-3 col-xs-4">
|
<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;">
|
<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> -->
|
<!-- <span class="close">×</span> -->
|
||||||
<img class="img img-responsive product-center image-thumbnails" style="height: 59.45px;" src="{{ config('site_config.images_url') }}/{{ $thumbnail->Image . '?t=' . time() }}"/>
|
<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() }}"/>
|
||||||
</a>
|
</a>
|
||||||
<div class="funkyradio">
|
<div class="funkyradio">
|
||||||
<div class="funkyradio-primary">
|
<div class="funkyradio-primary">
|
||||||
@@ -137,9 +138,6 @@
|
|||||||
<option value="toddler" @if(in_array("toddler", $available_size)) selected @endif>Toddler</option>
|
<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="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="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>
|
<option value="none" @if(in_array("none", $available_size)) selected @endif>None</option>
|
||||||
</select>
|
</select>
|
||||||
<span id="err_available_size"></span>
|
<span id="err_available_size"></span>
|
||||||
@@ -148,20 +146,9 @@
|
|||||||
<label>Item Privacy</label>
|
<label>Item Privacy</label>
|
||||||
<select class="form-control" name="item_privacy">
|
<select class="form-control" name="item_privacy">
|
||||||
<option value="public" @if($product_array[0]->PrivacyStatus == "public") selected @endif>Public</option>
|
<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>
|
</select>
|
||||||
</div>
|
</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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -200,7 +187,7 @@
|
|||||||
|
|
||||||
<tr id="{{ 'item-' . $thumbnail->Id }}">
|
<tr id="{{ 'item-' . $thumbnail->Id }}">
|
||||||
<td class="text-center" style="width: 50px"><i class="fa fa-bars"></i></td>
|
<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.images_url') }}/{{ $thumbnail->Image . '?t=' . time() }}"/></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 class="text-center">
|
<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-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>
|
<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
Executable file → Normal file
0
storage/.gitignore
vendored
Executable file → Normal file
0
storage/app/.gitignore
vendored
Executable file → Normal file
0
storage/app/.gitignore
vendored
Executable file → Normal file
0
storage/framework/.gitignore
vendored
Executable file → Normal file
0
storage/framework/.gitignore
vendored
Executable file → Normal file
0
storage/framework/cache/.gitignore
vendored
Executable file → Normal file
0
storage/framework/cache/.gitignore
vendored
Executable file → Normal file
0
storage/framework/sessions/.gitignore
vendored
Executable file → Normal file
0
storage/framework/sessions/.gitignore
vendored
Executable file → Normal file
0
storage/framework/views/.gitignore
vendored
Executable file → Normal file
0
storage/framework/views/.gitignore
vendored
Executable file → Normal file
0
storage/laravel-analytics/hardy-beach-228905-7755a62c7a35.p12
Executable file → Normal file
0
storage/laravel-analytics/hardy-beach-228905-7755a62c7a35.p12
Executable file → Normal file
0
storage/logs/.gitignore
vendored
Executable file → Normal file
0
storage/logs/.gitignore
vendored
Executable file → Normal file
Reference in New Issue
Block a user