90 Commits

Author SHA1 Message Date
Frank John Begornia
3dac8ee685 Fix image path for PayPal button in cart view
All checks were successful
Deploy Production (crewsportswear.com) / deploy (push) Successful in 2m1s
2026-01-07 01:42:43 +08:00
Frank John Begornia
09974721f3 Update DesignerController and site_config for MinIO integration and URL adjustments
All checks were successful
Deploy Production (crewsportswear.com) / deploy (push) Successful in 2m23s
2026-01-07 01:28:47 +08:00
Frank John Begornia
8215ad8337 Refactor image URLs to use MinIO storage across various views and controllers
All checks were successful
Deploy Production (crewsportswear.com) / deploy (push) Successful in 2m16s
2026-01-07 01:10:15 +08:00
Frank John Begornia
368ac50729 Add MinIO configuration and update image URLs in MainController
All checks were successful
Deploy Production (crewsportswear.com) / deploy (push) Successful in 1m57s
2026-01-06 15:34:02 +08:00
Frank John Begornia
8f094ee89c Use MinIO for sports category images
All checks were successful
Deploy Production (crewsportswear.com) / deploy (push) Successful in 1m56s
2026-01-06 15:27:17 +08:00
Frank John Begornia
0551cb078f Add MinIO S3 storage integration
All checks were successful
Deploy Production (crewsportswear.com) / deploy (push) Successful in 2m9s
- Add minio disk configuration in filesystems.php
- Create helper functions for MinIO URLs (minio_url, minio_image_url)
- Update composer.json with AWS SDK (for future S3 support)
- Add MinIO env vars to docker-compose.local.yml
- Add .env examples for MinIO configuration
2026-01-06 15:20:15 +08:00
Frank John Begornia
26620fc043 Update README.md to reflect project details and installation instructions
All checks were successful
Deploy Production (crewsportswear.com) / deploy (push) Successful in 2m1s
2026-01-05 23:15:14 +08:00
Frank John Begornia
f10d6daa6f Update APP_URL and Traefik rules for production environment 2026-01-05 23:13:37 +08:00
Frank John Begornia
ab0d370225 Remove commented-out sales chart section from user dashboard
All checks were successful
Deploy Production (crewsportswear.com) / deploy (push) Successful in 2m0s
2025-12-31 02:20:31 +08:00
Frank John Begornia
ee7b52feb2 Update AppServiceProvider to force HTTPS and configure APP_URL in app.php
All checks were successful
Deploy Production (crewsportswear.com) / deploy (push) Successful in 2m1s
2025-12-31 02:10:31 +08:00
Frank John Begornia
4cb77e9312 Remove '/public' prefix from asset paths for consistency across views
All checks were successful
Deploy Production (crewsportswear.com) / deploy (push) Successful in 2m4s
2025-12-31 02:04:33 +08:00
Frank John Begornia
43e66c7ac4 Refactor asset paths to remove '/public' prefix for consistency across views
All checks were successful
Deploy Production (crewsportswear.com) / deploy (push) Successful in 1m57s
2025-12-31 01:53:42 +08:00
Frank John Begornia
685a49cf57 Remove unnecessary environment setup and optimization steps from Dockerfile
All checks were successful
Deploy Production (crewsportswear.com) / deploy (push) Successful in 2m13s
2025-12-31 01:24:12 +08:00
Frank John Begornia
f6617f6d70 Fix Traefik certresolver value in production Docker Compose configuration
All checks were successful
Deploy Production (crewsportswear.com) / deploy (push) Successful in 2m5s
2025-12-31 01:10:07 +08:00
Frank John Begornia
7c6108e0a7 Update production environment URLs and Traefik rules for dev-crew.crewsportswear.app
All checks were successful
Deploy Production (crewsportswear.com) / deploy (push) Successful in 2m9s
2025-12-31 00:56:31 +08:00
Frank John Begornia
b8aa48a0bb Update deployment directory path in workflow configuration
All checks were successful
Deploy Production (crewsportswear.com) / deploy (push) Successful in 2m14s
2025-12-31 00:33:22 +08:00
Frank John Begornia
8fc0b1076a Add Docker and deployment configurations for development and production environments
Some checks failed
Deploy Production (crewsportswear.com) / deploy (push) Failing after 5m18s
2025-12-31 00:23:44 +08:00
franknstayn
71e1fca6fe updated 2023-08-24 21:55:06 +08:00
franknstayn
8dc23e4e67 exempt sf spartans tax 2021-12-23 18:08:57 +08:00
franknstayn
729d0e72e6 added voucher validation 2021-12-03 18:00:27 +08:00
franknstayn
0b8856d3a0 update store item view 2021-11-26 19:31:40 +08:00
franknstayn
6aa0587a69 update store item view 2021-11-26 19:29:59 +08:00
franknstayn
08c274f5bd updated checkout flow 2021-11-03 21:30:42 +08:00
franknstayn
148df27117 update navbar 2021-09-25 18:32:49 +08:00
franknstayn
e552037e2c update navbar 2021-09-25 18:30:03 +08:00
franknstayn
7011b28542 update navbar 2021-09-25 18:28:40 +08:00
franknstayn
2ac9cb6420 update navbar 2021-09-25 18:20:22 +08:00
franknstayn
9c403b7207 update creds 2021-09-15 20:48:31 +08:00
franknstayn
11960d6bad update email creds 2021-09-15 20:41:07 +08:00
franknstayn
25f80cb16f update email creds 2021-09-15 20:20:31 +08:00
franknstayn
72773a517a update email 2021-09-15 20:02:51 +08:00
franknstayn
d1f5d38480 update description label 2021-09-07 19:41:04 +08:00
franknstayn
f5f1693f55 update store please read text 2021-09-03 21:35:45 +08:00
franknstayn
39165cc7f9 update store please read text 2021-09-03 21:35:24 +08:00
franknstayn
20b4e06ee7 updated delete function for delete item 2021-07-17 15:32:49 +08:00
Frank John Begornia
18e11ac3d0 added shipping fee for dgs 2021-03-20 14:36:46 +08:00
Frank John Begornia
0013b2a025 fixed reports date range 2021-02-08 04:07:29 +08:00
Frank John Begornia
acf9c2e931 updated apis 2021-02-04 19:45:27 +08:00
Frank John Begornia
c144810352 update reports display 2021-01-23 19:52:17 +08:00
Frank John Begornia
b1ed52f7a6 update report 2021-01-23 19:49:15 +08:00
Frank John Begornia
70b250a64e fixed order report 2020-12-19 19:49:03 +08:00
Frank John Begornia
1eb7e6632f fixed order report 2020-12-19 19:46:36 +08:00
Frank John Begornia
98e7652e6b added status 2020-12-12 19:53:30 +08:00
Frank John Begornia
852593ecfb added new api 2020-12-11 21:47:36 +08:00
Frank John Begornia
43de35a66c added order status 2020-11-28 18:13:43 +08:00
Frank John Begornia
ad57e218af change image url 2020-11-27 16:24:57 +08:00
Frank John Begornia
d2a20c4831 added api for tracking 2020-11-27 02:43:26 +08:00
franknstayn
36ad67a37a added bucket hat sizes 2020-11-26 12:32:29 -06:00
franknstayn
6c55194c9a edit please read on lasc store 2020-11-17 18:50:50 +08:00
franknstayn
77ee1b9ccc update crewsportswear 2020-10-24 21:27:04 +08:00
franknstayn
6cc68cd56b added announcement 2020-10-17 23:16:25 +08:00
franknstayn
3e328b83a4 added 0 2020-10-17 23:14:52 +08:00
franknstayn
d82832043c added announcement 2020-10-17 22:17:25 +08:00
franknstayn
da89856e95 added stat 2020-09-29 19:40:42 +08:00
franknstayn
bf88584dcd update 2020-09-29 01:05:01 -05:00
franknstayn
3eb4078d19 update payment details record 2020-08-10 23:20:55 +08:00
franknstayn
5918eded8c add shipping cost 2020-08-10 22:41:40 +08:00
franknstayn
02361ca64e updates 2020-08-09 13:21:41 -05:00
franknstayn
1ca40ce1d7 updates 2020-08-01 03:06:48 -05:00
franknstayn
59e52125f7 fix teamstore password 2020-07-11 19:31:35 +08:00
franknstayn
bb139cb0df updated 2020-07-11 02:57:12 -05:00
franknstayn
bca94e54cc added new form for store item 2020-03-19 22:37:08 +08:00
franknstayn
e57209bc64 update 3_14_2020 2020-03-14 01:17:24 -05:00
franknstayn
5eeefa5587 fix tax exemption 2020-02-28 21:07:05 +08:00
franknstayn
80094cfdf0 Merge branch 'master' of github.com:franknstayn/crewsportswear
Conflicts:
	app/Http/Controllers/paypal/PaypalController.php
2020-02-28 07:02:30 -06:00
franknstayn
587819be9a exempt jjed phl intax 2020-02-28 06:58:41 -06:00
franknstayn
67b52fcc1a Merge branch 'master' of https://github.com/franknstayn/crewsportswear 2020-02-28 20:54:33 +08:00
franknstayn
f7b402fe7a exempt nlp in tax 2020-02-28 20:53:29 +08:00
franknstayn
8408695473 uncomment RewriteRule 2020-02-25 12:29:23 +08:00
franknstayn
99f89a968b removed JAC 2020-02-25 12:21:10 +08:00
franknstayn
3f96f82090 add jac 2020-02-25 12:06:28 +08:00
franknstayn
942af1f0a8 added contact us page 2020-02-25 11:53:26 +08:00
franknstayn
4610fb526b changed sizes display 2020-02-08 20:37:02 +08:00
franknstayn
c29936f6b9 Merge pull request #9 from franknstayn/additional_form
Additional form
2020-02-08 16:40:18 +08:00
franknstayn
7c12b0e2bf add form in user page 2020-02-07 01:14:27 +08:00
franknstayn
a5dab36a14 additional forms 2020-02-07 01:10:31 +08:00
franknstayn
55f135f66c Merge pull request #8 from franknstayn/local_dev
added delete function on store item
2020-01-25 20:12:43 +08:00
franknstayn
6631690f93 Merge branch 'master' of github.com:franknstayn/crewsportswear 2020-01-25 04:47:06 -06:00
franknstayn
dd26b1dd4b added user for tax exemption 2020-01-25 04:45:58 -06:00
franknstayn
155bc2ce53 Merge pull request #7 from franknstayn/local_dev
Local dev
2020-01-25 18:43:25 +08:00
franknstayn
ef81f0bf25 Merge branch 'local_dev' of github.com:franknstayn/crewsportswear 2020-01-10 07:32:59 -06:00
franknstayn
bf078c82bf Merge pull request #6 from franknstayn/local_dev
rename number to name
2019-12-04 18:49:08 +08:00
franknstayn
2e29677b90 Merge pull request #5 from franknstayn/local_dev
Local dev
2019-12-04 18:44:41 +08:00
franknstayn
03ea4e84a2 Merge pull request #4 from franknstayn/local_dev
added "size" column on download report in csv and excel
2019-11-15 21:05:31 +08:00
franknstayn
3f8c116293 Merge pull request #3 from franknstayn/local_dev
Local dev
2019-11-14 19:45:29 +08:00
franknstayn
9bf1a888a6 Merge branch 'master' of github.com:franknstayn/crewsportswear 2019-11-11 04:44:45 -06:00
franknstayn
542f2c64e0 update from live 11_11_2019 2019-11-11 04:44:08 -06:00
franknstayn
1d4c9a5445 Merge pull request #2 from franknstayn/local_dev
added column in store order reports in store owner
2019-11-11 18:42:11 +08:00
franknstayn
3698312664 fixed broken link on cart page. 2019-11-06 07:26:02 -06:00
franknstayn
a9145ea484 Merge pull request #1 from franknstayn/local_dev
Local dev by frank
2019-11-06 20:29:09 +08:00
105 changed files with 277482 additions and 27181 deletions

6
.env.local Normal file
View File

@@ -0,0 +1,6 @@
# Local Development MinIO Configuration
# Copy to .env.local and update with your MinIO credentials
# MinIO credentials (get from your production server)
MINIO_KEY=secret_key
MINIO_SECRET=your_minio_root_password

6
.env.local.example Normal file
View File

@@ -0,0 +1,6 @@
# Local Development MinIO Configuration
# Copy to .env.local and update with your MinIO credentials
# MinIO credentials (get from your production server)
MINIO_KEY=your_minio_root_user
MINIO_SECRET=your_minio_root_password

21
.env.minio.example Normal file
View File

@@ -0,0 +1,21 @@
# MinIO S3 Storage Configuration
# Add these to your production .env file
# MinIO Endpoint (internal Docker network)
MINIO_ENDPOINT=http://crew-minio-prod:9000
# MinIO Credentials (get from /var/www/apps/minio-storage/.env)
MINIO_KEY=your_minio_root_user
MINIO_SECRET=your_minio_root_password
# Bucket name
MINIO_BUCKET=crewsportswear
# Region (required for S3 compatibility)
MINIO_REGION=us-east-1
# Use path-style endpoint (required for MinIO)
MINIO_USE_PATH_STYLE=true
# Public URL for accessing files (use your actual domain)
MINIO_URL=https://minio.crewsportswear.app

View File

@@ -0,0 +1,57 @@
name: Build and Push Docker Image
on:
push:
tags:
- 'v*'
workflow_dispatch:
inputs:
tag:
description: 'Docker image tag (e.g., v1.0.0, latest)'
required: false
default: 'latest'
push_to_registry:
description: 'Push to registry?'
required: false
default: 'true'
jobs:
build-and-push:
runs-on: ubuntu-latest
container:
image: catthehacker/ubuntu:act-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Registry
uses: docker/login-action@v2
with:
registry: ${{ secrets.DOCKER_REGISTRY_URL }}
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Extract metadata
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ secrets.DOCKER_REGISTRY_URL }}/crewsportswear
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=raw,value=latest
- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=registry,ref=${{ secrets.DOCKER_REGISTRY_URL }}/crewsportswear:buildcache
cache-to: type=registry,ref=${{ secrets.DOCKER_REGISTRY_URL }}/crewsportswear:buildcache,mode=max

View File

@@ -0,0 +1,152 @@
name: Deploy Development
on:
push:
branches:
- dev
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
container:
image: catthehacker/ubuntu:act-latest
steps:
- name: Checkout code
shell: sh
run: |
git clone $GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git /workspace/repo
cd /workspace/repo
git checkout $GITHUB_REF_NAME
- name: Build Docker image
shell: sh
run: |
cd /workspace/repo
docker build -t crewsportswear:dev .
docker save crewsportswear:dev | gzip > crewsportswear_dev.tar.gz
- name: Setup SSH
shell: sh
env:
DEPLOY_SSH_KEY: ${{ secrets.DEPLOY_SSH_KEY }}
DEPLOY_HOST: ${{ secrets.DEPLOY_HOST }}
run: |
mkdir -p ~/.ssh
chmod 700 ~/.ssh
echo "$DEPLOY_SSH_KEY" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
ssh-keyscan -H "$DEPLOY_HOST" >> ~/.ssh/known_hosts
- name: Upload image and compose
shell: sh
env:
DEPLOY_USER: ${{ secrets.DEPLOY_USER }}
DEPLOY_HOST: ${{ secrets.DEPLOY_HOST }}
run: |
scp -i ~/.ssh/id_ed25519 \
/workspace/repo/crewsportswear_dev.tar.gz \
/workspace/repo/docker-compose.dev.yml \
${DEPLOY_USER}@${DEPLOY_HOST}:/tmp/
- name: Deploy on server
shell: sh
env:
DEPLOY_USER: ${{ secrets.DEPLOY_USER }}
DEPLOY_HOST: ${{ secrets.DEPLOY_HOST }}
run: |
ssh -i ~/.ssh/id_ed25519 $DEPLOY_USER@$DEPLOY_HOST << 'EOF'
set -e
DEPLOY_DIR="/var/www/apps/crewsportswear_dev"
mkdir -p "$DEPLOY_DIR"
echo "Loading image"
docker load < /tmp/crewsportswear_dev.tar.gz
echo "Removing old crewsportswear images"
docker images | grep crewsportswear | grep -v "$(docker images crewsportswear:dev -q)" | awk '{print $3}' | xargs -r docker rmi -f || true
echo "Updating compose file"
cp /tmp/docker-compose.dev.yml "$DEPLOY_DIR/docker-compose.yml"
cd "$DEPLOY_DIR"
echo "Checking .env file"
if [ ! -f .env ]; then
echo ".env file not found at $DEPLOY_DIR/.env"
echo "Please create it first with required variables:"
echo " - DB_*, PROD_PRIVATE, IMAGES_URL, UPLOAD_URL"
echo " - MAIL_*, CAPTCHA_*, ANALYTICS_*"
exit 1
fi
echo "Fixing .env permissions"
sudo chown $USER:$USER .env
sudo chmod 600 .env
echo "Ensure networks"
docker network inspect traefik-public >/dev/null 2>&1 || \
docker network create traefik-public
docker network inspect crew-app-net >/dev/null 2>&1 || \
docker network create crew-app-net
echo "Starting containers (env vars from .env file)"
docker compose up -d
echo "Waiting for app container"
sleep 15
if docker ps --format '{{.Names}}' | grep -q crewsportswear_app; then
echo "Clearing and rebuilding config cache"
docker compose exec -T app php artisan config:clear
docker compose exec -T app php artisan config:cache
else
echo "App container not running"
docker compose logs
exit 1
fi
echo "Cleanup"
rm -f /tmp/crewsportswear_dev.tar.gz /tmp/docker-compose.dev.yml
echo "Aggressive Docker cleanup to reclaim space"
docker image prune -af --filter "until=24h" || true
docker container prune -f || true
docker volume prune -f || true
docker builder prune -af --filter "until=48h" || true
echo "Docker space usage:"
docker system df
echo "Deployment completed"
EOF
- name: Health check
shell: sh
run: |
echo "Waiting for app to be ready..."
sleep 20
echo "Testing health check (ignoring SSL cert for now)..."
HTTP_CODE=$(curl -k -s -o /dev/null -w "%{http_code}" --max-time 30 https://dev.crewsportswear.app || echo "000")
if [ "$HTTP_CODE" = "200" ] || [ "$HTTP_CODE" = "302" ] || [ "$HTTP_CODE" = "301" ]; then
echo "Health check passed! (HTTP $HTTP_CODE)"
echo "Note: Using -k to ignore SSL cert. Check Traefik logs if cert not ready."
else
echo "Health check failed! (HTTP $HTTP_CODE)"
echo ""
echo "Troubleshooting:"
echo " 1. Check if container is running:"
echo " docker ps | grep crewsportswear_app"
echo " 2. Check container logs:"
echo " docker logs crewsportswear_app_dev"
echo " 3. Check Traefik routing:"
echo " docker logs traefik 2>&1 | grep crewsportswear"
echo " 4. Verify network connectivity:"
echo " docker network inspect traefik-public"
exit 1
fi

145
.gitea/workflows/deploy.yml Normal file
View File

@@ -0,0 +1,145 @@
name: Deploy Production (crewsportswear.com)
on:
push:
branches:
- main
- master
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
container:
image: catthehacker/ubuntu:act-latest
steps:
- name: Checkout code
shell: sh
run: |
git clone $GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git /workspace/repo
cd /workspace/repo
git checkout $GITHUB_REF_NAME
- name: Build Docker image
shell: sh
run: |
cd /workspace/repo
docker build -t crewsportswear:latest .
docker save crewsportswear:latest | gzip > crewsportswear.tar.gz
- name: Setup SSH
shell: sh
env:
DEPLOY_SSH_KEY: ${{ secrets.DEPLOY_SSH_KEY }}
DEPLOY_HOST: ${{ secrets.DEPLOY_HOST }}
run: |
mkdir -p ~/.ssh
chmod 700 ~/.ssh
echo "$DEPLOY_SSH_KEY" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
ssh-keyscan -H "$DEPLOY_HOST" >> ~/.ssh/known_hosts
- name: Upload image and compose
shell: sh
env:
DEPLOY_USER: ${{ secrets.DEPLOY_USER }}
DEPLOY_HOST: ${{ secrets.DEPLOY_HOST }}
run: |
scp -i ~/.ssh/id_ed25519 \
/workspace/repo/crewsportswear.tar.gz \
/workspace/repo/docker-compose.prod.yml \
${DEPLOY_USER}@${DEPLOY_HOST}:/tmp/
- name: Deploy on server
shell: sh
env:
DEPLOY_USER: ${{ secrets.DEPLOY_USER }}
DEPLOY_HOST: ${{ secrets.DEPLOY_HOST }}
run: |
ssh -i ~/.ssh/id_ed25519 $DEPLOY_USER@$DEPLOY_HOST << 'EOF'
set -e
DEPLOY_DIR="/var/www/apps/crewsportswear"
sudo mkdir -p "$DEPLOY_DIR"
sudo chown $USER:$USER "$DEPLOY_DIR"
echo "Stopping dev environment"
DEV_DIR="/var/www/apps/crewsportswear_dev"
if [ -d "$DEV_DIR" ]; then
cd "$DEV_DIR"
docker compose down || true
cd -
echo "Dev environment stopped"
echo "Copying .env from dev to production"
if [ -f "$DEV_DIR/.env" ]; then
cp "$DEV_DIR/.env" "$DEPLOY_DIR/.env"
echo ".env file copied from dev to production"
else
echo "No .env file found in dev directory"
fi else
echo "No dev environment found"
fi
echo "Loading image"
docker load < /tmp/crewsportswear.tar.gz
echo "Removing dev images and old crewsportswear images"
docker images | grep "crewsportswear:dev" | awk '{print $3}' | xargs -r docker rmi -f || true
docker images | grep crewsportswear | grep -v "$(docker images crewsportswear:latest -q)" | awk '{print $3}' | xargs -r docker rmi -f || true
echo "Updating compose file"
cp /tmp/docker-compose.prod.yml "$DEPLOY_DIR/docker-compose.yml"
cd "$DEPLOY_DIR"
echo "Checking .env file"
if [ ! -f .env ]; then
echo ".env file not found at $DEPLOY_DIR/.env"
echo "Please create it first with required variables:"
echo " - DB_*, PROD_PRIVATE, IMAGES_URL, UPLOAD_URL"
echo " - MAIL_*, CAPTCHA_*, ANALYTICS_*"
exit 1
fi
echo "Fixing .env permissions"
sudo chown $USER:$USER .env
sudo chmod 600 .env
echo "Ensure networks"
docker network inspect traefik-public >/dev/null 2>&1 || \
docker network create traefik-public
docker network inspect crew-app-net >/dev/null 2>&1 || \
docker network create crew-app-net
echo "Starting containers (env vars from .env file)"
docker compose up -d
echo "Waiting for app container"
sleep 15
if docker ps --format '{{.Names}}' | grep -q crewsportswear_app; then
echo "Clearing and rebuilding config cache"
docker compose exec -T app php artisan config:clear
docker compose exec -T app php artisan config:cache
else
echo "App container not running"
docker compose logs
exit 1
fi
echo "Cleanup"
rm -f /tmp/crewsportswear.tar.gz /tmp/docker-compose.prod.yml
echo "Aggressive Docker cleanup to reclaim space"
docker image prune -af --filter "until=24h" || true
docker container prune -f || true
docker volume prune -f || true
docker builder prune -af --filter "until=48h" || true
echo "Docker space usage:"
docker system df
echo "Production deployment completed!"
echo "Application available at: https://crewsportswear.com"
EOF

View File

@@ -2,12 +2,11 @@
<IfModule mod_negotiation.c> <IfModule mod_negotiation.c>
Options -MultiViews Options -MultiViews
</IfModule> </IfModule>
RewriteEngine On RewriteEngine On
# Redirect Trailing Slashes... # Redirect Trailing Slashes...
RewriteRule ^(.*)/$public /$1 [L,R=301] RewriteRule ^(.*)/$public /$1 [L,R=301]
RewriteCond %{SERVER_PORT} 80
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 Normal file
View File

@@ -0,0 +1,86 @@
# Use PHP 7.0 with Apache (has native mcrypt support for Laravel 5.0)
FROM php:7.0-apache
# Update to use archived Debian repositories
RUN sed -i 's|deb.debian.org|archive.debian.org|g' /etc/apt/sources.list \
&& sed -i 's|security.debian.org|archive.debian.org|g' /etc/apt/sources.list \
&& sed -i '/stretch-updates/d' /etc/apt/sources.list
# Install system dependencies
RUN apt-get update && apt-get install -y --allow-unauthenticated \
git \
curl \
libpng-dev \
libxml2-dev \
libmcrypt-dev \
zip \
unzip \
libfreetype6-dev \
libjpeg62-turbo-dev \
openssh-client \
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-install -j$(nproc) gd
# Install PHP extensions (mcrypt is built-in for PHP 7.0)
RUN docker-php-ext-install pdo_mysql mbstring exif pcntl bcmath mcrypt tokenizer zip
# Enable Apache mod_rewrite
RUN a2enmod rewrite
# Install Composer (version 1.x for better compatibility with Laravel 5.0)
COPY --from=composer:1.10 /usr/bin/composer /usr/bin/composer
# Set working directory
WORKDIR /var/www/html
# Copy existing application directory contents
COPY . /var/www/html
# Create storage directories and set permissions
RUN mkdir -p storage/framework/views \
storage/framework/cache \
storage/framework/sessions \
storage/logs \
bootstrap/cache
# Set proper ownership and permissions
RUN chown -R www-data:www-data /var/www/html \
&& chmod -R 775 /var/www/html/storage \
&& chmod -R 775 /var/www/html/bootstrap/cache
# Create .env file if it doesn't exist
RUN if [ ! -f .env ]; then cp .env.example .env; fi
# Install PHP dependencies (Laravel 5.0 compatible)
RUN composer install --no-dev --no-interaction --prefer-dist
# Generate application key
RUN php artisan key:generate || true
# Run Laravel 5.0 optimization
RUN php artisan clear-compiled && php artisan optimize
# Note: yakpro-po obfuscation requires PHP 7.1+, incompatible with PHP 7.0
# For code protection with PHP 7.0, consider:
# 1. ionCube Encoder (commercial, most secure)
# 2. Keeping source code private and using proper access controls
# 3. Using --optimize flag in composer (already done above)
# Configure Apache DocumentRoot to point to Laravel's public directory
ENV APACHE_DOCUMENT_ROOT=/var/www/html/public
RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf
RUN sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf
# Suppress Apache ServerName warning
RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf
# Copy entrypoint script
COPY docker-entrypoint.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
# Expose port 80
EXPOSE 80
# Use entrypoint to set up permissions before starting Apache
ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["apache2-foreground"]

View File

@@ -0,0 +1,149 @@
<?php
namespace App\Http\Controllers;
use App\Http\Requests;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\Models\ApiModel;
use ArrayObject;
use Carbon\Carbon;
use Illuminate\Support\Facades\Input;
class ApiController extends Controller
{
public function login(Request $request)
{
$ApiModel = new ApiModel;
$post = $request->all();
$response = $ApiModel->loginProductionUser($post['username'], $post['password']);
if (!$response) {
return response()->json(['status' => false, 'message' => "Invalid user"], 401);
}
$selectTrackingStepLabel = $ApiModel->selectTrackingStepLabel($response[0]->StepId);
$response[0]->AssignedStep = $selectTrackingStepLabel[0]->StepLabel;
return response()->json(['status' => true, 'data' => $response[0]], 200);
}
public function insert(Request $request)
{
$ApiModel = new ApiModel;
$post = $request->json()->all();
$data = array(
"StepId" => $post['StepId'],
"ScannedBy" => $post['ScannedBy'],
"InvoiceNumber" => $post['invoice'],
"OrdersId" => $post['ordersId'],
"ProductId" => $post['productId'],
"QuantityCounter" => $post['quantityCounter'],
"Timezone" => $post['timezone'],
"TimezoneOffset" => date('H:i:s', strtotime($post['timezoneOffset'])),
"DeviceId" => $post['deviceId'],
"created_at" => date('Y-m-d H:i:s', strtotime($post['datetime']))
);
$checkIfTrackExist = $ApiModel->checkIfTrackExist($post['StepId'], $post['productId'], $post['ordersId'], $post['invoice'], $post['quantityCounter']);
if ($checkIfTrackExist) {
return response()->json(['status' => false, 'message' => "Already scanned."], 500);
}
// $selectNextStep = $ApiModel->selectNextStep($post['invoice']);
// if(($selectNextStep->StepId + 1) != $post['StepId']){
// return response()->json(['status' => false, 'message' => "Your account is not allowed to update this item."], 401);
// }
$response = $ApiModel->insertTracking($data);
if (!$response) {
return response()->json(['status' => false, 'message' => "Something went wrong."], 500);
}
return response()->json(['status' => true, 'message' => 'Successfully updated.'], 201);
}
// public function getTrackingStatus()
// {
// $ApiModel = new ApiModel;
// $invoice = Input::get('invoice');
// $response = $ApiModel->getTrackingStatus($invoice);
// return response()->json(['status' => true, 'data' => $response], 200);
// }
public function getTrackingStatus()
{
$ApiModel = new ApiModel;
$invoice = Input::get('invoice');
$getStep = Input::get('step');
// $response = $ApiModel->getTrackingStatus($invoice);
$selectPaymentDetails = $ApiModel->selectPaymentDetails($invoice);
if (!$selectPaymentDetails) {
return response()->json(['status' => false, 'message' => "Not found."], 404);
}
$selectOrderList = $ApiModel->selectOrderList($selectPaymentDetails[0]->CartKey);
$getCurrentTrackingSteps = $ApiModel->getCurrentTrackingSteps($invoice);
$selectPaymentDetails[0]->tracking_steps = $getCurrentTrackingSteps;
$currentStep = $ApiModel->selectCurrentStep($invoice);
$selectPaymentDetails[0]->current_step = $currentStep;
$stp = ($getStep != "") ? $getStep : $currentStep->Order; // check if step
foreach ($selectOrderList as $k => $order) {
$table_fields[] = $ApiModel->selectOrderListTableFields($order->CartKey, $order->ProductId, $stp);
$product_images[] = $ApiModel->selectProductImages($order->ProductId);
$selectOrderList[$k]->table_fields = $table_fields[$k];
$selectOrderList[$k]->product_images = $product_images[$k];
}
return response()->json([
'status' => true,
'payment_details' => $selectPaymentDetails[0],
'order_list' => $selectOrderList
], 200);
}
public function getOrderStatus()
{
$ApiModel = new ApiModel;
$invoice = Input::get('invoice');
$productid = Input::get('productid');
$orderid = Input::get('orderid');
$qcounter = Input::get('qcounter');
$getStatus = $ApiModel->getStatus($invoice, $productid, $orderid, $qcounter);
if (!$getStatus) {
return response()->json(['status' => false, 'data' => ""], 404);
}
return response()->json([
'status' => true,
'data' => $getStatus[0]
], 200);
}
public function getSteps(){
$ApiModel = new ApiModel;
$selectSteps = $ApiModel->selectSteps();
if (!$selectSteps) {
return response()->json(['status' => false, 'data' => ""], 404);
}
return response()->json([
'status' => true,
'data' => $selectSteps
], 200);
}
}

View File

@@ -1,24 +1,29 @@
<?php namespace App\Http\Controllers; <?php
namespace App\Http\Controllers;
use App\Http\Requests; use App\Http\Requests;
use App\Http\Controllers\Controller; use App\Http\Controllers\Controller;
use Auth; use Illuminate\Support\Facades\Auth;
use App\Traits\CaptchaTrait; use App\Traits\CaptchaTrait;
use App\User; use App\User;
use Validator; use Illuminate\Support\Facades\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 = '
@@ -27,8 +32,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";
@@ -37,11 +42,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">
@@ -50,60 +55,78 @@ 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($post, [ $validator = Validator::make(
'username' => 'unique:user_logins', $post,
'email' => 'unique:user_logins', [
'g-recaptcha-response' => 'required', 'username' => 'unique:user_logins',
'captcha' => 'required|min:1' 'email' => 'unique:user_logins',
], 'g-recaptcha-response' => 'required',
[ 'captcha' => 'required|min:1'
'g-recaptcha-response.required' => 'Captcha is required', ],
'captcha.min' => 'Wrong captcha, please try again.' [
]); '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::create([ $user = User::create([
'name' => $post['name'], 'name' => $post['firstname'] . ' ' . $post['lastname'],
'username' => $post['username'], 'username' => $post['email'],
'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']
)); ));
} }
} }

View File

@@ -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 Session; use Illuminate\Support\Facades\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 config('site_config.uploads') . 'sports-thumbnails/' . $row->Thumbnail; ?>" alt="" class="img img-responsive product-center" /></a> <a href="<?php echo url('sports') . "/" . $row->URL; ?>"><img src="<?php echo minio_url('uploads/images/sports-thumbnails/' . $row->Thumbnail); ?>" alt="" class="img img-responsive product-center" /></a>
<h3 class="text-center sports-title"><?php echo $row->SportsName ?></h3> <h3 class="text-center sports-title"><?php echo $row->SportsName ?></h3>
</div> </div>
<?php <?php

View File

@@ -367,14 +367,11 @@ 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 config('site_config.uploads') . 'cliparts/'. $row->SVGFilename; ?>" width="100%"></a> <a href="#" class="img-clipart" data-link="<?php echo $row->SVGFilename; ?>"><img src="<?php echo minio_url('uploads/images/cliparts/') . $row->SVGFilename; ?>" width="100%"></a>
</div> </div>
</div> </div>
<?php <?php
} }
} }
public function clipartProperties(Request $request) public function clipartProperties(Request $request)
@@ -829,8 +826,9 @@ class DesignerController extends Controller {
} }
$arr = array( $arr = array(
'small' => config('site_config.uploads') . $small ,
'large' => config('site_config.uploads') . $large 'small' => minio_url('uploads/images') . $small ,
'large' => minio_url('uploads/images') . $large
); );
return json_encode($arr); return json_encode($arr);

View File

@@ -1,126 +1,189 @@
<?php namespace App\Http\Controllers\paypal; <?php
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 Session; use Illuminate\Support\Facades\Auth;
use Redirect; // use Session;
use Mail; use Illuminate\Support\Facades\Session;
// use Redirect;
use Illuminate\Support\Facades\Redirect;
// use Mail;
use Illuminate\Support\Facades\Mail;
use PayPal\Exception\PayPalConnectionException;
class PaypalController extends Controller
class PaypalController extends Controller { {
private $_apiContext; private $_apiContext;
public function __construct() public function __construct()
{ {
$this->_apiContext = PayPal::ApiContext( $paypal_env = "live";
config('services.paypal.client_id'), $paypal_apiUrl = 'https://api.paypal.com'; // default
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' => 'sandbox', 'mode' => $paypal_env,
'service.EndPoint' => 'https://api.sandbox.paypal.com', 'service.EndPoint' => $paypal_apiUrl,
'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'),
'log.LogLevel' => 'FINE' 'log.LogLevel' => 'FINE'
)); ));
// live // live
// $this->_apiContext->setConfig(array( // $this->_apiContext->setConfig(array(
// 'mode' => 'live', // 'mode' => 'sandbox',
// 'service.EndPoint' => 'https://api.paypal.com', // 'service.EndPoint' => 'https://api.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'),
// 'log.LogLevel' => 'FINE' // 'log.LogLevel' => 'FINE'
// )); // ));
} }
public function payPremium() public function payPremium()
{
return view('payPremium');
}
public function getCheckout(Request $request)
{ {
return view('payPremium');
}
if(Auth::guest()){
$message = 'Please <a href="'. url('auth/login'). '">Sign in</a> to your account to proceed.'; public function getCheckout(Request $request)
{
$UserModel = new UserModel;
if (Auth::guest()) {
$message = 'Please <a href="' . url('auth/login') . '">Sign in</a> to your account to proceed.';
Session::flash('msg', $message); Session::flash('msg', $message);
return Redirect::back(); return Redirect::back();
} }
$payer = PayPal::Payer(); $userId = Auth::user()->id;
$payer->setPaymentMethod('paypal'); $array_address_book = $UserModel->selectAddresBook('UserId', $userId);
if (count($array_address_book) <= 0) {
$message = 'Please complete your shipping address. <a href="user/address-book/create"> <strong> <u>click here</u> </strong></a>.';
Session::flash('cartkeyError', $message);
return Redirect::back();
}
$shipping_address_url = "user/address-book/edit/" . $array_address_book[0]->Id;
if (
count($array_address_book) <= 0 ||
$array_address_book[0]->Fullname == null ||
$array_address_book[0]->ContactNumber == null ||
$array_address_book[0]->Address == null ||
$array_address_book[0]->State == null ||
$array_address_book[0]->City == null ||
$array_address_book[0]->ZipCode == null
) {
$message = 'Please complete your shipping address. <a href="' . url($shipping_address_url) . '"> <strong> <u>click here</u> </strong></a>.';
Session::flash('cartkeyError', $message);
return Redirect::back();
}
// $shippingAddress = [
// "recipient_name" => $array_address_book[0]->Fullname,
// "line1" => $array_address_book[0]->Address,
// "line2" => "",
// "city" => $array_address_book[0]->City,
// "country_code" => $array_address_book[0]->CountryCode,
// "postal_code" => $array_address_book[0]->ZipCode,
// "state" => $array_address_book[0]->State,
// "phone" => $array_address_book[0]->ContactNumber
// ];
// $request->session()->forget('cartkey');
if (!$request->session()->has('cartkey')) {
$message = 'Your cart is empty';
Session::flash('cartkeyError', $message);
return Redirect::back();
}
$payer = PayPal::Payer();
$payer->setPaymentMethod('paypal');
// $inputFields = Paypal::InputFields();
// $inputFields->setAllowNote(true)
// ->setNoShipping(1)
// ->setAddressOverride(0);
// $webProfile = Paypal::WebProfile();
// $webProfile->setName("YeowZa! T-Shirt Shop" . uniqid())
// // ->setPresentation($presentation)
// ->setInputFields($inputFields);
// $shipping = PayPal::ShippingAddress();
// $shipping->setRecipientName($array_address_book[0]->Fullname);
// $shipping->setLine1($array_address_book[0]->Address);
// $shipping->setCity($array_address_book[0]->City);
// $shipping->setCountryCode($array_address_book[0]->CountryCode);
// $shipping->setPostalCode($array_address_book[0]->ZipCode);
// $shipping->setState($array_address_book[0]->State);
// $shipping->setPhone($array_address_book[0]->ContactNumber);
// $payerInfo = Paypal::PayerInfo();
// $payerInfo->setShippingAddress($shipping);
// $payer->setPayerInfo($payerInfo);
$m = new TeamStoreModel; $m = new TeamStoreModel;
$paypal_model = new PayPalModel; $paypal_model = new PayPalModel;
$last_id = $paypal_model->getLastIdPaymentDetails(); $last_id = $paypal_model->getLastIdPaymentDetails();
$invoice_num = str_pad($last_id[0]->Id, 4,'0',STR_PAD_LEFT); // var_dump(count($last_id));
if (count($last_id) > 0) {
$lastId = $last_id[0]->Id + 1;
} else {
$lastId = 1;
}
$invoice_num = str_pad($lastId, 6, '0', STR_PAD_LEFT);
// var_dump($invoice_num);
$cartKey = $request->session()->get('cartkey'); $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);
foreach($items as $item){ $shippingFee = $this->getShippingFee($cartKey);
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); $tax = $this->getTax($cartKey)['tax'];
}else{ $order_grandtotal = $this->getTax($cartKey)['order_grandtotal'];
$voucherData = array(
'totalValue'=> $totalValue,
'type'=>'Flat'
);
}
}
}
$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){ foreach ($updated_items as $key => $item) {
$tax_value = 0;
}else{
$tax_value = 0.10;
}
$tax = $order_grandtotal * $tax_value;
foreach($updated_items as $key => $item){
// $descriptions = "Name: " . $item->Name . " Number: " . $item->Number . " Size: " . $item->Size;"?" // $descriptions = "Name: " . $item->Name . " Number: " . $item->Number . " Size: " . $item->Size;"?"
@@ -131,19 +194,42 @@ class PaypalController extends Controller {
// $order_items[$key]->setDescription($descriptions); // $order_items[$key]->setDescription($descriptions);
// $order_items[$key]->setTax(10); // $order_items[$key]->setTax(10);
$order_items[$key]->setPrice($item->Price); $order_items[$key]->setPrice($item->Price);
} }
$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 = 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); $amount->setTotal($order_grandtotal + $tax + $shippingFee);
$transaction = PayPal::Transaction(); $transaction = PayPal::Transaction();
$transaction->setAmount($amount); $transaction->setAmount($amount);
@@ -152,23 +238,24 @@ class PaypalController extends Controller {
// $transaction->setDescription('Your transaction description'); // $transaction->setDescription('Your transaction description');
$transaction->setInvoiceNumber(date('Ymd') . '-' . $invoice_num); $transaction->setInvoiceNumber(date('Ymd') . '-' . $invoice_num);
$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);
$payment->setTransactions(array($transaction)); $payment->setTransactions(array($transaction));
$response = $payment->create($this->_apiContext); $response = $payment->create($this->_apiContext);
$redirectUrl = $response->links[1]->href; $redirectUrl = $response->links[1]->href;
return redirect()->to( $redirectUrl ); return redirect()->to($redirectUrl);
} }
public function getDoneTest() public function getDoneTest()
@@ -196,62 +283,114 @@ 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)
{ {
$id = $request->get('paymentId');
$token = $request->get('token');
$payer_id = $request->get('PayerID');
$payment = PayPal::getById($id, $this->_apiContext);
$paymentExecution = PayPal::PaymentExecution();
$paymentExecution->setPayerId($payer_id);
$executePayment = $payment->execute($paymentExecution, $this->_apiContext);
// print_r($executePayment);
// if ($executePayment->getState() == 'approved') {
// /** it's all right **/
// /** Here Write your database logic like that insert record or value in database if you want **/
// // \Session::put('success','Payment success');
// // return Redirect::route('paywithpaypal');
// echo 'Payment success';
// }
$obj = json_decode($executePayment);
$line2 = null;
//details
$total = $obj->transactions[0]->amount->total;
$sub_total = $obj->transactions[0]->amount->details->subtotal;
$tax = $obj->transactions[0]->amount->details->tax;
$currency = $obj->transactions[0]->amount->currency;
$invoice_number = $obj->transactions[0]->invoice_number;
//shipping address details
$recipient_name = $obj->transactions[0]->item_list->shipping_address->recipient_name;
$line1 = $obj->transactions[0]->item_list->shipping_address->line1;
if(isset($obj->transactions[0]->item_list->shipping_address->line2)){
$line2 = $obj->transactions[0]->item_list->shipping_address->line2;
}
$city = $obj->transactions[0]->item_list->shipping_address->city;
$state = $obj->transactions[0]->item_list->shipping_address->state;
$postal_code = $obj->transactions[0]->item_list->shipping_address->postal_code;
$country_code = $obj->transactions[0]->item_list->shipping_address->country_code;
// payer info
$payment_method = $obj->payer->payment_method;
$email = $obj->payer->payer_info->email;
$first_name = $obj->payer->payer_info->first_name;
$last_name = $obj->payer->payer_info->last_name;
$_payer_id = $obj->payer->payer_info->payer_id;
/// end paypal codes
$paypal_model = new PayPalModel; $paypal_model = new PayPalModel;
$m = new TeamStoreModel; $m = new TeamStoreModel;
@@ -259,103 +398,205 @@ class PaypalController extends Controller {
$userId = Auth::user()->id; $userId = Auth::user()->id;
$user_email = Auth::user()->email; $user_email = Auth::user()->email;
$items = $m->myCart($cartKey); // item from cart_tmp
$getSubtotal = $m->getSubtotal($cartKey);
$payment_details = array( $checkCartKey = $paypal_model->checkCartKey($cartKey);
'UserId' => $userId, if (count($checkCartKey) > 0) {
'CartKey' => $cartKey, $message = 'You already paid for this order. Please check your Order Page. <a href="user/orders"> <strong> <u>click here</u> </strong></a>.';
'PaymentId' => $id, Session::put('cartkeyError', $message);
'Token' => $token, return Redirect::route('cart');
'PayerId' => $payer_id,
'InvoiceNumber' => $invoice_number,
'Currency' => $currency,
'Total' => $total,
'SubTotal' => $sub_total,
'Tax' => $tax,
'Payer_Email' => $email,
'Payer_Firstname' => $first_name,
'Payer_Lastname' => $last_name,
'PaymentMethod' =>$payment_method
);
$p_id = $paypal_model->insertToPaypalDetails($payment_details);
$shipping_address = array(
'PaymentDetail_Id' => $p_id,
'recipient_name' => $recipient_name,
'line1' => $line1,
'line2' => $line2,
'city' => $city,
'state' => $state,
'postal_code' => $postal_code,
'country_code' => $country_code,
);
// iinsert shipping address
$paypal_model->insertShippingAddress($shipping_address);
// insert order from cart_tmp to orders table
$l = $paypal_model->insertToOrders($cartKey); // insert to orders table
//email sending
$newUserModel = new UserModel;
$order_item_array = $newUserModel->selectOrderItem($cartKey);
$item_goup_array = $newUserModel->itemGroup($cartKey);
$item_thumbs = $newUserModel->selectDisplayItemThumb();
$array_payment_details = $newUserModel->selectPaymentDetails('CartKey', $cartKey);
$array_storename = $newUserModel->selectTeamStoreName($cartKey); // email subject
foreach($array_storename as $storname){
$sName[] = $storname->StoreName;
$sid[] = $storname->Id;
}
$sName = implode (", ", $sName);
$user_loginsArray = $newUserModel->selectUserLoginsWhereIn($sid);
foreach($user_loginsArray as $userdata){
$other_email[] = $userdata->other_email;
} }
if($other_email[0] != null){ $id = $request->get('paymentId');
$other_email = implode (", ", $other_email); $token = $request->get('token');
$email_cc = "orders@crewsportswear.com" . "," . $other_email; $payer_id = $request->get('PayerID');
}else{
$email_cc = "orders@crewsportswear.com"; try {
$payment = PayPal::getById($id, $this->_apiContext);
$paymentExecution = PayPal::PaymentExecution();
$paymentExecution->setPayerId($payer_id);
$executePayment = $payment->execute($paymentExecution, $this->_apiContext);
$obj = json_decode($executePayment);
// var_dump($obj);
if ($executePayment->getState() == 'approved') {
/** it's all right **/
/** Here Write your database logic like that insert record or value in database if you want **/
// \Session::put('success','Payment success');
// return Redirect::route('paywithpaypal');
$line2 = null;
//details
$total = $obj->transactions[0]->amount->total;
$sub_total = $obj->transactions[0]->amount->details->subtotal;
$tax = $obj->transactions[0]->amount->details->tax;
$shipping = $obj->transactions[0]->amount->details->shipping;
$relatedResources = $obj->transactions[0]->related_resources[0];
$saleId = $relatedResources->sale->id; // transaction_id
$currency = $obj->transactions[0]->amount->currency;
$invoice_number = $obj->transactions[0]->invoice_number;
// var_dump( $obj->transactions[0]->item_list->phone);
//shipping address details
$recipient_name = $obj->transactions[0]->item_list->shipping_address->recipient_name;
$line1 = $obj->transactions[0]->item_list->shipping_address->line1;
if (isset($obj->transactions[0]->item_list->shipping_address->line2)) {
$line2 = $obj->transactions[0]->item_list->shipping_address->line2;
}
$city = $obj->transactions[0]->item_list->shipping_address->city;
$state = $obj->transactions[0]->item_list->shipping_address->state;
$postal_code = $obj->transactions[0]->item_list->shipping_address->postal_code;
$country_code = $obj->transactions[0]->item_list->shipping_address->country_code;
// payer info
$payment_method = $obj->payer->payment_method;
$email = $obj->payer->payer_info->email;
$first_name = $obj->payer->payer_info->first_name;
$last_name = $obj->payer->payer_info->last_name;
$_payer_id = $obj->payer->payer_info->payer_id;
/// end paypal codes
$payment_details = array(
'UserId' => $userId,
'CartKey' => $cartKey,
'PaymentId' => $id,
'Token' => $token,
'PayerId' => $payer_id,
'InvoiceNumber' => $invoice_number,
'Currency' => $currency,
'Total' => $total,
'SubTotal' => $sub_total,
'Tax' => $tax,
'Payer_Email' => $email,
'Payer_Firstname' => $first_name,
'Payer_Lastname' => $last_name,
'PaymentMethod' => $payment_method,
'ShippingCost' => $shipping,
'TransactionId' => $saleId
);
$p_id = $paypal_model->insertToPaypalDetails($payment_details);
$shipping_address = array(
'PaymentDetail_Id' => $p_id,
'recipient_name' => $recipient_name,
'line1' => $line1,
'line2' => $line2,
'city' => $city,
'state' => $state,
'postal_code' => $postal_code,
'country_code' => $country_code,
);
// iinsert shipping address
$paypal_model->insertShippingAddress($shipping_address);
// insert order from cart_tmp to orders table
$l = $paypal_model->insertToOrders($cartKey); // insert to orders table
//email sending
$newUserModel = new UserModel;
$order_item_array = $newUserModel->selectOrderItem($cartKey);
$item_goup_array = $newUserModel->itemGroup($cartKey);
$item_thumbs = $newUserModel->selectDisplayItemThumb();
$array_payment_details = $newUserModel->selectPaymentDetails('CartKey', $cartKey);
$array_storename = $newUserModel->selectTeamStoreName($cartKey); // email subject
foreach ($array_storename as $storname) {
$sName[] = $storname->StoreName;
$sid[] = $storname->Id;
}
$sName = implode(", ", $sName);
$user_loginsArray = $newUserModel->selectUserLoginsWhereIn($sid);
foreach ($user_loginsArray as $userdata) {
$other_email[] = $userdata->other_email;
}
if ($other_email[0] != null) {
$other_email = implode(", ", array_filter($other_email, function ($value) {
return !is_null($value) && $value !== '';
}));
$email_cc = "orders@crewsportswear.com" . "," . $other_email;
} else {
$email_cc = "orders@crewsportswear.com";
}
$explode_other_email = explode(",", $email_cc);
$data = array(
'order_item_array' => $order_item_array,
'item_goup_array' => $item_goup_array,
'img_thumb' => $item_thumbs,
'array_payment_details' => $array_payment_details,
'receiver' => $user_email,
'email_cc' => $explode_other_email,
'subject' => $sName . ' ORDERS',
);
Mail::send('emails.orders', $data, function ($message) use ($data) {
$message->from('no-reply@crewsportswear.com', 'CREW Sportswear');
$message->bcc($data['email_cc'], 'Orders From CREW Sportswear');
$message->to($data['receiver'])->subject($data['subject']);
});
// end email sending
$insertTracking = array(
"StepId" => 1,
"ScannedBy" => 1,
"InvoiceNumber" => $invoice_number,
"created_at" => date('Y-m-d H:i:s')
);
$ApiModel = new ApiModel;
$ApiModel->insertTracking($insertTracking);
$request->session()->forget('cartkey'); // clear session for cartkey
// redirect to thank you page.
return view('paypal.get_done')
->with('currency', $currency)
->with('total', $total);
} else {
Session::put('cartkeyError', 'Something went wrong. Please try again.');
return Redirect::route('cart');
}
} catch (PayPalConnectionException $e) {
//throw $th;
// echo $e->getCode();
echo $e->getData();
Session::put('cartkeyError', 'Invalid payment.');
return Redirect::route('cart');
} }
$explode_other_email = explode(",", $email_cc);
$data = array( // print_r($executePayment);
'order_item_array' => $order_item_array, // if ($executePayment->getState() == 'approved') {
'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) { // /** it's all right **/
$message->from('no-reply@crewsportswear.com', 'CREW Sportswear'); // /** Here Write your database logic like that insert record or value in database if you want **/
$message->bcc($data['email_cc'], 'Orders From CREW Sportswear');
$message->to($data['receiver'])->subject($data['subject']);
});
// end email sending
$request->session()->forget('cartkey'); // clear session for cartkey // // \Session::put('success','Payment success');
// // return Redirect::route('paywithpaypal');
// redirect to thank you page. // echo 'Payment success';
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);
} }
@@ -367,27 +608,73 @@ class PaypalController extends Controller {
$items = $m->myCart($cartKey); $items = $m->myCart($cartKey);
$getSubtotal = $m->getSubtotal($cartKey); $getSubtotal = $m->getSubtotal($cartKey);
foreach($items as $item){ if ($items == null) {
if($item->VoucherId != null){ return redirect()->route('cart');
}
foreach ($items as $item) {
if ($item->VoucherId != null) {
$voucherIds[] = $item->VoucherId; $voucherIds[] = $item->VoucherId;
$voucher = $m->selectVoucherWhereIn($voucherIds); $voucher = $m->selectVoucherWhereIn($voucherIds);
$item_id = $item->Id; $item_id = $item->Id;
$totalValue = $voucher[0]->VoucherValue; $totalValue = $voucher[0]->VoucherValue;
if($voucher[0]->VoucherType == "Percentage"){ if ($voucher[0]->VoucherType == "Percentage") {
$data = array( $data = array(
'Price' => '00.00' 'Price' => '00.00'
); );
$m->updateVoucherValueInCart($data, $item_id); $m->updateVoucherValueInCart($data, $item_id);
}else{ } else {
$voucherData = array( $voucherData = array(
'totalValue'=> $totalValue, 'totalValue' => $totalValue,
'type'=>'Flat' 'type' => 'Flat'
); );
} }
} }
} }
return redirect()->route('cart'); return redirect()->route('cart');
} }
public function createWebProfile()
{
$UserModel = new UserModel;
$userId = Auth::user()->id;
$array_address_book = $UserModel->selectAddresBook('UserId', $userId);
if (count($array_address_book) <= 0) {
$message = 'Please add Shipping address.';
Session::flash('cartkeyError', $message);
return Redirect::back();
}
// $shippingAddress = [
// "recipient_name" => ,
$flowConfig = PayPal::FlowConfig();
$presentation = PayPal::Presentation();
$inputFields = PayPal::InputFields();
$webProfile = PayPal::WebProfile();
// $presentation->setLogoImage("https://www.crewsportswear.com/beta/public/images/logo.png")->setBrandName("Merchbay"); //NB: Paypal recommended to use https for the logo's address and the size set to 190x60.
$presentation->setBrandName("Crewsportswear"); //NB: Paypal recommended to use https for the logo's address and the size set to 190x60.
if ($array_address_book[0]->CountryCode == "CA") {
$flowConfig->setLandingPageType("Billing"); //Set the page type
$inputFields->setAllowNote(true)->setAddressOverride(1);
} else {
$inputFields->setAllowNote(true)->setAddressOverride(0);
}
$webProfile->setName("Crewsportswear " . uniqid())
->setFlowConfig($flowConfig)
// Parameters for style and presentation.
->setPresentation($presentation)
// Parameters for input field customization.
->setInputFields($inputFields);
$createProfileResponse = $webProfile->create($this->_apiContext);
return $createProfileResponse->getId(); //The new webprofile's id
}
} }

View File

@@ -1,90 +1,110 @@
<?php namespace App\Http\Controllers\teamstore; <?php
namespace App\Http\Controllers\teamstore;
use App\Http\Requests; 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
{
public function index(Request $request, $teamStoreURL) public function index(Request $request, $teamStoreURL)
{ {
// 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 = '';
if (Auth::check()){ if (Auth::check()) {
$user_role = Auth::user()->role; $user_role = Auth::user()->role;
$store_id = Auth::user()->store_id; $store_id = Auth::user()->store_id;
}else{ } else {
$user_role = null; $user_role = null;
$store_id = null; $store_id = null;
} }
if($store_array[0]->Password != null){ if ($store_array[0]->Password != null) {
if($request->session()->get('teamstore_data_array') == null){ if ($request->session()->get('teamstore_data_array') == null) {
if($store_id != $store_array[0]->Id){ if ($store_id != $store_array[0]->Id) {
return redirect('teamstore'); return redirect('teamstore');
} }
}else{ } else {
if($user_role != "store_owner"){ if ($user_role != "store_owner") {
if($request->session()->get('teamstore_data_array')[0]->StoreUrl != $store_array[0]->StoreUrl){ if ($request->session()->get('teamstore_data_array')[0]->StoreUrl != $store_array[0]->StoreUrl) {
return redirect()->back(); return redirect()->back();
} }
} }
} }
} }
$displayThumbnails = 'product-image-placeholder.png';
foreach ($product_array as $p => $pr_arr) { foreach ($product_array as $p => $pr_arr) {
$thumbnails_array = $m->getProductThumbnails($pr_arr->Id); $thumbnails_array = $m->getProductThumbnails($pr_arr->Id);
if(!empty($thumbnails_array)){ if (!empty($thumbnails_array)) {
foreach ($thumbnails_array as $t => $thumb) { foreach ($thumbnails_array as $t => $thumb) {
if($thumb->ImageClass == 'custom'){ if ($thumb->ImageClass == 'custom') {
$displayThumbnails = $thumb->Image; $displayThumbnails = $thumb->Image;
break; break;
} }
if($thumb->ImageClass == 'active'){ if ($thumb->ImageClass == 'active') {
$displayThumbnails = $thumb->Image; $displayThumbnails = $thumb->Image;
break; break;
} }
} }
$thumbnails[] = array( $thumbnails[] = array(
'folder' => $store_array[0]->ImageFolder, 'folder' => $store_array[0]->ImageFolder,
'product_id' => $pr_arr->Id, 'product_id' => $pr_arr->Id,
'thumb' => $displayThumbnails 'thumb' => $displayThumbnails
); );
} else {
}else{
$thumbnails[] = array( $thumbnails[] = array(
'folder' => $store_array[0]->ImageFolder, 'folder' => $store_array[0]->ImageFolder,
'product_id' => $pr_arr->Id, 'product_id' => $pr_arr->Id,
'thumb' => "product-image-placeholder.png" 'thumb' => "product-image-placeholder.png"
); );
} }
} }
$getAnnouncement = $UserModel->getAnnouncement($store_array[0]->Id);
if (count($getAnnouncement) > 0) {
$data = $getAnnouncement[0];
} else {
$data = (object) array(
'Id' => 0,
'StoreId' => "",
'Announcement' => "",
'IsActive' => 0,
'DateCreated' => ""
);
}
// var_dump($thumbnails);
return view('teamstore-sublayouts.index') 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('thumbnails', $thumbnails); ->with('announcement', $data)
->with('thumbnails', $thumbnails);
} }
public function storelist(Request $request) public function storelist(Request $request)
@@ -112,31 +132,30 @@ class TeamStoreController extends Controller {
$q = $request->input('q'); $q = $request->input('q');
$sort = $request->input('s'); $sort = $request->input('s');
if(isset($q) && isset($sort)){ if (isset($q) && isset($sort)) {
if($sort == "latest"){ if ($sort == "latest") {
$field = "Id"; $field = "Id";
$sort_value = "DESC";
}elseif($sort == "al-desc"){
$field = "StoreName";
$sort_value = "DESC"; $sort_value = "DESC";
}elseif($sort == "oldest"){ } elseif ($sort == "al-desc") {
$field = "StoreName";
$sort_value = "DESC";
} elseif ($sort == "oldest") {
$field = "Id"; $field = "Id";
$sort_value = "ASC"; $sort_value = "ASC";
}else{ } else {
$field = "StoreName"; $field = "StoreName";
$sort_value = "ASC"; $sort_value = "ASC";
} }
if($q != ""){ if ($q != "") {
// keyword and sort // keyword and sort
$stores_array = $m->selectTeamstoreSearch($field, $sort_value, $q); $stores_array = $m->selectTeamstoreSearch($field, $sort_value, $q);
}else{ } else {
// sort only // sort only
$stores_array = $m->selectTeamstoreFilter($field, $sort_value); $stores_array = $m->selectTeamstoreFilter($field, $sort_value);
} }
} else {
}else{
$field = "StoreName"; $field = "StoreName";
$sort_value = "ASC"; $sort_value = "ASC";
$sort = "al-asc"; $sort = "al-asc";
@@ -144,25 +163,24 @@ class TeamStoreController extends Controller {
} }
return view('teamstore-sublayouts.stores') return view('teamstore-sublayouts.stores')
->with('stores_array', $stores_array) ->with('stores_array', $stores_array)
->with('keyword', $q) ->with('keyword', $q)
->with('filter', $sort); ->with('filter', $sort);
} }
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']);
if($store_array){ $store_array = $m->checkStorePassword($post['store_id'], $post['password']);
if ($store_array) {
$request->session()->put('teamstore_data_array', $store_array); $request->session()->put('teamstore_data_array', $store_array);
return redirect('teamstore/'. $store_array[0]->StoreUrl); return redirect('teamstore/' . $store_array[0]->StoreUrl);
} else {
}else{
return redirect()->back()->with('errors', 'Invalid Password.'); return redirect()->back()->with('errors', 'Invalid Password.');
} }
} }
private $teams_array; private $teams_array;
@@ -178,7 +196,7 @@ class TeamStoreController extends Controller {
$teams_array = $m->getTeams($product_array[0]->Id); $teams_array = $m->getTeams($product_array[0]->Id);
// $sizes_array = $m->getSizes(); // $sizes_array = $m->getSizes();
if(empty($thumbnails_array)){ if (empty($thumbnails_array)) {
$data = (object) array( $data = (object) array(
'Image' => 'product-image-placeholder.png', 'Image' => 'product-image-placeholder.png',
@@ -190,34 +208,33 @@ class TeamStoreController extends Controller {
} }
$x = explode(",", $product_array[0]->AvailableSizes ); $x = explode(",", $product_array[0]->AvailableSizes);
foreach($x as $s){ foreach ($x as $s) {
$h[] = $m->getSizesByBracket($s); $h[] = $m->getSizesByBracket($s);
} }
foreach($h as $d){ foreach ($h as $d) {
foreach($d as $g){ foreach ($d as $g) {
$sizes_array[] = $g; $sizes_array[] = $g;
} }
} }
if($product_array[0]->ProductAvailableQty != null){ if ($product_array[0]->ProductAvailableQty != null) {
$soldQty = $m->getSoldQty($product_array[0]->Id); $soldQty = $m->getSoldQty($product_array[0]->Id);
$availableQty = $product_array[0]->ProductAvailableQty - $soldQty[0]->SoldQty; $availableQty = $product_array[0]->ProductAvailableQty - $soldQty[0]->SoldQty;
}else{ } else {
// echo 'no qty'; // echo 'no qty';
$availableQty = null; $availableQty = null;
} }
// $product_array[0]->ProductAvailableQty // $product_array[0]->ProductAvailableQty
return view('teamstore-sublayouts.product-details') return view('teamstore-sublayouts.product-details')
->with('store_array', $store_array) ->with('store_array', $store_array)
->with('product_array', $product_array) ->with('product_array', $product_array)
->with('thumbnails_array', $thumbnails_array) ->with('thumbnails_array', $thumbnails_array)
->with('teams_array', $teams_array) ->with('teams_array', $teams_array)
->with('sizes_array', $sizes_array) ->with('sizes_array', $sizes_array)
->with('available_qty', $availableQty); ->with('available_qty', $availableQty);
} }
public function login(Request $request) public function login(Request $request)
@@ -239,32 +256,30 @@ class TeamStoreController extends Controller {
$item = $TeamStoreModel->selectTeamStoreProductByIdHash($post['p_id']); $item = $TeamStoreModel->selectTeamStoreProductByIdHash($post['p_id']);
$x = explode(",", $item[0]->AvailableSizes); $x = explode(",", $item[0]->AvailableSizes);
foreach($x as $s){ foreach ($x as $s) {
$h[] = $TeamStoreModel->getSizesByBracket($s); $h[] = $TeamStoreModel->getSizesByBracket($s);
} }
foreach($h as $d){ foreach ($h as $d) {
foreach($d as $g){ foreach ($d as $g) {
$sizes_array[] = $g; $sizes_array[] = $g;
} }
} }
if($item[0]->ProductAvailableQty != null){ if ($item[0]->ProductAvailableQty != null) {
$soldQty = $m->getSoldQty($product_array[0]->Id); $soldQty = $TeamStoreModel->getSoldQty($item[0]->Id);
$availableQty = $item[0]->ProductAvailableQty - $soldQty[0]->SoldQty; $availableQty = $item[0]->ProductAvailableQty - $soldQty[0]->SoldQty;
}else{ } else {
// echo 'no qty'; // echo 'no qty';
$availableQty = null; $availableQty = null;
} }
$handle_form = view('teamstore-sublayouts.forms.' . $item[0]->ProductForm ) $handle_form = view('teamstore-sublayouts.forms.' . $item[0]->ProductForm)
->with('sizes_array', $sizes_array) ->with('sizes_array', $sizes_array)
->with('availableQty', $availableQty) ->with('availableQty', $availableQty)
->render(); ->render();
return $handle_form; return $handle_form;
} }
public function addToCart(Request $request) public function addToCart(Request $request)
@@ -273,9 +288,9 @@ class TeamStoreController extends Controller {
$m = new TeamStoreModel; $m = new TeamStoreModel;
$hash_product_id = $post['p_id']; $hash_product_id = $post['p_id'];
if($request->session()->has('cartkey')){ if ($request->session()->has('cartkey')) {
$cartKey = $request->session()->get('cartkey'); $cartKey = $request->session()->get('cartkey');
}else{ } else {
$request->session()->put('cartkey', sha1(time() . str_random(6))); $request->session()->put('cartkey', sha1(time() . str_random(6)));
$cartKey = $cartKey = $request->session()->get('cartkey'); $cartKey = $cartKey = $request->session()->get('cartkey');
} }
@@ -288,23 +303,24 @@ 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;
$teamstore_array = $m->selectTeamStore('Id', $TeamStoreId); $teamstore_array = $m->selectTeamStore('Id', $TeamStoreId);
$store_url = $teamstore_array[0]->StoreUrl; $store_url = $teamstore_array[0]->StoreUrl;
$store_id = $teamstore_array[0]->Id; $store_id = $teamstore_array[0]->Id;
if($product_form == "jersey-and-shorts-form"){ if ($product_form == "jersey-and-shorts-form") {
$order_names = $post['order_names']; $order_names = $post['order_names'];
$order_number = $post['order_number']; $order_number = $post['order_number'];
$order_jersey_size = $post['order_jersey_size']; $order_jersey_size = $post['order_jersey_size'];
$order_shorts_size = $post['order_shorts_size']; $order_shorts_size = $post['order_shorts_size'];
foreach($order_names as $key => $val){ foreach ($order_names as $key => $val) {
if($order_jersey_size[$key] == "none" || $order_shorts_size[$key] == "none"){ if ($order_jersey_size[$key] == "none" || $order_shorts_size[$key] == "none") {
$final_price = $ProductPrice / 2; $final_price = $ProductPrice / 2;
}else{ } else {
$final_price = $ProductPrice; $final_price = $ProductPrice;
} }
@@ -322,10 +338,11 @@ class TeamStoreController extends Controller {
'JerseySize' => $order_jersey_size[$key], 'JerseySize' => $order_jersey_size[$key],
'ShortsSize' => $order_shorts_size[$key], 'ShortsSize' => $order_shorts_size[$key],
'Price' => $final_price, 'Price' => $final_price,
'Quantity' => 1 'Quantity' => 1,
'ShippingCostId' => $shipping_cost_id
); );
} }
}elseif($product_form == "tshirt-form"){ } elseif ($product_form == "tshirt-form") {
$items[] = array( $items[] = array(
'ProductId' => $product_id, 'ProductId' => $product_id,
@@ -338,9 +355,10 @@ class TeamStoreController extends Controller {
'ProductName' => $product_name, 'ProductName' => $product_name,
'Size' => $post['uniformSize'], 'Size' => $post['uniformSize'],
'Price' => $ProductPrice, 'Price' => $ProductPrice,
'Quantity' => $post['quantity'] 'Quantity' => $post['quantity'],
'ShippingCostId' => $shipping_cost_id
); );
}elseif($product_form == "quantity-form"){ } elseif ($product_form == "quantity-form") {
$items[] = array( $items[] = array(
'ProductId' => $product_id, 'ProductId' => $product_id,
@@ -352,16 +370,15 @@ class TeamStoreController extends Controller {
'ProductURL' => $ProductURL, 'ProductURL' => $ProductURL,
'ProductName' => $product_name, 'ProductName' => $product_name,
'Price' => $ProductPrice, 'Price' => $ProductPrice,
'Quantity' => $post['quantity'] 'Quantity' => $post['quantity'],
'ShippingCostId' => $shipping_cost_id
); );
} elseif ($product_form == "name-number-form") {
}elseif($product_form == "name-number-form"){
$order_names = $post['order_names']; $order_names = $post['order_names'];
$order_number = $post['order_number']; $order_number = $post['order_number'];
foreach($order_names as $key => $val){ foreach ($order_names as $key => $val) {
$items[] = array( $items[] = array(
'ProductId' => $product_id, 'ProductId' => $product_id,
'StoreURL' => $store_url, 'StoreURL' => $store_url,
@@ -374,16 +391,17 @@ class TeamStoreController extends Controller {
'Name' => $order_names[$key], 'Name' => $order_names[$key],
'Number' => $order_number[$key], 'Number' => $order_number[$key],
'Price' => $ProductPrice, 'Price' => $ProductPrice,
'Quantity' => 1 'Quantity' => 1,
'ShippingCostId' => $shipping_cost_id
); );
} }
}elseif($product_form == "name-number-size-form"){ } elseif ($product_form == "name-number-size-form") {
$order_names = $post['order_names']; $order_names = $post['order_names'];
$order_number = $post['order_number']; $order_number = $post['order_number'];
$order_size = $post['order_size']; $order_size = $post['order_size'];
foreach($order_names as $key => $val){ foreach ($order_names as $key => $val) {
$items[] = array( $items[] = array(
'ProductId' => $product_id, 'ProductId' => $product_id,
'StoreURL' => $store_url, 'StoreURL' => $store_url,
@@ -397,15 +415,15 @@ class TeamStoreController extends Controller {
'Size' => $order_size[$key], 'Size' => $order_size[$key],
'Number' => $order_number[$key], 'Number' => $order_number[$key],
'Price' => $ProductPrice, 'Price' => $ProductPrice,
'Quantity' => 1 'Quantity' => 1,
'ShippingCostId' => $shipping_cost_id
); );
} }
} elseif ($product_form == "number-form") {
}elseif($product_form == "number-form"){
$order_number = $post['order_number']; $order_number = $post['order_number'];
foreach($order_number as $key => $val){ foreach ($order_number as $key => $val) {
$items[] = array( $items[] = array(
'ProductId' => $product_id, 'ProductId' => $product_id,
'StoreURL' => $store_url, 'StoreURL' => $store_url,
@@ -417,16 +435,17 @@ class TeamStoreController extends Controller {
'ProductName' => $product_name, 'ProductName' => $product_name,
'Number' => $order_number[$key], 'Number' => $order_number[$key],
'Price' => $ProductPrice, 'Price' => $ProductPrice,
'Quantity' => 1 'Quantity' => 1,
'ShippingCostId' => $shipping_cost_id
); );
} }
}elseif($product_form == "name-name2-size-form"){ } elseif ($product_form == "name-name2-size-form") {
$order_names = $post['order_names']; $order_names = $post['order_names'];
$order_names2 = $post['order_names2']; $order_names2 = $post['order_names2'];
$order_size = $post['order_size']; $order_size = $post['order_size'];
foreach($order_names as $key => $val){ foreach ($order_names as $key => $val) {
$items[] = array( $items[] = array(
'ProductId' => $product_id, 'ProductId' => $product_id,
'StoreURL' => $store_url, 'StoreURL' => $store_url,
@@ -440,15 +459,16 @@ class TeamStoreController extends Controller {
'Name2' => $order_names2[$key], 'Name2' => $order_names2[$key],
'Size' => $order_size[$key], 'Size' => $order_size[$key],
'Price' => $ProductPrice, 'Price' => $ProductPrice,
'Quantity' => 1 'Quantity' => 1,
'ShippingCostId' => $shipping_cost_id
); );
} }
}elseif($product_form == "name-size-form"){ } elseif ($product_form == "name-size-form") {
$order_names = $post['order_names']; $order_names = $post['order_names'];
$order_size = $post['order_size']; $order_size = $post['order_size'];
foreach($order_names as $key => $val){ foreach ($order_names as $key => $val) {
$items[] = array( $items[] = array(
'ProductId' => $product_id, 'ProductId' => $product_id,
'StoreURL' => $store_url, 'StoreURL' => $store_url,
@@ -461,14 +481,78 @@ class TeamStoreController extends Controller {
'Name' => $order_names[$key], 'Name' => $order_names[$key],
'Size' => $order_size[$key], 'Size' => $order_size[$key],
'Price' => $ProductPrice, 'Price' => $ProductPrice,
'Quantity' => 1 'Quantity' => 1,
'ShippingCostId' => $shipping_cost_id
);
}
} elseif ($product_form == "jersey-and-shorts-quantity-form") {
$order_shorts_size = $post['order_shorts_size'];
$order_jersey_size = $post['order_jersey_size'];
$quantity = $post['quantity'];
foreach ($order_jersey_size as $key => $val) {
if ($order_jersey_size[$key] != "none" || $order_shorts_size[$key] != "none") {
if ($order_jersey_size[$key] == "none" || $order_shorts_size[$key] == "none") {
$final_price = $ProductPrice / 2;
} else {
$final_price = $ProductPrice;
}
$items[] = array(
'ProductId' => $product_id,
'StoreURL' => $store_url,
'StoreId' => $store_id,
'FormUsed' => $product_form,
'CartKey' => $cartKey,
'DesignCode' => $design_code,
'ProductURL' => $ProductURL,
'ProductName' => $product_name,
'JerseySize' => $order_jersey_size[$key],
'ShortsSize' => $order_shorts_size[$key],
'Price' => $final_price,
'Quantity' => $quantity[$key],
'ShippingCostId' => $shipping_cost_id
);
}
}
} elseif ($product_form == "number-jersey-shorts-form") {
$order_number = $post['order_number'];
$order_jersey_size = $post['order_jersey_size'];
$order_shorts_size = $post['order_shorts_size'];
foreach ($order_number as $key => $val) {
if ($order_jersey_size[$key] == "none" || $order_shorts_size[$key] == "none") {
$final_price = $ProductPrice / 2;
} else {
$final_price = $ProductPrice;
}
$items[] = array(
'ProductId' => $product_id,
'StoreURL' => $store_url,
'StoreId' => $store_id,
'FormUsed' => $product_form,
'CartKey' => $cartKey,
'DesignCode' => $design_code,
'ProductURL' => $ProductURL,
'ProductName' => $product_name,
'Number' => $order_number[$key],
'JerseySize' => $order_jersey_size[$key],
'ShortsSize' => $order_shorts_size[$key],
'Price' => $final_price,
'Quantity' => 1,
'ShippingCostId' => $shipping_cost_id
); );
} }
} }
$i = $m->insertToCart($items); $i = $m->insertToCart($items);
if($i['i']){ if ($i['i']) {
return response()->json(array( return response()->json(array(
'success' => true 'success' => true
)); ));
@@ -481,17 +565,34 @@ class TeamStoreController extends Controller {
)); ));
} }
public function cart(Request $request){ public function cart(Request $request)
{
$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);
$items_group = $m->myCartGroup($cartKey); $items_group = $m->myCartGroup($cartKey);
//var_dump($items_group);
$grouped_item = $m->selectTeamStoreGroupByCartKey($cartKey); $grouped_item = $m->selectTeamStoreGroupByCartKey($cartKey);
if($grouped_item){ if ($grouped_item) {
$defId = $grouped_item[0]->StoreId; $defId = $grouped_item[0]->StoreId;
}else{ } else {
$defId = 0; $defId = 0;
} }
@@ -499,10 +600,10 @@ class TeamStoreController extends Controller {
$store_array = $m->selectTeamStore('Id', $defId); $store_array = $m->selectTeamStore('Id', $defId);
if($items){ if ($items) {
$voucherIds = array(); $voucherIds = array();
foreach($items as $item){ foreach ($items as $item) {
if($item->VoucherId != null){ if ($item->VoucherId != null) {
$voucherIds[] = $item->VoucherId; $voucherIds[] = $item->VoucherId;
} }
} }
@@ -510,45 +611,59 @@ class TeamStoreController extends Controller {
} }
$totalValue = 0; $totalValue = 0;
if(!empty($vouchers)){ if (!empty($vouchers)) {
foreach($vouchers as $voucher){ foreach ($vouchers as $voucher) {
$totalValue = $totalValue + $voucher->VoucherValue; $totalValue = $totalValue + $voucher->VoucherValue;
if($voucher->VoucherType == "Percentage"){ if ($voucher->VoucherType == "Percentage") {
$voucherData = array( $voucherData = array(
'totalValue'=> $totalValue, 'totalValue' => $totalValue,
'type'=>'Percentage' 'type' => 'Percentage'
); );
}else{ } else {
$voucherData = array( $voucherData = array(
'totalValue'=> $totalValue, 'totalValue' => $totalValue,
'type'=>'Flat' 'type' => 'Flat'
); );
} }
} }
if($voucherData['type'] == "Percentage"){ if ($voucherData['type'] == "Percentage") {
$getPercentageValue = $voucherData['totalValue'] / 100; $getPercentageValue = $voucherData['totalValue'] / 100;
$getDiscountValue = ($getSubtotal[0]->Subtotal * $getPercentageValue); $getDiscountValue = ($getSubtotal[0]->Subtotal * $getPercentageValue);
$finalSubTotal = $getSubtotal[0]->Subtotal - $getDiscountValue; $finalSubTotal = $getSubtotal[0]->Subtotal - $getDiscountValue;
}else{ } else {
//Flat voucher computation here.. //Flat voucher computation here..
} }
}else{ } else {
$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_fee', $shippingFee)
->with('tax', $tax)
->with('address_book', $array_address_book);
} }
public function addVoucher(Request $request){ public function addVoucher(Request $request)
{
$cartKey = $request->session()->get('cartkey'); $cartKey = $request->session()->get('cartkey');
if($cartKey == ""){ if ($cartKey == "") {
return false; return false;
} }
@@ -567,18 +682,32 @@ 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);
// check if if voucher is already in used; // check if if voucher is already in used;
foreach($items as $item){ foreach ($items as $item) {
if($getVoucher[0]->Id == $item->VoucherId){ if ($getVoucher[0]->Id == $item->VoucherId) {
return response()->json(array( return response()->json(array(
'success' => false, 'success' => false,
'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
@@ -598,59 +727,58 @@ class TeamStoreController extends Controller {
//get all voucher used. //get all voucher used.
$updated_items = $TeamStoreModel->myCart($cartKey); $updated_items = $TeamStoreModel->myCart($cartKey);
foreach($updated_items as $item){ foreach ($updated_items as $item) {
if($item->VoucherId != null){ if ($item->VoucherId != null) {
$voucherIds[] = $item->VoucherId; $voucherIds[] = $item->VoucherId;
} }
} }
$vouchers = $TeamStoreModel->selectVoucherWhereIn($voucherIds); $vouchers = $TeamStoreModel->selectVoucherWhereIn($voucherIds);
$totalValue = 0; $totalValue = 0;
if(!empty($vouchers)){ if (!empty($vouchers)) {
foreach($vouchers as $voucher){ foreach ($vouchers as $voucher) {
$totalValue = $totalValue + $voucher->VoucherValue; $totalValue = $totalValue + $voucher->VoucherValue;
if($voucher->VoucherType == "Percentage"){ if ($voucher->VoucherType == "Percentage") {
$voucherData = array( $voucherData = array(
'totalValue'=> $totalValue, 'totalValue' => $totalValue,
'type'=>'Percentage' 'type' => 'Percentage'
); );
}else{ } else {
$voucherData = array( $voucherData = array(
'totalValue'=> $totalValue, 'totalValue' => $totalValue,
'type'=>'Flat' 'type' => 'Flat'
); );
} }
} }
if($voucherData['type'] == "Percentage"){ if ($voucherData['type'] == "Percentage") {
$getPercentageValue = $voucherData['totalValue'] / 100; $getPercentageValue = $voucherData['totalValue'] / 100;
$getDiscountValue = ($getSubtotal[0]->Subtotal * $getPercentageValue); $getDiscountValue = ($getSubtotal[0]->Subtotal * $getPercentageValue);
$finalSubTotal = $getSubtotal[0]->Subtotal - $getDiscountValue; $finalSubTotal = $getSubtotal[0]->Subtotal - $getDiscountValue;
}else{ } else {
//Flat voucher computation here.. //Flat voucher computation here..
} }
}else{ } else {
$finalSubTotal = $getSubtotal[0]->Subtotal; $finalSubTotal = $getSubtotal[0]->Subtotal;
} }
if($getVoucher[0]->VoucherType == "Percentage"){ if ($getVoucher[0]->VoucherType == "Percentage") {
$offData = $getVoucher[0]->VoucherValue . '%'; $offData = $getVoucher[0]->VoucherValue . '%';
}else{ } else {
$offData = $getVoucher[0]->VoucherValue . ' ' . $store_array[0]->StoreCurrency; $offData = $getVoucher[0]->VoucherValue . ' ' . $store_array[0]->StoreCurrency;
} }
$message = '<div class="btn-group"> $message = '<div class="btn-group">
<button type="button" class="btn btn-default btn-xs">'.$getVoucher[0]->VoucherCode. ' ' .$offData. ' OFF</button> <button type="button" class="btn btn-default btn-xs">' . $getVoucher[0]->VoucherCode . ' ' . $offData . ' OFF</button>
<button type="button" class="btn btn-default dropdown-toggle btn-xs" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <button type="button" class="btn btn-default dropdown-toggle btn-xs" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span class="caret"></span> <span class="caret"></span>
<span class="sr-only"></span> <span class="sr-only"></span>
</button> </button>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li><a href="'.$removeItemURL.'"><i class="fa fa-times"></i> Remove</a></li> <li><a href="' . $removeItemURL . '"><i class="fa fa-times"></i> Remove</a></li>
</ul> </ul>
</div>'; </div>';
@@ -658,12 +786,9 @@ class TeamStoreController extends Controller {
return response()->json(array( return response()->json(array(
'success' => true, 'success' => true,
'message' => $message, 'message' => $message,
'subtotal' =>$finalSubTotal 'subtotal' => $finalSubTotal
)); ));
} else {
}else{
return response()->json(array( return response()->json(array(
'success' => false, 'success' => false,
@@ -689,10 +814,9 @@ class TeamStoreController extends Controller {
$getSubtotal = $m->getSubtotal($cartKey); $getSubtotal = $m->getSubtotal($cartKey);
return view('sublayouts.checkout') return view('sublayouts.checkout')
->with('row', $items) ->with('row', $items)
->with('getSubtotal', $getSubtotal) ->with('getSubtotal', $getSubtotal)
->with('array_address_book', $array_address_book); ->with('array_address_book', $array_address_book);
} }
public function mail() public function mail()
@@ -708,13 +832,10 @@ class TeamStoreController extends Controller {
// dd('Mail Send Successfully'); // dd('Mail Send Successfully');
Mail::raw('Text to e-mail', function($message) Mail::raw('Text to e-mail', function ($message) {
{
$message->from('us@example.com', 'Laravel'); $message->from('us@example.com', 'Laravel');
$message->to('frank.begornia@yahoo.com')->subject('sample email'); $message->to('frank.begornia@yahoo.com')->subject('sample email');
}); });
} }
} }

File diff suppressed because it is too large Load Diff

View File

@@ -30,6 +30,8 @@ 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',
]; ];
} }

View File

@@ -1,9 +1,13 @@
<?php namespace App\Http\Middleware; <?php
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.
@@ -32,19 +36,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 {
else $prev = URL::previous();
{ 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);
} }
} }

View File

@@ -0,0 +1,28 @@
<?php
namespace App\Http\Middleware;
use Closure;
class Cors
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle($request, Closure $next)
{
header("Access-Control-Allow-Origin: *");
header('Access-Control-Allow-Methods: GET, POST, OPTIONS');
header("Access-Control-Allow-Headers: *");
// header('Access-Control-Allow-Credentials: true');
if (!$request->isMethod('options')) {
return $next($request);
}
}
}

View File

@@ -13,9 +13,23 @@ 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)
{ {
return parent::handle($request, $next); foreach($this->except as $route) {
if ($request->is($route)) {
return $next($request);
}
}
return parent::handle($request, $next);
} }
} }

View File

@@ -0,0 +1,23 @@
<?php namespace App\Http\Middleware;
use Closure;
class isAuthorized {
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle($request, Closure $next)
{
if(isset(getallheaders()['token']) && getallheaders()['token']=="1HHIaIsT4pvO2S39vMzlVfGWi3AhAz6F5xGBNKil") {
return $next($request);
}else{
return response()->json(['status' => false,'error' => "Invalid request"], 503);
}
}
}

View File

@@ -1,5 +1,7 @@
<?php <?php
use Illuminate\Support\Facades\Route;
// use Spatie\LaravelAnalytics\LaravelAnalytics;
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Application Routes | Application Routes
@@ -35,7 +37,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');
@@ -74,13 +76,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');
@@ -131,15 +133,19 @@ 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
}); });
@@ -169,12 +175,19 @@ 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');
}); });

152
app/Models/ApiModel.php Normal file
View File

@@ -0,0 +1,152 @@
<?php
namespace App\models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\DB;
class ApiModel extends Model
{
function loginProductionUser($username, $password)
{
$i = DB::table('production_user')
->where('Username', $username)
->where('Password', $password)
->get();
return $i;
}
function selectTrackingStepLabel($id)
{
$i = DB::table('tracking_steps')->select('StepLabel')
->where('Id', $id)
->get();
return $i;
}
function getTrackingStatus($invoice)
{
$i = DB::table('tracking')->select('tracking.Id', 'tracking.InvoiceNumber', 'tracking_steps.StepLabel', 'production_user.Name', DB::raw('DATE_FORMAT(tracking.created_at, "%b %d, %Y") AS date'), DB::raw('DATE_FORMAT(tracking.created_at, "%H:%i") AS time'))
->leftjoin('tracking_steps', 'tracking_steps.Id', '=', 'tracking.StepId')
->leftjoin('production_user', 'production_user.Id', '=', 'tracking.ScannedBy')
->where('tracking.InvoiceNumber', '=', $invoice)
->orderBy('tracking.created_at', 'DESC')
->get();
return $i;
}
function selectPaymentDetails($invoice)
{
$i = DB::table('payment_details')
->where('InvoiceNumber', $invoice)
->get();
return $i;
}
function selectOrderList($cartKey)
{
$i = DB::table('orders')->select('ProductId', 'ProductName', 'CartKey')
->where('CartKey', $cartKey)
->groupBy('ProductId')
->get();
return $i;
}
function selectProductImages($productId)
{
$i = DB::table('teamstore_product_thumbnails')
->where('ProductId', $productId)
->get();
return $i;
}
function selectOrderListTableFields($cartKey, $productId, $stepid)
{
// $i = DB::table('orders')->select('Id', 'Name', 'Name2', 'Number', 'Size', 'JerseySize', 'ShortsSize', 'Quantity')
// ->where('CartKey', $cartKey)
// ->where('ProductId', $productId)
// ->get();
// return $i;
$i = DB::table('orders')->select('orders.Id', 'orders.Name', 'orders.Name2', 'orders.Number', 'orders.Size', 'orders.JerseySize',
'orders.ShortsSize', 'orders.Quantity', DB::raw('(SELECT COUNT(*) FROM tracking WHERE StepId = '.$stepid.' AND OrdersId = orders.Id) AS Status'))
// ->leftjoin('tracking', 'orders.Id', '=', 'tracking.OrdersId')
// ->where('tracking.StepId', $stepid)
->where('orders.CartKey', $cartKey)
->where('orders.ProductId', $productId)
->groupBy('orders.Id')
->get();
return $i;
}
function insertTracking($data)
{
$i = DB::table('tracking')->insert($data);
return $i;
}
// function selectNextStep($invoice)
// {
// $i = DB::table('tracking')->select('StepId')
// ->where('InvoiceNumber', $invoice)
// ->orderBy('StepId', 'DESC')->first();
// return $i;
// }
function checkIfTrackExist($stepid, $productid, $orderid, $invoice, $qcounter)
{
$i = DB::table('tracking')
->where('StepId', $stepid)
->where('ProductId', $productid)
->where('OrdersId', $orderid)
->where('InvoiceNumber', $invoice)
->where('QuantityCounter', $qcounter)
->get();
return $i;
}
function getCurrentTrackingSteps($invoice){
$i = DB::table('tracking')->select('StepId')
->where('InvoiceNumber', $invoice)
->groupBy('StepId')
->orderBy('StepId', 'ASC')
->get();
return $i;
}
function getStatus($invoice, $productid, $orderid, $qcounter){
$i = DB::table('tracking')->select('production_user.Name', DB::raw('DATE_FORMAT(tracking.created_at, "%b %d, %Y - %H:%i") AS datetime'))
->leftjoin('production_user', 'production_user.Id', '=', 'tracking.ScannedBy')
->where('tracking.InvoiceNumber', $invoice)
->where('tracking.ProductId', $productid)
->where('tracking.OrdersId', $orderid)
->where('tracking.QuantityCounter', $qcounter)
->get();
return $i;
}
function selectSteps(){
$i = DB::table('tracking_steps')
->orderBy('Order', 'ASC')
->get();
return $i;
}
function selectCurrentStep($invoice){
$i = DB::table('tracking')->select('tracking_steps.*')
->leftjoin('tracking_steps', 'tracking_steps.Id', '=', 'tracking.StepId')
->where('tracking.InvoiceNumber', $invoice)
->orderBy('tracking.StepId', 'DESC')
->first();
return $i;
}
function selectCurrentStepOrder($stepOrder){
$i = DB::table('tracking_steps')
->where('Order', $stepOrder)
->get();
return $i;
}
}

View File

@@ -1,6 +1,6 @@
<?php namespace App\Models; <?php namespace App\Models;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
use DB; use Illuminate\Support\Facades\DB;
class MainModel extends Model { class MainModel extends Model {

View File

@@ -1,7 +1,7 @@
<?php namespace App\Models; <?php namespace App\Models;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
use DB; use Illuminate\Support\Facades\DB;
class SizesModel extends Model { class SizesModel extends Model {

View File

@@ -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 DB; use Illuminate\Support\Facades\DB;
class PayPalModel extends Model { class PayPalModel extends Model {
@@ -39,5 +39,13 @@ 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;
}
} }

View File

@@ -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 DB; use Illuminate\Support\Facades\DB;
class TeamStoreModel extends Model { class TeamStoreModel extends Model {
@@ -39,6 +39,15 @@ 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')
@@ -100,7 +109,7 @@ class TeamStoreModel extends Model {
function getSizesByBracket($bracket){ function getSizesByBracket($bracket){
$i = DB::table('sizes')->select('Size') $i = DB::table('sizes')->select('Size', 'SizeDisplay')
->where('Bracket', $bracket) ->where('Bracket', $bracket)
->where('IsActive', 'TRUE') ->where('IsActive', 'TRUE')
->orderby('Ordering', 'ASC') ->orderby('Ordering', 'ASC')

View File

@@ -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 DB; use Illuminate\Support\Facades\DB;
class UserModel extends Model { class UserModel extends Model {
@@ -160,8 +160,20 @@ 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.*') $i = DB::table('orders')->select('orders.*', 'orders.Id as Order_Id', 'payment_details.InvoiceNumber', 'payment_details.Currency', 'payment_details.Payer_Email', 'payment_details.Payer_Firstname', 'payment_details.Payer_Lastname', 'shipping_addresses.*', DB::raw('(SELECT tracking_steps.StepLabel FROM tracking LEFT JOIN tracking_steps ON tracking_steps.Id = tracking.StepId WHERE tracking.InvoiceNumber = payment_details.InvoiceNumber ORDER BY tracking.Id DESC LIMIT 1 ) AS StepLabel'))
->leftjoin('payment_details', 'payment_details.CartKey','=','orders.CartKey') ->leftjoin('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)
@@ -170,6 +182,7 @@ 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");
@@ -310,5 +323,62 @@ 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;
}
} }

View File

@@ -14,6 +14,11 @@ 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);

33
app/helpers.php Normal file
View File

@@ -0,0 +1,33 @@
<?php
if (!function_exists('minio_url')) {
/**
* Generate MinIO URL for a file
*
* @param string $path File path relative to bucket
* @return string Full MinIO URL
*/
function minio_url($path)
{
$bucket = env('MINIO_BUCKET', 'crewsportswear');
$baseUrl = env('MINIO_URL', 'https://minio.crewsportswear.app');
// Remove leading slash if present
$path = ltrim($path, '/');
return $baseUrl . '/' . $bucket . '/' . $path;
}
}
if (!function_exists('minio_image_url')) {
/**
* Generate MinIO URL for an image in uploads/images/
*
* @param string $filename Image filename
* @return string Full MinIO URL
*/
function minio_image_url($filename)
{
return minio_url('uploads/images/' . $filename);
}
}

View File

@@ -11,7 +11,8 @@
"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",
@@ -24,7 +25,10 @@
], ],
"psr-4": { "psr-4": {
"App\\": "app/" "App\\": "app/"
} },
"files": [
"app/helpers.php"
]
}, },
"autoload-dev": { "autoload-dev": {
"classmap": [ "classmap": [

45
composer.lock generated
View File

@@ -909,33 +909,28 @@
}, },
{ {
"name": "league/flysystem-sftp", "name": "league/flysystem-sftp",
"version": "1.0.14", "version": "1.0.22",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/thephpleague/flysystem-sftp.git", "url": "https://github.com/thephpleague/flysystem-sftp.git",
"reference": "f28d742a3e81258417293fd9a179a350154ab8f7" "reference": "cab59dd2277e02fe46f5f23195672a02ed49774d"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/thephpleague/flysystem-sftp/zipball/f28d742a3e81258417293fd9a179a350154ab8f7", "url": "https://api.github.com/repos/thephpleague/flysystem-sftp/zipball/cab59dd2277e02fe46f5f23195672a02ed49774d",
"reference": "f28d742a3e81258417293fd9a179a350154ab8f7", "reference": "cab59dd2277e02fe46f5f23195672a02ed49774d",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"league/flysystem": "~1.0", "league/flysystem": "~1.0",
"php": ">=5.4.0", "php": ">=5.6.0",
"phpseclib/phpseclib": "~2.0" "phpseclib/phpseclib": "~2.0"
}, },
"require-dev": { "require-dev": {
"mockery/mockery": "0.9.*", "mockery/mockery": "0.9.*",
"phpunit/phpunit": "~4.0" "phpunit/phpunit": "^5.7.25"
}, },
"type": "library", "type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0-dev"
}
},
"autoload": { "autoload": {
"psr-4": { "psr-4": {
"League\\Flysystem\\Sftp\\": "src/" "League\\Flysystem\\Sftp\\": "src/"
@@ -952,7 +947,7 @@
} }
], ],
"description": "Flysystem adapter for SFTP", "description": "Flysystem adapter for SFTP",
"time": "2017-07-11T12:29:45+00:00" "time": "2019-10-16T20:05:49+00:00"
}, },
{ {
"name": "monolog/monolog", "name": "monolog/monolog",
@@ -2786,22 +2781,22 @@
}, },
{ {
"name": "phpdocumentor/reflection-docblock", "name": "phpdocumentor/reflection-docblock",
"version": "3.2.2", "version": "3.3.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
"reference": "4aada1f93c72c35e22fb1383b47fee43b8f1d157" "reference": "bf329f6c1aadea3299f08ee804682b7c45b326a2"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/4aada1f93c72c35e22fb1383b47fee43b8f1d157", "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/bf329f6c1aadea3299f08ee804682b7c45b326a2",
"reference": "4aada1f93c72c35e22fb1383b47fee43b8f1d157", "reference": "bf329f6c1aadea3299f08ee804682b7c45b326a2",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=5.5", "php": "^5.6 || ^7.0",
"phpdocumentor/reflection-common": "^1.0@dev", "phpdocumentor/reflection-common": "^1.0.0",
"phpdocumentor/type-resolver": "^0.3.0", "phpdocumentor/type-resolver": "^0.4.0",
"webmozart/assert": "^1.0" "webmozart/assert": "^1.0"
}, },
"require-dev": { "require-dev": {
@@ -2827,20 +2822,20 @@
} }
], ],
"description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
"time": "2017-08-08T06:39:58+00:00" "time": "2017-11-10T14:09:06+00:00"
}, },
{ {
"name": "phpdocumentor/type-resolver", "name": "phpdocumentor/type-resolver",
"version": "0.3.0", "version": "0.4.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/phpDocumentor/TypeResolver.git", "url": "https://github.com/phpDocumentor/TypeResolver.git",
"reference": "fb3933512008d8162b3cdf9e18dba9309b7c3773" "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/fb3933512008d8162b3cdf9e18dba9309b7c3773", "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7",
"reference": "fb3933512008d8162b3cdf9e18dba9309b7c3773", "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -2874,7 +2869,7 @@
"email": "me@mikevanriel.com" "email": "me@mikevanriel.com"
} }
], ],
"time": "2017-06-03T08:32:36+00:00" "time": "2017-07-14T14:27:02+00:00"
}, },
{ {
"name": "phpspec/php-diff", "name": "phpspec/php-diff",

View File

@@ -26,7 +26,7 @@ return [
| |
*/ */
'url' => 'http://localhost', 'url' => env('APP_URL', 'http://localhost'),
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------

View File

@@ -50,7 +50,7 @@ return [
'localdir' => [ 'localdir' => [
'driver' => 'local', 'driver' => 'local',
'root' => 'C:\\wamp\\www\\images\\', 'root' => '/var/www/html/uploads/images',
], ],
's3' => [ 's3' => [
@@ -77,15 +77,27 @@ return [
'port' => 22, 'port' => 22,
'username' => 'root', 'username' => 'root',
'password' => '', 'password' => '',
'privateKey' => 'C:\\Users\\user\\Documents\\#keys\\instance2\\root.ppk', 'privateKey' => '/var/www/html/_key/instance2/root.ppk',
'root' => '/var/www/html/images', 'root' => '/var/www/html/images',
'timeout' => 10 'timeout' => 10
], ],
'uploads' => [ 'uploads' => [
'driver' => 'local', 'driver' => 'local',
'root' => 'C:\\wamp\\www\\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'),
],
], ],
]; ];

View File

@@ -57,7 +57,7 @@ return [
| |
*/ */
'from' => ['address' => 'noreply@crewsportswear.com', 'name' => 'no-reply'], 'from' => ['address' => 'no-reply@crewsportswear.com', 'name' => 'no-reply'],
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------

View File

@@ -35,15 +35,14 @@ return [
], ],
// sandbox // sandbox
'paypal' => [ 'paypal_sandbox' => [
'client_id' => 'AQuz-HKzQiL7FygkG8skSekaWf-RP6Rgj4f1XeX1Ghp86bUFj7tQXVT1xbpluu5_WCGRbQpOVGtlJKVB', 'client_id' => 'AQuz-HKzQiL7FygkG8skSekaWf-RP6Rgj4f1XeX1Ghp86bUFj7tQXVT1xbpluu5_WCGRbQpOVGtlJKVB',
'secret' => 'EJAMKxQsl-mFkL_4J_90cvTamYfcsgswqgIxz9wQPiRAwJ6sy_wNsttMlmrXIpxI96JpYzdMXkLCHAPz' 'secret' => 'EJAMKxQsl-mFkL_4J_90cvTamYfcsgswqgIxz9wQPiRAwJ6sy_wNsttMlmrXIpxI96JpYzdMXkLCHAPz'
], ],
// live // live
// 'paypal' => [ 'paypal_live' => [
// 'client_id' => 'AUqBUFW5lfyYmrlBtFZA3RNw45sttM3ltbvS_d4qCVBMrkcMG9rEeivGvtNFSy8XTiEp50YyQ6khKxbq', 'client_id' => 'AUqBUFW5lfyYmrlBtFZA3RNw45sttM3ltbvS_d4qCVBMrkcMG9rEeivGvtNFSy8XTiEp50YyQ6khKxbq',
// 'secret' => 'ELlnuiupoFKwGUSc2g5j-sD1EmsvKpdhth1gFV7njpfvyNtKsK8WwIKUMOS0ehJcRatV865eMhfgsnd_' 'secret' => 'ELlnuiupoFKwGUSc2g5j-sD1EmsvKpdhth1gFV7njpfvyNtKsK8WwIKUMOS0ehJcRatV865eMhfgsnd_'
// ], ],
]; ];

View File

@@ -16,7 +16,9 @@ return [
// 'company_name' => env('COMPANY_NAME','Acme Inc'), // 'company_name' => env('COMPANY_NAME','Acme Inc'),
// 'company_email' => env('COMPANY_email','contact@acme.inc'), // 'company_email' => env('COMPANY_email','contact@acme.inc'),
'prod_private_server_ip' => env('http://localhost', 'http://localhost'), 'prod_private_server_ip' => env('https://crewsportswear.app', 'https://crewsportswear.app'),
'uploads' => env('http://localhost/uploads/images/', 'http://localhost/uploads/images/'), // local 'images_url' => env('https://crewsportswear.app:5955', 'https://crewsportswear.app:5955'),
'uploads' => env('https://crewsportswear.com/uploads/images/', 'https://crewsportswear.com/uploads/images/'), // local
]; ];

View File

@@ -0,0 +1,32 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateApiModelsTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('api_models', function(Blueprint $table)
{
$table->increments('id');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('api_models');
}
}

114
docker-compose.dev.yml Normal file
View File

@@ -0,0 +1,114 @@
services:
app:
image: crewsportswear:dev
container_name: crewsportswear_app_dev
restart: unless-stopped
environment:
- APP_ENV=${APP_ENV:-development}
- APP_DEBUG=${APP_DEBUG:-true}
- APP_URL=${APP_URL:-https://dev.crewsportswear.app}
- DB_CONNECTION=mysql
- DB_HOST=${DB_HOST}
- DB_PORT=${DB_PORT:-3306}
- DB_DATABASE=${DB_DATABASE}
- DB_USERNAME=${DB_USERNAME}
- DB_PASSWORD=${DB_PASSWORD}
- PROD_PRIVATE=${PROD_PRIVATE}
- IMAGES_URL=${IMAGES_URL}
- UPLOAD_URL=${UPLOAD_URL}
- FORCE_HTTPS=true
- MAIL_DRIVER=${MAIL_DRIVER}
- MAIL_HOST=${MAIL_HOST}
- MAIL_PORT=${MAIL_PORT}
- MAIL_USERNAME=${MAIL_USERNAME}
- MAIL_PASSWORD=${MAIL_PASSWORD}
- MAIL_ENCRYPTION=${MAIL_ENCRYPTION}
- CAPTCHA_SITE_KEY=${CAPTCHA_SITE_KEY}
- CAPTCHA_SECRET_KEY=${CAPTCHA_SECRET_KEY}
- ANALYTICS_SITE_ID=${ANALYTICS_SITE_ID}
- ANALYTICS_CLIENT_ID=${ANALYTICS_CLIENT_ID}
- ANALYTICS_SERVICE_EMAIL=${ANALYTICS_SERVICE_EMAIL}
volumes:
- ./storage:/var/www/html/storage
- ./public/uploads:/var/www/html/public/uploads
labels:
- "traefik.enable=true"
# Development environment (dev.crewsportswear.app)
- "traefik.http.routers.crewsportswear-dev.rule=Host(`dev.crewsportswear.app`)"
- "traefik.http.routers.crewsportswear-dev.entrypoints=websecure"
- "traefik.http.routers.crewsportswear-dev.tls=true"
- "traefik.http.routers.crewsportswear-dev.tls.certresolver=le"
- "traefik.http.services.crewsportswear-dev.loadbalancer.server.port=80"
# HTTP to HTTPS redirect
- "traefik.http.routers.crewsportswear-dev-http.rule=Host(`dev.crewsportswear.app`)"
- "traefik.http.routers.crewsportswear-dev-http.entrypoints=web"
- "traefik.http.routers.crewsportswear-dev-http.middlewares=https-redirect"
- "traefik.http.middlewares.https-redirect.redirectscheme.scheme=https"
networks:
- traefik-public
- crew-app-net
- default
networks:
traefik-public:
external: true
crew-app-net:
external: true
default:
driver: bridge
image: crewsportswear:dev
container_name: crewsportswear_app_dev
restart: unless-stopped
environment:
- APP_ENV=${APP_ENV:-development}
- APP_DEBUG=${APP_DEBUG:-true}
- APP_URL=${APP_URL:-https://dev.crewsportswear.com}
- DB_CONNECTION=mysql
- DB_HOST=${DB_HOST}
- DB_PORT=${DB_PORT:-3306}
- DB_DATABASE=${DB_DATABASE}
- DB_USERNAME=${DB_USERNAME}
- DB_PASSWORD=${DB_PASSWORD}
- PROD_PRIVATE=${PROD_PRIVATE}
- IMAGES_URL=${IMAGES_URL}
- UPLOAD_URL=${UPLOAD_URL}
- FORCE_HTTPS=true
- MAIL_DRIVER=${MAIL_DRIVER}
- MAIL_HOST=${MAIL_HOST}
- MAIL_PORT=${MAIL_PORT}
- MAIL_USERNAME=${MAIL_USERNAME}
- MAIL_PASSWORD=${MAIL_PASSWORD}
- MAIL_ENCRYPTION=${MAIL_ENCRYPTION}
- CAPTCHA_SITE_KEY=${CAPTCHA_SITE_KEY}
- CAPTCHA_SECRET_KEY=${CAPTCHA_SECRET_KEY}
- ANALYTICS_SITE_ID=${ANALYTICS_SITE_ID}
- ANALYTICS_CLIENT_ID=${ANALYTICS_CLIENT_ID}
- ANALYTICS_SERVICE_EMAIL=${ANALYTICS_SERVICE_EMAIL}
volumes:
- ./storage:/var/www/html/storage
- ./public/uploads:/var/www/html/public/uploads
labels:
- "traefik.enable=true"
# Development environment (dev.crewsportswear.com)
- "traefik.http.routers.crewsportswear-dev.rule=Host(`dev.crewsportswear.com`)"
- "traefik.http.routers.crewsportswear-dev.entrypoints=websecure"
- "traefik.http.routers.crewsportswear-dev.tls=true"
- "traefik.http.routers.crewsportswear-dev.tls.certresolver=letsencrypt"
- "traefik.http.services.crewsportswear-dev.loadbalancer.server.port=80"
# HTTP to HTTPS redirect
- "traefik.http.routers.crewsportswear-dev-http.rule=Host(`dev.crewsportswear.com`)"
- "traefik.http.routers.crewsportswear-dev-http.entrypoints=web"
- "traefik.http.routers.crewsportswear-dev-http.middlewares=https-redirect"
- "traefik.http.middlewares.https-redirect.redirectscheme.scheme=https"
networks:
- traefik-public
- crew-app-net
- default
networks:
traefik-public:
external: true
crew-app-net:
external: true
default:
driver: bridge

89
docker-compose.local.yml Normal file
View File

@@ -0,0 +1,89 @@
services:
db:
image: mariadb:10.6
platform: linux/arm64
container_name: crewsportswear_db_local
restart: unless-stopped
environment:
MYSQL_DATABASE: crewsportswear
MYSQL_ROOT_PASSWORD: root
MYSQL_USER: crewsportswear
MYSQL_PASSWORD: secret
ports:
- "3307:3306"
volumes:
- db_data:/var/lib/mysql
networks:
- crewsportswear-local
app:
build:
context: .
dockerfile: Dockerfile
container_name: crewsportswear_app_local
restart: unless-stopped
ports:
- "8082:80"
environment:
- APP_ENV=local
- APP_DEBUG=true
- APP_URL=http://localhost:8082
- DB_CONNECTION=mysql
- DB_HOST=db
- DB_PORT=3306
- DB_DATABASE=crewsportswear
- DB_USERNAME=crewsportswear
- DB_PASSWORD=secret
- PROD_PRIVATE=http://localhost:8082
- IMAGES_URL=http://localhost:8082
- UPLOAD_URL=http://localhost:8082/uploads/
- MAIL_DRIVER=log
- MAIL_HOST=localhost
- MAIL_PORT=1025
- MAIL_USERNAME=null
- MAIL_PASSWORD=null
- MAIL_ENCRYPTION=null
- CAPTCHA_SITE_KEY=test_key
- CAPTCHA_SECRET_KEY=test_secret
- ANALYTICS_SITE_ID=
- ANALYTICS_CLIENT_ID=
- ANALYTICS_SERVICE_EMAIL=
# MinIO S3 Storage (connect to production MinIO for testing)
- MINIO_ENDPOINT=https://minio.crewsportswear.app
- MINIO_KEY=${MINIO_KEY:-minioadmin}
- MINIO_SECRET=${MINIO_SECRET:-minioadmin}
- MINIO_BUCKET=crewsportswear
- MINIO_REGION=us-east-1
- MINIO_USE_PATH_STYLE=false
- MINIO_URL=https://minio.crewsportswear.app
volumes:
- ./:/var/www/html
- ./storage:/var/www/html/storage
- ./public/uploads:/var/www/html/public/uploads
depends_on:
- db
networks:
- crewsportswear-local
phpmyadmin:
image: arm64v8/phpmyadmin
platform: linux/arm64
container_name: crewsportswear_phpmyadmin
restart: unless-stopped
ports:
- "8083:80"
environment:
PMA_HOST: db
PMA_PORT: 3306
MYSQL_ROOT_PASSWORD: root
depends_on:
- db
networks:
- crewsportswear-local
networks:
crewsportswear-local:
driver: bridge
volumes:
db_data:

58
docker-compose.prod.yml Normal file
View File

@@ -0,0 +1,58 @@
services:
app:
image: crewsportswear:latest
container_name: crewsportswear_app_prod
restart: unless-stopped
environment:
- APP_ENV=${APP_ENV:-production}
- APP_DEBUG=${APP_DEBUG:-false}
- APP_URL=${APP_URL:-https://crewsportswear.com}
- DB_CONNECTION=mysql
- DB_HOST=${DB_HOST}
- DB_PORT=${DB_PORT:-3306}
- DB_DATABASE=${DB_DATABASE}
- DB_USERNAME=${DB_USERNAME}
- DB_PASSWORD=${DB_PASSWORD}
- PROD_PRIVATE=${PROD_PRIVATE}
- IMAGES_URL=${IMAGES_URL}
- UPLOAD_URL=${UPLOAD_URL}
- FORCE_HTTPS=true
- MAIL_DRIVER=${MAIL_DRIVER}
- MAIL_HOST=${MAIL_HOST}
- MAIL_PORT=${MAIL_PORT}
- MAIL_USERNAME=${MAIL_USERNAME}
- MAIL_PASSWORD=${MAIL_PASSWORD}
- MAIL_ENCRYPTION=${MAIL_ENCRYPTION}
- CAPTCHA_SITE_KEY=${CAPTCHA_SITE_KEY}
- CAPTCHA_SECRET_KEY=${CAPTCHA_SECRET_KEY}
- ANALYTICS_SITE_ID=${ANALYTICS_SITE_ID}
- ANALYTICS_CLIENT_ID=${ANALYTICS_CLIENT_ID}
- ANALYTICS_SERVICE_EMAIL=${ANALYTICS_SERVICE_EMAIL}
volumes:
- ./storage:/var/www/html/storage
- ./public/uploads:/var/www/html/public/uploads
labels:
- "traefik.enable=true"
# Production environment (crewsportswear.com) - Uses paid SSL certificate
- "traefik.http.routers.crewsportswear-prod.rule=Host(`crewsportswear.com`)"
- "traefik.http.routers.crewsportswear-prod.entrypoints=websecure"
- "traefik.http.routers.crewsportswear-prod.tls=true"
- "traefik.http.services.crewsportswear-prod.loadbalancer.server.port=80"
# HTTP to HTTPS redirect
- "traefik.http.routers.crewsportswear-prod-http.rule=Host(`crewsportswear.com`)"
- "traefik.http.routers.crewsportswear-prod-http.entrypoints=web"
- "traefik.http.routers.crewsportswear-prod-http.middlewares=https-redirect"
- "traefik.http.middlewares.https-redirect.redirectscheme.scheme=https"
networks:
- traefik-public
- crew-app-net
- default
networks:
traefik-public:
external: true
crew-app-net:
external: true
default:
driver: bridge

17
docker-entrypoint.sh Normal file
View File

@@ -0,0 +1,17 @@
#!/bin/bash
set -e
# Create storage directory structure if it doesn't exist
mkdir -p storage/framework/views
mkdir -p storage/framework/cache
mkdir -p storage/framework/sessions
mkdir -p storage/logs
mkdir -p storage/app/public
mkdir -p bootstrap/cache
# Set proper permissions
chown -R www-data:www-data storage bootstrap/cache
chmod -R 775 storage bootstrap/cache
# Execute the main command
exec "$@"

372
public/api/canada.json Normal file
View File

@@ -0,0 +1,372 @@
{
"Alberta": [
"Airdrie",
"Grande Prairie",
"Red Deer",
"Beaumont",
"Hanna",
"St. Albert",
"Bonnyville",
"Hinton",
"Spruce Grove",
"Brazeau",
"Irricana",
"Strathcona County",
"Breton",
"Lacombe",
"Strathmore",
"Calgary",
"Leduc",
"Sylvan Lake",
"Camrose",
"Lethbridge",
"Swan Hills",
"Canmore",
"McLennan",
"Taber",
"Didzbury",
"Medicine Hat",
"Turner Valley",
"Drayton Valley",
"Olds",
"Vermillion",
"Edmonton",
"Onoway",
"Wood Buffalo",
"Ft. Saskatchewan",
"Provost"
],
"British Columbia": [
"Burnaby",
"Lumby",
"City of Port Moody",
"Cache Creek",
"Maple Ridge",
"Prince George",
"Castlegar",
"Merritt",
"Prince Rupert",
"Chemainus",
"Mission",
"Richmond",
"Chilliwack",
"Nanaimo",
"Saanich",
"Clearwater",
"Nelson",
"Sooke",
"Colwood",
"New Westminster",
"Sparwood",
"Coquitlam",
"North Cowichan",
"Surrey",
"Cranbrook",
"North Vancouver",
"Terrace",
"Dawson Creek",
"North Vancouver",
"Tumbler",
"Delta",
"Osoyoos",
"Vancouver",
"Fernie",
"Parksville",
"Vancouver",
"Invermere",
"Peace River",
"Vernon",
"Kamloops",
"Penticton",
"Victoria",
"Kaslo",
"Port Alberni",
"Whistler",
"Langley",
"Port Hardy"
],
"Manitoba": [
"Birtle",
"Flin Flon",
"Swan River",
"Brandon",
"Snow Lake",
"The Pas",
"Cranberry Portage",
"Steinbach",
"Thompson",
"Dauphin",
"Stonewall",
"Winnipeg"
],
"New Brunswick": [
"Cap-Pele",
"Miramichi",
"Saint John",
"Fredericton",
"Moncton",
"Saint Stephen",
"Grand Bay-Westfield",
"Oromocto",
"Shippagan",
"Grand Falls",
"Port Elgin",
"Sussex",
"Memramcook",
"Sackville",
"Tracadie-Sheila"
],
"Newfoundland And Labrador": [
"Argentia",
"Corner Brook",
"Paradise",
"Bishop's Falls",
"Labrador City",
"Portaux Basques",
"Botwood",
"Mount Pearl",
"St. John's",
"Brigus"
],
"Northwest Territories": [
"Town of Hay River",
"Town of Inuvik",
"Yellowknife"
],
"Nova Scotia": [
"Amherst",
"Hants County",
"Pictou",
"Annapolis",
"Inverness County",
"Pictou County",
"Argyle",
"Kentville",
"Queens",
"Baddeck",
"County of Kings",
"Richmond",
"Bridgewater",
"Lunenburg",
"Shelburne",
"Cape Breton",
"Lunenburg County",
"Stellarton",
"Chester",
"Mahone Bay",
"Truro",
"Cumberland County",
"New Glasgow",
"Windsor",
"East Hants",
"New Minas",
"Yarmouth",
"Halifax",
"Parrsboro"
],
"Ontario": [
"Ajax",
"Halton",
"Peterborough",
"Atikokan",
"Halton Hills",
"Pickering",
"Barrie",
"Hamilton",
"Port Bruce",
"Belleville",
"Hamilton-Wentworth",
"Port Burwell",
"Blandford-Blenheim",
"Hearst",
"Port Colborne",
"Blind River",
"Huntsville",
"Port Hope",
"Brampton",
"Ingersoll",
"Prince Edward",
"Brant",
"James",
"Quinte West",
"Brantford",
"Kanata",
"Renfrew",
"Brock",
"Kincardine",
"Richmond Hill",
"Brockville",
"King",
"Sarnia",
"Burlington",
"Kingston",
"Sault Ste. Marie",
"Caledon",
"Kirkland Lake",
"Scarborough",
"Cambridge",
"Kitchener",
"Scugog",
"Chatham-Kent",
"Larder Lake",
"Souix Lookout CoC Sioux Lookout",
"Chesterville",
"Leamington",
"Smiths Falls",
"Clarington",
"Lennox-Addington",
"South-West Oxford",
"Cobourg",
"Lincoln",
"St. Catharines",
"Cochrane",
"Lindsay",
"St. Thomas",
"Collingwood",
"London",
"Stoney Creek",
"Cornwall",
"Loyalist Township",
"Stratford",
"Cumberland",
"Markham",
"Sudbury",
"Deep River",
"Metro Toronto",
"Temagami",
"Dundas",
"Merrickville",
"Thorold",
"Durham",
"Milton",
"Thunder Bay",
"Dymond",
"Nepean",
"Tillsonburg",
"Ear Falls",
"Newmarket",
"Timmins",
"East Gwillimbury",
"Niagara",
"Toronto",
"East Zorra-Tavistock",
"Niagara Falls",
"Uxbridge",
"Elgin",
"Niagara-on-the-Lake",
"Vaughan",
"Elliot Lake",
"North Bay",
"Wainfleet",
"Flamborough",
"North Dorchester",
"Wasaga Beach",
"Fort Erie",
"North Dumfries",
"Waterloo",
"Fort Frances",
"North York",
"Waterloo",
"Gananoque",
"Norwich",
"Welland",
"Georgina",
"Oakville",
"Wellesley",
"Glanbrook",
"Orangeville",
"West Carleton",
"Gloucester",
"Orillia",
"West Lincoln",
"Goulbourn",
"Osgoode",
"Whitby",
"Gravenhurst",
"Oshawa",
"Wilmot",
"Grimsby",
"Ottawa",
"Windsor",
"Guelph",
"Ottawa-Carleton",
"Woolwich",
"Haldimand-Norfork",
"Owen Sound",
"York"
],
"Prince Edward Island": [
"Alberton",
"Montague",
"Stratford",
"Charlottetown",
"Souris",
"Summerside",
"Cornwall"
],
"Quebec": [
"Alma",
"Fleurimont",
"Longueuil",
"Amos",
"Gaspe",
"Marieville",
"Anjou",
"Gatineau",
"Mount Royal",
"Aylmer",
"Hull",
"Montreal",
"Beauport",
"Joliette",
"Montreal Region",
"Bromptonville",
"Jonquiere",
"Montreal-Est",
"Brosssard",
"Lachine",
"Quebec",
"Chateauguay",
"Lasalle",
"Saint-Leonard",
"Chicoutimi",
"Laurentides",
"Sherbrooke",
"Coaticook",
"LaSalle",
"Sorel",
"Coaticook",
"Laval",
"Thetford Mines",
"Dorval",
"Lennoxville",
"Victoriaville",
"Drummondville",
"Levis"
],
"Saskatchewan": [
"Avonlea",
"Melfort",
"Swift Current",
"Colonsay",
"Nipawin",
"Tisdale",
"Craik",
"Prince Albert",
"Unity",
"Creighton",
"Regina",
"Weyburn",
"Eastend",
"Saskatoon",
"Wynyard",
"Esterhazy",
"Shell Lake",
"Yorkton",
"Gravelbourg"
],
"Yukon": [
"Carcross",
"Whitehorse"
]
}

238
public/api/usa.json Normal file
View File

@@ -0,0 +1,238 @@
[
{
"name": "Alabama",
"abbreviation": "AL"
},
{
"name": "Alaska",
"abbreviation": "AK"
},
{
"name": "American Samoa",
"abbreviation": "AS"
},
{
"name": "Arizona",
"abbreviation": "AZ"
},
{
"name": "Arkansas",
"abbreviation": "AR"
},
{
"name": "California",
"abbreviation": "CA"
},
{
"name": "Colorado",
"abbreviation": "CO"
},
{
"name": "Connecticut",
"abbreviation": "CT"
},
{
"name": "Delaware",
"abbreviation": "DE"
},
{
"name": "District Of Columbia",
"abbreviation": "DC"
},
{
"name": "Federated States Of Micronesia",
"abbreviation": "FM"
},
{
"name": "Florida",
"abbreviation": "FL"
},
{
"name": "Georgia",
"abbreviation": "GA"
},
{
"name": "Guam",
"abbreviation": "GU"
},
{
"name": "Hawaii",
"abbreviation": "HI"
},
{
"name": "Idaho",
"abbreviation": "ID"
},
{
"name": "Illinois",
"abbreviation": "IL"
},
{
"name": "Indiana",
"abbreviation": "IN"
},
{
"name": "Iowa",
"abbreviation": "IA"
},
{
"name": "Kansas",
"abbreviation": "KS"
},
{
"name": "Kentucky",
"abbreviation": "KY"
},
{
"name": "Louisiana",
"abbreviation": "LA"
},
{
"name": "Maine",
"abbreviation": "ME"
},
{
"name": "Marshall Islands",
"abbreviation": "MH"
},
{
"name": "Maryland",
"abbreviation": "MD"
},
{
"name": "Massachusetts",
"abbreviation": "MA"
},
{
"name": "Michigan",
"abbreviation": "MI"
},
{
"name": "Minnesota",
"abbreviation": "MN"
},
{
"name": "Mississippi",
"abbreviation": "MS"
},
{
"name": "Missouri",
"abbreviation": "MO"
},
{
"name": "Montana",
"abbreviation": "MT"
},
{
"name": "Nebraska",
"abbreviation": "NE"
},
{
"name": "Nevada",
"abbreviation": "NV"
},
{
"name": "New Hampshire",
"abbreviation": "NH"
},
{
"name": "New Jersey",
"abbreviation": "NJ"
},
{
"name": "New Mexico",
"abbreviation": "NM"
},
{
"name": "New York",
"abbreviation": "NY"
},
{
"name": "North Carolina",
"abbreviation": "NC"
},
{
"name": "North Dakota",
"abbreviation": "ND"
},
{
"name": "Northern Mariana Islands",
"abbreviation": "MP"
},
{
"name": "Ohio",
"abbreviation": "OH"
},
{
"name": "Oklahoma",
"abbreviation": "OK"
},
{
"name": "Oregon",
"abbreviation": "OR"
},
{
"name": "Palau",
"abbreviation": "PW"
},
{
"name": "Pennsylvania",
"abbreviation": "PA"
},
{
"name": "Puerto Rico",
"abbreviation": "PR"
},
{
"name": "Rhode Island",
"abbreviation": "RI"
},
{
"name": "South Carolina",
"abbreviation": "SC"
},
{
"name": "South Dakota",
"abbreviation": "SD"
},
{
"name": "Tennessee",
"abbreviation": "TN"
},
{
"name": "Texas",
"abbreviation": "TX"
},
{
"name": "Utah",
"abbreviation": "UT"
},
{
"name": "Vermont",
"abbreviation": "VT"
},
{
"name": "Virgin Islands",
"abbreviation": "VI"
},
{
"name": "Virginia",
"abbreviation": "VA"
},
{
"name": "Washington",
"abbreviation": "WA"
},
{
"name": "West Virginia",
"abbreviation": "WV"
},
{
"name": "Wisconsin",
"abbreviation": "WI"
},
{
"name": "Wyoming",
"abbreviation": "WY"
}
]

File diff suppressed because it is too large Load Diff

23909
public/api/usaCities.old.json Normal file

File diff suppressed because it is too large Load Diff

1311
public/assets/css/jquery-ui.css vendored Normal file

File diff suppressed because it is too large Load Diff

18706
public/assets/js/jquery-ui.js vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,23 +1,79 @@
## Laravel PHP Framework # Crew Sportswear
[![Build Status](https://travis-ci.org/laravel/framework.svg)](https://travis-ci.org/laravel/framework) A custom sportswear and apparel e-commerce platform built with Laravel.
[![Total Downloads](https://poser.pugx.org/laravel/framework/downloads.svg)](https://packagist.org/packages/laravel/framework)
[![Latest Stable Version](https://poser.pugx.org/laravel/framework/v/stable.svg)](https://packagist.org/packages/laravel/framework)
[![Latest Unstable Version](https://poser.pugx.org/laravel/framework/v/unstable.svg)](https://packagist.org/packages/laravel/framework)
[![License](https://poser.pugx.org/laravel/framework/license.svg)](https://packagist.org/packages/laravel/framework)
Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable, creative experience to be truly fulfilling. Laravel attempts to take the pain out of development by easing common tasks used in the majority of web projects, such as authentication, routing, sessions, queueing, and caching. ## Production URL
Laravel is accessible, yet powerful, providing powerful tools needed for large, robust applications. A superb inversion of control container, expressive migration system, and tightly integrated unit testing support give you the tools you need to build any application with which you are tasked. https://crewsportswear.com
## Official Documentation ## Requirements
Documentation for the framework can be found on the [Laravel website](http://laravel.com/docs). - Docker & Docker Compose
- PHP 7.4+
- MySQL 5.7+
- Composer
- Node.js & NPM
## Contributing ## Installation
Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](http://laravel.com/docs/contributions). 1. Clone the repository
2. Copy `.env.example` to `.env` and configure your environment variables
3. Install PHP dependencies:
```bash
composer install
```
4. Install Node dependencies:
```bash
npm install
```
5. Generate application key:
```bash
php artisan key:generate
```
6. Run migrations:
```bash
php artisan migrate
```
### License ## Docker Deployment
The Laravel framework is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT) ### Local Development
```bash
docker-compose -f docker-compose.local.yml up -d
```
### Development Environment
```bash
docker-compose -f docker-compose.dev.yml up -d
```
### Production Environment
```bash
docker-compose -f docker-compose.prod.yml up -d
```
The production environment uses Traefik as a reverse proxy with paid SSL certificate for crewsportswear.com.
## Features
- Custom sportswear design interface
- Product catalog and management
- Order processing and tracking
- User authentication and profiles
- Analytics integration
- Email notifications
- reCAPTCHA integration
## Environment Variables
Key environment variables (see `.env.example` for full list):
- `APP_ENV` - Application environment (local, development, production)
- `APP_URL` - Application URL
- `DB_*` - Database configuration
- `MAIL_*` - Mail server configuration
- `ANALYTICS_*` - Google Analytics configuration
- `CAPTCHA_*` - reCAPTCHA keys
## License
Proprietary - All rights reserved

View File

@@ -1,12 +1,13 @@
<!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('public/css/app.css') }}" rel="stylesheet"> <link href="{{ asset('/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'>
@@ -19,7 +20,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('public/assets/css/style.css')}}" rel="stylesheet"> <link href="{{asset('/assets/css/style.css')}}" rel="stylesheet">
<!-- <link href="{{asset('public/assets/login/css/style.css')}}" rel="stylesheet"> <!-- <link href="{{asset('public/assets/login/css/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>
@@ -27,12 +28,16 @@
<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">
@@ -76,8 +81,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');
@@ -88,7 +93,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;
} }
@@ -109,7 +114,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);
} }
}, },
@@ -118,12 +123,15 @@
$("#frm-register").validate({ $("#frm-register").validate({
rules: { rules: {
name: { firstname: {
required : true required: true
}, },
username: { lastname: {
required : true required: true
}, },
// username: {
// required: true
// },
email: { email: {
required: true, required: true,
email: true email: true
@@ -131,6 +139,24 @@
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: {},
@@ -138,15 +164,17 @@
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;
@@ -160,28 +188,169 @@
}); // end document ready }); // end document ready
function submitLoginForm (){ function getSelectedCountry() {
var selectedState = $('#select_country').data('selected');
if (selectedState) {
// console.log(selectedState)
$("#select_country").val(selectedState).change();
// selectCountry()
}
}
function selectCountry(item) {
const country = item.options[item.selectedIndex].text;
const countryCode = item.options[item.selectedIndex].value
console.log(countryCode)
if (countryCode === "US") {
fetchUSA()
}
if (countryCode === "CA") {
fetchCanada()
}
}
function fetchCanada() {
$.getJSON("{{ asset('/api/canada.json') }}", function(items) {
var states = [];
Object.keys(items).forEach(function(state) {
states.push(state)
});
var uniqueStates = Array.from(new Set(states));
var selectedState = $('#lst-states').data('selected');
$('.dynamic-state').remove();
$('.dynamic-city').remove();
uniqueStates.sort().forEach(function(key) {
if (selectedState == key) {
$('#lst-states').append('<option value="' + key + '" selected class="dynamic-state">' + key + '</option>');
var cities = [];
cities = items[selectedState];
var uniqueCities = Array.from(new Set(cities));
var selectedCity = $('#lst-cities').data('selected');
$('.dynamic-city').remove();
uniqueCities.sort().forEach(function(key) {
if (selectedCity == key) {
$('#lst-cities').append('<option value="' + key + '" class="dynamic-city" selected>' + key + '</option>');
} else {
$('#lst-cities').append('<option value="' + key + '" class="dynamic-city">' + key + '</option>');
}
});
} else {
$('#lst-states').append('<option value="' + key + '" class="dynamic-state">' + key + '</option>');
}
});
$(document).on('select change', '#lst-states', function() {
var cities = [];
var selectedState = $(this).val()
cities = items[selectedState];
var uniqueCities = Array.from(new Set(cities));
$('.dynamic-city').remove();
uniqueCities.sort().forEach(function(key) {
$('#lst-cities').append('<option value="' + key + '" class="dynamic-city">' + key + '</option>');
});
});
});
}
function fetchUSA() {
$.getJSON("{{ asset('/api/usaCities.json') }}", function(data) {
var states = [];
for (i = 0; i < data.length; i++) {
states.push(data[i]['state']);
}
var uniqueStates = Array.from(new Set(states));
var selectedState = $('#lst-states').data('selected');
$('.dynamic-state').remove();
$('.dynamic-city').remove();
uniqueStates.sort().forEach(function(key) {
if (selectedState == key) {
$('#lst-states').append('<option value="' + key + '" selected class="dynamic-state">' + key + '</option>');
//
var cities = [];
for (i = 0; i < data.length; i++) {
console.log(data[i])
cities.push(data[i]);
}
var city = getCities(cities, key);
var uniqueCities = Array.from(new Set(city));
var selectedCity = $('#lst-cities').data('selected');
$('.dynamic-city').remove();
uniqueCities.sort().forEach(function(key) {
if (selectedCity == key) {
$('#lst-cities').append('<option value="' + key + '" class="dynamic-city" selected>' + key + '</option>');
} else {
$('#lst-cities').append('<option value="' + key + '" class="dynamic-city">' + key + '</option>');
}
});
} else {
$('#lst-states').append('<option value="' + key + '" class="dynamic-state">' + key + '</option>');
}
});
$(document).on('select change', '#lst-states', function() {
var cities = [];
for (i = 0; i < data.length; i++) {
cities.push(data[i]);
}
var city = getCities(cities, $(this).val());
var uniqueCities = Array.from(new Set(city));
$('.dynamic-city').remove();
uniqueCities.sort().forEach(function(key) {
$('#lst-cities').append('<option value="' + key + '" class="dynamic-city">' + key + '</option>');
});
});
});
}
function getCities(arr, q) {
var sd = [];
arr.find(function(element) {
if (element['state'] == q) {
sd.push(element['city']);
}
});
return sd;
}
function submitLoginForm() {
// method="POST" action="{{ url('/auth/login') }}" // 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 &nbsp; <i class="fa fa-spinner fa-spin"></i>'); $("#btn-login").html('Signing in &nbsp; <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);
} }
// //
@@ -192,27 +361,35 @@
} }
}); });
return false; return false;
}/* login submit */ } /* login submit */
function submitRegisterForm (){ function submitRegisterForm() {
var data = $("#frm-register").serialize(); var data = $("#frm-register").serializeArray();
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 &nbsp; <i class="fa fa-spinner fa-spin"></i>'); $("#btn-register").html('Please wait &nbsp; <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) {
location.reload(); if (response.redirect != "") {
}else{ window.location = response.redirect;
} else {
location.reload();
}
} else {
$("#register-response-msg").html(response.message); $("#register-response-msg").html(response.message);
} }
$("#btn-register").html('Register'); $("#btn-register").html('Register');
@@ -224,8 +401,7 @@
return false; return false;
} }
</script> </script>
</body> </body>
</html> </html>

View File

@@ -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('public/images/fb-share-logo.png')}}" /> <meta property="og:image" content="{{asset('/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('public/assets/css/bootstrap.min.css')}}" rel="stylesheet"> <link href="{{asset('/assets/css/bootstrap.min.css')}}" rel="stylesheet">
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug --> <!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<link href="{{asset('public/assets/css/ie10-viewport-bug-workaround.css')}}" rel="stylesheet"> <link href="{{asset('/assets/css/ie10-viewport-bug-workaround.css')}}" rel="stylesheet">
<!-- Custom styles for this template --> <!-- Custom styles for this template -->
<link href="{{asset('public/assets/css/style.css')}}" rel="stylesheet"> <link href="{{asset('/assets/css/style.css')}}" rel="stylesheet">
<!-- Just for debugging purposes. Don't actually copy these 2 lines! --> <!-- 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('public/assets/js/ie-emulation-modes-warning.js')}}"></script> <script src="{{asset('/assets/js/ie-emulation-modes-warning.js')}}"></script>
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --> <!-- 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('public/assets/js/vendor/jquery.min.js')}}"><\/script>')</script> <script>window.jQuery || document.write('<script src="{{asset('/assets/js/vendor/jquery.min.js')}}"><\/script>')</script>
<script src="https://ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/jquery.validate.min.js"></script> <script 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('public/assets/js/crew-designer.js')}}"></script> <script src="{{asset('/assets/js/crew-designer.js')}}"></script>
</body> </body>
</html> </html>

View File

@@ -2,11 +2,12 @@
@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">
@@ -22,25 +23,40 @@
<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">Fullname</label> <label class="control-label">First name</label>
<input type="text" class="form-control" name="name" value="{{ old('name') }}" placeholder="Fullname"> <input type="text" class="form-control" name="firstname" placeholder="First name">
</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">
@@ -48,6 +64,50 @@
<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>

View File

@@ -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('/public/images/logo.png')}}" class="img img-responsive" /> <img src="{{asset('/images/logo.png')}}" class="img img-responsive" />
</div> </div>
</section> </section>
<!-- /.content --> <!-- /.content -->

View File

@@ -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('/public/designer/css/custom-style.css')}}" rel="stylesheet"> <link href="{{asset('/designer/css/custom-style.css')}}" rel="stylesheet">
<link href="{{asset('/public/designer/css/tab-styles.css')}}" rel="stylesheet"> <link href="{{asset('/designer/css/tab-styles.css')}}" rel="stylesheet">
<link href="{{asset('/public/designer/css/input-range-style.css')}}" rel="stylesheet"> <link href="{{asset('/designer/css/input-range-style.css')}}" rel="stylesheet">
<link href="{{asset('/public/designer/css/spectrum.css')}}" rel="stylesheet"> <link href="{{asset('/designer/css/spectrum.css')}}" rel="stylesheet">
<link href="{{asset('/public/designer/css/one-by-one-slider.css')}}" rel="stylesheet"> <link href="{{asset('/designer/css/one-by-one-slider.css')}}" rel="stylesheet">
<link href="{{asset('/public/designer/custom-fonts/custom-fonts.php')}}" rel='stylesheet' type='text/css'> <link href="{{asset('/designer/custom-fonts/custom-fonts.php')}}" rel='stylesheet' type='text/css'>
<link href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css" rel="stylesheet"> <link href="{{asset('/assets/css/jquery-ui.css')}}" rel="stylesheet">
<link href="{{asset('/public/designer/css/build.css')}}" rel="stylesheet"> <link href="{{asset('/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('/public/images/loading-please-wait.gif')}}" class="img img-responsive img-loader main-thumbnail"> <img id="{{ strtolower($template->Side) }}-image-thumb" src="{{asset('/images/loading-please-wait.gif')}}" class="img img-responsive img-loader main-thumbnail">
@endif @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('/public/designer/js/spectrum.js')}}"></script> <script src="{{asset('/designer/js/spectrum.js')}}"></script>
<!-- CUSTOM SCRIPT --> <!-- CUSTOM SCRIPT -->
<script src="{{asset('/public/designer/js/custom-script.js')}}"></script> <script src="{{asset('/designer/js/custom-script.js')}}"></script>
<!-- PRICE FORMAT --> <!-- PRICE FORMAT -->
<script src="{{asset('/public/designer/js/jquery.priceformat.min.js')}}"></script> <script src="{{asset('/designer/js/jquery.priceformat.min.js')}}"></script>
<!-- JQUERY VALIDATE --> <!-- 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("/public/images/logo.png")}}">'); $('#custom-navbar-brand').html('<img src="{{asset("/images/logo.png")}}">');
$("#frm-design-details").validate({ $("#frm-design-details").validate({
@@ -348,9 +348,18 @@
var gen_url; var gen_url;
if(template_format == "png"){ if(template_format == "png"){
gen_url = ip+":"+port+"/ap/{{ $client_design_array[0]->DesignCode }}"; if(port == 5952){
gen_url = ip+":"+port+"/ap/{{ $client_design_array[0]->DesignCode }}";
}else{
gen_url = ip+":"+port+"/mask/{{ $client_design_array[0]->DesignCode }}";
}
}else{ }else{
gen_url = ip+":"+port+"/tb/{{ $client_design_array[0]->DesignCode }}"; if(port == 5953){
gen_url = ip+":"+port+"/classic-mask/{{ $client_design_array[0]->DesignCode }}";
}else{
gen_url = ip+":"+port+"/tb/{{ $client_design_array[0]->DesignCode }}";
}
} }
$.ajax({ //create an ajax request to load_page.php $.ajax({ //create an ajax request to load_page.php

View File

@@ -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('/public/designer/css/custom-style.css')}}" rel="stylesheet"> <link href="{{asset('/designer/css/custom-style.css')}}" rel="stylesheet">
<link href="{{asset('/public/designer/css/tab-styles.css')}}" rel="stylesheet"> <link href="{{asset('/designer/css/tab-styles.css')}}" rel="stylesheet">
<link href="{{asset('/public/designer/css/input-range-style.css')}}" rel="stylesheet"> <link href="{{asset('/designer/css/input-range-style.css')}}" rel="stylesheet">
<link href="{{asset('/public/designer/css/spectrum.css')}}" rel="stylesheet"> <link href="{{asset('/designer/css/spectrum.css')}}" rel="stylesheet">
<link href="{{asset('/public/designer/css/one-by-one-slider.css')}}" rel="stylesheet"> <link href="{{asset('/designer/css/one-by-one-slider.css')}}" rel="stylesheet">
<link href="{{asset('/public/designer/custom-fonts/custom-fonts.php')}}" rel='stylesheet' type='text/css'> <link href="{{asset('/designer/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('/public/images/bring_forward.png')}}"); background-image: url("{{asset('/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('/public/images/send_backward.png')}}"); background-image: url("{{asset('/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('/public/images/send_to_middle.png')}}"); background-image: url("{{asset('/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('/public/images/bring_forward.png')}}"); background-image: url("{{asset('/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('/public/images/align-v1.png')}}"); background-image: url("{{asset('/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('/public/images/align-h1.png')}}"); background-image: url("{{asset('/images/align-h1.png')}}");
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: cover; background-size: cover;
} }
@@ -284,15 +284,33 @@
<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>
@@ -428,7 +446,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('{{ config('site_config.uploads') }}{{ $val[0]->PatternThumbnail }}'); background-size:cover; background-repeat: no-repeat;" @if ($i == 0) disabled @endif> @if ($i == 0) <i class="fa fa-2 fa-check" aria-hidden="true"></i> @endif</button> <button type="button" data-pattern-path="{{ $val[0]->SVGPath }}" class="patternThumbs btn" data-id="{{ $val[0]->PatternId }}" style="background-image:url('{{ minio_url('uploads/images/' . $val[0]->PatternThumbnail) }}'); background-size:cover; background-repeat: no-repeat;" @if ($i == 0) disabled @endif> @if ($i == 0) <i class="fa fa-2 fa-check" aria-hidden="true"></i> @endif</button>
</div> </div>
</div> </div>
@endforeach @endforeach
@@ -528,7 +546,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('{{ config('site_config.uploads') }}{{ $val[0]->PatternThumbnail }}'); background-size:cover; background-repeat: no-repeat;" @if ($r == 0) disabled @endif> @if ($r == 0) <i class="fa fa-2 fa-check" aria-hidden="true"></i> @endif</button> <button type="button" data-pattern-path="{{ $val[0]->SVGPath }}" class="patternTrimThumbs patternTrim{{ $i }} btn" data-id="{{ $val[0]->PatternId }}" data-trim="{{ $i }}" style="background-image:url('{{ minio_url('uploads/images/' . $val[0]->PatternThumbnail) }}'); background-size:cover; background-repeat: no-repeat;" @if ($r == 0) disabled @endif> @if ($r == 0) <i class="fa fa-2 fa-check" aria-hidden="true"></i> @endif</button>
</div> </div>
</div> </div>
@endforeach @endforeach
@@ -550,37 +568,37 @@
</div> </div>
<div class="tab-pane fade" id="tab-add-text"> <div class="tab-pane fade" id="tab-add-text">
<div id="addNewTextId"> <div id="addNewTextId">
<div class="row"> <div class="row">
<div class="form-group col-sm-12"> <div class="form-group col-sm-12">
<!-- <button type="button" class="btn btn-danger pull-right btn-sm remove addMarginLeft" title="Remove object"><i class="fa fa-trash" aria-hidden="true"></i></button> --> <!-- <button type="button" class="btn btn-danger pull-right btn-sm remove addMarginLeft" title="Remove object"><i class="fa fa-trash" aria-hidden="true"></i></button> -->
<button type="button" onclick="addNewText();" class="btn btn-primary pull-right btn-sm"><i class="fa fa-plus" aria-hidden="true"></i> New Text</button> <button type="button" onclick="addNewText();" class="btn btn-primary pull-right btn-sm"><i class="fa fa-plus" aria-hidden="true"></i> New Text</button>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="form-group col-sm-12"> <div class="form-group col-sm-12">
<label>Enter team name here</label> <label>Enter team name here</label>
<textarea name="editedTextInput" id="editedTextInput" class="form-control" placeholder="Enter team name here"></textarea> <textarea name="editedTextInput" id="editedTextInput" class="form-control" placeholder="Enter team name here"></textarea>
</div> </div>
</div> </div>
</div> </div>
<div id="enterTextId"> <div id="enterTextId">
<div class="row"> <div class="row">
<div class="form-group col-sm-12"> <div class="form-group col-sm-12">
<label>Enter team name here</label> <label>Enter team name here</label>
<textarea name="textInput" id="textInput" class="form-control" placeholder="Enter team name here"></textarea> <textarea name="textInput" id="textInput" class="form-control" placeholder="Enter team name here"></textarea>
<!--span id="errfirstName" style="color: #dd4b39"></span> !--> <!--span id="errfirstName" style="color: #dd4b39"></span> !-->
</div> </div>
<div class="form-group col-sm-12"> <div class="form-group col-sm-12">
<button type="button" id="okBtn" onclick="addText();" class="btn btn-primary btn-block btn-sm">OK</button> <button type="button" id="okBtn" onclick="addText();" class="btn btn-primary btn-block btn-sm">OK</button>
</div> </div>
</div> </div>
</div> </div>
<div id="textProperties"> <div id="textProperties">
@include('designer.text_properties') @include('designer.text_properties')
</div> </div>
</div> </div>
<div class="tab-pane fade" id="tab-add-number"> <div class="tab-pane fade" id="tab-add-number">
@@ -613,9 +631,9 @@
</div> </div>
<div class="tab-pane fade" id="tab-clipart"> <div class="tab-pane fade" id="tab-clipart">
<div id="tab-clipart-content"> <div id="tab-clipart-content">
</div> </div>
</div> </div>
<div class="tab-pane fade" id="tab-upload-image"> <div class="tab-pane fade" id="tab-upload-image">
<!-- <div class="row"> <!-- <div class="row">
@@ -863,9 +881,9 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/fabric.js/1.7.15/fabric.min.js"></script> <script src="https://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('/public/designer/js/spectrum.js')}}"></script> <script src="{{asset('/designer/js/spectrum.js')}}"></script>
<script src="{{asset('/public/designer/js/custom-script.js')}}"></script> <script src="{{asset('/designer/js/custom-script.js')}}"></script>
<script src="https://gitcdn.github.io/bootstrap-toggle/2.2.2/js/bootstrap-toggle.min.js"></script> <script src="https://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>
@@ -874,7 +892,7 @@
$(document).ready(function() { $(document).ready(function() {
$.getJSON("{{asset('/public/designer/palette.json') }}", callbackFuncWithData); $.getJSON("{{asset('/designer/palette.json') }}", callbackFuncWithData);
function callbackFuncWithData(data){ function callbackFuncWithData(data){
console.log(data) console.log(data)
@@ -1036,7 +1054,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" ){ if(get_template_type != "Hoodie" && get_template_type != "Shirts" && get_template_type != "Cake" && get_template_type != "Mask" ){
addDefaultTeamText(); addDefaultTeamText();
addNameNumber(); addNameNumber();
} }
@@ -1288,7 +1306,7 @@
var patternSVGPath = $(this).attr('data-pattern-path'); var patternSVGPath = $(this).attr('data-pattern-path');
var patternPath = "{{ config('site_config.uploads') }}" + patternSVGPath; var patternPath = "{{ env('MINIO_URL', 'https://minio.crewsportswear.app') }}/{{ env('MINIO_BUCKET', 'crewsportswear') }}/" + patternSVGPath;
var SideAndPath = {!! json_encode($templatepaths_arrays) !!}; var SideAndPath = {!! json_encode($templatepaths_arrays) !!};
@@ -1365,7 +1383,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 = "{{ config('site_config.uploads') }}" + patternSVGPath; var patternPath = "{{ env('MINIO_URL', 'https://minio.crewsportswear.app') }}/{{ env('MINIO_BUCKET', 'crewsportswear') }}/" + patternSVGPath;
var getTrimId = $(this).attr('data-trim'); var getTrimId = $(this).attr('data-trim');
var SideAndPath = {!! json_encode($templatepaths_arrays) !!}; var SideAndPath = {!! json_encode($templatepaths_arrays) !!};
@@ -1509,7 +1527,7 @@
var gradientIds = sideName+"_"+type+"_Gradients"; var gradientIds = sideName+"_"+type+"_Gradients";
var gradientPrefix = sideName+"_"+type+"_"; var gradientPrefix = sideName+"_"+type+"_";
var tempPath = "{{ config('site_config.uploads') }}" + pathLocation; var tempPath = "{{ env('MINIO_URL', 'https://minio.crewsportswear.app') }}/{{ env('MINIO_BUCKET', 'crewsportswear') }}/" + pathLocation;
console.log(tempPath) console.log(tempPath)
if(!document.getElementById(objectId)) if(!document.getElementById(objectId))
return false; return false;
@@ -1693,7 +1711,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 = "{{ config('site_config.uploads') }}" + pathLocation; var tempPath = "{{ env('MINIO_URL', 'https://minio.crewsportswear.app') }}/{{ env('MINIO_BUCKET', 'crewsportswear') }}/" + pathLocation;
window['canvas_' + type + '_' + sideName] = new fabric.Canvas(canvasName); window['canvas_' + type + '_' + sideName] = new fabric.Canvas(canvasName);
var templateFormat = SideAndPath[i]['TemplateFormat']; var templateFormat = SideAndPath[i]['TemplateFormat'];
@@ -2025,9 +2043,9 @@
if(objType == "curvedText"){ if(objType == "curvedText"){
if(obj.effect == "curved"){ if(obj.effect == "curved"){
$('#teamname_text_shape').html('Text Shape: <br><img src="{{ config('site_config.uploads') }}text-shapes-logo/curve-logo.png" height="30px">'); $('#teamname_text_shape').html('Text Shape: <br><img src="{{ minio_url('uploads/images/text-shapes-logo/curve-logo.png') }}" height="30px">');
}else if(obj.effect == "arc"){ }else if(obj.effect == "arc"){
$('#teamname_text_shape').html('Text Shape: <br><img src="{{ config('site_config.uploads') }}text-shapes-logo/arch-logo.png" height="30px">'); $('#teamname_text_shape').html('Text Shape: <br><img src="{{ minio_url('uploads/images/text-shapes-logo/arch-logo.png') }}" height="30px">');
}else{ }else{
$('#teamname_text_shape').html('Add text Shape'); $('#teamname_text_shape').html('Add text Shape');
} }
@@ -3327,7 +3345,7 @@
function loadSVGClipart(dataUrl){ function loadSVGClipart(dataUrl){
var k = 0; var k = 0;
var arrayPathId = []; var arrayPathId = [];
var svgUrl = "{{ config('site_config.uploads') }}cliparts/" + dataUrl; var svgUrl = "{{ env('MINIO_URL', 'https://minio.crewsportswear.app') }}/{{ env('MINIO_BUCKET', 'crewsportswear') }}/uploads/images/cliparts/" + dataUrl;
fabric.loadSVGFromURL(svgUrl, function(objects, options) { fabric.loadSVGFromURL(svgUrl, function(objects, options) {
var clipart = fabric.util.groupSVGElements(objects, options ); var clipart = fabric.util.groupSVGElements(objects, options );
clipart.set({ clipart.set({

View File

@@ -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('/public/designer/css/custom-style.css')}}" rel="stylesheet"> <link href="{{asset('/designer/css/custom-style.css')}}" rel="stylesheet">
<link href="{{asset('/public/designer/css/tab-styles.css')}}" rel="stylesheet"> <link href="{{asset('/designer/css/tab-styles.css')}}" rel="stylesheet">
<link href="{{asset('/public/designer/css/input-range-style.css')}}" rel="stylesheet"> <link href="{{asset('/designer/css/input-range-style.css')}}" rel="stylesheet">
<link href="{{asset('/public/designer/css/spectrum.css')}}" rel="stylesheet"> <link href="{{asset('/designer/css/spectrum.css')}}" rel="stylesheet">
<link href="{{asset('/public/designer/css/one-by-one-slider.css')}}" rel="stylesheet"> <link href="{{asset('/designer/css/one-by-one-slider.css')}}" rel="stylesheet">
<link href="{{asset('/public/designer/custom-fonts/custom-fonts.php')}}" rel='stylesheet' type='text/css'> <link href="{{asset('/designer/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('/public/images/bring_forward.png')}}"); background-image: url("{{asset('/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('/public/images/send_backward.png')}}"); background-image: url("{{asset('/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('/public/images/bring_forward.png')}}"); background-image: url("{{asset('/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('/public/images/align-v1.png')}}"); background-image: url("{{asset('/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('/public/images/align-h1.png')}}"); background-image: url("{{asset('/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('/public/designer/js/spectrum.js')}}"></script> <script src="{{asset('/designer/js/spectrum.js')}}"></script>
<script src="{{asset('/public/designer/js/custom-script.js')}}"></script> <script src="{{asset('/designer/js/custom-script.js')}}"></script>
<script> <script>
@@ -685,7 +685,7 @@
$('body,html').animate({scrollTop:0},800); $('body,html').animate({scrollTop:0},800);
}); });
// $('#custom-navbar-brand').html('<img src="{{asset("/public/images/logo.png")}}">'); // $('#custom-navbar-brand').html('<img src="{{asset("/images/logo.png")}}">');
// calling functions // calling functions

View File

@@ -407,7 +407,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.prod_private_server_ip') }}/images/{{ $img->Image }}"> <img style="height: 200px; overflow: hidden; object-fit: contain;" src="{{ config('site_config.images_url') }}/{{ $img->Image }}">
@endif @endif
@endforeach @endforeach
</td> </td>
@@ -474,7 +474,21 @@
<th>Size</th> <th>Size</th>
<th>Price</th> <th>Price</th>
<th>Quantity</th> <th>Quantity</th>
<th></th> </tr>
@elseif($item->FormUsed=="jersey-and-shorts-quantity-form")
<tr>
<th>Jersey Size</th>
<th>Shorts Size</th>
<th>Price</th>
<th>Quantity</th>
</tr>
@elseif($item->FormUsed=="number-jersey-shorts-form")
<tr>
<td><b>Number</b></td>
<td><b>Jersey Size</b></td>
<td><b>Shorts Size</b></td>
<td><b>Price</b></td>
<td><b>Quantity</b></td>
</tr> </tr>
@else @else
@@ -545,6 +559,21 @@
<td>{{ $sub_item->Price }}</td> <td>{{ $sub_item->Price }}</td>
<td>{{ $sub_item->Quantity }}</td> <td>{{ $sub_item->Quantity }}</td>
</tr> </tr>
@elseif($item->FormUsed=="jersey-and-shorts-quantity-form")
<tr>
<td>{{ $sub_item->JerseySize }}</td>
<td>{{ $sub_item->ShortsSize }}</td>
<td>{{ $sub_item->Price }}</td>
<td>{{ $sub_item->Quantity }}</td>
</tr>
@elseif($item->FormUsed=="number-jersey-shorts-form")
<tr>
<td>{{ $sub_item->Number }}</td>
<td>{{ $sub_item->JerseySize }}</td>
<td>{{ $sub_item->ShortsSize }}</td>
<td>{{ $sub_item->Price }}</td>
<td>{{ $sub_item->Quantity }}</td>
</tr>
@else @else
@endif @endif

View File

@@ -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 Uniform Customizer" /> <meta property="og:title" content="CREW Apparel" />
<meta property="og:description" content="Custom Uniforms offered in a variety colors to match your team. Browse through our baseball, fastpitch, softball, lacrosse, football, volleyball and basketball gear." /> <meta property="og:description" content="Custom Uniforms offered in a variety colors to match your team. Browse through our baseball, fastpitch, softball, lacrosse, football, volleyball and basketball gear." />
<meta property="og:image" content="{{asset('public/images/fb-share-logo.png')}}" /> <meta property="og:image" content="{{asset('/images/fb-share-logo.png')}}" />
<title>CREW Uniform Designer</title> <title>CREW Uniform Designer</title>
<!-- Bootstrap core CSS --> <!-- Bootstrap core CSS -->
<link href="{{ asset('public/assets/css/bootstrap.min.css') }}" rel="stylesheet"> <link href="{{ asset('/assets/css/bootstrap.min.css') }}" rel="stylesheet">
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug --> <!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<link href="{{ asset('public/assets/css/ie10-viewport-bug-workaround.css') }}" rel="stylesheet"> <link href="{{ asset('/assets/css/ie10-viewport-bug-workaround.css') }}" rel="stylesheet">
<!-- Custom styles for this template --> <!-- Custom styles for this template -->
<link href="{{ asset('public/assets/css/style.css')}}" rel="stylesheet"> <link href="{{ asset('/assets/css/style.css')}}" rel="stylesheet">
<!-- Just for debugging purposes. Don't actually copy these 2 lines! --> <!-- 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('public/assets/js/ie-emulation-modes-warning.js')}}"></script> <script src="{{asset('/assets/js/ie-emulation-modes-warning.js')}}"></script>
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --> <!-- 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('public/assets/css/font-awesome/css/font-awesome.min.css')}}" rel="stylesheet"> <link href="{{ asset('/assets/css/font-awesome/css/font-awesome.min.css')}}" rel="stylesheet">
<!-- Social Media Share button <!-- 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('public/assets/js/jquery.min.js') }}"></script> <script src="{{ asset('/assets/js/jquery.min.js') }}"></script>
<!-- bootstrap --> <!-- bootstrap -->
<script src="{{asset('public/assets/js/bootstrap.min.js')}}"></script>] <script src="{{asset('/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('public/assets/js/crew-designer.js') }}"></script> <script src="{{ asset('/assets/js/crew-designer.js') }}"></script>
<script> <script>
$(function(){ $(function(){
$(".hide-row").hide(); $(".hide-row").hide();

View File

@@ -7,17 +7,29 @@
<span class="icon-bar"></span> <span class="icon-bar"></span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
</button> </button>
<a class="navbar-brand" href="{{ url('/') }}"> @if (Request::segment(2) == "hi-five-sports-club" || Request::segment(2) == "hi-five-sports-zone")
<img src="{{asset('public/images/logo.png')}}" /> <a class="navbar-brand" href="#"></a>
</a> @else
<a class="navbar-brand" href="{{ url('/') }}">
<img src="{{asset('/images/logo.png')}}" />
</a>
@endif
{{-- <small>JAC Printing & Graphics Co.</small> --}}
</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>
@@ -254,8 +266,15 @@
<button type="button" class="close" data-dismiss="modal">&times;</button> <button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title">Contact Us</h4> <h4 class="modal-title">Contact Us</h4>
</div> </div>
<div class="modal-body"> <div class="modal-body text-center">
<p>Coming soon.</p> <h1>Contact Us</h1>
<hr>
<h3>Email Address: <small><a href="#">customer-service@crewsportswear.com</a></small></h3>
<h3>Address: <small><a href="#">1281 Humbracht Circle
Suite J
Bartlett, Illinois
60103</a></small>
</h3>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button> <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>

View File

@@ -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('/public/bower_components/AdminLTE/bootstrap/css/bootstrap.min.css')}}"> <link rel="stylesheet" href="{{asset('/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('/public/bower_components/AdminLTE/dist/css/AdminLTE.min.css')}}"> <link rel="stylesheet" href="{{asset('/bower_components/AdminLTE/dist/css/AdminLTE.min.css')}}">
<!-- AdminLTE Skins. Choose a skin from the css/skins <!-- 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('/public/bower_components/AdminLTE/dist/css/skins/_all-skins.min.css')}}"> <link rel="stylesheet" href="{{asset('/bower_components/AdminLTE/dist/css/skins/_all-skins.min.css')}}">
<!-- iCheck --> <!-- iCheck -->
<link rel="stylesheet" href="{{asset('/public/bower_components/AdminLTE/plugins/iCheck/flat/blue.css')}}"> <link rel="stylesheet" href="{{asset('/bower_components/AdminLTE/plugins/iCheck/flat/blue.css')}}">
<!-- Date Picker --> <!-- Date Picker -->
<link rel="stylesheet" href="{{asset('/public/bower_components/AdminLTE/plugins/datepicker/datepicker3.css')}}"> <link rel="stylesheet" href="{{asset('/bower_components/AdminLTE/plugins/datepicker/datepicker3.css')}}">
<!-- Daterange picker --> <!-- Daterange picker -->
<link rel="stylesheet" href="{{asset('/public/bower_components/AdminLTE/plugins/daterangepicker/daterangepicker.css')}}"> <link rel="stylesheet" href="{{asset('/bower_components/AdminLTE/plugins/daterangepicker/daterangepicker.css')}}">
<!-- bootstrap wysihtml5 - text editor --> <!-- bootstrap wysihtml5 - text editor -->
<link rel="stylesheet" href="{{asset('/public/bower_components/AdminLTE/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css')}}"> <link rel="stylesheet" href="{{asset('/bower_components/AdminLTE/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css')}}">
<!-- Select2 --> <!-- Select2 -->
<link href="{{asset('/public/bower_components/AdminLTE/plugins/select2/select2.min.css')}}" rel="stylesheet" /> <link href="{{asset('/bower_components/AdminLTE/plugins/select2/select2.min.css')}}" rel="stylesheet" />
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- 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('/public/bower_components/AdminLTE/plugins/jQuery/jquery-2.2.3.min.js')}}"></script> <script src="{{asset('/bower_components/AdminLTE/plugins/jQuery/jquery-2.2.3.min.js')}}"></script>
<!-- jQuery UI 1.11.4 --> <!-- 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('/public/bower_components/AdminLTE/bootstrap/js/bootstrap.min.js')}}"></script> <script src="{{asset('/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('/public/bower_components/AdminLTE/plugins/daterangepicker/daterangepicker.js')}}"></script> <script src="{{asset('/bower_components/AdminLTE/plugins/daterangepicker/daterangepicker.js')}}"></script>
<!-- datepicker --> <!-- datepicker -->
<script src="{{asset('/public/bower_components/AdminLTE/plugins/datepicker/bootstrap-datepicker.js')}}"></script> <script src="{{asset('/bower_components/AdminLTE/plugins/datepicker/bootstrap-datepicker.js')}}"></script>
<!-- Bootstrap WYSIHTML5 --> <!-- Bootstrap WYSIHTML5 -->
<script src="{{asset('/public/bower_components/AdminLTE/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js')}}"></script> <script src="{{asset('/bower_components/AdminLTE/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js')}}"></script>
<!-- Slimscroll --> <!-- Slimscroll -->
<script src="{{asset('/public/bower_components/AdminLTE/plugins/slimScroll/jquery.slimscroll.min.js')}}"></script> <script src="{{asset('/bower_components/AdminLTE/plugins/slimScroll/jquery.slimscroll.min.js')}}"></script>
<!-- FastClick --> <!-- FastClick -->
<script src="{{asset('/public/bower_components/AdminLTE/plugins/fastclick/fastclick.js')}}"></script> <script src="{{asset('/bower_components/AdminLTE/plugins/fastclick/fastclick.js')}}"></script>
<!-- AdminLTE App --> <!-- AdminLTE App -->
<script src="{{asset('/public/bower_components/AdminLTE/dist/js/app.min.js')}}"></script> <script src="{{asset('/bower_components/AdminLTE/dist/js/app.min.js')}}"></script>
<!-- AdminLTE dashboard demo (This is only for demo purposes) <!-- 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('/public/bower_components/AdminLTE/dist/js/demo.js')}}"></script> <script src="{{asset('/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('/public/images/no-image.jpg')}}"); $('#template-img-preview').attr('src', "{{asset('/images/no-image.jpg')}}");
} }
function clearImg(){ function clearImg(){
$('#previewImg').val(""); $('#previewImg').val("");
$('#prev-img').attr('src', "{{asset('/public/images/no-image.jpg')}}"); $('#prev-img').attr('src', "{{asset('/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 &nbsp; <img src="{{url('public/images/ajax-loader.gif')}}">'); $("#saveSportsBtn").html('Saving &nbsp; <img src="{{url('/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 &nbsp; <img src="{{url('public/images/ajax-loader.gif')}}">'); $("#updateSportsBtn").html('Updating &nbsp; <img src="{{url('/images/ajax-loader.gif')}}">');
var token = $('meta[name="csrf_token"]').attr('content'); var token = $('meta[name="csrf_token"]').attr('content');
if (token) { if (token) {

View File

@@ -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 Uniform Customizer" /> <meta property="og:title" content="CREW Apparel" />
<meta property="og:description" content="Custom Uniforms offered in a variety colors to match your team. Browse through our baseball, fastpitch, softball, lacrosse, football, volleyball and basketball gear." /> <meta property="og:description" content="Custom Uniforms offered in a variety colors to match your team. Browse through our baseball, fastpitch, softball, lacrosse, football, volleyball and basketball gear." />
<meta property="og:image" content="{{asset('public/images/fb-share-logo.png')}}" /> <meta property="og:image" content="{{asset('/images/fb-share-logo.png')}}" />
<!-- favicons <!-- 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('public/assets/css/bootstrap.min.css')}}" rel="stylesheet"> <link href="{{asset('/assets/css/bootstrap.min.css')}}" rel="stylesheet">
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug --> <!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<link href="{{asset('public/assets/css/ie10-viewport-bug-workaround.css')}}" rel="stylesheet"> <link href="{{asset('/assets/css/ie10-viewport-bug-workaround.css')}}" rel="stylesheet">
<!-- Custom styles for this template --> <!-- Custom styles for this template -->
<link href="{{asset('public/assets/css/style.css')}}" rel="stylesheet"> <link href="{{asset('/assets/css/style.css')}}" rel="stylesheet">
<!-- Just for debugging purposes. Don't actually copy these 2 lines! --> <!-- 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('public/assets/js/ie-emulation-modes-warning.js')}}"></script> <script src="{{asset('/assets/js/ie-emulation-modes-warning.js')}}"></script>
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --> <!-- 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('/public/designer/css/build.css')}}" rel="stylesheet"> <link href="{{asset('/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('public/assets/js/bootstrap.min.js')}}"></script> <script src="{{asset('/assets/js/bootstrap.min.js')}}"></script>
<!-- <script>window.jQuery || document.write('<script src="{{asset('public/assets/js/vendor/jquery.min.js')}}"><\/script>')</script> --> <!-- <script>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('public/assets/js/jquery.validate.js')}}"></script> <script src="{{asset('/assets/js/jquery.validate.js')}}"></script>
<!-- <script type="text/javascript" src="https://cdn.ywxi.net/js/1.js" async></script> --> <!-- <script 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>

View File

@@ -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('/public/images/logo.png')}}" class="img img-responsive" /> <img src="{{asset('/images/logo.png')}}" class="img img-responsive" />
</div> </div>
</section> </section>
<!-- /.content --> <!-- /.content -->

View File

@@ -26,6 +26,13 @@
<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>
@@ -45,8 +52,41 @@
<h3>Order Summary</h3> <h3>Order Summary</h3>
</div> </div>
@if (!Auth::guest())
<div style="border: 1px solid #e2e2e2; padding: 10px; border-bottom: none;"> <div style="border: 1px solid #e2e2e2; padding: 10px; border-bottom: none;">
<h3>Subtotal: <span id="my_subtotal">{{ round($getSubtotal, 2) }}</span> <small>{{ $store_array[0]->StoreCurrency }}</small></h3>
<p><strong>Ship to:</strong></p>
@if ($address_book === null)
<a href="{{ url('user/address-book/create') }}">[ Add ]</a>
@else
<div>{{ $address_book[0]->Fullname }}</div>
<div>{{ $address_book[0]->ContactNumber }}</div>
<div>
{{ $address_book[0]->Address . ' ' . $address_book[0]->Address2 . ', ' . $address_book[0]->State . ', ' . $address_book[0]->City . ', ' . $address_book[0]->Country . ', ' . $address_book[0]->CountryCode . ' ' . $address_book[0]->ZipCode }}
<a href="{{ url('user/address-book/edit/'.$address_book[0]->Id) }}">[ Edit ]</a>
</div>
@endif
</div>
@endif
<div style="border: 1px solid #e2e2e2; padding: 10px; border-bottom: none;">
{{-- <h3>Subtotal: <span id="my_subtotal">{{ round($getSubtotal, 2) }}</span> <small>{{ $store_array[0]->StoreCurrency }}</small></h3> --}}
<h5><strong>Subtotal:</strong>
<span>{{ number_format($tax['order_grandtotal'], 2) . ' ' . $store_array[0]->StoreCurrency }}</span>
</h5>
<h5><strong>Shipping Fee:</strong>
<span>{{ number_format($shipping_fee, 2) . ' ' . $store_array[0]->StoreCurrency }}</span>
</h5>
<h5> <strong>Tax:</strong>
<span>{{ number_format($tax['tax'], 2) . ' ' . $store_array[0]->StoreCurrency }}</span>
</h5>
<hr>
<h3> <strong>Total:</strong> <span id="my_subtotal">{{ number_format($tax['order_grandtotal'] + $shipping_fee + $tax['tax'], 2) }}</span>
<span>{{ $store_array[0]->StoreCurrency }}</span>
</h3>
<hr> <hr>
<div class="form-group" id="voucher_list"> <div class="form-group" id="voucher_list">
@foreach($row as $item) @foreach($row as $item)
@@ -82,13 +122,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('/public/images/paypal1.png')}}" class="img img-responsive" style="height:30px;"></a><br> <a @if($getSubtotal <= 0 ) disabled @endif href="{{ url('getCheckout') }}" class="btn btn-primary btn-block" style="background-color: #ffc300; border-color: #e2ad00; text-align: -webkit-center;" ><img src="{{asset('/images/paypal1.png')}}" class="img img-responsive" style="height:30px;"></a><br>
<a href="{{ url('teamstore') . '/' . $store_array[0]->StoreUrl }}" class="btn btn-default btn-block" type="submit">Continue Shopping</a> <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="{{ config('site_config.uploads') . 'teamstore/'. $store_array[0]->ImageFolder . '/' . $store_array[0]->StoreLogo }}"> {{ $store_array[0]->StoreName }}</h4> <h4><img height="30px" class="store-logo" src="{{ minio_url('uploads/images/teamstore/' . $store_array[0]->ImageFolder . '/' . $store_array[0]->StoreLogo) }}"> {{ $store_array[0]->StoreName }}</h4>
</div> </div>
@foreach($item_group as $item) @foreach($item_group as $item)
@if($item->VoucherId == null) @if($item->VoucherId == null)
@@ -98,7 +138,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.prod_private_server_ip') }}/images/{{ $img->Image }}"> <img class="previewImage" src="{{ config('site_config.images_url') }}/{{ $img->Image }}">
@endif @endif
@endforeach @endforeach
</div> </div>
@@ -180,11 +220,27 @@
<th>Quantity</th> <th>Quantity</th>
<th></th> <th></th>
</tr> </tr>
@elseif($item->FormUsed=="jersey-and-shorts-quantity-form")
<tr>
<th>Jersey Size</th>
<th>Shorts Size</th>
<th>Price</th>
<th>Quantity</th>
<th></th>
</tr>
@elseif($item->FormUsed=="number-jersey-shorts-form")
<tr>
<th>Number</th>
<th>Jersey Size</th>
<th>Shorts Size</th>
<th>Price</th>
<th>Quantity</th>
<th></th>
</tr>
@else @else
@endif @endif
@foreach($row as $sub_item) @foreach($row as $sub_item)
@if($sub_item->ProductId == $item->ProductId) @if($sub_item->ProductId == $item->ProductId)
@@ -252,6 +308,23 @@
<td>{{ $sub_item->Quantity }}</td> <td>{{ $sub_item->Quantity }}</td>
<td><a class="btn btn-xs btn-link pull-right" href="{{ url('removeitem') }}/{{ $sub_item->Id }}"><span class="glyphicon glyphicon-remove"></span></a></td> <td><a class="btn btn-xs btn-link pull-right" href="{{ url('removeitem') }}/{{ $sub_item->Id }}"><span class="glyphicon glyphicon-remove"></span></a></td>
</tr> </tr>
@elseif($item->FormUsed=="jersey-and-shorts-quantity-form")
<tr>
<td>{{ $sub_item->JerseySize}}</td>
<td>{{ $sub_item->ShortsSize}}</td>
<td>{{ $sub_item->Price . ' ' . $store_array[0]->StoreCurrency }}</td>
<td>{{ $sub_item->Quantity }}</td>
<td><a class="btn btn-xs btn-link pull-right" href="{{ url('removeitem') }}/{{ $sub_item->Id }}"><span class="glyphicon glyphicon-remove"></span></a></td>
</tr>
@elseif($item->FormUsed=="number-jersey-shorts-form")
<tr>
<td>{{ $sub_item->Number }}</td>
<td>{{ $sub_item->JerseySize }}</td>
<td>{{ $sub_item->ShortsSize }}</td>
<td>{{ $sub_item->Price . ' ' . $store_array[0]->StoreCurrency }}</td>
<td>{{ $sub_item->Quantity }}</td>
<td><a class="btn btn-xs btn-link pull-right" href="{{ url('removeitem') }}/{{ $sub_item->Id }}"><span class="glyphicon glyphicon-remove"></span></a></td>
</tr>
@else @else
@endif @endif

View File

@@ -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('public/images/logo.png')}}" class="" height="100px" /> <img src="{{asset('/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.prod_private_server_ip') }}/images/{{ $item->Image }} "></td> <td rowspan="2" class="text-center"><img class="previewImage" src="http://{{ config('site_config.images_url') }}/{{ $item->Image }} "></td>
<td colspan="5"> <td colspan="5">
<h4>{{ $item->ProductName }} {{ $itemOrder }} <br>Price: ${{ $item->Price }}</h4> <h4>{{ $item->ProductName }} {{ $itemOrder }} <br>Price: ${{ $item->Price }}</h4>
</td> </td>

View File

@@ -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="{{ config('site_config.uploads') . 'sports-category/' . $r->Thumbnail }}" alt="{{ $r->Category }}" class="image" /> <img src="{{ minio_url('uploads/images/sports-category/' . $r->Thumbnail) }}" alt="{{ $r->Category }}" class="image" />
</a> </a>
</div> </div>
<div class="text-center"> <div class="text-center">

View File

@@ -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="{{ config('site_config.uploads') . $r->Thumbnail}}" alt="" class="image" /> <img src="{{ minio_url('uploads/images/' . $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>

View File

@@ -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 Uniform Customizer" /> <meta property="og:title" content="CREW Apparel" />
<meta property="og:description" content="Custom Uniforms offered in a variety colors to match your team. Browse through our baseball, fastpitch, softball, lacrosse, football, volleyball and basketball gear." /> <meta property="og:description" content="Custom Uniforms offered in a variety colors to match your team. Browse through our baseball, fastpitch, softball, lacrosse, football, volleyball and basketball gear." />
<meta property="og:image" content="{{asset('public/images/logo.png')}}" /> <meta property="og:image" content="{{asset('/images/logo.png')}}" />
<!-- favicons <!-- 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('public/assets/css/bootstrap.min.css')}}" rel="stylesheet"> <link href="{{asset('/assets/css/bootstrap.min.css')}}" rel="stylesheet">
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug --> <!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<link href="{{asset('public/assets/css/ie10-viewport-bug-workaround.css')}}" rel="stylesheet"> <link href="{{asset('/assets/css/ie10-viewport-bug-workaround.css')}}" rel="stylesheet">
<!-- Custom styles for this template --> <!-- Custom styles for this template -->
<link href="{{asset('public/assets/css/style.css')}}" rel="stylesheet"> <link href="{{asset('/assets/css/style.css')}}" rel="stylesheet">
<!-- Just for debugging purposes. Don't actually copy these 2 lines! --> <!-- 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('public/assets/js/ie-emulation-modes-warning.js')}}"></script> <script src="{{asset('/assets/js/ie-emulation-modes-warning.js')}}"></script>
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --> <!-- 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('/public/designer/css/build.css')}}" rel="stylesheet"> <link href="{{asset('/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('public/assets/js/bootstrap.min.js')}}"></script> <script src="{{asset('/assets/js/bootstrap.min.js')}}"></script>
<!-- <script>window.jQuery || document.write('<script src="{{asset('public/assets/js/vendor/jquery.min.js')}}"><\/script>')</script> --> <!-- <script>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('public/assets/js/jquery.validate.js')}}"></script> <script src="{{asset('/assets/js/jquery.validate.js')}}"></script>
<!-- <script type="text/javascript" src="https://cdn.ywxi.net/js/1.js" async></script> --> <!-- <script 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('public/assets/js/jquery.bcSwipe.min.js')}}"></script> <script src="{{asset('/assets/js/jquery.bcSwipe.min.js')}}"></script>
<script src="{{asset('public/assets/js/jquery.zoom.js')}}"></script> <script src="{{asset('/assets/js/jquery.zoom.js')}}"></script>
<script> <script>

View File

@@ -2,7 +2,7 @@
<table class="table" id="tableRow" style="font-size:12px;"> <table class="table" id="tableRow" style="font-size:12px;">
<thead> <thead>
<tr> <tr>
<th class="col-md-4">Name</th> <th class="col-md-4">Name on Jersey</th>
<th class="col-md-2">Number</th> <th class="col-md-2">Number</th>
<th class="col-md-3">Jersey Size</th> <th class="col-md-3">Jersey Size</th>
<th class="col-md-3">Shorts Size</th> <th class="col-md-3">Shorts Size</th>
@@ -12,7 +12,7 @@
<tbody id="orderTableBody"> <tbody id="orderTableBody">
<tr class="table-tr-0"> <tr class="table-tr-0">
<td> <td>
<input type="text" name="order_names[]" class="form-control input-sm inputName roster-input" placeholder="Name"> <input type="text" name="order_names[]" class="form-control input-sm inputName roster-input" placeholder="Name on Jersey">
</td> </td>
<td> <td>
<select class="form-control input-sm roster-input" name="order_number[]"> <select class="form-control input-sm roster-input" name="order_number[]">
@@ -27,7 +27,7 @@
<select class="form-control input-sm order-size roster-input" name="order_jersey_size[]" data-row-number="1"> <select class="form-control input-sm order-size roster-input" name="order_jersey_size[]" data-row-number="1">
<option value="none">none</option> <option value="none">none</option>
@foreach($sizes_array as $size) @foreach($sizes_array as $size)
<option value="{{ $size->Size }}">{{ $size->Size }}</option> <option value="{{ $size->Size }}">{{ $size->SizeDisplay }}</option>
@endforeach @endforeach
</select> </select>
</td> </td>
@@ -35,7 +35,7 @@
<select class="form-control input-sm order-size roster-input" name="order_shorts_size[]" style="border-right: 1px solid #ccc;" data-row-number="1"> <select class="form-control input-sm order-size roster-input" name="order_shorts_size[]" style="border-right: 1px solid #ccc;" data-row-number="1">
<option value="none">none</option> <option value="none">none</option>
@foreach($sizes_array as $size) @foreach($sizes_array as $size)
<option value="{{ $size->Size }}">{{ $size->Size }}</option> <option value="{{ $size->Size }}">{{ $size->SizeDisplay }}</option>
@endforeach @endforeach
</select> </select>
</td> </td>

View File

@@ -0,0 +1,47 @@
<div class="panel-design-details" id="orderListPanel">
<table class="table" id="tableRow" style="font-size:12px;">
<thead>
<tr>
<th class="col-md-4">Jersey Size</th>
<th class="col-md-4">Shorts Size</th>
<th class="col-md-4">Quantity</th>
<th class="text-center"></th>
</tr>
</thead>
<tbody id="orderTableBody">
<tr class="table-tr-0">
<td>
<select class="form-control input-sm order-size roster-input" name="order_jersey_size[]" data-row-number="1">
<!-- <option value="none">none</option> !-->
@foreach($sizes_array as $size)
<option value="{{ $size->Size }}">{{ $size->SizeDisplay }}</option>
@endforeach
</select>
</td>
<td>
<select class="form-control input-sm order-size roster-input" name="order_shorts_size[]" data-row-number="1">
<!-- <option value="none">none</option> !-->
@foreach($sizes_array as $size)
<option value="{{ $size->Size }}">{{ $size->SizeDisplay }}</option>
@endforeach
</select>
</td>
<td>
<select class="form-control input-sm roster-input" name="quantity[]">
@for($i = 1; $i <= 50; $i++)
<option value="{{ $i }}">{{ $i }}</option>
@endfor
</select>
</td>
<td id="action-column" class="text-center" style="padding: 4px !important; border-top: none">
<span class="tr-remove-btn">
<button type="button" id="addNewRow" class="btn btn-success btn-sm btn-roster-action" data-toggle="tooltip" title="Add Another"><i class="fa fa-plus" aria-hidden="true"></i></button>
</span>
</td>
</tr>
</tbody>
</table>
<div id="addnew-btn-tbl-row">
</div>
</div>

View File

@@ -20,7 +20,7 @@
<td> <td>
<select class="form-control input-sm order-size roster-input" name="order_size[]" style="border-right: 1px solid #ccc;" > <select class="form-control input-sm order-size roster-input" name="order_size[]" style="border-right: 1px solid #ccc;" >
@foreach($sizes_array as $size) @foreach($sizes_array as $size)
<option value="{{ $size->Size }}">{{ $size->Size }}</option> <option value="{{ $size->Size }}">{{ $size->SizeDisplay }}</option>
@endforeach @endforeach
</select> </select>
</td> </td>

View File

@@ -27,7 +27,7 @@
<td> <td>
<select class="form-control input-sm order-size roster-input" name="order_size[]" style="border-right: 1px solid #ccc;" data-row-number="1"> <select class="form-control input-sm order-size roster-input" name="order_size[]" style="border-right: 1px solid #ccc;" data-row-number="1">
@foreach($sizes_array as $size) @foreach($sizes_array as $size)
<option value="{{ $size->Size }}">{{ $size->Size }}</option> <option value="{{ $size->Size }}">{{ $size->SizeDisplay }}</option>
@endforeach @endforeach
</select> </select>
</td> </td>

View File

@@ -16,7 +16,7 @@
<td> <td>
<select class="form-control input-sm order-size roster-input" style="border-right: 1px solid #ccc;" name="order_size[]" data-row-number="1"> <select class="form-control input-sm order-size roster-input" style="border-right: 1px solid #ccc;" name="order_size[]" data-row-number="1">
@foreach($sizes_array as $size) @foreach($sizes_array as $size)
<option value="{{ $size->Size }}">{{ $size->Size }}</option> <option value="{{ $size->Size }}">{{ $size->SizeDisplay }}</option>
@endforeach @endforeach
</select> </select>
</td> </td>

View File

@@ -0,0 +1,48 @@
<div class="panel-design-details" id="orderListPanel">
<table class="table" id="tableRow" style="font-size:12px;">
<thead>
<tr>
<th class="col-md-3">Number</th>
<th class="col-md-4">Jersey Size</th>
<th class="col-md-4">Shorts Size</th>
<th class="text-center"></th>
</tr>
</thead>
<tbody id="orderTableBody">
<tr class="table-tr-0">
<td>
<select class="form-control input-sm roster-input" name="order_number[]">
<option value="none">none</option>
@for($i = 0; $i <= 99; $i++)
<option value="{{ $i }}">{{ $i }}</option>
@endfor
<option value="00">00</option>
</select>
</td>
<td>
<select class="form-control input-sm order-size roster-input" name="order_jersey_size[]" data-row-number="1">
<option value="none">none</option>
@foreach($sizes_array as $size)
<option value="{{ $size->Size }}">{{ $size->SizeDisplay }}</option>
@endforeach
</select>
</td>
<td>
<select class="form-control input-sm order-size roster-input" name="order_shorts_size[]" style="border-right: 1px solid #ccc;" data-row-number="1">
<option value="none">none</option>
@foreach($sizes_array as $size)
<option value="{{ $size->Size }}">{{ $size->SizeDisplay }}</option>
@endforeach
</select>
</td>
<td id="action-column" class="text-center" style="padding: 4px !important; border-top: none">
<span class="tr-remove-btn">
<button type="button" id="addNewRow" class="btn btn-success btn-sm btn-roster-action" data-toggle="tooltip" title="Add Another"><i class="fa fa-plus" aria-hidden="true"></i></button>
</span>
</td>
</tr>
</tbody>
</table>
<div id="addnew-btn-tbl-row">
</div>
</div>

View File

@@ -6,7 +6,7 @@
<select class="form-control input-sm cls-uniformSize" name="uniformSize" data-error="#err-uniformSize" required > <select class="form-control input-sm cls-uniformSize" name="uniformSize" data-error="#err-uniformSize" required >
<option value="">Select Size</option> <option value="">Select Size</option>
@foreach($sizes_array as $size) @foreach($sizes_array as $size)
<option value="{{ $size->Size }}">{{ $size->Size }}</option> <option value="{{ $size->Size }}">{{ $size->SizeDisplay }}</option>
@endforeach @endforeach
</select> </select>
<span id="err-uniformSize" style="color: #dd4b39"></span> <span id="err-uniformSize" style="color: #dd4b39"></span>

View File

@@ -1,5 +1,11 @@
@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%;
@@ -80,9 +86,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("{{ config('site_config.uploads') . 'teamstore/store-banner-dark.png' }}"); background-image: url("{{ minio_url('uploads/images/teamstore/store-banner-dark.png') }}");
@else @else
background-image: url("{{ config('site_config.uploads') . 'teamstore/' . $store_array[0]->ImageFolder . '/' . $store_array[0]->StoreBanner }}"); background-image: url("{{ minio_url('uploads/images/teamstore/' . $store_array[0]->ImageFolder . '/' . $store_array[0]->StoreBanner) }}");
@endif @endif
background-color: #f3f3f3; background-color: #f3f3f3;
background-position: center; background-position: center;
@@ -145,6 +151,46 @@
</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)
@@ -159,7 +205,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.prod_private_server_ip') }}/images/{{ $filename }}" alt="{{ $product->ProductName }}" > <img style="height: 201.84px;" src="{{ config('site_config.images_url') }}/{{ $filename }}" alt="{{ $product->ProductName }}" >
</a> </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">

View File

@@ -15,7 +15,6 @@
<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() }}">

View File

@@ -1,5 +1,10 @@
@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{
@@ -229,13 +234,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.prod_private_server_ip') }}/images/{{ $thumbnail->Image }}"> <img style="height:400px;" src="{{ config('site_config.images_url') }}/{{ $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.prod_private_server_ip') }}/images/{{ $thumbnail->Image }}"> <img style="height:400px;" src="{{ config('site_config.images_url') }}/{{ $thumbnail->Image }}">
</span> </span>
</div> </div>
@endif @endif
@@ -264,7 +269,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.prod_private_server_ip') }}/images/{{ $thumbnail->Image }}"/> <img class="img img-responsive product-center image-thumbnails" style="height: 59.45px;" src="{{ config('site_config.images_url') }}/{{ $thumbnail->Image }}"/>
</a> </a>
</li> </li>
@define $j++ @define $j++
@@ -299,7 +304,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">Desciption</a></li> <li role="presentation" class="active"><a href="#productDescription" aria-controls="productDescription" role="tab" data-toggle="tab">Description</a></li>
</ul> </ul>
<!-- Tab panes --> <!-- Tab panes -->
<div class="tab-content"> <div class="tab-content">

View File

@@ -59,7 +59,7 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-7 control-label hidden-xs">&nbsp;</label> <label class="col-sm-7 control-label hidden-xs">&nbsp;</label>
<div class="col-sm-5"> <div class="col-sm-5">
<label>Sory by:</label> <label>Sort 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 &rarr; Z</option> <option @if($filter == "al-asc") selected @endif value="al-asc">Store Name A &rarr; Z</option>
<option @if($filter == "al-desc") selected @endif value="al-desc">Store Name Z &rarr; A</option> <option @if($filter == "al-desc") selected @endif value="al-desc">Store Name Z &rarr; 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-url="{{ $store->StoreUrl }}"> <a class="thumbnail password-protected" href="#" data-store-id="{{ $store->Id }}" data-store-url="{{ $store->StoreUrl }}">
<img class="store-logo" src="{{ config('site_config.uploads') . 'teamstore/'. $store->ImageFolder . '/' . $store->StoreLogo }}"> <img class="store-logo" src="{{ minio_url('uploads/images/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="{{ config('site_config.uploads') . 'teamstore/' . $store->ImageFolder . '/' . $store->StoreLogo }}"> <img class="store-logo" src="{{ minio_url('uploads/images/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,11 +124,12 @@
<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>

View File

@@ -100,6 +100,8 @@
<option value="name-number-size-form">Name, Number and Size Form</option> <option value="name-number-size-form">Name, Number and Size Form</option>
<option value="number-form">Number Only Form</option> <option value="number-form">Number Only Form</option>
<option value="name-size-form">Name and Size Form</option> <option value="name-size-form">Name and Size Form</option>
<option value="jersey-and-shorts-quantity-form">Jersey, Shorts and Quantity Form</option>
<option value="number-jersey-shorts-form">Number, Jersey and Shorts Form</option>
</select> </select>
</div> </div>
<div class="form-group"> <div class="form-group">
@@ -117,7 +119,10 @@
<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="none">None</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>

View File

@@ -34,15 +34,13 @@
<tr> <tr>
<th>Full name</th> <th>Full name</th>
<th>Address</th> <th>Address</th>
<th>Postcode</th>
<th>Phone Number</th> <th>Phone Number</th>
<th class="text-center">Action</th> <th class="text-center">Action</th>
</tr> </tr>
@foreach($array_address_book as $row) @foreach($array_address_book as $row)
<tr> <tr>
<td>{{ $row->Fullname }}</td> <td>{{ $row->Fullname }}</td>
<td>{{ $row->Address }}</td> <td>{{ $row->Address . ' ' . $row->Address2 }}, {{ $row->State }}, {{ $row->City }}, {{ $row->Country}} {{ $row->CountryCode}}, {{ $row->ZipCode }}</td>
<td>{{ $row->State }}, {{ $row->City }}, {{ $row->ZipCode }}</td>
<td>{{ $row->ContactNumber }}</td> <td>{{ $row->ContactNumber }}</td>
<td class="text-center"> <td class="text-center">
<a href="{{ url('user/address-book/edit/') }}/{{ $row->Id }}" class="btn btn-default btn-xs"><i class="fa fa-edit"></i> Edit</a> <a href="{{ url('user/address-book/edit/') }}/{{ $row->Id }}" class="btn btn-default btn-xs"><i class="fa fa-edit"></i> Edit</a>

View File

@@ -0,0 +1,51 @@
@extends('user-layouts.user_template')
@section('content')
<div class="content-wrapper" style="min-height: 916px;">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
Announcement
<!-- <small>Control panel</small> -->
</h1>
<ol class="breadcrumb">
<li><a href="{{ url ('user') }}"><i class="fa fa-home"></i> Home</a></li>
<li class="active">Announcement</li>
</ol>
</section>
<!-- Main content -->
<section class="content">
<div class="row">
<div class="col-md-12">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">Announcement</h3>
<div class="pull-right">
<input type="checkbox" id="isActiveAnnouncement" @if($data->IsActive) checked @endif data-id={{ $data->Id }} name="isActiveAnnouncement" data-toggle="toggle" data-width="100px" data-on="<i class='fa fa-check-circle'></i> Active" data-off="<i class='fa fa-ban'></i> Inactive" data-size="small">
</div>
</div>
<form role="form" id="form_announcement">
<div class="box-body">
<div class="row">
<div class="col-md-12">
<div class="form-group">
<label>Current Announcement</label>
<textarea class="form-control" rows="5" name="announcementInput" placeholder="Announcement">{{ $data->Announcement }}</textarea>
</div>
</div>
</div>
</div>
<div class="box-footer">
<button type="submit" class="btn btn-primary btn-custom-save">Save Changes</button>
</div>
</form>
{{-- {!! nl2br(e($data->Announcement)) !!} --}}
<div>
</div>
</div>
</section>
<!-- /.content -->
</div>
@endsection

View File

@@ -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.prod_private_server_ip') }}/images/{{ $row->DesignCode }}-front-thumbnail.png" alt="{{ $row->DesignName }}" id="main-thumbnail" class="img img-responsive"> <img src="{{ config('site_config.images_url') }}/{{ $row->DesignCode }}-front-thumbnail.png" alt="{{ $row->DesignName }}" id="main-thumbnail" class="img img-responsive">
@endif @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.prod_private_server_ip') }}/images/{{ $row->DesignCode }}-front-thumbnail.png"/> <img class="img img-responsive product-center image-thumbnails" style="height: 59.45px;" src="{{ config('site_config.images_url') }}/{{ $row->DesignCode }}-front-thumbnail.png"/>
</a> </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.prod_private_server_ip') }}/images/{{ $row->DesignCode }}-{{ strtolower($row1->Side) }}-thumbnail.png"/> <img class="img img-responsive product-center image-thumbnails" style="height: 59.45px;" src="{{ config('site_config.images_url') }}/{{ $row->DesignCode }}-{{ strtolower($row1->Side) }}-thumbnail.png"/>
</a> </a>
<!-- <p>&nbsp;</p> <!-- <p>&nbsp;</p>
<div class="text-center"> <div class="text-center">

View File

@@ -1,81 +1,93 @@
@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="col-md-6"> <div class="form-group">
<div class="form-group"> <label>Mobile Number</label>
<label>House Number, Building and Street Name</label> <input type="text" class="form-control" name="mobilenumber" placeholder="Please enter your mobile number">
<input type="text" class="form-control" name="address" placeholder="Please enter your House Number, Building and Street Name"> </div>
</div> <div class="form-group">
<div class="form-group"> <label>Other Notes</label>
<label>State</label> <input type="text" class="form-control" name="othernotes" placeholder="Please enter your notes">
<select class="form-control" name="state" id="lst-states" > </div>
<option value="">Select State</option> <!-- /.box-body -->
</select> </div>
</div> <div class="col-md-6">
<div class="form-group"> <div class="form-group">
<label>City</label> <label>Country</label>
<select class="form-control" name="city" id="lst-cities"> <select class="form-control" name="countryCode" id="select_country" onchange="selectCountry(this)">
<option value="">Select City</option> <option value="">Select Country</option>
</select> <option value="US">United States</option>
</div> <option value="CA">Canada</option>
<div class="form-group"> </select>
<label>Zip Code</label> </div>
<input type="text" class="form-control" name="zipcode" placeholder="Please enter your zip code"> <div class="form-group">
</div> <label>State / Province</label>
<select class="form-control" name="state" id="lst-states">
<option value="">Select State</option>
</select>
</div>
<div class="form-group">
<label>City</label>
<select class="form-control" name="city" id="lst-cities">
<option value="">Select City</option>
</select>
</div>
<div class="form-group">
<label>Address 1</label>
<textarea type="text" class="form-control" name="address" placeholder="Address 1"></textarea>
</div>
<div class="form-group">
<label>Address 2</label>
<textarea type="text" class="form-control" name="address2" placeholder="Address 2"></textarea>
</div>
<div class="form-group">
<label>Zip Code</label>
<input type="text" class="form-control" name="zipcode" placeholder="Please enter your zip code">
</div> </div>
</div> </div>
</div> </div>
<div class="box-footer"> </div>
<button type="submit" class="btn btn-primary btn-custom-save">Save</button> <div class="box-footer">
</div> <button type="submit" class="btn btn-primary btn-custom-save">Save</button>
</form> </div>
</form>
<div> <div>
</div>
</div> </div>
</div> </section>
</section>
<!-- /.content --> <!-- /.content -->
</div> </div>
@endsection @endsection

View File

@@ -46,8 +46,12 @@
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<div class="form-group"> <div class="form-group">
<label>House Number, Building and Street Name</label> <label>Country</label>
<input type="text" class="form-control" name="address" placeholder="Please enter your House Number, Building and Street Name" value="{{ $array_address_book[0]->Address }}"> <select class="form-control" name="countryCode" id="select_country" onchange="selectCountry(this)" data-selected="{{ $array_address_book[0]->CountryCode }}">
<option value="">Select Country</option>
<option value="US">United States</option>
<option value="CA">Canada</option>
</select>
</div> </div>
<div class="form-group"> <div class="form-group">
<label>State</label> <label>State</label>
@@ -61,6 +65,15 @@
<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 }}">

View File

@@ -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="{{ config('site_config.uploads') . 'user/default-user.png' }}" class="user-image" alt="User Image"> <img src="{{ minio_url('uploads/images/user/default-user.png') }}" class="user-image" alt="User Image">
<span class="hidden-xs">{{ Auth::user()->username }}</span> <span class="hidden-xs">{{ Auth::user()->username }}</span>
</a> </a>
</li> </li>

View File

@@ -17,15 +17,81 @@
<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>
<div class="text-center" id="homepage-logo"> @endif
@if ($data['isStoreOwner'])
<div class="row">
<div class="col-lg-3 col-xs-6">
<!-- small box -->
<div class="small-box bg-aqua">
<div class="inner">
<h3>{{ $data['store_order'] or 0 }}</h3>
<p>Total Item Ordered</p>
</div>
<div class="icon">
<i class="ion ion-bag"></i>
</div>
<a href="./user/store-orders" class="small-box-footer">More info <i class="fa fa-arrow-circle-right"></i></a>
</div>
</div>
<!-- ./col -->
<div class="col-lg-3 col-xs-6">
<!-- small box -->
<div class="small-box bg-green">
<div class="inner">
<h3>{{ number_format($data['store_income'], 2) }}</h3>
<p>Store Income</p>
</div>
<div class="icon">
<i class="ion ion-cash"></i>
</div>
<a href="#" class="small-box-footer">More info <i class="fa fa-arrow-circle-right"></i></a>
</div>
</div>
<!-- ./col -->
<div class="col-lg-3 col-xs-6">
<!-- small box -->
<div class="small-box bg-yellow">
<div class="inner">
<h3>{{ $data['store_product_count'] or 0 }}</h3>
<p>Total Products</p>
</div>
<div class="icon">
<i class="ion ion-ios-pricetags"></i>
</div>
<a href="#" class="small-box-footer">More info <i class="fa fa-arrow-circle-right"></i></a>
</div>
</div>
<!-- ./col -->
<div class="col-lg-3 col-xs-6">
<!-- small box -->
<div class="small-box bg-red">
<div class="inner">
<h3>{{ $data['store_published_product'] or 0 }}</h3>
<p>Total Published Product</p>
</div>
<div class="icon">
<i class="ion ion-ios-pricetags-outline"></i>
</div>
<a href="#" class="small-box-footer">More info <i class="fa fa-arrow-circle-right"></i></a>
</div>
</div>
<!-- ./col -->
</div>
@else
<div class="text-center" id="homepage-logo">
<img src="{{asset('/images/logo.png')}}" style="height: 200px;" class="img img-responsive" />
</div>
@endif @endif
<img src="{{asset('/public/images/logo.png')}}" style="height: 200px;" class="img img-responsive" />
</div>
</section> </section>
<!-- /.content --> <!-- /.content -->
</div> </div>

View File

@@ -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.prod_private_server_ip') }}/images/{{ $row->DesignCode }}-front-thumbnail.png" alt="{{ $row->DesignName }}" > <img src="{{ config('site_config.images_url') }}/{{ $row->DesignCode }}-front-thumbnail.png" alt="{{ $row->DesignName }}" >
<h4 class="design-name-holder">{{ $row->DesignName }}</h4> <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">

View File

@@ -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.prod_private_server_ip') . '/images/' . $array_thumbnail_display[0]->Image }}"> <img class="previewImage" id="active_thumbnail" src="{{ config('site_config.images_url') . '/images/' . $array_thumbnail_display[0]->Image }}">
</div> </div>
</div> </div>
<div class="col-md-10"> <div class="col-md-10">
@@ -84,6 +84,36 @@
<th>Price</th> <th>Price</th>
<th>Quantity</th> <th>Quantity</th>
</tr> </tr>
@elseif($array_item[0]->FormUsed=="name-name2-size-form")
<tr>
<th>Gamer Tag</th>
<th>Name</th>
<th>Size</th>
<th>Price</th>
<th>Quantity</th>
</tr>
@elseif($array_item[0]->FormUsed=="name-size-form")
<tr>
<th>Name</th>
<th>Size</th>
<th>Price</th>
<th>Quantity</th>
</tr>
@elseif($array_item[0]->FormUsed=="jersey-and-shorts-quantity-form")
<tr>
<th>Jersey Size</th>
<th>Shorts Size</th>
<th>Price</th>
<th>Quantity</th>
</tr>
@elseif($array_item[0]->FormUsed=="number-jersey-shorts-form")
<tr>
<th>Number</th>
<th>Jersey Size</th>
<th>Shorts Size</th>
<th>Price</th>
<th>Quantity</th>
</tr>
@else @else
@endif @endif
@@ -134,6 +164,37 @@
<td>{{ $array_item[0]->Price }}</td> <td>{{ $array_item[0]->Price }}</td>
<td>{{ $array_item[0]->Quantity }}</td> <td>{{ $array_item[0]->Quantity }}</td>
</tr> </tr>
@elseif($array_item[0]->FormUsed=="name-name2-size-form")
<tr>
<td>{{ $array_item[0]->Name }}</td>
<td>{{ $array_item[0]->Name2 }}</td>
<td>{{ $array_item[0]->Size }}</td>
<td>{{ $array_item[0]->Price . ' ' . $store_array[0]->StoreCurrency }}</td>
<td>{{ $array_item[0]->Quantity }}</td>
</tr>
@elseif($array_item[0]->FormUsed=="name-size-form")
<tr>
<td>{{ $array_item[0]->Name }}</td>
<td>{{ $array_item[0]->Size }}</td>
<td>{{ $array_item[0]->Price . ' ' . $store_array[0]->StoreCurrency }}</td>
<td>{{ $array_item[0]->Quantity }}</td>
</tr>
@elseif($array_item[0]->FormUsed=="jersey-and-shorts-quantity-form")
<tr>
<td>{{ $array_item[0]->JerseySize}}</td>
<td>{{ $array_item[0]->ShortsSize}}</td>
<td>{{ $array_item[0]->Price . ' ' . $store_array[0]->StoreCurrency }}</td>
<td>{{ $array_item[0]->Quantity }}</td>
</tr>
@elseif($array_item[0]->FormUsed=="number-jersey-shorts-form")
<tr>
<td>{{ $array_item[0]->Number }}</td>
<td>{{ $array_item[0]->JerseySize }}</td>
<td>{{ $array_item[0]->ShortsSize }}</td>
<td>{{ $array_item[0]->Price . ' ' . $store_array[0]->StoreCurrency }}</td>
<td>{{ $array_item[0]->Quantity }}</td>
</tr>
@else @else
@endif @endif

View File

@@ -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.prod_private_server_ip') }}/images/{{ $img->Image }}"> <img class="previewImage" src="{{ config('site_config.images_url') }}/{{ $img->Image }}">
@endif @endif
@endforeach @endforeach
</div> </div>

View File

@@ -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.prod_private_server_ip') }}/images/{{ $row->DesignCode }}-front-thumbnail.png" alt="{{ $row->DesignName }}" id="main-thumbnail" class="img img-responsive"> <img src="{{ config('site_config.images_url') }}/{{ $row->DesignCode }}-front-thumbnail.png" alt="{{ $row->DesignName }}" id="main-thumbnail" class="img img-responsive">
@endif @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.prod_private_server_ip') }}/images/{{ $row->DesignCode }}-front-thumbnail.png"/> <img class="img img-responsive product-center image-thumbnails" style="height: 59.45px;" src="{{ config('site_config.images_url') }}/{{ $row->DesignCode }}-front-thumbnail.png"/>
</a> </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.prod_private_server_ip') }}/images/{{ $row->DesignCode }}-{{ strtolower($row1->Side) }}-thumbnail.png"/> <img class="img img-responsive product-center image-thumbnails" style="height: 59.45px;" src="{{ config('site_config.images_url') }}/{{ $row->DesignCode }}-{{ strtolower($row1->Side) }}-thumbnail.png"/>
</a> </a>
<!-- <p>&nbsp;</p> <!-- <p>&nbsp;</p>
<div class="text-center"> <div class="text-center">
@@ -144,6 +144,10 @@
<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>

View File

@@ -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="{{ config('site_config.uploads') . 'user/default-user.png' }}" class="img-circle" alt="User Image"> <img src="{{ minio_url('uploads/images/user/default-user.png') }}" class="img-circle" alt="User Image">
</div> </div>
<div class="pull-left info"> <div class="pull-left info">
<p>{{ Auth::user()->name }}</p> <p>{{ Auth::user()->name }}</p>
@@ -49,6 +49,11 @@
</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>

View File

@@ -51,6 +51,7 @@
<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>
@@ -77,7 +78,8 @@
<tbody> <tbody>
@foreach($array_store_orders as $item_order) @foreach($array_store_orders as $item_order)
<tr> <tr>
<td>{{ $item_order->InvoiceNumber . ' - ' . $item_order->Order_Id }}</td> <td>{{ $item_order->StepLabel }}</td>
<td>{{ $item_order->InvoiceNumber }}</td>
<td>{{ $item_order->ProductName }}</td> <td>{{ $item_order->ProductName }}</td>
<td>{{ $item_order->Name }}</td> <td>{{ $item_order->Name }}</td>
<td>{{ $item_order->Number }}</td> <td>{{ $item_order->Number }}</td>

View File

@@ -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.prod_private_server_ip') }}/images/{{ $filename . '?t=' . time() }}" alt="{{ $product->ProductName }}" > <img style="height:200px" src="{{ config('site_config.images_url') }}/{{ $filename . '?t=' . time() }}" alt="{{ $product->ProductName }}" >
</a> </a>
<hr class="line"> <hr class="line">
<div class="pull-right"> <div class="pull-right">

View File

@@ -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.prod_private_server_ip') }}/images/{{ $filename . '?t=' . time() }}" alt="{{ $product->ProductName }}" > <img style="height:200px" src="{{ config('site_config.images_url') }}/{{ $filename . '?t=' . time() }}" alt="{{ $product->ProductName }}" >
</a> </a>
<hr class="line"> <hr class="line">
<div class="pull-right"> <div class="pull-right">

View File

@@ -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="{{ config('site_config.uploads') . 'teamstore/' . $store_array[0]->ImageFolder . '/' . $store_array[0]->StoreLogo }}?v={{ time() }}" class="img_store_logo_href" data-toggle="lightbox"> <a href="{{ minio_url('uploads/images/teamstore/' . $store_array[0]->ImageFolder . '/' . $store_array[0]->StoreLogo) }}?v={{ time() }}" class="img_store_logo_href" data-toggle="lightbox">
<img class="img_store_logo_img" id="img_store_logo" src="{{ config('site_config.uploads') . '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="{{ minio_url('uploads/images/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="{{ config('site_config.uploads') . 'teamstore/' . $store_array[0]->ImageFolder . '/' . $store_array[0]->StoreBanner }}?v={{ time() }}" class="img_store_banner_href" data-toggle="lightbox"> <a href="{{ minio_url('uploads/images/teamstore/' . $store_array[0]->ImageFolder . '/' . $store_array[0]->StoreBanner) }}?v={{ time() }}" class="img_store_banner_href" data-toggle="lightbox">
<img class="img_store_banner_img" id="img_store_banner" src="{{ config('site_config.uploads') . '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="{{ minio_url('uploads/images/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

View File

@@ -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.prod_private_server_ip') }}/images/{{ $row->DesignCode }}-front-thumbnail.png" alt="{{ $row->DesignName }}" id="main-thumbnail" class="img img-responsive"> <img src="{{ config('site_config.images_url') }}/{{ $row->DesignCode }}-front-thumbnail.png" alt="{{ $row->DesignName }}" id="main-thumbnail" class="img img-responsive">
@endif @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.prod_private_server_ip') }}/images/{{ $row->DesignCode }}-front-thumbnail.png"/> <img class="img img-responsive product-center image-thumbnails" style="height: 59.45px;" src="{{ config('site_config.images_url') }}/{{ $row->DesignCode }}-front-thumbnail.png"/>
</a> </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.prod_private_server_ip') }}/images/{{ $row->DesignCode }}-{{ strtolower($row1->Side) }}-thumbnail.png"/> <img class="img img-responsive product-center image-thumbnails" style="height: 59.45px;" src="{{ config('site_config.images_url') }}/{{ $row->DesignCode }}-{{ strtolower($row1->Side) }}-thumbnail.png"/>
</a> </a>
</li> </li>
@endif @endif

View File

@@ -20,7 +20,6 @@
<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">
@@ -37,7 +36,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.prod_private_server_ip') }}/images/{{ $thumbnail->Image . '?t=' . time() }}" id="main-thumbnail"> <img style="height:400px" src="{{ config('site_config.images_url') }}/{{ $thumbnail->Image . '?t=' . time() }}" id="main-thumbnail">
@endif @endif
@endforeach @endforeach
</div> </div>
@@ -48,7 +47,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">&times;</span> --> <!-- <span class="close">&times;</span> -->
<img class="img img-responsive product-center " style="height: 65.45px;" src="{{ asset('/public/images/add-new-img.svg') }}"/> <img class="img img-responsive product-center " style="height: 65.45px;" src="{{ asset('/images/add-new-img.svg') }}"/>
<!-- <p class="center">Add Image</p> --> <!-- <p class="center">Add Image</p> -->
<p class="text-center"> <p class="text-center">
Add Image Add Image
@@ -59,7 +58,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">&times;</span> --> <!-- <span class="close">&times;</span> -->
<img class="img img-responsive product-center image-thumbnails" style="height: 59.45px;" src="{{ config('site_config.prod_private_server_ip') }}/images/{{ $thumbnail->Image . '?t=' . time() }}"/> <img class="img img-responsive product-center image-thumbnails" style="height: 59.45px;" src="{{ config('site_config.images_url') }}/{{ $thumbnail->Image . '?t=' . time() }}"/>
</a> </a>
<div class="funkyradio"> <div class="funkyradio">
<div class="funkyradio-primary"> <div class="funkyradio-primary">
@@ -128,6 +127,8 @@
<option value="name-number-size-form" @if($product_array[0]->ProductForm == "name-number-size-form") selected @endif>Name, Number and Size Form</option> <option value="name-number-size-form" @if($product_array[0]->ProductForm == "name-number-size-form") selected @endif>Name, Number and Size Form</option>
<option value="number-form" @if($product_array[0]->ProductForm == "number-form") selected @endif>Number Only Form</option> <option value="number-form" @if($product_array[0]->ProductForm == "number-form") selected @endif>Number Only Form</option>
<option value="name-size-form" @if($product_array[0]->ProductForm == "name-size-form") selected @endif>Name and Size Form</option> <option value="name-size-form" @if($product_array[0]->ProductForm == "name-size-form") selected @endif>Name and Size Form</option>
<option value="jersey-and-shorts-quantity-form" @if($product_array[0]->ProductForm == "jersey-and-shorts-quantity-form") selected @endif>Jersey, Shorts and Quantity Form</option>
<option value="number-jersey-shorts-form" @if($product_array[0]->ProductForm == "number-jersey-shorts-form") selected @endif>Number, Jersey and Shorts Form</option>
</select> </select>
</div> </div>
<div class="form-group"> <div class="form-group">
@@ -136,6 +137,9 @@
<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>
@@ -144,9 +148,20 @@
<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>
@@ -185,7 +200,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.prod_private_server_ip') }}/images/{{ $thumbnail->Image . '?t=' . time() }}"/></td> <td><img class="img img-responsive product-center" style="height: 59.45px;" src="{{ config('site_config.images_url') }}/{{ $thumbnail->Image . '?t=' . time() }}"/></td>
<td class="text-center"> <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 Normal file → Executable file
View File

0
storage/app/.gitignore vendored Normal file → Executable file
View File

0
storage/framework/.gitignore vendored Normal file → Executable file
View File

Some files were not shown because too many files have changed in this diff Show More