final checkout and card

This commit is contained in:
Kevin Adametz 2019-02-21 21:38:36 +01:00
parent 4bd21bd986
commit 1953c97cd0
33 changed files with 2131 additions and 1084 deletions

10
.env
View file

@ -1,11 +1,12 @@
APP_NAME="mivita.care"
APP_NAME=mivita.care
APP_ENV=local
APP_DEBUG=true
APP_KEY=base64:HrWQ9AV3Zt2TU0iq1OeUUpTUaXwNUdh8xHmx7RXTif4=
APP_URL=http://mivita.local/
APP_URL=https://mivita.local/
APP_DOMAIN=mivita.local
APP_PROTOCOL=http://
APP_PROTOCOL=https://
APP_URL_MAIN=
APP_URL_CHECKOUT=checkout.
#APP_URL_MAIN=dev.
APP_URL_CRM=mein.
@ -22,6 +23,9 @@ DB_PASSWORD=KT32vQ7
#DB_USERNAME=d02c1ed2
#DB_PASSWORD=H7mdYuVTV6pNHDVu
PAYONE_URL = checkout.mivita.care
PAYONE_TS = checkout.mivita.care/transaction/status
PAYONE_KEY = Zjop5cvP2UeB7Qhy
BROADCAST_DRIVER=log
CACHE_DRIVER=file

896
.idea/workspace.xml generated

File diff suppressed because it is too large Load diff

View file

@ -5,7 +5,7 @@ namespace PHPSTORM_META {
/**
* PhpStorm Meta file, to provide autocomplete information for PhpStorm
* Generated on 2019-01-03 18:54:53.
* Generated on 2019-02-21 17:50:01.
*
* @author Barry vd. Heuvel <barryvdh@gmail.com>
* @see https://github.com/barryvdh/laravel-ide-helper

View file

@ -3,7 +3,7 @@
/**
* A helper file for Laravel 5, to provide autocomplete information to your IDE
* Generated for Laravel 5.6.39 on 2019-01-03 18:54:52.
* Generated for Laravel 5.6.39 on 2019-02-21 17:50:01.
*
* This file should not be included in your code, only analyzed by your IDE!
*
@ -17425,12 +17425,61 @@ namespace App\Services\Facade {
/**
*
*
* @param $shipping
* @static
*/
public static function setShipping($shipping)
public static function putShippingExtra($key, $value)
{
return \App\Services\Yard::setShipping($shipping);
return \App\Services\Yard::putShippingExtra($key, $value);
}
/**
*
*
* @static
*/
public static function getShippingExtra($key)
{
return \App\Services\Yard::getShippingExtra($key);
}
/**
*
*
* @static
*/
public static function getShippingCountryName()
{
return \App\Services\Yard::getShippingCountryName();
}
/**
*
*
* @static
*/
public static function getShippingCountryId()
{
return \App\Services\Yard::getShippingCountryId();
}
/**
*
*
* @static
*/
public static function getYContent()
{
return \App\Services\Yard::getYContent();
}
/**
*
*
* @static
*/
public static function setShippingCountryWithPrice($shipping_country_id)
{
return \App\Services\Yard::setShippingCountryWithPrice($shipping_country_id);
}
/**
@ -17477,6 +17526,20 @@ namespace App\Services\Facade {
return \App\Services\Yard::totalWithShipping($decimals, $decimalPoint, $thousandSeperator);
}
/**
* Get the total price of the items in the cart.
*
* @param int $decimals
* @param string $decimalPoint
* @param string $thousandSeperator
* @return string
* @static
*/
public static function weight($decimals = null, $decimalPoint = null, $thousandSeperator = null)
{
return \App\Services\Yard::weight($decimals, $decimalPoint, $thousandSeperator);
}
/**
* Get the total price of the items in the cart.
*

View file

@ -70,11 +70,34 @@ namespace App{
* @method static \Illuminate\Database\Eloquent\Builder|\App\User newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\User query()
* @method static \Illuminate\Database\Eloquent\Builder|\App\User whereAccountId($value)
* @property-read \App\Models\UserShop $user_shop
* @property-read \App\Models\UserShop $shop
*/
class User extends \Eloquent {}
}
namespace App\Models{
/**
* App\Models\ShippingCountry
*
* @property int $id
* @property int $shipping_id
* @property int|null $country_id
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read \App\Models\Country|null $country
* @property-read \App\Models\Shipping $shipping
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShippingCountry newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShippingCountry newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShippingCountry query()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShippingCountry whereCountryId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShippingCountry whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShippingCountry whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShippingCountry whereShippingId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShippingCountry whereUpdatedAt($value)
*/
class ShippingCountry extends \Eloquent {}
}
namespace App\Models{
/**
* App\Models\Category
@ -130,6 +153,40 @@ namespace App\Models{
class UserUpdateEmail extends \Eloquent {}
}
namespace App\Models{
/**
* App\Models\ShippingPrice
*
* @property int $id
* @property int $shipping_id
* @property float|null $price
* @property float|null $tax
* @property float|null $factor
* @property float|null $total_from
* @property float|null $total_to
* @property int|null $weight_from
* @property int|null $weight_to
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read \App\Models\Shipping $shipping
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShippingPrice newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShippingPrice newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShippingPrice query()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShippingPrice whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShippingPrice whereFactor($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShippingPrice whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShippingPrice wherePrice($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShippingPrice whereShippingId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShippingPrice whereTax($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShippingPrice whereTotalFrom($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShippingPrice whereTotalTo($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShippingPrice whereUpdatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShippingPrice whereWeightFrom($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShippingPrice whereWeightTo($value)
*/
class ShippingPrice extends \Eloquent {}
}
namespace App\Models{
/**
* App\Models\Product
@ -202,10 +259,39 @@ namespace App\Models{
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Product newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Product newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Product query()
* @property int|null $weight
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Product whereWeight($value)
*/
class Product extends \Eloquent {}
}
namespace App\Models{
/**
* App\Models\Shipping
*
* @property int $id
* @property string $name
* @property array|null $trans_name
* @property float|null $free
* @property int $active
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\ShippingCountry[] $countries
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\ShippingPrice[] $prices
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Shipping newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Shipping newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Shipping query()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Shipping whereActive($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Shipping whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Shipping whereFree($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Shipping whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Shipping whereName($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Shipping whereTransName($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Shipping whereUpdatedAt($value)
*/
class Shipping extends \Eloquent {}
}
namespace App\Models{
/**
* App\Models\Country
@ -422,13 +508,12 @@ namespace App\Models{
* @property string $name
* @property string $slug
* @property int $active
* @property int|null $set_defaults
* @property string|null $active_date
* @property string $title
* @property array|null $trans_title
* @property string|null $copy
* @property array|null $trans_copy
* @property string|null $info
* @property array|null $trans_info
* @property string|null $title
* @property string|null $contact
* @property string|null $accessibility
* @property string|null $about
* @property array|null $featured
* @property string|null $filename
* @property string|null $originalname
@ -438,6 +523,7 @@ namespace App\Models{
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property \Illuminate\Support\Carbon|null $deleted_at
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\UserShopOnSite[] $on_sites
* @property-read \App\User $user
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserShop findSimilarSlugs($attribute, $config, $slug)
* @method static bool|null forceDelete()
@ -446,25 +532,24 @@ namespace App\Models{
* @method static \Illuminate\Database\Query\Builder|\App\Models\UserShop onlyTrashed()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserShop query()
* @method static bool|null restore()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserShop whereAbout($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserShop whereAccessibility($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserShop whereActive($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserShop whereActiveDate($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserShop whereCopy($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserShop whereContact($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserShop whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserShop whereDeletedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserShop whereExt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserShop whereFeatured($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserShop whereFilename($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserShop whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserShop whereInfo($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserShop whereMine($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserShop whereName($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserShop whereOriginalname($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserShop whereSetDefaults($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserShop whereSize($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserShop whereSlug($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserShop whereTitle($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserShop whereTransCopy($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserShop whereTransInfo($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserShop whereTransTitle($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserShop whereUpdatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserShop whereUserId($value)
* @method static \Illuminate\Database\Query\Builder|\App\Models\UserShop withTrashed()
@ -473,6 +558,39 @@ namespace App\Models{
class UserShop extends \Eloquent {}
}
namespace App\Models{
/**
* App\Models\UserShopOnSite
*
* @property int $id
* @property int $user_shop_id
* @property string|null $filename
* @property string|null $original_name
* @property string|null $ext
* @property string|null $mine
* @property int|null $size
* @property string $slug
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read \App\Models\UserShop $product
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserShopOnSite findSimilarSlugs($attribute, $config, $slug)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserShopOnSite newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserShopOnSite newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserShopOnSite query()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserShopOnSite whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserShopOnSite whereExt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserShopOnSite whereFilename($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserShopOnSite whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserShopOnSite whereMine($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserShopOnSite whereOriginalName($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserShopOnSite whereSize($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserShopOnSite whereSlug($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserShopOnSite whereUpdatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserShopOnSite whereUserShopId($value)
*/
class UserShopOnSite extends \Eloquent {}
}
namespace App\Models{
/**
* App\Models\ProductCategory

View file

@ -5,8 +5,9 @@ namespace App\Http\Controllers\Web;
use App\Http\Controllers\Controller;
use App\Models\Product;
use App\Models\ShippingCountry;
use Util;
use App\Models\ShoppingInstance;
use Validator;
use App\Services\Util;
use Yard;
use Input;
@ -33,8 +34,10 @@ class CardController extends Controller
if($product->images->count()){
$image = $product->images->first()->slug;
}
Yard::instance('shopping')->add($product->id, $product->getLang('name'), $quantity, $product->price, ['image' => $image, 'slug' => $product_slug]);
Yard::instance('shopping')->add($product->id, $product->getLang('name'), $quantity, $product->price, ['image' => $image, 'slug' => $product_slug, 'weight' => $product->weight]);
\Session()->flash('show-card-after-add', true);
}
return back();
}
@ -50,7 +53,8 @@ class CardController extends Controller
$image = $product->images->first()->slug;
}
$quantity = Input::get('quantity') ? Input::get('quantity') : 1;
Yard::instance('shopping')->add($product->id, $product->getLang('name'), $quantity, $product->price, ['image' => $image, 'slug' => $product->slug]);
Yard::instance('shopping')->add($product->id, $product->getLang('name'), $quantity, $product->price, ['image' => $image, 'slug' => $product->slug, 'weight' => $product->weight]);
\Session()->flash('show-card-after-add', true);
}
return back();
@ -60,12 +64,11 @@ class CardController extends Controller
public function showCard(){
if(Input::get('selected_country')){
$selected_country = Input::get('selected_country');
Yard::instance('shopping')->setShippingCountryWithPrice(Input::get('selected_country'));
}else{
$ShippingCountry = ShippingCountry::where('country_id', 1)->first();
$selected_country = $ShippingCountry->id;
// $ShippingCountry = ShippingCountry::where('country_id', 1)->first();
// $selected_country = $ShippingCountry->id;
}
Yard::instance('shopping')->setShippingCountry($selected_country);
$data = [
'user_shop' => Util::getUserShop(),
@ -86,28 +89,30 @@ class CardController extends Controller
return back();
}
public function checkoutCard(){#
if(Input::get('selected_country')){
$selected_country = Input::get('selected_country');
}else{
$ShippingCountry = ShippingCountry::where('country_id', 1)->first();
$selected_country = $ShippingCountry->id;
}
Yard::instance('shopping')->setShippingCountry($selected_country);
$data = [
'user_shop' => Util::getUserShop(),
];
return view('web.templates.checkout', $data);
}
public function checkoutFinalCard(){
$data = [
'user_shop' => Util::getUserShop(),
];
return view('web.templates.checkout-final', $data);
}
public function checkoutServer(){
$user_shop = Util::getUserShop();
do {
$identifier = Util::getToken();
} while( ShoppingInstance::where('identifier', $identifier)->count() );
ShoppingInstance::create([
'identifier' => $identifier,
'user_shop_id' => $user_shop->id,
'subdomain' => url('/'),
'country_id' => Yard::instance('shopping')->getShippingCountryId(),
]);
Yard::instance('shopping')->store($identifier);
//add to DB
$path = route('checkout.checkout_card', ['identifier'=>$identifier]);
$path = str_replace('http', 'https', $path);
return redirect()->secure($path);
}
public function removeCard($rowId){

View file

@ -10,7 +10,7 @@ use App\Services\Util;
use Yard;
use Input;
class CardController extends Controller
class CheckoutController extends Controller
{
/**
* Create a new controller instance.
@ -23,72 +23,12 @@ class CardController extends Controller
//Cart::instance('wishlist')->add('sdjk922', 'Product 2', 1, 19.95, ['size' => 'medium']);
public function addToCardGet($id, $quantity = 1, $product_slug = false)
{
public function checkout(){
$product = Product::find($id);
if($product){
$image = "";
if($product->images->count()){
$image = $product->images->first()->slug;
}
Yard::instance('shopping')->add($product->id, $product->getLang('name'), $quantity, $product->price, ['image' => $image, 'slug' => $product_slug, 'weight' => $product->weight]);
\Session()->flash('show-card-after-add', true);
}
return back();
}
public function addToCardPost($id)
{
$product = Product::find($id);
if($product){
$image = "";
if($product->images->count()){
$image = $product->images->first()->slug;
}
$quantity = Input::get('quantity') ? Input::get('quantity') : 1;
Yard::instance('shopping')->add($product->id, $product->getLang('name'), $quantity, $product->price, ['image' => $image, 'slug' => $product->slug, 'weight' => $product->weight]);
\Session()->flash('show-card-after-add', true);
}
return back();
$user_shop = Util::getUserShop();
}
public function showCard(){
if(Input::get('selected_country')){
Yard::instance('shopping')->setShippingCountryWithPrice(Input::get('selected_country'));
}else{
// $ShippingCountry = ShippingCountry::where('country_id', 1)->first();
// $selected_country = $ShippingCountry->id;
}
$data = [
'user_shop' => Util::getUserShop(),
];
return view('web.templates.card', $data);
}
public function updateCard(){
$data = Input::all();
if(isset($data['quantity'])){
foreach ($data['quantity'] as $rowId => $qty){
Yard::instance('shopping')->update($rowId, $qty);
}
}else{
$this->deleteCard();
}
return back();
}
public function checkoutCard(){#
if(Input::get('selected_country')){
Yard::instance('shopping')->setShippingCountryWithPrice(Input::get('selected_country'));
}else{
@ -101,7 +41,7 @@ class CardController extends Controller
return view('web.templates.checkout', $data);
}
public function checkoutFinalCard(){
public function checkoutFinal(){
$rules = array(
'billing.firstname'=>'required',
@ -136,7 +76,6 @@ class CardController extends Controller
public function removeCard($rowId){
Yard::instance('shopping')->remove($rowId);
return back();
}
@ -147,8 +86,4 @@ class CardController extends Controller
return back();
}
}

View file

@ -8,7 +8,7 @@ use App\Mail\MailContact;
use GuzzleHttp\Client;
use Input;
use Illuminate\Support\Facades\Mail;
use Util;
use App\Services\Util;
use Validator;

View file

@ -7,7 +7,7 @@ use App\Http\Controllers\Controller;
use App\Models\Category;
use App\Models\Product;
use Input;
use Util;
use App\Services\Util;
class SiteController extends Controller
{

View file

@ -58,6 +58,7 @@ class Kernel extends HttpKernel
'admin' => \App\Http\Middleware\Admin::class,
'superadmin' => \App\Http\Middleware\SuperAdmin::class,
'subdomain' => \App\Http\Middleware\Subdomain::class,
'checkout' => \App\Http\Middleware\Checkout::class,
'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
'can' => \Illuminate\Auth\Middleware\Authorize::class,

View file

@ -2,13 +2,15 @@
namespace App\Http\Middleware;
use App\Models\ShoppingInstance;
use App\Models\UserShop;
use Closure;
use Auth;
use phpDocumentor\Reflection\DocBlock\Tags\Uses;
use Util;
use App\Services\Util;
use Yard;
class Subdomain
class Checkout
{
/**
* Handle an incoming request.
@ -19,15 +21,29 @@ class Subdomain
*/
public function handle($request, Closure $next)
{
if(!empty($request->route('subdomain'))){
$user_shop = UserShop::where('slug', $request->route('subdomain'))->where('active', 1)->first();
$request->route()->forgetParameter('subdomain');
if($identifier = ShoppingInstance::where('identifier', $request->route('identifier'))->first()){
//user shop
$user_shop = $identifier->user_shop;
if($user_shop && $user_shop->active == 1){
Util::setPostRoute('user.');
if($user_shop){
\Session::put('user_shop', $user_shop);
\Session::put('isCheckout', true);
}
//restore yard
Yard::instance('shopping')->restore($request->route('identifier'));
Yard::instance('shopping')->setShippingCountryWithPrice($identifier->country_id);
ShoppingInstance::where('identifier', $request->route('identifier'))->delete();
$request->route()->forgetParameter('identifier');
return $next($request);
}
if(\Session::has('user_shop') && \Session::has('isCheckout') && Yard::instance('shopping')->count()){
return $next($request);
}
return redirect(config('app.url'));
}

View file

@ -3,10 +3,10 @@
namespace App\Http\Middleware;
use App\Models\UserShop;
use App\Services\Util;
use Closure;
use Auth;
use phpDocumentor\Reflection\DocBlock\Tags\Uses;
use Util;
class Subdomain
{
@ -19,7 +19,6 @@ class Subdomain
*/
public function handle($request, Closure $next)
{
if(!empty($request->route('subdomain'))){
$user_shop = UserShop::where('slug', $request->route('subdomain'))->where('active', 1)->first();
$request->route()->forgetParameter('subdomain');

View file

@ -6,7 +6,7 @@ use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Contracts\Queue\ShouldQueue;
use Util;
use App\Services\Util;
class MailContact extends Mailable
{

View file

@ -0,0 +1,26 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class ShoppingInstance extends Model
{
protected $table = 'shopping_instances';
protected $fillable = [
'identifier', 'user_shop_id', 'subdomain', 'country_id'
];
public function user_shop()
{
return $this->belongsTo('App\Models\UserShop', 'user_shop_id');
}
public function country()
{
return $this->belongsTo('App\Models\Country', 'country_id');
}
}

View file

@ -6,8 +6,15 @@ namespace App\Services;
class Util
{
private static $postRoute = 'base.';
public static function getToken()
{
return hash_hmac('sha256', str_random(40), config('app.key'));
}
public static function formatDate(){
if(\App::getLocale() == "en"){
return 'yyyy-mm-dd';
@ -47,6 +54,7 @@ class Util
public static function addRoute($p = []){
$b = [];
if(\Session::has('user_shop')){
if($user_shop = \Session::get('user_shop')){
$b = ['subdomain' => $user_shop->slug];
@ -55,4 +63,24 @@ class Util
return array_merge($p, $b);
}
public static function isCheckout(){
if(\Session::has('isCheckout')){
if(\Session::get('isCheckout') == true){
return true;
}
}
return false;
}
public static function getUserShopBackUrl($uri){
if(\Session::has('user_shop')){
if($user_shop = \Session::get('user_shop')){
return 'http://'.$user_shop->slug.".".Config('app.domain').$uri;
}
}
return url($uri);
}
}

View file

@ -6,19 +6,29 @@ use \Gloudemans\Shoppingcart\Cart;
use Gloudemans\Shoppingcart\CartItem;
use Illuminate\Session\SessionManager;
use Illuminate\Contracts\Events\Dispatcher;
use Illuminate\Support\Collection;
class Yard extends Cart
{
private $shipping = 0;
private $shipping_country_id = 0;
private $shipping_country_id = 7; //default de
private $ysession;
private $yinstance;
public function __construct(SessionManager $session, Dispatcher $events)
{
parent::__construct($session, $events);
$this->ysession = $session;
$this->yinstance = sprintf('%s.%s', 'cart', 'shipping_extras');
if($this->getShippingExtra('shipping_price')){
$this->shipping = floatval($this->getShippingExtra('shipping_price'));
}
if($this->getShippingExtra('shipping_country_id')){
$this->shipping_country_id = $this->getShippingExtra('shipping_country_id');
}
parent::__construct($session, $events);
}
public static function getTaxRate()
{
@ -26,33 +36,66 @@ class Yard extends Cart
}
/**
* @param $shipping
*/
public function setShipping($shipping)
{
$this->shipping = floatval($shipping); ;
public function putShippingExtra($key, $value){
$content = $this->getYContent();
$content->put($key, $value);
$this->ysession->put($this->yinstance, $content);
}
public function setShippingCountry($shipping_country_id)
{
$this->shipping_country_id = $shipping_country_id ;
if($this->shipping_country_id > 0){
public function getShippingExtra($key){
$content = $this->getYContent();
if ($content->has($key)){
return $content->get($key);
}
return false;
}
public function getShippingCountryName(){
$shippingCountry = ShippingCountry::find($this->shipping_country_id);
$shipping = $shippingCountry->shipping;
$price = $shipping->prices->first();
if($price){
$this->setShipping($price->price);
}
if($shippingCountry && $shippingCountry->country){
return $shippingCountry->country->getLocated();
}
return "";
}
public function getShippingCountry()
public function getShippingCountryId()
{
return $this->shipping_country_id;
}
public function getYContent()
{
if (is_null($this->ysession->get($this->yinstance))) {
return new Collection([]);
}
return $this->ysession->get($this->yinstance);
}
public function setShippingCountryWithPrice($shipping_country_id)
{
$this->shipping_country_id = $shipping_country_id;
$this->putShippingExtra('shipping_country_id', $shipping_country_id);
if($shipping_country_id > 0){
$shippingCountry = ShippingCountry::find($shipping_country_id);
$shipping = $shippingCountry->shipping;
if($this->weight()){
//blance by weigt
}
$price = $shipping->prices->first();
if($price){
$this->shipping = floatval($price->price);
$this->putShippingExtra('shipping_price', $this->shipping);
}
}
}
/**
* @param null $decimals
* @param null $decimalPoint
@ -101,7 +144,23 @@ class Yard extends Cart
/**
* Get the total price of the items in the cart.
*
* @param int $decimals
* @param string $decimalPoint
* @param string $thousandSeperator
* @return string
*/
public function weight($decimals = null, $decimalPoint = null, $thousandSeperator = null)
{
$content = $this->getContent();
$total = $content->reduce(function ($total, CartItem $cartItem) {
return $total + ($cartItem->options->weight ? intval($cartItem->options->weight) : 0);
}, 0);
return $total;
}
/**
* Get the total price of the items in the cart.
*

View file

@ -52,11 +52,13 @@ return [
|
*/
'url' => env('APP_URL', 'http://mivita.local/'),
'domain' => env('APP_DOMAIN', 'mivita.local'),
'protocol' => env('APP_PROTOCOL', 'http://'),
'url' => env('APP_URL', 'mivita.local/'),
'domain' => env('APP_DOMAIN', 'https://mivita.local'),
'protocol' => env('APP_PROTOCOL', 'https://'),
'pre_url_main' => env('APP_URL_MAIN', ''),
'pre_url_crm' => env('APP_URL_CRM', 'mein.'),
'checkout_url' => env('APP_URL_CHECKOUT', 'checkout.'),
/* 'url_backend' => env('APP_URL', 'http://mivita.local/'),
'url_backend' => env('APP_URL', 'http://mivita.local/'),

View file

@ -0,0 +1,46 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateShoppingInstancesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('shopping_instances', function (Blueprint $table) {
$table->string('identifier')->unique()->index();
$table->unsignedInteger('user_shop_id');
$table->unsignedInteger('country_id');
$table->string('subdomain');
$table->primary(['identifier']);
$table->timestamps();
$table->foreign('user_shop_id')
->references('id')
->on('user_shops');
$table->foreign('country_id')
->references('id')
->on('countries');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('shopping_instances');
}
}

View file

@ -153,3 +153,535 @@ div.heading-title p {
border: #b5c49b 1px solid;
}
.btn-sm {
font-size: 14px;
}
.btn {
font-size: 16px;
}
.btn-text-500{
font-weight: 600;
}
div.shop-item-buttons .btn-xs {
font-size: 13px;
}
#header li.quick-cart .quick-cart-box {
padding-bottom: 0;
border: 1px solid #9ca985;
}
form input.form-control, form select.form-control, form textarea.form-control {
padding: 8px 10px;
}
form .row {
margin-bottom: 10px;
}
form .select2-container .select2-selection--single .select2-selection__rendered {
padding: 12px 20px;
height: 45px;
}
@-webkit-keyframes burst {
0% {
opacity: 1
}
75% {
-webkit-transform: scale(1.6);
transform: scale(1.6);
opacity: 1
}
85% {
-webkit-transform: scale(1.7);
transform: scale(1.7);
opacity: 0
}
100% {
opacity: 0
}
}
@keyframes burst {
0% {
opacity: 1
}
75% {
-webkit-transform: scale(1.6);
transform: scale(1.6);
opacity: 1
}
85% {
-webkit-transform: scale(1.7);
transform: scale(1.7);
opacity: 0
}
100% {
opacity: 0
}
}
.faa-burst.animated, .faa-burst.animated-hover:hover, .faa-parent.animated-hover:hover > .faa-burst {
-webkit-animation: burst 3s infinite linear;
animation: burst 3s infinite linear;
margin-left: 3px;
margin-right: 3px
}
.faa-burst.animated-hover.faa-fast:hover, .faa-burst.animated.faa-fast,
.faa-parent.animated-hover:hover > .faa-burst.faa-fast {
-webkit-animation: burst 1s infinite linear;
animation: burst 1s infinite linear
}
.faa-burst.animated-hover.faa-slow:hover, .faa-burst.animated.faa-slow,
.faa-parent.animated-hover:hover > .faa-burst.faa-slow {
-webkit-animation: burst 3s infinite linear;
animation: burst 3s infinite linear
}
/* HORIZONTAL */
@-webkit-keyframes horizontal {
0% {
-webkit-transform: translate(0,0);
transform: translate(0,0);
}
6% {
-webkit-transform: translate(5px,0);
transform: translate(5px,0);
}
12% {
-webkit-transform: translate(0,0);
transform: translate(0,0);
}
18% {
-webkit-transform: translate(5px,0);
transform: translate(5px,0);
}
24% {
-webkit-transform: translate(0,0);
transform: translate(0,0);
}
30% {
-webkit-transform: translate(5px,0);
transform: translate(5px,0);
}
36% {
-webkit-transform: translate(0,0);
transform: translate(0,0);
}
}
@keyframes horizontal {
0% {
-webkit-transform: translate(0,0);
-ms-transform: translate(0,0);
transform: translate(0,0);
}
6% {
-webkit-transform: translate(5px,0);
-ms-transform: translate(5px,0);
transform: translate(5px,0);
}
12% {
-webkit-transform: translate(0,0);
-ms-transform: translate(0,0);
transform: translate(0,0);
}
18% {
-webkit-transform: translate(5px,0);
-ms-transform: translate(5px,0);
transform: translate(5px,0);
}
24% {
-webkit-transform: translate(0,0);
-ms-transform: translate(0,0);
transform: translate(0,0);
}
30% {
-webkit-transform: translate(5px,0);
-ms-transform: translate(5px,0);
transform: translate(5px,0);
}
36% {
-webkit-transform: translate(0,0);
-ms-transform: translate(0,0);
transform: translate(0,0);
}
}
.faa-horizontal.animated,
.faa-horizontal.animated-hover:hover,
.faa-parent.animated-hover:hover > .faa-horizontal {
-webkit-animation: horizontal 4s ease infinite;
animation: horizontal 4s ease infinite;
}
/* BOUNCE */
@-webkit-keyframes bounce {
0%, 10%, 20%, 50%, 80% {
-webkit-transform: translateY(0);
transform: translateY(0);
}
40% {
-webkit-transform: translateY(-15px);
transform: translateY(-15px);
}
60% {
-webkit-transform: translateY(-15px);
transform: translateY(-15px);
}
}
@keyframes bounce {
0%, 10%, 20%, 50%, 80% {
-webkit-transform: translateY(0);
-ms-transform: translateY(0);
transform: translateY(0);
}
40% {
-webkit-transform: translateY(-15px);
-ms-transform: translateY(-15px);
transform: translateY(-15px);
}
60% {
-webkit-transform: translateY(-15px);
-ms-transform: translateY(-15px);
transform: translateY(-15px);
}
}
.faa-bounce.animated,
.faa-bounce.animated-hover:hover,
.faa-parent.animated-hover:hover > .faa-bounce {
-webkit-animation: bounce 2s ease infinite;
animation: bounce 2s ease infinite;
}
/* SPIN */
@-webkit-keyframes spin {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(359deg);
transform: rotate(359deg);
}
}
@keyframes spin {
0% {
-webkit-transform: rotate(0deg);
-ms-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(359deg);
-ms-transform: rotate(359deg);
transform: rotate(359deg);
}
}
.faa-spin.animated,
.faa-spin.animated-hover:hover,
.faa-parent.animated-hover:hover > .faa-spin {
-webkit-animation: spin 1.5s linear infinite;
animation: spin 1.5s linear infinite;
}
/* FLOAT */
@-webkit-keyframes float {
0% {
-webkit-transform: translateY(0);
transform: translateY(0);
}
50% {
-webkit-transform: translateY(-6px);
transform: translateY(-6px);
}
100% {
-webkit-transform: translateY(0);
transform: translateY(0);
}
}
@keyframes float {
0% {
-webkit-transform: translateY(0);
-ms-transform: translateY(0);
transform: translateY(0);
}
50% {
-webkit-transform: translateY(-6px);
-ms-transform: translateY(-6px);
transform: translateY(-6px);
}
100% {
-webkit-transform: translateY(0);
-ms-transform: translateY(0);
transform: translateY(0);
}
}
.faa-float.animated,
.faa-float.animated-hover:hover,
.faa-parent.animated-hover:hover > .faa-float {
-webkit-animation: float 2s linear infinite;
animation: float 2s linear infinite;
}
/* PULSE */
@-webkit-keyframes pulse {
0% {
-webkit-transform: scale(1.1);
transform: scale(1.1);
}
50% {
-webkit-transform: scale(0.8);
transform: scale(0.8);
}
100% {
-webkit-transform: scale(1.1);
transform: scale(1.1);
}
}
@keyframes pulse {
0% {
-webkit-transform: scale(1.1);
-ms-transform: scale(1.1);
transform: scale(1.1);
}
50% {
-webkit-transform: scale(0.8);
-ms-transform: scale(0.8);
transform: scale(0.8);
}
100% {
-webkit-transform: scale(1.1);
-ms-transform: scale(1.1);
transform: scale(1.1);
}
}
.faa-pulse.animated,
.faa-pulse.animated-hover:hover,
.faa-parent.animated-hover:hover > .faa-pulse {
-webkit-animation: pulse 2s linear infinite;
animation: pulse 2s linear infinite;
}
/* SHAKE */
.faa-shake.animated,
.faa-shake.animated-hover:hover,
.faa-parent.animated-hover:hover > .faa-shake {
-webkit-animation: wrench 2.5s ease infinite;
animation: wrench 2.5s ease infinite;
}
/* TADA */
@-webkit-keyframes tada {
0% {
-webkit-transform: scale(1);
transform: scale(1);
}
10%, 20% {
-webkit-transform: scale(.9) rotate(-8deg);
transform: scale(.9) rotate(-8deg);
}
30%, 50%, 70% {
-webkit-transform: scale(1.3) rotate(8deg);
transform: scale(1.3) rotate(8deg);
}
40%, 60% {
-webkit-transform: scale(1.3) rotate(-8deg);
transform: scale(1.3) rotate(-8deg);
}
80% {
-webkit-transform: scale(1) rotate(0);
transform: scale(1) rotate(0);
}
}
@keyframes tada {
0% {
-webkit-transform: scale(1);
-ms-transform: scale(1);
transform: scale(1);
}
10%, 20% {
-webkit-transform: scale(.9) rotate(-8deg);
-ms-transform: scale(.9) rotate(-8deg);
transform: scale(.9) rotate(-8deg);
}
30%, 50%, 70% {
-webkit-transform: scale(1.3) rotate(8deg);
-ms-transform: scale(1.3) rotate(8deg);
transform: scale(1.3) rotate(8deg);
}
40%, 60% {
-webkit-transform: scale(1.3) rotate(-8deg);
-ms-transform: scale(1.3) rotate(-8deg);
transform: scale(1.3) rotate(-8deg);
}
80% {
-webkit-transform: scale(1) rotate(0);
-ms-transform: scale(1) rotate(0);
transform: scale(1) rotate(0);
}
}
.faa-tada.animated,
.faa-tada.animated-hover:hover,
.faa-parent.animated-hover:hover > .faa-tada {
-webkit-animation: tada 2s linear infinite;
animation: tada 2s linear infinite;
}
/* PASSING */
@-webkit-keyframes passing {
0% {
-webkit-transform: translateX(-50%);
transform: translateX(-50%);
opacity: 0;
}
50% {
-webkit-transform: translateX(0%);
transform: translateX(0%);
opacity: 1;
}
100% {
-webkit-transform: translateX(50%);
transform: translateX(50%);
opacity: 0;
}
}
@keyframes passing {
0% {
-webkit-transform: translateX(-50%);
-ms-transform: translateX(-50%);
transform: translateX(-50%);
opacity: 0;
}
50% {
-webkit-transform: translateX(0%);
-ms-transform: translateX(0%);
transform: translateX(0%);
opacity: 1;
}
100% {
-webkit-transform: translateX(50%);
-ms-transform: translateX(50%);
transform: translateX(50%);
opacity: 0;
}
}
.faa-passing.animated,
.faa-passing.animated-hover:hover,
.faa-parent.animated-hover:hover > .faa-passing {
-webkit-animation: passing 3s linear infinite;
animation: passing 3s linear infinite;
}
/* WAVE */
@-webkit-keyframes burst {
0% {
opacity: .6;
}
50% {
-webkit-transform: scale(1.8);
transform: scale(1.8);
opacity: 0;
}
100% {
opacity: 0;
}
}
@keyframes burst {
0% {
opacity: .6;
}
50% {
-webkit-transform: scale(1.8);
-ms-transform: scale(1.8);
transform: scale(1.8);
opacity: 0;
}
100% {
opacity: 0;
}
}
.faa-burst.animated,
.faa-burst.animated-hover:hover,
.faa-parent.animated-hover:hover > .faa-burst {
-webkit-animation: burst 3s infinite linear;
animation: burst 3s infinite linear;
}

View file

@ -179,7 +179,19 @@ return [
'user_shop_name' => 'Shop Name',
'user_shop_active' => 'Nutzungsbedinungen',
'g-recaptcha-response' => 'google reCaptcha',
'accepted_data_protection' => 'Einwilligung Datenschutzerklärung'
'accepted_data_protection' => 'Einwilligung Datenschutzerklärung',
'billing.firstname'=>'Vorname',
'billing.lastname'=>'Nachname',
'billing.email'=>'E-Mail-Adresse',
'billing.address'=>'Adresse',
'billing.zipcode'=>'PLZ',
'billing.city' => 'Stadt',
'accepted_data_checkbox' => 'Einwilligung',
'shipping.firstname'=>'Vorname',
'shipping.lastname'=>'Nachname',
'shipping.address'=>'Adresse',
'shipping.zipcode'=>'PLZ',
'shipping.city' => 'Stadt'
],
];

View file

@ -43,8 +43,6 @@
<!-- SCROLL TO TOP -->
<a href="#" id="toTop"></a>
<!-- JAVASCRIPT FILES -->
<script type="text/javascript">var plugin_path = "{{ url('/assets/plugins/').'/' }}"</script>
<script type="text/javascript" src="{{ asset('/assets/plugins/jquery/jquery-2.2.3.min.js') }}"></script>

View file

@ -41,74 +41,16 @@
<!-- TOP NAV -->
<header id="topNav">
<div class="container">
<!-- Mobile Menu Button -->
<button class="btn btn-mobile" data-toggle="collapse" data-target=".nav-main-collapse">
<i class="fa fa-bars"></i>
</button>
<ul class="pull-right nav nav-pills nav-second-main has-topBar">
<!-- QUICK SHOP CART -->
<li class="quick-cart">
<a href="#" style="border: 1px solid #c3c3c3; padding: 10px;">
<span style="position: relative">
<span class="badge badge-success btn-xs badge-corner">{{ Yard::instance('shopping')->count() }}</span>
<i class="fa fa-shopping-cart"></i>
</span>
&nbsp;
@if(Yard::instance('shopping')->count())
<span class="">{{ \Yard::instance('shopping')->subtotal() }} </span>
@endif
</a>
<div class="quick-cart-box" style="display: none;">
<h4>Warenkorb</h4>
<div class="quick-cart-wrapper">
@foreach(Yard::instance('shopping')->content() as $row)
<a href="{{ url('/produkte/alle-produkte/'.$row->options->slug) }}"><!-- cart item -->
@if($row->options->has('image'))
<img src="{{ route('product_image', [$row->options->image]) }}" width="50" height="66" alt="">
@else
<img src="{{ asset('/assets/images/1x1.png') }}" width="50" height="66" alt="">
@endif
<h5>{{ $row->name }}</h5>
<span class="price">{{ $row->qty }}x <strong>{{ $row->price() }} </strong></span>
</a><!-- /cart item -->
@endforeach
</div>
<!-- quick cart footer -->
<div class="quick-cart-footer clearfix">
<div class="text-left">
<strong>Zwischensumme:</strong> <strong class="pull-right">{{ Yard::instance('shopping')->subtotal() }} </strong>
<br>
<em style="font-size: 0.9em">inkl. MwSt. zzgl. Versandkosten</em>
</div>
<a href="{{ route(Util::getPostRoute().'card_show', Util::addRoute()) }}" class="btn btn-primary btn-block mt-3">zum Warenkorb</a>
</div>
</div>
</li>
</ul>
<!-- Logo -->
<a class="logo pull-left" href="{{ url('/') }}">
<img class="fixed_top" src="/assets/images/logo_mivita.png" alt="mivita" />
<img class="fixed_scroll" src="/assets/images/logo_mivita_fixed.png" alt="mivita" />
</a>
<div class="navbar-collapse pull-right nav-main-collapse collapse">
<nav class="nav-main">
<ul id="topMain" class="nav nav-pills nav-main nav-onepage">
@ -140,9 +82,7 @@
</ul>
</nav>
</div>
</div>
</header>
<!-- /Top Nav -->
</div>

View file

@ -1,23 +1,12 @@
@extends('web.layouts.application')
@section('layout-content')
@include('web.layouts.includes.header')
<!-- wrapper -->
<div id="wrapper">
@yield('content')
<!-- /FOOTER -->
@include('web.layouts.includes.footer')
</div>
<!-- /wrapper -->
@endsection

View file

@ -158,8 +158,7 @@
@endforeach
</div>
<a href="{{route(Util::getPostRoute().'card_delete', Util::addRoute())}}" class="btn btn-default btn-sm margin-top-20 margin-right-10 pull-left"><i class="glyphicon glyphicon-remove"></i> Warenkorb löschen</a>
<button type="submit" class="btn btn-primary margin-top-20 pull-right"><i class="glyphicon glyphicon-refresh"></i> Warenkorb aktualisieren</button>
<button type="submit" class="btn btn-sm btn-default margin-top-20 pull-right"><i class="glyphicon glyphicon-refresh"></i> Warenkorb aktualisieren</button>
<div class="clearfix"></div>
</div>
@ -202,19 +201,16 @@
<div class="small">
<form action="{{ route(Util::getPostRoute().'card_show', Util::addRoute()) }}" method="GET" style="margin-bottom: 0;">
<select name="selected_country" class="select2" onchange="this.form.submit()">
{!! HTMLHelper::getCountriesForShipping(Yard::instance('shopping')->getShippingCountry()) !!}
{!! HTMLHelper::getCountriesForShipping(Yard::instance('shopping')->getShippingCountryId()) !!}
</select>
</form>
</div>
</div>
<div class="clearfix mb-2">
<span class="pull-right small">{{ Yard::instance('shopping')->shipping() }} </span>
<span class="pull-left small">Versandkosten:</span>
</div>
<hr class="mt-4 mb-4">
<div class="clearfix mb-2">
<span class="pull-right small">{{ Yard::instance('shopping')->subtotalWithShipping() }} </span>
<span class="pull-left small">Summe ohne MwSt:</span>
@ -222,27 +218,22 @@
<div class="clearfix mb-2">
<span class="pull-right small">{{ Yard::instance('shopping')->taxWithShipping() }} </span>
<span class="pull-left small"> zzgl. {{ Yard::getTaxRate() }} % MwSt.:</span>
<span class="pull-left small"> zzgl. {{ Yard::getTaxRate() }} % MwSt:</span>
</div>
<hr />
<span class="clearfix ">
<span class="pull-right size-20"><strong>{{ Yard::instance('shopping')->totalWithShipping() }} </strong></span>
<strong class="pull-left">Gesamtsumme:</strong>
</span>
<a href="{{ route(Util::getPostRoute().'card_checkout', Util::addRoute()) }}" class="btn btn-primary btn-lg btn-block size-15 mt-4"><i class="fa fa-mail-forward"></i> zur Kasse</a>
<a href="{{ route(Util::getPostRoute().'card_checkout_server', Util::addRoute()) }}" class="btn btn-primary btn-lg btn-block mt-4 btn-text-500 faa-parent animated-hover"><i class="fa fa-mail-forward faa-horizontal"></i> zur Kasse</a>
<hr>
<p class="text-center" style="line-height: 1.2em;"><em class="small text-center"> <i class="fa fa-lock"></i> Sie werden auf unseren checkout Server weitergeletet, die Verbindung ist mit SSL verschlüsselt.</em></p>
</div>
</div>
</div>
@endif
</div>
</div>
<br><br>
<hr>

View file

@ -12,6 +12,9 @@
<!-- /PAGE HEADER -->
<style>
.checkbox.error{
color:#b92c28 !important;
}
div.shop-item {
margin-bottom:30px;
border: 1px solid #ddd;
@ -88,7 +91,20 @@
<!-- CHECKOUT -->
<section>
<div class="container">
{{-- @if ($errors->any())
<div class="row">
<div class="col-sm-12">
<div class="alert alert-danger">
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
</div>
</div>
@endif
--}}
{{--
<!-- NOT LOGGED IN -->
<!-- <div class="mb-30 box-border-shadow p-20">
@ -97,62 +113,89 @@
</div>
-->
<!-- /NOT LOGGED IN -->
--}}
<!-- CHECKOUT -->
<div class="">
{!! Form::open(['url' => route(Util::getPostRoute().'card_checkout_final', Util::addRoute()), 'class' => 'row clearfix', 'id'=>'']) !!}
--}}<!-- CHECKOUT -->
@if ($errors->any())
<div class="row">
<div class="col-sm-12">
<div class="alert alert-danger">
Bitte überprüfen Sie das Formular und vervollständigen alle Angaben.
</div>
</div>
</div>
@endif
<div class="m-checkout">
{!! Form::open(['url' => route('checkout.checkout_card_final'), 'class' => 'row clearfix', 'id'=>'']) !!}
<div class="col-lg-7 col-sm-7">
<!-- BILLING -->
<fieldset class="mb-0 box-border-shadow p-20">
<h4>Rechnung &amp; Versand</h4>
<hr />
<div class="row">
<div class="col-md-12 col-sm-12">
<label class="mt-0 fs-14 fw-400" for="billing_company">Firma</label>
<input id="billing_company" name="billing[company]" type="text" class="form-control" />
<div class="form-group">
<label class="mt-0 fs-14 fw-400" for="billing_company">Firmenname (optional)</label>
{!! Form::text('billing[company]', null, ['class' => 'form-control', 'id'=>'billing_company']) !!}
</div>
</div>
</div>
<div class="row">
<div class="col-md-6 col-sm-6">
<div class="form-group">
<label class="mt-0 fs-14 fw-400" for="billing_firstname">Vorname*</label>
<input id="billing_firstname" name="billing[firstname]" type="text" class="form-control required" />
{!! Form::text('billing[firstname]', null, ['class' => 'form-control '.($errors->has('billing.firstname') ? 'error' : ''), 'id'=>'billing_firstname']) !!}
@if ($errors->has('billing.firstname'))
<label for="billing_firstname" class="error text-danger small" style="display: block;">{{ $errors->first('billing.firstname') }}</label>
@endif
</div>
</div>
<div class="col-md-6 col-sm-6">
<label class="mt-0 fs-14 fw-400" for="billing_lastname">Nachname *</label>
<input id="billing_lastname" name="billing[lastname]" type="text" class="form-control required" />
<div class="form-group">
<label class="mt-0 fs-14 fw-400" for="billing_lastname">Nachname*</label>
{!! Form::text('billing[lastname]', null, ['class' => 'form-control '.($errors->has('billing.lastname') ? 'error' : ''), 'id'=>'billing_lastname']) !!}
@if ($errors->has('billing.lastname'))
<label for="billing_lastname" class="error text-danger small" style="display: block;">{{ $errors->first('billing.lastname') }}</label>
@endif
</div>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<label class="mt-0 fs-14 fw-400" for="billing_address1">Straße Nr. *</label>
<input id="billing_address1" name="billing[address][]" type="text" class="form-control required" placeholder="" />
<!--<input id="billing_address2" name="billing[address][]" type="text" class="form-control margin-top-10" placeholder="Address 2" />-->
<div class="form-group">
<label class="mt-0 fs-14 fw-400" for="billing_address">Straße Nr. *</label>
{!! Form::text('billing[address]', null, ['class' => 'form-control '.($errors->has('billing.address') ? 'error' : ''), 'id'=>'billing_address']) !!}
@if ($errors->has('billing.address'))
<label for="billing_address" class="error text-danger small" style="display: block;">{{ $errors->first('billing.address') }}</label>
@endif
</div>
</div>
<div class="col-lg-12">
<div class="form-group">
<label class="mt-0 fs-14 fw-400" for="billing_address_2">Wohnung / Gebäude (optional)</label>
{!! Form::text('billing[address_2]', null, ['class' => 'form-control '.($errors->has('billing.address_2') ? 'error' : ''), 'id'=>'billing_address_2']) !!}
@if ($errors->has('billing.address_]'))
<label for="billing_address_2" class="error text-danger small" style="display: block;">{{ $errors->first('billing.address_2') }}</label>
@endif
</div>
</div>
</div>
<div class="row">
<div class="col-md-6 col-sm-6">
<label class="mt-0 fs-14 fw-400" for="billing_zipcode">PLZ *</label>
<input id="billing_zipcode" name="billing[zipcode]" type="text" class="form-control required" />
{!! Form::text('billing[zipcode]', null, ['class' => 'form-control '.($errors->has('billing.zipcode') ? 'error' : ''), 'id'=>'billing_zipcode']) !!}
@if ($errors->has('billing.zipcode'))
<label for="billing_zipcode" class="error text-danger small" style="display: block;">{{ $errors->first('billing.zipcode') }}</label>
@endif
</div>
<div class="col-md-6 col-sm-6">
<label class="mt-0 fs-14 fw-400" for="billing_city">Stadt *</label>
<input id="billing_city" name="billing[city]" type="text" class="form-control required" />
{!! Form::text('billing[city]', null, ['class' => 'form-control '.($errors->has('billing.city') ? 'error' : ''), 'id'=>'billing_city']) !!}
@if ($errors->has('billing.city'))
<label for="billing_city" class="error text-danger small" style="display: block;">{{ $errors->first('billing.city') }}</label>
@endif
</div>
</div>
@ -160,32 +203,41 @@
<div class="row">
<div class="col-md-12 col-sm-12">
<label class="mt-0 fs-14 fw-400" for="billing_state">Land *</label>
<select id="billing_state" name="billing[state]" class="form-control pointer selectpicker required">
<option value="">Select...</option>
<option value="1">...</option>
<option value="2">...</option>
<option value="">..............</option>
<select id="billing_state" name="billing[state]" class="form-control select2 required" disabled="true">
{!! HTMLHelper::getCountriesForShipping(Yard::instance('shopping')->getShippingCountryId()) !!}
</select>
</div>
</div>
<div class="row">
<div class="col-md-6 col-sm-6">
<label class="mt-0 fs-14 fw-400" for="billing_phone">Telefon *</label>
<input id="billing_phone" name="billing[phone]" type="text" class="form-control required" />
</div>
<div class="col-md-6 col-sm-6">
<label class="mt-0 fs-14 fw-400" for="billing_fax">Fax</label>
<input id="billing_fax" name="billing[fax]" type="text" class="form-control" />
<div class="col-md-12 col-sm-12">
<label class="mt-0 fs-14 fw-400" for="billing_phone">Telefon (optional)</label>
{!! Form::text('billing[phone]', null, ['class' => 'form-control '.($errors->has('billing.phone') ? 'error' : ''), 'id'=>'billing_phone']) !!}
@if ($errors->has('billing.phone'))
<label for="billing_phone" class="error text-danger small" style="display: block;">{{ $errors->first('billing.phone') }}</label>
@endif
</div>
</div>
<div class="row">
<div class="col-md-12 col-sm-12">
<label class="mt-0 fs-14 fw-400" for="billing_email">Email *</label>
<input id="billing_email" name="billing[email]" type="text" class="form-control required" />
<label class="mt-0 fs-14 fw-400" for="billing_email">E-Mail *</label>
{!! Form::email('billing[email]', null, ['class' => 'form-control '.($errors->has('billing.email') ? 'error' : ''), 'id'=>'billing_email']) !!}
@if ($errors->has('billing.email'))
<label for="billing_email" class="error text-danger small" style="display: block;">{{ $errors->first('billing.email') }}</label>
@endif
</div>
</div>
<div class="row">
<div class="col-md-12 col-sm-12">
<hr>
<label class="checkbox {{ ($errors->has('accepted_data_checkbox') ? 'error' : '') }}" for="accepted_data_checkbox" style="font-size: 14px;line-height: 22px; font-weight: 400">
{!! Form::checkbox('accepted_data_checkbox', 1, false, ['id'=>'accepted_data_checkbox', 'class' => 'form-control '.($errors->has('accepted_data_checkbox') ? 'error' : '')]) !!}
<i></i> Mit Klick auf "Jetzt kaufen" akzeptiere ich die <a href="{{ url('/datenschutz') }}">Allgemeinen Geschäftsbedingungen</a>, die <a href="{{ url('/datenschutz') }}">Widerrufsbestimmungen</a> und die <a href="{{ url('/datenschutz') }}">Datenschutzbelehrung</a>, damit für die Bestellung meine Daten verarbeitet werden können.
</label>
@if ($errors->has('accepted_data_checkbox'))
<label for="accepted_data_checkbox" class="error text-danger small" style="display: block;">{{ $errors->first('accepted_data_checkbox') }}</label>
@endif
</div>
</div>
@ -193,8 +245,9 @@
<div class="row">
<div class="col-lg-12 nomargin clearfix">
<hr>
<label class="mt-0 fs-14 fw-400 checkbox pull-left"><!-- see assets/js/view/demo.shop.js - CHECKOUT section -->
<input id="shipswitch" name="shipping[same_as_billing]" type="checkbox" value="1" checked="checked" />
{!! Form::checkbox('shipping[same_as_billing]', 1, true, ['id'=>'shipswitch', 'class' => '']) !!}
<i></i> <span class="weight-300">Versand an die gleiche Adresse</span>
</label>
</div>
@ -208,7 +261,6 @@
<!-- SHIPPING -->
<fieldset id="shipping" class="softhide mt-40">
<div class="box-border-shadow p-20">
<h4>Versand Adresse</h4>
<hr />
@ -216,41 +268,67 @@
<div class="row">
<div class="col-md-12 col-sm-12">
<label class="mt-0 fs-14 fw-400" for="shipping_company">Firma</label>
<input id="shipping_company" name="shipping[company]" type="text" class="form-control" />
<label class="mt-0 fs-14 fw-400" for="shipping_company">Firmenname (optional)</label>
{!! Form::text('shipping[company]', null, ['class' => 'form-control', 'id'=>'billing_company']) !!}
</div>
</div>
<div class="row">
<div class="col-md-6 col-sm-6">
<div class="form-group">
<label class="mt-0 fs-14 fw-400" for="shipping_firstname">Vorname*</label>
<input id="shipping_firstname" name="shipping[firstname]" type="text" class="form-control required" />
{!! Form::text('shipping[firstname]', null, ['class' => 'form-control '.($errors->has('shipping.firstname') ? 'error' : ''), 'id'=>'shipping_firstname']) !!}
@if ($errors->has('shipping.firstname'))
<label for="shipping_firstname" class="error text-danger small" style="display: block;">{{ $errors->first('shipping.firstname') }}</label>
@endif
</div>
</div>
<div class="col-md-6 col-sm-6">
<label class="mt-0 fs-14 fw-400" for="shipping_lastname">Nachname *</label>
<input id="shipping_lastname" name="shipping[lastname]" type="text" class="form-control required" />
<div class="form-group">
<label class="mt-0 fs-14 fw-400" for="shipping_lastname">Nachname*</label>
{!! Form::text('shipping[lastname]', null, ['class' => 'form-control '.($errors->has('shipping.lastname') ? 'error' : ''), 'id'=>'shipping_lastname']) !!}
@if ($errors->has('shipping.lastname'))
<label for="shipping_lastname" class="error text-danger small" style="display: block;">{{ $errors->first('shipping.lastname') }}</label>
@endif
</div>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<label class="mt-0 fs-14 fw-400" for="shipping_address1">Straße Nr. *</label>
<input id="shipping_address1" name="shipping[address][]" type="text" class="form-control required" placeholder="" />
<!--<input id="shipping_address2" name="shipping[address][]" type="text" class="form-control margin-top-10" placeholder="Address 2" />-->
<div class="form-group">
<label class="mt-0 fs-14 fw-400" for="shipping_address">Straße Nr. *</label>
{!! Form::text('shipping[address]', null, ['class' => 'form-control '.($errors->has('shipping.address') ? 'error' : ''), 'id'=>'shipping_address']) !!}
@if ($errors->has('shipping.address'))
<label for="shipping_address" class="error text-danger small" style="display: block;">{{ $errors->first('shipping.address') }}</label>
@endif
</div>
</div>
<div class="col-lg-12">
<div class="form-group">
<label class="mt-0 fs-14 fw-400" for="shipping_address_2">Wohnung / Gebäude (optional)</label>
{!! Form::text('shipping[address_2]', null, ['class' => 'form-control '.($errors->has('shipping.address_2') ? 'error' : ''), 'id'=>'shipping_address_2']) !!}
@if ($errors->has('shipping.address_]'))
<label for="shipping_address_2" class="error text-danger small" style="display: block;">{{ $errors->first('shipping.address_2') }}</label>
@endif
</div>
</div>
</div>
<div class="row">
<div class="col-md-6 col-sm-6">
<label class="mt-0 fs-14 fw-400" for="shipping_zipcode">PLZ *</label>
<input id="shipping_zipcode" name="shipping[zipcode]" type="text" class="form-control required" />
{!! Form::text('shipping[zipcode]', null, ['class' => 'form-control '.($errors->has('shipping.zipcode') ? 'error' : ''), 'id'=>'shipping_zipcode']) !!}
@if ($errors->has('shipping.zipcode'))
<label for="shipping_zipcode" class="error text-danger small" style="display: block;">{{ $errors->first('shipping.zipcode') }}</label>
@endif
</div>
<div class="col-md-6 col-sm-6">
<label class="mt-0 fs-14 fw-400" for="shipping_city">Stadt *</label>
<input id="shipping_city" name="shipping[city]" type="text" class="form-control required" />
{!! Form::text('shipping[city]', null, ['class' => 'form-control '.($errors->has('shipping.city') ? 'error' : ''), 'id'=>'shipping_city']) !!}
@if ($errors->has('shipping.city'))
<label for="shipping_city" class="error text-danger small" style="display: block;">{{ $errors->first('shipping.city') }}</label>
@endif
</div>
</div>
@ -258,38 +336,28 @@
<div class="row">
<div class="col-md-12 col-sm-12">
<label class="mt-0 fs-14 fw-400" for="shipping_state">Land *</label>
<select id="shipping_state" name="shipping[state]" class="form-control pointer selectpicker required">
<option value="">Select...</option>
<option value="1">...</option>
<option value="2">...</option>
<option value="">..............</option>
<select id="shipping_state" name="shipping[state]" class="form-control select2 required" disabled="true">
{!! HTMLHelper::getCountriesForShipping(Yard::instance('shopping')->getShippingCountryId()) !!}
</select>
</div>
</div>
<div class="row">
<div class="col-md-6 col-sm-6">
<label class="mt-0 fs-14 fw-400" for="shipping_phone">Telefon *</label>
<input id="shipping_phone" name="shipping[phone]" type="text" class="form-control required" />
</div>
<div class="col-md-6 col-sm-6">
<label class="mt-0 fs-14 fw-400" for="shipping_fax">Fax</label>
<input id="shipping_fax" name="shipping[fax]" type="text" class="form-control" />
<div class="col-md-12 col-sm-12">
<label class="mt-0 fs-14 fw-400" for="shipping_phone">Telefon (optional)</label>
{!! Form::text('shipping[phone]', null, ['class' => 'form-control '.($errors->has('shipping.phone') ? 'error' : ''), 'id'=>'shipping_phone']) !!}
@if ($errors->has('shipping.phone'))
<label for="shipping_phone" class="error text-danger small" style="display: block;">{{ $errors->first('shipping.phone') }}</label>
@endif
</div>
</div>
</div>
</fieldset>
<!-- /SHIPPING -->
<a href="{{ Util::getUserShopBackUrl('/card/show') }}" class="btn btn-default btn-sm btn- size-15 mt-4"><i class="fa fa-chevron-left"></i> zurück zum Warenkorb</a>
</div>
<div class="col-lg-5 col-sm-5">
<!-- PAYMENT METHOD -->
@ -306,16 +374,34 @@
<div class="row nomargin-bottom">
<div class="col-lg-12 nomargin clearfix">
<label class="mt-0 fs-14 fw-400 radio pull-left nomargin-top">
<input id="payment_check" name="payment[method]" type="radio" value="1" checked="checked" />
<input id="payment_check" name="payment[method]" type="radio" value="paypal" checked="checked" />
<i></i> <span class="weight-300">Paypal</span>
</label>
</div>
<div class="col-lg-12 nomargin clearfix">
<label class="mt-0 fs-14 fw-400 radio pull-left">
<input id="payment_card" name="payment[method]" type="radio" value="2" />
<input id="payment_card" name="payment[method]" type="radio" value="sofort" />
<i></i> <span class="weight-300">Sofortüberweisung</span>
</label>
</div>
<div class="col-lg-12 nomargin clearfix">
<label class="mt-0 fs-14 fw-400 radio pull-left">
<input id="payment_card" name="payment[method]" type="radio" value="credit" />
<i></i> <span class="weight-300">Kredit Karte</span>
</label>
</div>
<div class="col-lg-12 nomargin clearfix">
<label class="mt-0 fs-14 fw-400 radio pull-left">
<input id="payment_card" name="payment[method]" type="radio" value="sepa" />
<i></i> <span class="weight-300">Lastschrift SEPA</span>
</label>
</div>
<div class="col-lg-12 nomargin clearfix">
<label class="mt-0 fs-14 fw-400 radio pull-left">
<input id="payment_card" name="payment[method]" type="radio" value="voraus" />
<i></i> <span class="weight-300">Vorauskasse</span>
</label>
</div>
</div>
</div>
@ -324,10 +410,6 @@
</fieldset>
<!-- /PAYMENT METHOD -->
<!-- TOTAL / PLACE ORDER -->
<div class="toggle-transparent toggle-bordered-full clearfix">
<div class="toggle active">
@ -338,11 +420,18 @@
<strong class="pull-left">Zwischensumme:</strong>
</div>
<hr class="mt-4 mb-4">
<div class="clearfix mb-2">
<span class="pull-right small">{{ Yard::instance('shopping')->shipping() }} </span>
<span class="pull-left small">Versandkosten:</span>
</div>
<div class="clearfix mb-2">
<span class="pull-right small">{{ Yard::instance('shopping')->getShippingCountryName() }}</span>
<span class="pull-left small">Versandland:</span>
</div>
<hr class="mt-4 mb-4">
<div class="clearfix mb-2">
@ -352,23 +441,28 @@
<div class="clearfix mb-2">
<span class="pull-right small">{{ Yard::instance('shopping')->taxWithShipping() }} </span>
<span class="pull-left small"> zzgl. {{ Yard::getTaxRate() }} % MwSt.:</span>
<span class="pull-left small"> zzgl. {{ Yard::getTaxRate() }} % MwSt:</span>
</div>
<hr />
<span class="clearfix ">
<div class="clearfix">
<span class="pull-right size-20"><strong>{{ Yard::instance('shopping')->totalWithShipping() }} </strong></span>
<strong class="pull-left">Gesamtsumme:</strong>
</span>
<button class="btn btn-primary btn-lg btn-block size-15 mt-4"><i class="fa fa-mail-forward"></i> Bestellung absenden</button>
</div>
<button type="submit" class="btn btn-primary btn-lg btn-block size-18 btn-text-500 mt-4 faa-parent animated-hover"><i class="fa fa-mail-forward faa-horizontal"></i> Jetzt kaufen</button>
<hr><p class="text-center" style="line-height: 1.2em;"><em class="small text-center"> <i class="fa fa-lock"></i> Sind alle Ihre Angaben vollsätndig ausgefüllt, klicken Sie auf "Jetzt kaufen" und Sie werden zu unserem Zahlungsanbieter weitergeleitet, die Verbindung wird ist SSL verschlüsselt.</em></p>
</div>
</div>
</div>
<!-- /TOTAL / PLACE ORDER -->
{{--
<!-- CREATE ACCOUNT -->
<div class="toggle-transparent toggle-bordered-full margin-top-30 clearfix">
<div class="toggle active">
@ -406,11 +500,12 @@
<!-- /CREATE ACCOUNT -->
--}}
{!! Form::close() !!}
</div>
<!-- /CHECKOUT -->
{!! Form::close() !!}
</div>
</div>
</section>
<!-- /CHECKOUT -->
<!-- /CART -->

View file

@ -134,7 +134,7 @@
genannte Datenverarbeitung ein.
</label>
@if ($errors->has('accepted_data_protection'))
<label for="last_name" class="error text-danger small" style="display: block;">{{ $errors->first('accepted_data_protection') }}</label>
<label for="accepted_data_protection" class="error text-danger small" style="display: block;">{{ $errors->first('accepted_data_protection') }}</label>
@endif
</div>

View file

@ -25,28 +25,12 @@
@endif
@endforeach
</a>
<!-- /product image(s) -->
<!-- hover buttons -->
{{--
<div class="shop-option-over">
<a class="btn btn-default add-wishlist" href="#" data-item-id="4" data-toggle="tooltip" title="" data-original-title="Auf die Wunschliste"><i class="fa fa-heart nopadding"></i></a>
</div>
--}}
<!-- /hover buttons -->
<!-- product more info -->
{{-- <div class="shop-item-info">
<span class="label label-success">NEW</span>
</div>--}}
<!-- /product more info -->
</div>
@if($user_shop)
<div class="shop-item-summary text-center ">
<h2 class=""><a
href="{{ url('/produkte/'.$subsite.'/'.$product->slug) }}">{{ $product->getLang('name') }}</a>
</h2>
<h2 class=""><a href="{{ url('/produkte/'.$subsite.'/'.$product->slug) }}">{{ $product->getLang('name') }}</a></h2>
<!-- rating -->
<div class="shop-item-rating-line">
@ -60,20 +44,23 @@
</div>
<!-- /price -->
</div>
<!-- buttons -->
<div class="shop-item-buttons text-left">
<a href="{{ route(Util::getPostRoute().'card_add_get', Util::addRoute([$product->id, 1, $product->slug])) }}"
data-quantity="1" data-product_id="{{ $product->id }}"
aria-label="{{ $product->getLang('name') }} zu deinem Warenkorb hinzufügen"
class="btn btn-primary btn-xs" rel="nofollow">
<i class="fa fa-cart-plus"></i> In den Warenkorb
class="btn btn-primary btn-xs btn-text-500 faa-parent animated-hover" rel="nofollow">
<i class="fa fa-cart-plus faa-horizontal"></i> In den Warenkorb
</a>
<a class="float-right btn btn-primary btn-xs"
<a class="float-right btn btn-primary btn-xs btn-text-500 faa-parent animated-hover"
href="{{ url('/produkte/'.$subsite.'/'.$product->slug) }}">
<i class="fa fa-list"></i> Details
<i class="fa fa-list faa-horizonta"></i> Details
</a>
</div>
@else
<div class="shop-item-buttons text-center">
<a class="btn btn-primary btn-sm btn-text-500 faa-parent animated-hover" href="{{ url('/produkte/'.$subsite.'/'.$product->slug) }}">{{ $product->getLang('name') }} <i class="fa fa-lg fa-chevron-circle-right faa-horizontal"></i> </a>
</div>
@endif
<!-- /buttons -->
</div>

View file

@ -65,7 +65,6 @@
</figure>
</div>
<!-- Thumbnails (required height:100px) -->
<div data-for="zoom-primary" class="zoom-more owl-carousel owl-padding-3 featured"
data-plugin-options='{"singleItem": false, "autoPlay": false, "navigation": true, "pagination": false}'>
@ -78,27 +77,22 @@
</a>
@php ($activ = '')
@endforeach
</div>
<!-- /Thumbnails -->
@endif
</div>
<!-- /IMAGE -->
<!-- ITEM DESC -->
<div class="col-lg-6 col-sm-6">
{{--
<div class="pull-right">
<a class="btn btn-default add-wishlist" href="#" data-item-id="1" data-toggle="tooltip" title="" data-original-title="Add To Wishlist"><i class="fa fa-heart nopadding"></i></a>
</div>
--}}
<h1 class="small-h1">{{ $product->getLang('name') }}</h1>
{!! $product->getLang('copy') !!}
<hr/>
@if($user_shop)
<div class="shop-item-price text-right">
{{ $product->getFormattedPrice() }} <br>
<span style="font-size: 0.7em; color:#999; font-weight: 400;"><em>inkl. 19% MwSt. zzgl. Versandkosten</em></span>
@ -110,12 +104,15 @@
<div class="qty float-left">
<input type="number" value="1" name="quantity" maxlength="3" max="999" min="1"><br>
</div>
<button class="btn btn-primary">In den Warenkorb</button>
<button class="btn btn-primary btn-text-500 faa-parent animated-hover"><i class="fa fa-cart-plus faa-horizontal"></i> In den Warenkorb</button>
<br>
<span style="font-size: 0.7em; color:#999; font-weight: 400;"><em>Lieferzeit: 1-3 Werktage</em></span>
{!! Form::close() !!}
</div>
<hr>
@endif
<div class="shop-item-price text-right">
<span class="pull-left"><strong>Inhalt:</strong></span>
<span style="font-size: 0.8em">{{ $product->contents }}</span>

View file

@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8" />
<title>mivita care</title>
<title>@if($user_shop->title) {{ $user_shop->title }}@endif | mivita care</title>
<meta name="description" content="" />
<meta name="Author" content="" />
@ -43,8 +43,6 @@
<!-- SCROLL TO TOP -->
<a href="#" id="toTop"></a>
<!-- JAVASCRIPT FILES -->
<script type="text/javascript">var plugin_path = "{{ url('/assets/plugins/').'/' }}"</script>
<script type="text/javascript" src="{{ asset('/assets/plugins/jquery/jquery-2.2.3.min.js') }}"></script>
@ -66,14 +64,22 @@
// Shipping Address show|hide
jQuery("#shipswitch").bind("click", function() {
jQuery('#shipping').slideToggle(200, function() {
// scroll down to shipping area.
if(jQuery('#shipping').is(":visible")) {
_scrollTo('#shipping', 150);
}
});
});
if(!jQuery('#shipswitch').is(':checked')){
jQuery('#shipping').show();
}
jQuery('.quick-cart-box-close').on('click', function () {
jQuery('.quick-cart-box').css('display', 'none');
});
});
</script>
</body>
</html>

View file

@ -1,22 +1,25 @@
<div class="alert alert-success bordered-bottom nomargin">
<div class="container">
<div class="row">
<div class="col-12"><!-- left text -->
<p class="font-lato weight-300 size-20 nomargin-bottom">
Du möchtest Vertriebspartner werden oder hast Fragen zu unseren Produkten?
</p>
<h3>Jetzt Kontakt aufnehmen: <a href="{{url('/kontakt')}}" rel="nofollow" class="btn btn-primary btn-lg">zum Kontakt</a>
@if(Util::isCheckout())
<h3>
Jetzt Kontakt aufnehmen: <a href="{{ Util::getUserShopBackUrl('/kontakt') }}" rel="nofollow" class="btn btn-primary btn-lg">zum Kontakt</a>
</h3>
@else
<h3>
Jetzt Kontakt aufnehmen: <a href="{{url('/kontakt')}}" rel="nofollow" class="btn btn-primary btn-lg">zum Kontakt</a>
</h3>
@endif
</div><!-- /left text -->
</div>
</div>
</div>
<!-- /CALLOUT -->
@ -26,27 +29,16 @@
<div class="container">
<div class="row">
<div class="col-md-4">
<!-- Footer Logo -->
<img class="footer-logo" src="{{asset('/assets/images/logo_dark.png')}}" alt=""/>
</div>
<div class="col-md-4">
<!-- Contact Address -->
<br>
<address>
<ul class="list-unstyled">
@if($user_shop->title)
<li class="footer-sprite title">
<strong style="color: #97b085; font-size: 1.1em;">{{ $user_shop->title }}</strong>
@ -65,7 +57,16 @@
<!-- /Contact Address -->
</div>
@if(Util::isCheckout())
<div class="col-md-4">
<!-- Links -->
<h4 class="letter-spacing-1">&nbsp;</h4>
<a href="{{ Util::getUserShopBackUrl('/card/show') }}">
<i class="fa fa-chevron-left"></i> zurück zum Warenkorb
</a>
<!-- /Links -->
</div>
@else
<div class="col-md-4">
<!-- Links -->
<h4 class="letter-spacing-1">Inhalte</h4>
@ -86,12 +87,21 @@
<!-- /Links -->
</div>
</div>
@endif
</div>
</div>
<div class="copyright">
<div class="container">
@if(Util::isCheckout())
<ul class="pull-right nomargin list-inline mobile-block">
<li><a href="{{ Util::getUserShopBackUrl('/datenschutz') }}">Datenschutzerklärung</a></li>
<li>&bull;</li>
<li><a href="{{ Util::getUserShopBackUrl('/impressum') }}">Impressum</a></li>
</ul>
@else
<ul class="pull-right nomargin list-inline mobile-block">
<li class="{{ Request::is('datenschutz') ? ' active' : '' }}"><a
href="{{ url('/datenschutz') }}">Datenschutzerklärung</a></li>
@ -99,6 +109,7 @@
<li class="{{ Request::is('impressum') ? ' active' : '' }} "><a
href="{{ url('/impressum') }}">Impressum</a></li>
</ul>
@endif
&copy; All Rights Reserved, mivita.care
</div>
</div>

View file

@ -37,6 +37,17 @@
#header.fixed ul.nav-second-main {
margin-top: 8px;
}
#header li.quick-cart .quick-cart-box a.btn-sm{
padding: 8px !important;
font-size: 13px;
line-height: 1.2em;
}
#header li.quick-cart .quick-cart-box a.btn-default{
background-color: transparent;
border: #b0adb3 1px solid;
}
</style>
<!-- TOP NAV -->
<header id="topNav">
@ -47,30 +58,43 @@
<i class="fa fa-bars"></i>
</button>
<ul class="pull-right nav nav-pills nav-second-main has-topBar">
@if(Util::isCheckout())
<a class="logo pull-left" href="{{ Util::getUserShopBackUrl('/') }}">
<img class="fixed_top" src="/assets/images/logo_mivita.png" alt="mivita" />
<img class="fixed_scroll" src="/assets/images/logo_mivita_fixed.png" alt="mivita" />
</a>
<div class="navbar-collapse pull-right nav-main-collapse collapse">
<nav class="nav-main">
<ul id="topMain" class="nav nav-pills nav-main nav-onepage">
<li class="">
<a href="{{ Util::getUserShopBackUrl('/card/show') }}">
<i class="fa fa-chevron-left"></i> zurück zum Warenkorb
</a>
</li>
</ul>
</nav>
</div>
@else
<ul class="pull-right nav nav-pills nav-second-main has-topBar">
<!-- QUICK SHOP CART -->
<li class="quick-cart">
<a href="#" style="border: 1px solid #c3c3c3; padding: 10px;">
<span style="position: relative">
<span class="badge badge-success btn-xs badge-corner">{{ Yard::instance('shopping')->count() }}</span>
<span class="badge badge-success btn-xs badge-corner faa-horizontal animated">{{ Yard::instance('shopping')->count() }}</span>
<i class="fa fa-shopping-cart"></i>
</span>
&nbsp;
@if(Yard::instance('shopping')->count())
<span class="">{{ \Yard::instance('shopping')->subtotal() }} </span>
@endif
</a>
<div class="quick-cart-box" style="display: none;">
<div class="quick-cart-box" style="display: @if(Session::has('show-card-after-add')) block @else none @endif">
<h4>Warenkorb</h4>
<div class="quick-cart-wrapper">
@foreach(Yard::instance('shopping')->content() as $row)
<a href="{{ url('/produkte/alle-produkte/'.$row->options->slug) }}"><!-- cart item -->
@if($row->options->has('image'))
<img src="{{ route('product_image', [$row->options->image]) }}" width="50" height="66" alt="">
@ -81,27 +105,23 @@
<span class="price">{{ $row->qty }}x <strong>{{ $row->price() }} </strong></span>
</a><!-- /cart item -->
@endforeach
</div>
<!-- quick cart footer -->
<div class="quick-cart-footer clearfix">
<div class="text-left">
<strong>Zwischensumme:</strong> <strong class="pull-right">{{ Yard::instance('shopping')->subtotal() }} </strong>
<br>
<em style="font-size: 0.9em">inkl. MwSt. zzgl. Versandkosten</em>
</div>
<a href="{{ route(Util::getPostRoute().'card_show', Util::addRoute()) }}" class="btn btn-primary btn-block mt-3">zum Warenkorb</a>
<a href="{{ route(Util::getPostRoute().'card_show', Util::addRoute()) }}" class="btn btn-primary btn-text-500 btn-block mt-3 faa-parent animated-hover">zum Warenkorb <i class="fa fa-shopping-cart faa-horizontal"></i></a>
<a href="#" class="btn btn-sm btn-default mt-3 quick-cart-box-close">schließen</a>
</div>
</div>
</li>
</ul>
<!-- Logo -->
<a class="logo pull-left" href="{{ url('/') }}">
<img class="fixed_top" src="/assets/images/logo_mivita.png" alt="mivita" />
@ -138,7 +158,7 @@
</ul>
</nav>
</div>
@endif
</div>
</header>
<!-- /Top Nav -->

View file

@ -1,23 +1,10 @@
@extends('web.user.layouts.application')
@section('layout-content')
@include('web.user.layouts.includes.header')
<!-- wrapper -->
<div id="wrapper">
@yield('content')
<!-- /FOOTER -->
@include('web.user.layouts.includes.footer')
</div>
<!-- /wrapper -->
@endsection

View file

@ -51,7 +51,7 @@ Route::get('/shop/product/image/{slug}', function($slug = null)
})->name('shop_product_image');
//main site
//main site mivita
Route::domain(config('app.pre_url_main').config('app.domain'))->group(function () {
Route::get('/datenschutz', 'HomeController@legalDataProtected')->name('datenschutz');
@ -60,20 +60,21 @@ Route::domain(config('app.pre_url_main').config('app.domain'))->group(function (
Route::post('/kontakt', 'Web\ContactController@store')->name('contact_store');
Route::get('/', 'Web\SiteController@index')->name('/');
Route::get('/card/add/{id}/{quantity?}/{product_slug?}', 'Web\CardController@addToCardGet')->name('base.card_add_get');
/* Route::get('/card/add/{id}/{quantity?}/{product_slug?}', 'Web\CardController@addToCardGet')->name('base.card_add_get');
Route::post('/card/add/{id}', 'Web\CardController@addToCardPost')->name('base.card_add_post');
Route::get('/card/show', 'Web\CardController@showCard')->name('base.card_show');
Route::get('/card/checkout', 'Web\CardController@checkoutCard')->name('base.card_checkout');
Route::post('/card/checkout_final', 'Web\CardController@checkoutFinalCard')->name('base.card_checkout_final');
Route::post('/card/update', 'Web\CardController@updateCard')->name('base.card_update');
Route::get('/card/remove/{rowId}', 'Web\CardController@removeCard')->name('base.card_remove');
Route::get('/card/delete', 'Web\CardController@deleteCard')->name('base.card_delete');
Route::get('/card/delete', 'Web\CardController@deleteCard')->name('base.card_delete');*/
Route::get('/{site}/{subsite?}/{product_slug?}', 'Web\SiteController@site')->name('base.site');
});
/* ROUTING FOR CRM / CMS*/
/* ROUTING FOR CRM mein.mivita / CMS*/
Route::domain(config('app.pre_url_crm').config('app.domain'))->group(function () {
Auth::routes();
@ -228,8 +229,22 @@ Route::domain(config('app.pre_url_crm').config('app.domain'))->group(function ()
});
/* ROUTING the checkout.mivita ... */
Route::domain(config('app.checkout_url').config('app.domain'))->group(function () {
Route::group(['middleware' => ['checkout']], function() {
Route::get('/checkout/card/{identifier}', 'Web\CheckoutController@checkout')->name('checkout.checkout_card');
Route::post('/checkout/card/final', 'Web\CheckoutController@checkoutFinal')->name('checkout.checkout_card_final');
Route::get('/transaction/status/', 'Web\CheckoutController@transactionStatus')->name('checkout.transaction_status');
Route::post('/transaction/status/', 'Web\CheckoutController@transactionStatus')->name('checkout.transaction_status');
});
});
/* ROUTING the SUBDOMAINS user.mivita ... */
/* ROUTING the SUBDOMAINS*/
Route::domain('{subdomain}.'.config('app.domain'))->group(function () {
Route::group(['middleware' => ['subdomain']], function() {
@ -242,8 +257,7 @@ Route::domain('{subdomain}.'.config('app.domain'))->group(function () {
Route::get('/card/add/{id}/{quantity?}/{product_slug?}', 'Web\CardController@addToCardGet')->name('user.card_add_get');
Route::post('/card/add/{id}', 'Web\CardController@addToCardPost')->name('user.card_add_post');
Route::get('/card/show', 'Web\CardController@showCard')->name('user.card_show');
Route::get('/card/checkout', 'Web\CardController@checkoutCard')->name('user.card_checkout');
Route::post('/card/checkout_final', 'Web\CardController@checkoutFinalCard')->name('user.card_checkout_final');
Route::get('/card/checkout/server', 'Web\CardController@checkoutServer')->name('user.card_checkout_server');
Route::post('/card/update', 'Web\CardController@updateCard')->name('user.card_update');
Route::get('/card/remove/{rowId}', 'Web\CardController@removeCard')->name('user.card_remove');
Route::get('/card/delete', 'Web\CardController@deleteCard')->name('user.card_delete');