diff --git a/.idea/mivita.care.iml b/.idea/mivita.care.iml
index 3ea9f856..7bdb327f 100644
--- a/.idea/mivita.care.iml
+++ b/.idea/mivita.care.iml
@@ -22,6 +22,7 @@
+
diff --git a/.idea/php.xml b/.idea/php.xml
index f9064303..2b867389 100644
--- a/.idea/php.xml
+++ b/.idea/php.xml
@@ -99,6 +99,7 @@
+
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index fda2eca7..d6821f0b 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -2,71 +2,39 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
@@ -83,11 +51,14 @@
-
+
+
-
-
+
+
+
+
@@ -97,9 +68,9 @@
-
+
-
+
@@ -107,13 +78,13 @@
-
+
-
+
-
+
@@ -121,22 +92,22 @@
-
+
-
+
-
+
-
+
-
-
+
+
@@ -154,39 +125,173 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
yout
tem
?>
+ exca
+ tax
+ instance
+ priceTax
+ instance(
+ confi
+ cartIt
+ form
+ form>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -196,35 +301,9 @@
@@ -373,11 +478,11 @@
+
-
-
+
@@ -387,7 +492,6 @@
-
@@ -395,17 +499,6 @@
-
-
-
-
-
-
-
-
-
-
-
@@ -444,6 +537,12 @@
+
+
+
+
+
+
@@ -456,11 +555,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -570,6 +687,7 @@
+
@@ -579,15 +697,16 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
@@ -619,20 +738,24 @@
+
+
+
+
+
+
-
+
-
-
+
-
+
-
@@ -646,6 +769,7 @@
+
@@ -659,280 +783,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -940,13 +790,6 @@
-
-
-
-
-
-
-
@@ -954,37 +797,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -992,25 +804,306 @@
-
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/Http/Controllers/AdminUserController.php b/app/Http/Controllers/AdminUserController.php
index fe526fdd..a330823b 100755
--- a/app/Http/Controllers/AdminUserController.php
+++ b/app/Http/Controllers/AdminUserController.php
@@ -4,6 +4,7 @@ namespace App\Http\Controllers;
+use App\Http\Controllers\Api\KasController;
use App\Models\Account;
use App\Repositories\UserRepository;
use App\User;
@@ -30,6 +31,23 @@ class AdminUserController extends Controller
*/
public function index()
{
+ $kas = new KasController();
+ $pra = array(
+ 'subdomain_name' => 'test',
+ 'domain_name' => 'mivita.care',
+ 'subdomain_path' => '/mein.mivita.care/public/',
+ //'php_version' => '7.1',
+ //'ssl_proxy' => 'Y',
+ //'redirect_status' => 0
+
+
+ );
+ //add_subdomain
+ $req = $kas->action('get_subdomains');
+ //"is_active"]=> string(1) "Y" ["in_progress"
+
+ var_dump($req);
+ die();
$data = [
//'values' => User::where('admin', 0)->get(),
'values' => User::where('confirmation_code_remider', '!=', 2)->get(),
diff --git a/app/Http/Controllers/Api/KasController.php b/app/Http/Controllers/Api/KasController.php
new file mode 100755
index 00000000..b1169fa5
--- /dev/null
+++ b/app/Http/Controllers/Api/KasController.php
@@ -0,0 +1,89 @@
+ Sekunden ab, bei Y verlängert sich die Session mit jeder Benutzung
+ private $CredentialToken = false;
+
+ /**
+ * Create a new controller instance.
+ *
+ * @return void
+ */
+ public function __construct()
+ {
+ $this->login();
+ }
+
+
+ public function action($func, $para = array()){
+
+ try
+ {
+ $Params = array(); // Parameter für die API-Funktion
+ $SoapRequest = new SoapClient('https://kasapi.kasserver.com/soap/wsdl/KasApi.wsdl');
+ $req = $SoapRequest->KasApi(json_encode(array(
+ 'KasUser' => $this->kas_user, // KAS-User
+ 'KasAuthType' => 'session', // Auth per Sessiontoken
+ 'KasAuthData' => $this->CredentialToken, // Auth-Token
+ 'KasRequestType' => $func, // API-Funktion
+ 'KasRequestParams' => $para // Parameter an die API-Funktion
+ )));
+ if(isset($req['Response']['ReturnString']) && $req['Response']['ReturnString'] == "TRUE"){
+ return $req['Response']['ReturnInfo'];
+ }
+ return $req;
+ }
+
+ // Fehler abfangen und ausgeben
+ catch (SoapFault $fault)
+ {
+ trigger_error(" Fehlernummer: {$fault->faultcode},
+ Fehlermeldung: {$fault->faultstring},
+ Verursacher: {$fault->faultactor},
+ Details: {$fault->detail}", E_USER_ERROR);
+ }
+ }
+
+
+ private function login(){
+ try
+ {
+ $SoapLogon = new SoapClient('https://kasapi.kasserver.com/soap/wsdl/KasAuth.wsdl');
+ $this->CredentialToken = $SoapLogon->KasAuth(json_encode(array(
+ 'KasUser' => $this->kas_user,
+ 'KasAuthType' => 'sha1',
+ 'KasPassword' => sha1($this->kas_pass),
+ 'SessionLifeTime' => $this->session_lifetime,
+ 'SessionUpdateLifeTime' => $this->session_update_lifetime
+ )));
+ }
+
+ // Fehler abfangen und ausgeben
+ catch (SoapFault $fault)
+ {
+ trigger_error("Fehlernummer: {$fault->faultcode},
+ Fehlermeldung: {$fault->faultstring},
+ Verursacher: {$fault->faultactor},
+ Details: {$fault->detail}", E_USER_ERROR);
+ }
+
+ }
+
+
+
+
+}
\ No newline at end of file
diff --git a/app/Http/Controllers/Web/CardController.php b/app/Http/Controllers/Web/CardController.php
new file mode 100755
index 00000000..fa826572
--- /dev/null
+++ b/app/Http/Controllers/Web/CardController.php
@@ -0,0 +1,101 @@
+add('sdjk922', 'Product 2', 1, 19.95, ['size' => 'medium']);
+ public function addToCardGet($id, $quantity = 1, $product_slug = false)
+ {
+
+ $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]);
+ }
+ 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]);
+ }
+ return back();
+
+
+ }
+
+ public function showCard(){
+ return view('web.templates.card');
+ }
+
+ 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(){
+ return view('web.templates.checkout');
+ }
+
+ public function checkoutFinalCard(){
+ return view('web.templates.checkout-final');
+ }
+
+
+
+ public function removeCard($rowId){
+
+ Yard::instance('shopping')->remove($rowId);
+ return back();
+ }
+
+ public function deleteCard(){
+
+ Yard::instance('shopping')->destroy();
+ return back();
+ }
+
+
+
+
+
+}
\ No newline at end of file
diff --git a/app/Http/Controllers/Web/SiteController.php b/app/Http/Controllers/Web/SiteController.php
index d3da5d7b..09e127f5 100755
--- a/app/Http/Controllers/Web/SiteController.php
+++ b/app/Http/Controllers/Web/SiteController.php
@@ -6,8 +6,6 @@ namespace App\Http\Controllers\Web;
use App\Http\Controllers\Controller;
use App\Models\Category;
use App\Models\Product;
-use Carbon\Carbon;
-use Request;
use Input;
class SiteController extends Controller
@@ -31,14 +29,14 @@ class SiteController extends Controller
{
if($product_slug){
+
$category = Category::where('slug', $subsite)->where('active', true)->first();
$product = Product::where('slug', $product_slug)->where('active', true)->first();
if ($category && $product) {
-
$data = [
'subsite' => $subsite,
- 'categories' => Category::where('active', true)->orderBy('pos', 'DESC')->get(),
+ 'categories' => Category::where('active', true)->orderBy('pos', 'ASC')->get(),
'product' => $product,
'p_count' => Product::where('active', true)->count(),
@@ -54,7 +52,7 @@ class SiteController extends Controller
if ($category) {
$data = [
'subsite' => $subsite,
- 'categories' => Category::where('active', true)->orderBy('pos', 'DESC')->get(),
+ 'categories' => Category::where('active', true)->orderBy('pos', 'ASC')->get(),
'products' => Product::whereHas('categories', function ($query) use ($category) {
$query->where('category_id', '=', $category->id);
@@ -68,8 +66,8 @@ class SiteController extends Controller
}
$data = [
'subsite' => 'alle-produkte',
- 'categories' => Category::where('active', true)->orderBy('pos', 'DESC')->get(),
- 'products' => Product::where('active', true)->orderBy('pos', 'DESC')->get(),
+ 'categories' => Category::where('active', true)->orderBy('pos', 'ASC')->get(),
+ 'products' => Product::where('active', true)->orderBy('pos', 'ASC')->get(),
'p_count' => Product::where('active', true)->count(),
];
return view('web.templates.'.$site, $data);
diff --git a/app/Models/Attribute.php b/app/Models/Attribute.php
index bf9d4941..e48b9ba9 100644
--- a/app/Models/Attribute.php
+++ b/app/Models/Attribute.php
@@ -26,6 +26,8 @@ use Illuminate\Database\Eloquent\Model;
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Attribute whereTransName($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Attribute whereUpdatedAt($value)
* @mixin \Eloquent
+ * @property string|null $slug
+ * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Attribute whereSlug($value)
*/
class Attribute extends Model
{
diff --git a/app/Models/Category.php b/app/Models/Category.php
index fc5ac5d4..ee2a41ab 100644
--- a/app/Models/Category.php
+++ b/app/Models/Category.php
@@ -27,6 +27,10 @@ use Cviebrock\EloquentSluggable\Sluggable;
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Category whereTransName($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Category whereUpdatedAt($value)
* @mixin \Eloquent
+ * @property string|null $slug
+ * @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\ProductCategory[] $product_categories
+ * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Category findSimilarSlugs($attribute, $config, $slug)
+ * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Category whereSlug($value)
*/
class Category extends Model
{
diff --git a/app/Models/Product.php b/app/Models/Product.php
index feaecea3..f09f0465 100644
--- a/app/Models/Product.php
+++ b/app/Models/Product.php
@@ -71,6 +71,9 @@ use Illuminate\Database\Eloquent\SoftDeletes;
* @method static \Illuminate\Database\Query\Builder|\App\Models\Product withTrashed()
* @method static \Illuminate\Database\Query\Builder|\App\Models\Product withoutTrashed()
* @mixin \Eloquent
+ * @property string|null $slug
+ * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Product findSimilarSlugs($attribute, $config, $slug)
+ * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Product whereSlug($value)
*/
class Product extends Model
{
diff --git a/app/Models/ProductImage.php b/app/Models/ProductImage.php
index f78b4821..d9cfa5ba 100644
--- a/app/Models/ProductImage.php
+++ b/app/Models/ProductImage.php
@@ -30,6 +30,9 @@ use Illuminate\Database\Eloquent\Model;
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ProductImage whereSize($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ProductImage whereUpdatedAt($value)
* @mixin \Eloquent
+ * @property string|null $slug
+ * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ProductImage findSimilarSlugs($attribute, $config, $slug)
+ * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ProductImage whereSlug($value)
*/
class ProductImage extends Model
{
diff --git a/app/Providers/YardServiceProvider.php b/app/Providers/YardServiceProvider.php
new file mode 100755
index 00000000..856bb114
--- /dev/null
+++ b/app/Providers/YardServiceProvider.php
@@ -0,0 +1,30 @@
+app->singleton(Yard::class, function ($app) {
+ return new Yard($app['session'], $app['events']);
+ });
+
+
+ }
+
+}
\ No newline at end of file
diff --git a/app/Services/Facade/Yard.php b/app/Services/Facade/Yard.php
new file mode 100644
index 00000000..3fa51f37
--- /dev/null
+++ b/app/Services/Facade/Yard.php
@@ -0,0 +1,19 @@
+ __('business'), 0 => __('private'), );
$ret = "";
diff --git a/app/Services/Yard.php b/app/Services/Yard.php
new file mode 100644
index 00000000..d8e8dfad
--- /dev/null
+++ b/app/Services/Yard.php
@@ -0,0 +1,167 @@
+shipping = floatval($shipping); ;
+
+ }
+
+ /**
+ * @param null $decimals
+ * @param null $decimalPoint
+ * @param null $thousandSeperator
+ * @return string
+ */
+ public function shipping($decimals = null, $decimalPoint = null, $thousandSeperator = null)
+ {
+ return $this->numberFormat($this->shipping, $decimals, $decimalPoint, $thousandSeperator);
+ }
+
+ //
+ private function shippingTax($taxRate = -19){
+ return ($this->shipping * ($taxRate / 100));
+ }
+
+
+ private function shippingSub($taxRate){
+ return ($this->shipping + $this->shippingTax($taxRate));
+ }
+
+
+ public function subtotalWithShipping($decimals = null, $decimalPoint = null, $thousandSeperator = null)
+ {
+ $taxRate =config('cart.tax');
+ $total = floatval($this->total(2, '.', '')) + $this->shipping;
+ $totalTax = $total/ (100 + $taxRate) * $taxRate;
+ return $this->numberFormat(($total - $totalTax), $decimals, $decimalPoint, $thousandSeperator);
+ }
+
+
+ public function taxWithShipping($decimals = null, $decimalPoint = null, $thousandSeperator = null)
+ {
+ $taxRate =config('cart.tax');
+ $total = floatval($this->total(2, '.', '')) + $this->shipping;
+ $totalTax = $total/ (100 + $taxRate) * $taxRate;
+ return $this->numberFormat($totalTax, $decimals, $decimalPoint, $thousandSeperator);
+ }
+
+
+ public function totalWithShipping($decimals = null, $decimalPoint = null, $thousandSeperator = null)
+ {
+ $total = floatval($this->total(2, '.', '')) + $this->shipping;
+ return $this->numberFormat($total, $decimals, $decimalPoint, $thousandSeperator);
+ }
+
+
+
+
+ /**
+ * Get the total price of the items in the cart.
+ *
+ * @param int $decimals
+ * @param string $decimalPoint
+ * @param string $thousandSeperator
+ * @return string
+ */
+ public function total($decimals = null, $decimalPoint = null, $thousandSeperator = null)
+ {
+ $content = $this->getContent();
+ $total = $content->reduce(function ($total, CartItem $cartItem) {
+ return $total + ($cartItem->qty * $cartItem->price);
+ }, 0);
+
+ return $this->numberFormat($total, $decimals, $decimalPoint, $thousandSeperator);
+ }
+
+ /**
+ * Get the total tax of the items in the cart.
+ *
+ * @param int $decimals
+ * @param string $decimalPoint
+ * @param string $thousandSeperator
+ * @return float
+ */
+ public function tax($decimals = null, $decimalPoint = null, $thousandSeperator = null)
+ {
+ $content = $this->getContent();
+
+ $tax = $content->reduce(function ($tax, CartItem $cartItem) {
+ $priceTax = $cartItem->price / (100 + $cartItem->taxRate) * $cartItem->taxRate;
+ return $tax + ($cartItem->qty * $priceTax);
+ }, 0);
+
+ return $this->numberFormat($tax, $decimals, $decimalPoint, $thousandSeperator);
+ }
+
+ /**
+ * Get the subtotal (total - tax) of the items in the cart.
+ *
+ * @param int $decimals
+ * @param string $decimalPoint
+ * @param string $thousandSeperator
+ * @return float
+ */
+ public function subtotal($decimals = null, $decimalPoint = null, $thousandSeperator = null)
+ {
+ $content = $this->getContent();
+
+ $subTotal = $content->reduce(function ($subTotal, CartItem $cartItem) {
+ $priceTax = $cartItem->price / (100 + $cartItem->taxRate) * $cartItem->taxRate;
+ return $subTotal + ($cartItem->qty * ($cartItem->price - $priceTax));
+ }, 0);
+
+ return $this->numberFormat($subTotal, $decimals, $decimalPoint, $thousandSeperator);
+ }
+
+
+ /**
+ * Get the Formated number
+ *
+ * @param $value
+ * @param $decimals
+ * @param $decimalPoint
+ * @param $thousandSeperator
+ * @return string
+ */
+ protected function numberFormat($value, $decimals, $decimalPoint, $thousandSeperator)
+ {
+ if(is_null($decimals)){
+ $decimals = is_null(config('cart.format.decimals')) ? 2 : config('cart.format.decimals');
+ }
+ if(is_null($decimalPoint)){
+ $decimalPoint = is_null(config('cart.format.decimal_point')) ? '.' : config('cart.format.decimal_point');
+ }
+ if(is_null($thousandSeperator)){
+ $thousandSeperator = is_null(config('cart.format.thousand_seperator')) ? ',' : config('cart.format.thousand_seperator');
+ }
+
+ return number_format($value, $decimals, $decimalPoint, $thousandSeperator);
+ }
+}
\ No newline at end of file
diff --git a/bootstrap/cache/packages.php b/bootstrap/cache/packages.php
index b8e2cb41..659e1079 100644
--- a/bootstrap/cache/packages.php
+++ b/bootstrap/cache/packages.php
@@ -20,6 +20,17 @@
0 => 'Fideloper\\Proxy\\TrustedProxyServiceProvider',
),
),
+ 'gloudemans/shoppingcart' =>
+ array (
+ 'providers' =>
+ array (
+ 0 => 'Gloudemans\\Shoppingcart\\ShoppingcartServiceProvider',
+ ),
+ 'aliases' =>
+ array (
+ 'Cart' => 'Gloudemans\\Shoppingcart\\Facades\\Cart',
+ ),
+ ),
'intervention/image' =>
array (
'providers' =>
diff --git a/bootstrap/cache/services.php b/bootstrap/cache/services.php
index 9c8fa200..04218100 100644
--- a/bootstrap/cache/services.php
+++ b/bootstrap/cache/services.php
@@ -26,26 +26,28 @@
22 => 'Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider',
23 => 'Cviebrock\\EloquentSluggable\\ServiceProvider',
24 => 'Fideloper\\Proxy\\TrustedProxyServiceProvider',
- 25 => 'Intervention\\Image\\ImageServiceProvider',
- 26 => 'Jenssegers\\Date\\DateServiceProvider',
- 27 => 'Laracasts\\Flash\\FlashServiceProvider',
- 28 => 'Laravel\\Tinker\\TinkerServiceProvider',
- 29 => 'Collective\\Html\\HtmlServiceProvider',
- 30 => 'Maatwebsite\\Excel\\ExcelServiceProvider',
- 31 => 'NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider',
- 32 => 'Yajra\\DataTables\\DataTablesServiceProvider',
+ 25 => 'Gloudemans\\Shoppingcart\\ShoppingcartServiceProvider',
+ 26 => 'Intervention\\Image\\ImageServiceProvider',
+ 27 => 'Jenssegers\\Date\\DateServiceProvider',
+ 28 => 'Laracasts\\Flash\\FlashServiceProvider',
+ 29 => 'Laravel\\Tinker\\TinkerServiceProvider',
+ 30 => 'Collective\\Html\\HtmlServiceProvider',
+ 31 => 'Maatwebsite\\Excel\\ExcelServiceProvider',
+ 32 => 'NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider',
33 => 'Yajra\\DataTables\\DataTablesServiceProvider',
- 34 => 'Laravel\\Tinker\\TinkerServiceProvider',
- 35 => 'App\\Providers\\AppServiceProvider',
- 36 => 'App\\Providers\\AuthServiceProvider',
- 37 => 'App\\Providers\\EventServiceProvider',
- 38 => 'App\\Providers\\RouteServiceProvider',
- 39 => 'Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider',
- 40 => 'Jenssegers\\Date\\DateServiceProvider',
- 41 => 'Collective\\Html\\HtmlServiceProvider',
- 42 => 'Intervention\\Image\\ImageServiceProvider',
- 43 => 'Maatwebsite\\Excel\\ExcelServiceProvider',
- 44 => 'Yajra\\DataTables\\DataTablesServiceProvider',
+ 34 => 'Yajra\\DataTables\\DataTablesServiceProvider',
+ 35 => 'Laravel\\Tinker\\TinkerServiceProvider',
+ 36 => 'App\\Providers\\AppServiceProvider',
+ 37 => 'App\\Providers\\AuthServiceProvider',
+ 38 => 'App\\Providers\\EventServiceProvider',
+ 39 => 'App\\Providers\\RouteServiceProvider',
+ 40 => 'Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider',
+ 41 => 'Jenssegers\\Date\\DateServiceProvider',
+ 42 => 'Collective\\Html\\HtmlServiceProvider',
+ 43 => 'Intervention\\Image\\ImageServiceProvider',
+ 44 => 'Maatwebsite\\Excel\\ExcelServiceProvider',
+ 45 => 'Yajra\\DataTables\\DataTablesServiceProvider',
+ 46 => 'App\\Providers\\YardServiceProvider',
),
'eager' =>
array (
@@ -61,20 +63,22 @@
9 => 'Illuminate\\View\\ViewServiceProvider',
10 => 'Cviebrock\\EloquentSluggable\\ServiceProvider',
11 => 'Fideloper\\Proxy\\TrustedProxyServiceProvider',
- 12 => 'Intervention\\Image\\ImageServiceProvider',
- 13 => 'Jenssegers\\Date\\DateServiceProvider',
- 14 => 'Laracasts\\Flash\\FlashServiceProvider',
- 15 => 'Maatwebsite\\Excel\\ExcelServiceProvider',
- 16 => 'Yajra\\DataTables\\DataTablesServiceProvider',
+ 12 => 'Gloudemans\\Shoppingcart\\ShoppingcartServiceProvider',
+ 13 => 'Intervention\\Image\\ImageServiceProvider',
+ 14 => 'Jenssegers\\Date\\DateServiceProvider',
+ 15 => 'Laracasts\\Flash\\FlashServiceProvider',
+ 16 => 'Maatwebsite\\Excel\\ExcelServiceProvider',
17 => 'Yajra\\DataTables\\DataTablesServiceProvider',
- 18 => 'App\\Providers\\AppServiceProvider',
- 19 => 'App\\Providers\\AuthServiceProvider',
- 20 => 'App\\Providers\\EventServiceProvider',
- 21 => 'App\\Providers\\RouteServiceProvider',
- 22 => 'Jenssegers\\Date\\DateServiceProvider',
- 23 => 'Intervention\\Image\\ImageServiceProvider',
- 24 => 'Maatwebsite\\Excel\\ExcelServiceProvider',
- 25 => 'Yajra\\DataTables\\DataTablesServiceProvider',
+ 18 => 'Yajra\\DataTables\\DataTablesServiceProvider',
+ 19 => 'App\\Providers\\AppServiceProvider',
+ 20 => 'App\\Providers\\AuthServiceProvider',
+ 21 => 'App\\Providers\\EventServiceProvider',
+ 22 => 'App\\Providers\\RouteServiceProvider',
+ 23 => 'Jenssegers\\Date\\DateServiceProvider',
+ 24 => 'Intervention\\Image\\ImageServiceProvider',
+ 25 => 'Maatwebsite\\Excel\\ExcelServiceProvider',
+ 26 => 'Yajra\\DataTables\\DataTablesServiceProvider',
+ 27 => 'App\\Providers\\YardServiceProvider',
),
'deferred' =>
array (
diff --git a/composer.json b/composer.json
index a41f3b69..ac68f3f5 100755
--- a/composer.json
+++ b/composer.json
@@ -9,6 +9,7 @@
"cviebrock/eloquent-sluggable": "^4.5",
"doctrine/dbal": "^2.8",
"fideloper/proxy": "^4.0",
+ "gloudemans/shoppingcart": "^2.5",
"guzzlehttp/guzzle": "6.3.3",
"intervention/image": "2.4.2",
"jenssegers/date": "^3.4",
diff --git a/composer.lock b/composer.lock
index e121217f..167d40ff 100755
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "7f8a962781fe580335d945e8225b01a5",
+ "content-hash": "412db16529e0d589f01459505bfbbef2",
"packages": [
{
"name": "cocur/slugify",
@@ -722,6 +722,66 @@
],
"time": "2018-02-07T20:20:57+00:00"
},
+ {
+ "name": "gloudemans/shoppingcart",
+ "version": "2.5.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/Crinsane/LaravelShoppingcart.git",
+ "reference": "7ff157b7e1ef10d27cd2759d5151aae2cc6b1b9a"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/Crinsane/LaravelShoppingcart/zipball/7ff157b7e1ef10d27cd2759d5151aae2cc6b1b9a",
+ "reference": "7ff157b7e1ef10d27cd2759d5151aae2cc6b1b9a",
+ "shasum": ""
+ },
+ "require": {
+ "illuminate/events": "5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*",
+ "illuminate/session": "5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*",
+ "illuminate/support": "5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*"
+ },
+ "require-dev": {
+ "mockery/mockery": "~0.9.0",
+ "orchestra/testbench": "~3.1",
+ "phpunit/phpunit": "~5.0|~6.0|~7.0"
+ },
+ "suggest": {
+ "gloudemans/notify": "Simple flash notifications for Laravel"
+ },
+ "type": "library",
+ "extra": {
+ "laravel": {
+ "providers": [
+ "Gloudemans\\Shoppingcart\\ShoppingcartServiceProvider"
+ ],
+ "aliases": {
+ "Cart": "Gloudemans\\Shoppingcart\\Facades\\Cart"
+ }
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Gloudemans\\Shoppingcart\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Rob Gloudemans",
+ "email": "info@robgloudemans.nl"
+ }
+ ],
+ "description": "Laravel Shoppingcart",
+ "keywords": [
+ "laravel",
+ "shoppingcart"
+ ],
+ "time": "2018-02-17T09:34:00+00:00"
+ },
{
"name": "guzzlehttp/guzzle",
"version": "6.3.3",
diff --git a/config/app.php b/config/app.php
index 73dc93d5..3f6d45ec 100755
--- a/config/app.php
+++ b/config/app.php
@@ -167,6 +167,8 @@ return [
Intervention\Image\ImageServiceProvider::class,
Maatwebsite\Excel\ExcelServiceProvider::class,
Yajra\DataTables\DataTablesServiceProvider::class,
+ App\Providers\YardServiceProvider::class
+
],
@@ -226,7 +228,7 @@ return [
'Util' => App\Services\Util::class,
'Excel' => Maatwebsite\Excel\Facades\Excel::class,
'DataTables' => Yajra\DataTables\Facades\DataTables::class,
-
+ 'Yard' => App\Services\Facade\Yard::class,
],
];
diff --git a/config/cart.php b/config/cart.php
new file mode 100644
index 00000000..df3cbc03
--- /dev/null
+++ b/config/cart.php
@@ -0,0 +1,67 @@
+ 19,
+
+ /*
+ |--------------------------------------------------------------------------
+ | Shoppingcart database settings
+ |--------------------------------------------------------------------------
+ |
+ | Here you can set the connection that the shoppingcart should use when
+ | storing and restoring a cart.
+ |
+ */
+
+ 'database' => [
+
+ 'connection' => 'mysql',
+
+ 'table' => 'shoppingcart',
+
+ ],
+
+ /*
+ |--------------------------------------------------------------------------
+ | Destroy the cart on user logout
+ |--------------------------------------------------------------------------
+ |
+ | When this option is set to 'true' the cart will automatically
+ | destroy all cart instances when the user logs out.
+ |
+ */
+
+ 'destroy_on_logout' => false,
+
+ /*
+ |--------------------------------------------------------------------------
+ | Default number format
+ |--------------------------------------------------------------------------
+ |
+ | This defaults will be used for the formated numbers if you don't
+ | set them in the method call.
+ |
+ */
+
+ 'format' => [
+
+ 'decimals' => 2,
+
+ 'decimal_point' => ',',
+
+ 'thousand_seperator' => '.'
+
+ ],
+
+];
\ No newline at end of file
diff --git a/config/ide-helper.php b/config/ide-helper.php
index 38013a21..9b22926a 100644
--- a/config/ide-helper.php
+++ b/config/ide-helper.php
@@ -81,6 +81,7 @@ return array(
'extra' => array(
'Eloquent' => array('Illuminate\Database\Eloquent\Builder', 'Illuminate\Database\Query\Builder'),
'Session' => array('Illuminate\Session\Store'),
+ 'Yard' => array('App\Services\Yard'),
),
'magic' => array(
diff --git a/database/migrations/2018_11_20_174609_create_shoppingcart_table.php b/database/migrations/2018_11_20_174609_create_shoppingcart_table.php
new file mode 100644
index 00000000..fc5bb26e
--- /dev/null
+++ b/database/migrations/2018_11_20_174609_create_shoppingcart_table.php
@@ -0,0 +1,30 @@
+string('identifier');
+ $table->string('instance');
+ $table->longText('content');
+ $table->nullableTimestamps();
+
+ $table->primary(['identifier', 'instance']);
+ });
+ }
+ /**
+ * Reverse the migrations.
+ */
+ public function down()
+ {
+ Schema::drop(config('cart.database.table'));
+ }
+}
diff --git a/public/css/custom-forms-v2.css b/public/css/custom-forms-v2.css
new file mode 100755
index 00000000..5a7c29ec
--- /dev/null
+++ b/public/css/custom-forms-v2.css
@@ -0,0 +1,311 @@
+/** CUSTOM FORM ELEMENTS [OPTIONAL]
+
+ This CSS file must be included after all other CSS's.
+ Nothing special - will only rewrite the form elements (input, textarea, select2, buttons)
+ to look more clean, professional.
+ **************************************************************** **/
+
+
+ /** CUSTOM : FORM ELEMENTS
+ *************************** **/
+.btn:not(.btn-xs):not(.btn-sm):not(.btn-md):not(.btn-lg):not(.btn-xlg):not(.btn-reveal):not(.btn-3d):not(.btn-social):not(.btn-v1) {
+ height:auto;
+ padding: 14px 20px;
+}
+#footer .btn {
+ padding: 6px 12px;
+}
+#footer.footer-light input {
+ color: #121212 !important;
+}
+
+
+input.form-control,
+select.form-control,
+textarea.form-control {
+ height: auto;
+ color: #121212;
+ background-color: #fff;
+ border-color: #dee5ed;
+ width: 100%;
+
+ border-width:1px;
+ font-size: 15px;
+ line-height: 15px;
+ padding: 14px 20px;
+ border-radius: 3px;
+ margin-bottom: 15px;
+ outline: none;
+ -webkit-appearance: none;
+
+ -webkit-transition: all .300s;
+ -moz-transition: all .300s;
+ -o-transition: all .300s;
+ transition: all .300s;
+}
+form .row input.form-control,
+form .row select.form-control,
+form .row textarea.form-control {
+ margin-bottom: 0;
+}
+
+@media only screen and (max-width: 768px) { /* mobile fix */
+ input.form-control,
+ select.form-control,
+ textarea.form-control {
+ line-height: 22px;
+ }
+}
+
+/* label spacing fix */
+form label {
+ margin-top:15px;
+}
+#topBar form label,
+#header form label,
+#footer form label,
+form div.form-group label {
+ margin-top:0;
+}
+
+
+
+input.form-control:hover,
+select.form-control:hover,
+textarea.form-control:hover {
+ background-color: #fafafa !important;
+}
+
+ section.dark input.form-control:hover,
+ section.dark select.form-control:hover,
+ section.dark textarea.form-control:hover {
+ background-color: #1c2125 !important;
+ }
+
+section.dark .select2-container .select2-selection--single .select2-selection__rendered,
+section.dark input.form-control,
+section.dark select.form-control,
+section.dark textarea.form-control {
+ color: #ffffff;
+ background-color: #272e33 ;
+ border-color: #272e33;
+}
+
+section.dark input::placeholder,
+section.dark select::placeholder,
+section.dark textarea::placeholder {
+ color: #a3a9b0 !important;
+ }
+
+ /* textarea */
+ textarea.form-control {
+ min-height:100px;
+ }
+
+ /* normal select */
+ select.form-control:not([size]):not([multiple]) {
+ height: 50px;
+ -webkit-appearance:none;
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAGCAMAAADNLv/0AAAANlBMVEUAAAD///+ZmZmfoqiaoKydo6ueo6ucpKqdo6qdoqqeoqqdo6qdoqqdo6qco6mdo6qcoqmdo6rJSltEAAAAEHRSTlMAAQVSU5Wmrbe+1NXf5f7+fUgvXAAAAC5JREFUeNodxkkCABAMBMEhiDX4/2fJ9KULLYHlhW5C3YIwvikgThOK3kcddPU9JQ4BFWtk/ScAAAAASUVORK5CYII=) no-repeat;
+ background-position: center right 20px;
+ background-color: #fff;
+ color:#a3a9b0;
+ }
+ section.dark select.form-control:not([size]):not([multiple]) {
+ background: #272e33 url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAGCAMAAADNLv/0AAAANlBMVEUAAAD///+ZmZmfoqiaoKydo6ueo6ucpKqdo6qdoqqeoqqdo6qdoqqdo6qco6mdo6qcoqmdo6rJSltEAAAAEHRSTlMAAQVSU5Wmrbe+1NXf5f7+fUgvXAAAAC5JREFUeNodxkkCABAMBMEhiDX4/2fJ9KULLYHlhW5C3YIwvikgThOK3kcddPU9JQ4BFWtk/ScAAAAASUVORK5CYII=) 15px center no-repeat;
+ background-position: center right 20px;
+ color:# c9c9c9;
+ }
+
+
+/* SELECT2 CUSTOM */
+.select2 {
+ position: relative;
+}
+.select2-container--default .select2-selection--single {
+ border: none;
+ background-color: #fff;
+}
+.select2-container {
+ width: 100% !important;
+ max-width: 100% !important;
+ font-size: 16px;
+ height: auto;
+ margin-bottom: 15px;
+}
+form .row .select2-container {
+ margin-bottom: 0;
+}
+@media (min-width: 64em) {
+ .select2-container.select2-container--open {
+ max-width: 393px !important;
+ }
+}
+.select2-container .select2-selection--single {
+ height: auto;
+ margin: 0;
+ outline: none;
+}
+.select2-container .select2-selection--single .select2-selection__rendered {
+ font-size: 16px;
+ max-width: 100%;
+ padding: 16px 20px;
+ border-radius: 3px;
+ border-style: solid;
+ border-width: 1px;
+ border-color: #dee5ed;
+ resize: none;
+ line-height: 1;
+ outline: none;
+ color: #a3a9b0;
+ text-align: left;
+ margin: 0;
+ height: 50px;
+}
+.select2-container .select2-selection--single .select2-selection__rendered:after {
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAGCAMAAADNLv/0AAAANlBMVEUAAAD///+ZmZmfoqiaoKydo6ueo6ucpKqdo6qdoqqeoqqdo6qdoqqdo6qco6mdo6qcoqmdo6rJSltEAAAAEHRSTlMAAQVSU5Wmrbe+1NXf5f7+fUgvXAAAAC5JREFUeNodxkkCABAMBMEhiDX4/2fJ9KULLYHlhW5C3YIwvikgThOK3kcddPU9JQ4BFWtk/ScAAAAASUVORK5CYII=) 0 center no-repeat;
+ width: 20px;
+}
+.select2-container .select2-results .select2-results__options {
+ width: 100%;
+ text-align: left;
+ font-size: 16px;
+}
+.select2-container .select2-results .select2-results__options .select2-results__option.select2-results__option--highlighted[aria-selected] {
+ background-color: #ccc;
+}
+section.dark .select2-container .select2-selection--single .select2-selection__rendered {
+ background-color: #272e33;
+ border-color: #272e33;
+ color: #a3a9b0;
+}
+section.dark .select2-container .select2-selection--single .select2-selection__rendered,
+.select2-container .select2-selection--single .select2-selection__rendered {
+ -webkit-transition: all .300s;
+ -moz-transition: all .300s;
+ -o-transition: all .300s;
+ transition: all .300s;
+}
+.select2-container .select2-selection--single .select2-selection__rendered:hover {
+ background-color: #fafafa;
+}
+section.dark .select2-container .select2-selection--single .select2-selection__rendered:hover {
+ background-color: #1c2125;
+}
+section.dark .select2-container .select2-selection--single .select2-selection__rendered:focus {
+ border-color: #c1d120;
+}
+section.dark .select2-container .select2-results .select2-results__options {
+ border-color: #a3a9b0;
+}
+section.dark .select2-container .select2-results .select2-results__options .select2-results__option {
+ background-color: #272e33;
+ color: #a3a9b0;
+}
+section.dark .select2-container .select2-results .select2-results__options .select2-results__option.select2-results__option--highlighted[aria-selected] {
+ background-color: #333a3f;
+}
+.select2-container--default .select2-selection--single .select2-selection__arrow {
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAGCAMAAADNLv/0AAAANlBMVEUAAAD///+ZmZmfoqiaoKydo6ueo6ucpKqdo6qdoqqeoqqdo6qdoqqdo6qco6mdo6qcoqmdo6rJSltEAAAAEHRSTlMAAQVSU5Wmrbe+1NXf5f7+fUgvXAAAAC5JREFUeNodxkkCABAMBMEhiDX4/2fJ9KULLYHlhW5C3YIwvikgThOK3kcddPU9JQ4BFWtk/ScAAAAASUVORK5CYII=) 0 center no-repeat;
+ width: 20px;
+ height: 20px;
+ right: 12px;
+ top: 50%;
+ margin-top: -9px;
+}
+.select2-container--default .select2-selection--single .select2-selection__arrow b {
+ display: none;
+}
+.select2-results__option {
+ padding-left: 20px;
+ padding-right: 20px;
+}
+.select2-container.select2-container--open {
+ max-width: 100% !important;
+}
+section.dark .select2-dropdown {
+ border: 0;
+}
+.select2-dropdown {
+ border-color: #dee5ed;
+ border-width:1px;
+}
+.select2-container--focus {
+ outline: 1px solid transparent;
+ z-index: 102;
+}
+/* search field */
+.select2-container--default .select2-search--dropdown .select2-search__field {
+ padding: 6px !important;
+ border-radius: 0;
+ -webkit-border-radius: 0;
+}
+/* optgroup */
+.select2-container--default .select2-results__group {
+ font-size:14px;
+ border-top: #eaeaea 1px solid;
+ padding-left: 17px;
+ padding-right: 17px;
+}
+
+
+
+/* FANCY FORM */
+.fancy-file-upload {
+ height: auto;
+}
+.fancy-file-upload>span.button {
+ height: 41px;
+ line-height: 41px;
+}
+.fancy-file-upload>i {
+ top: 4px;
+}
+
+
+
+/* MISC */
+@media only screen and (max-width: 768px) {
+ form .row {
+ margin-bottom:0 !important;
+ }
+ form .row>div {
+ margin-bottom:15px !important;
+ display: block;
+ }
+
+ form .row>div>.row>div:last-child {
+ margin-bottom: 0 !important;
+ }
+}
+
+
+
+
+/** RTL
+ Add .rtl class to body
+ *************************** **/
+/* forms */
+body.rtl .select2-container .select2-results .select2-results__options,
+body.rtl .select2-container .select2-selection--single .select2-selection__rendered {
+ text-align: right !important;
+}
+body.rtl .select2-container--default .select2-selection--single .select2-selection__arrow {
+ left:15px;
+}
+body.rtl .select2-results__option,
+body.rtl .select2-container .select2-selection--single .select2-selection__rendered {
+ padding-left:20px;
+ padding-right: 20px;
+}
+body.rtl input, body.rtl select, body.rtl textarea {
+ text-align:right !important;
+}
+
+/* normal select */
+body.rtl select.form-control:not([size]):not([multiple]) {
+ background-position: center left 15px;
+}
+body.rtl section.dark select.form-control:not([size]):not([multiple]) {
+ background-position: center left 15px;
+}
\ No newline at end of file
diff --git a/resources/views/web/layouts/application.blade.php b/resources/views/web/layouts/application.blade.php
index 3c4316f6..c170267a 100644
--- a/resources/views/web/layouts/application.blade.php
+++ b/resources/views/web/layouts/application.blade.php
@@ -20,13 +20,20 @@
+
+
+
@@ -47,5 +54,26 @@
+
+