01 2022 Microsite Promotion
This commit is contained in:
parent
3f1fb9377d
commit
38e7fd504a
39 changed files with 761 additions and 336 deletions
|
|
@ -21,7 +21,7 @@ class CategoryController extends Controller
|
|||
{
|
||||
|
||||
$data = [
|
||||
'values' => Category::all(),
|
||||
'values' => Category::orderBy('pos', 'ASC')->get(),
|
||||
];
|
||||
return view('admin.category.index', $data);
|
||||
}
|
||||
|
|
@ -46,42 +46,66 @@ class CategoryController extends Controller
|
|||
{
|
||||
|
||||
$data = Request::all();
|
||||
$data['active'] = isset($data['active']) ? true : false;
|
||||
$data['parent_id'] = isset($data['parent_id']) ? $data['parent_id'] : null;
|
||||
if($data['id'] == "new"){
|
||||
$model = Category::create($data);
|
||||
}else{
|
||||
$model = Category::find($data['id']);
|
||||
$model->fill($data)->save();
|
||||
if($data['action'] === 'save-product_category'){
|
||||
|
||||
if($data['id'] === 'new'){
|
||||
$ProductCategory = ProductCategory::create([
|
||||
'pos' => $data['pos'],
|
||||
'product_id' => $data['product_id'],
|
||||
'category_id' => $data['category_id'],
|
||||
]);
|
||||
\Session()->flash('alert-save', '1');
|
||||
return redirect(route('admin_product_category_edit', [$ProductCategory->category_id]));
|
||||
}else{
|
||||
$ProductCategory = ProductCategory::findOrFail($data['id']);
|
||||
if($ProductCategory->category_id != $data['category_id']){
|
||||
abort(404);
|
||||
}
|
||||
$ProductCategory->pos = $data['pos'];
|
||||
$ProductCategory->product_id = $data['product_id'];
|
||||
$ProductCategory->save();
|
||||
\Session()->flash('alert-save', '1');
|
||||
return redirect(route('admin_product_category_edit', [$ProductCategory->category_id]));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$trans = [];
|
||||
if(!empty($data['trans_name'])){
|
||||
if($data['action'] === 'save-form'){
|
||||
$data['active'] = isset($data['active']) ? true : false;
|
||||
$data['parent_id'] = isset($data['parent_id']) ? $data['parent_id'] : null;
|
||||
if($data['id'] == "new"){
|
||||
$model = Category::create($data);
|
||||
}else{
|
||||
$model = Category::find($data['id']);
|
||||
$model->fill($data)->save();
|
||||
}
|
||||
|
||||
foreach ($data['trans_name'] as $lang => $value){
|
||||
if($value && $value != null){
|
||||
$trans[$lang] = $value;
|
||||
$trans = [];
|
||||
if(!empty($data['trans_name'])){
|
||||
|
||||
foreach ($data['trans_name'] as $lang => $value){
|
||||
if($value && $value != null){
|
||||
$trans[$lang] = $value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$model->trans_name = $trans;
|
||||
$model->save();
|
||||
$model->trans_name = $trans;
|
||||
$model->save();
|
||||
|
||||
$trans = [];
|
||||
if(!empty($data['trans_headline'])){
|
||||
foreach ($data['trans_headline'] as $lang => $value){
|
||||
if($value && $value != null){
|
||||
$trans[$lang] = $value;
|
||||
$trans = [];
|
||||
if(!empty($data['trans_headline'])){
|
||||
foreach ($data['trans_headline'] as $lang => $value){
|
||||
if($value && $value != null){
|
||||
$trans[$lang] = $value;
|
||||
}
|
||||
}
|
||||
}
|
||||
$model->trans_headline = $trans;
|
||||
$model->save();
|
||||
|
||||
\Session()->flash('alert-save', '1');
|
||||
return redirect(route('admin_product_categories'));
|
||||
}
|
||||
$model->trans_headline = $trans;
|
||||
$model->save();
|
||||
|
||||
\Session()->flash('alert-save', '1');
|
||||
return redirect(route('admin_product_categories'));
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -157,7 +181,7 @@ class CategoryController extends Controller
|
|||
return redirect(route('admin_product_category_edit', [$category->id]));
|
||||
|
||||
}
|
||||
catch (Exception $e) {
|
||||
catch (\Exception $e) {
|
||||
\Session()->flash('alert-danger', "Fehler".$e);
|
||||
return redirect(route('admin_product_category_edit', [$category->id]));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@ use Response;
|
|||
use Validator;
|
||||
use App\Services\Util;
|
||||
use App\Models\Product;
|
||||
use App\Models\Category;
|
||||
use App\Services\Payment;
|
||||
use App\Models\UserHistory;
|
||||
use App\Models\PaymentMethod;
|
||||
use App\Models\PromotionUser;
|
||||
|
|
@ -17,7 +19,6 @@ use App\Services\PromotionCart;
|
|||
use App\Models\PaymentTransaction;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Repositories\CheckoutRepository;
|
||||
use App\Services\Payment;
|
||||
|
||||
class PromotionController extends Controller
|
||||
{
|
||||
|
|
@ -45,10 +46,16 @@ class PromotionController extends Controller
|
|||
return view('web.promotion.outofstock', $data);
|
||||
}
|
||||
PromotionCart::initYard();
|
||||
|
||||
$first_category = Category::where('active', true)->whereJsonContains('show_on', ['3'])->orderBy('pos', 'DESC')->first();
|
||||
$first_category_id = isset($first_category->id) ? $first_category->id : false;
|
||||
$shop_products = $this->getShowProducts();
|
||||
|
||||
$data = [
|
||||
'promotion_user' => $PromotionUser,
|
||||
'shop_products' => Product::where('active', true)->whereJsonContains('show_on', ['3'])->orderBy('pos', 'ASC')->get(),
|
||||
'shop_products' => $shop_products,
|
||||
'user_payment_methods' => PaymentMethod::getDefaultAsArray()->toArray(),
|
||||
'first_category_id' => $first_category_id,
|
||||
];
|
||||
return view('web.promotion.index', $data);
|
||||
}
|
||||
|
|
@ -95,7 +102,6 @@ class PromotionController extends Controller
|
|||
}
|
||||
if($data['action'] === 'submit-reminder-service'){
|
||||
return redirect(route('web_promotion_goto', ['thanksreminder', $PromotionUser->id]));
|
||||
|
||||
}
|
||||
if($data['action'] === 'submit-promotion-order'){
|
||||
$rules = array(
|
||||
|
|
@ -142,8 +148,6 @@ class PromotionController extends Controller
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
private function directPaymentStatus(PaymentTransaction $payt, $identifier){
|
||||
|
||||
if(isset($payt->transmitted_data['param'])){
|
||||
|
|
@ -201,12 +205,19 @@ class PromotionController extends Controller
|
|||
$data = Request::all();
|
||||
$ret = "";
|
||||
$status = false;
|
||||
|
||||
if(Request::ajax()){
|
||||
if($data['action'] === 'web-show-product'){
|
||||
$product = Product::find($data['id']); //current user form order
|
||||
$ret = view("web.promotion.show_product", compact('product', 'data'))->render();
|
||||
}
|
||||
if($data['perform']){
|
||||
if(isset($data['perform'])){
|
||||
if($data['action'] === 'switch-show_products'){
|
||||
$category_id = isset($data['show_products_option']) ? $data['show_products_option'] : false;
|
||||
$shop_products = $this->getShowProducts($category_id);
|
||||
$shop_products_view = view("web.promotion._shop_products_inner", compact('shop_products'))->render();
|
||||
return response()->json(['response' => $data, 'shop_products_view'=>$shop_products_view, 'status'=>$status]);
|
||||
}
|
||||
if($data['action'] === 'switch-free-product'){
|
||||
\App\Services\PromotionCart::updateFeeProduct($data);
|
||||
}
|
||||
|
|
@ -226,6 +237,10 @@ class PromotionController extends Controller
|
|||
if($data['action'] === 'switch-shipping'){
|
||||
\App\Services\PromotionCart::switchShipping($data);
|
||||
}
|
||||
if($data['action'] === 'change-state-shipping'){
|
||||
\App\Services\PromotionCart::changeStateShipping($data);
|
||||
}
|
||||
|
||||
$cart = view("web.promotion._promotion_cart", compact('data'))->render();
|
||||
if(Yard::instance('shopping')->isQuickShipping()){
|
||||
$invoice = view("web.promotion._invoice_details_quick")->render();
|
||||
|
|
@ -233,10 +248,25 @@ class PromotionController extends Controller
|
|||
$invoice = view("web.promotion._invoice_details")->render();
|
||||
}
|
||||
$checkout = view("web.promotion._checkout")->render();
|
||||
$data['shipping_price_formated'] = Yard::instance('shopping')->shipping();
|
||||
|
||||
return response()->json(['response' => $data, 'cart'=>$cart, 'invoice'=>$invoice, 'checkout'=>$checkout, 'status'=>$status]);
|
||||
}
|
||||
return response()->json(['response' => $data, 'html'=>$ret, 'status'=>$status]);
|
||||
}
|
||||
}
|
||||
|
||||
private function getShowProducts($category_id = false){
|
||||
$shop_products = [];
|
||||
if($category_id){
|
||||
$shop_products = Product::where('active', true)->whereJsonContains('show_on', ['3'])
|
||||
->whereHas('categories', function ($query) use ($category_id) {
|
||||
$query->where('category_id', $category_id); //->whereJsonContains('show_on', ['3']);
|
||||
})->orderBy('pos', 'ASC')->get();
|
||||
}else{
|
||||
$shop_products = Product::where('active', true)->whereJsonContains('show_on', ['3'])
|
||||
->orderBy('pos', 'ASC')->get();
|
||||
}
|
||||
return $shop_products;
|
||||
}
|
||||
}
|
||||
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
namespace App\Models;
|
||||
|
||||
use App\Services\Type;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Cviebrock\EloquentSluggable\Sluggable;
|
||||
|
||||
|
|
@ -53,10 +54,10 @@ class Category extends Model
|
|||
|
||||
protected $table = 'categories';
|
||||
|
||||
protected $casts = ['trans_name' => 'array', 'trans_headline' => 'array'];
|
||||
protected $casts = ['trans_name' => 'array', 'trans_headline' => 'array', 'show_on' => 'array'];
|
||||
|
||||
protected $fillable = [
|
||||
'parent_id', 'name', 'headline', 'pos', 'active',
|
||||
'parent_id', 'name', 'headline', 'pos', 'active', 'show_on'
|
||||
];
|
||||
|
||||
public function sluggable()
|
||||
|
|
@ -133,4 +134,15 @@ class Category extends Model
|
|||
return rtrim($ret, ', ');
|
||||
}
|
||||
|
||||
public function getShowOnTypes(){
|
||||
$ret = [];
|
||||
if(is_array($this->show_on)){
|
||||
foreach($this->show_on as $show){
|
||||
$ret[] = isset(Type::$showONs[$show]) ? Type::$showONs[$show] : '-';
|
||||
}
|
||||
}
|
||||
return $ret;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
namespace App\Models;
|
||||
|
||||
use App\Services\Type;
|
||||
use App\Services\Util;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
|
@ -65,35 +66,16 @@ class PaymentMethod extends Model
|
|||
'active'
|
||||
];
|
||||
|
||||
public static $showATs = [
|
||||
0 => 'Nur Kunden Shop',
|
||||
1 => 'Nur Vertriebspartner Shop',
|
||||
2 => 'Kunden + Vertriebspartner Shop',
|
||||
3 => 'Nur Reg/Mitgliedschaft Vertriebspartner',
|
||||
4 => 'Kunden + Vertriebspartner Shop + Reg/Mitgliedschaft',
|
||||
5 => 'Vertriebspartner Shop + Reg/Mitgliedschaft',
|
||||
9 => 'überall',
|
||||
];
|
||||
|
||||
public static $showONs = [
|
||||
1 => 'Kunden Bestellungen',
|
||||
2 => 'Vertriebspartner Bestellungen',
|
||||
3 => 'Microsite',
|
||||
4 => 'Registrierung Vertriebspartner',
|
||||
5 => 'Mitgliedschaft Vertriebspartner',
|
||||
//6 => 'Onboarding Berater',
|
||||
10 => 'überall',
|
||||
];
|
||||
|
||||
public function getShowAtType(){
|
||||
return isset(self::$showATs[$this->show_at]) ? self::$showATs[$this->show_at] : '-';
|
||||
return isset(Type::$payShowATs[$this->show_at]) ? Type::$payShowATs[$this->show_at] : '-';
|
||||
}
|
||||
|
||||
public function getShowOnTypes(){
|
||||
$ret = [];
|
||||
if($this->show_on){
|
||||
foreach($this->show_on as $show){
|
||||
$ret[] = isset(self::$showONs[$show]) ? self::$showONs[$show] : '-';
|
||||
$ret[] = isset(Type::$payShowONs[$show]) ? Type::$payShowONs[$show] : '-';
|
||||
}
|
||||
}
|
||||
return $ret;
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
namespace App\Models;
|
||||
|
||||
use App\Services\Type;
|
||||
use App\Services\Util;
|
||||
use Cviebrock\EloquentSluggable\Sluggable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
|
@ -218,27 +219,7 @@ class Product extends Model
|
|||
4 => 'KG',
|
||||
];
|
||||
|
||||
public $showATs = [
|
||||
0 => 'Nur Kunden Bestellungen',
|
||||
1 => 'Kunden + Vertriebspartner Bestellungen',
|
||||
2 => 'Nur Vertriebspartner Bestellungen',
|
||||
3 => 'Registrierung / Mitgliedschaft Vertriebspartner',
|
||||
4 => 'Nur Mitgliedschaft Vertriebspartner',
|
||||
//5 => 'Onboarding Vertriebspartner',
|
||||
//6 => 'Onboarding Vertriebspartner + Vertriebspartner Shop',
|
||||
7 => 'zur internen Berechnung',
|
||||
|
||||
];
|
||||
|
||||
public $showONs = [
|
||||
1 => 'Kunden Bestellungen',
|
||||
2 => 'Vertriebspartner Bestellungen',
|
||||
3 => 'Microsite',
|
||||
4 => 'Registrierung Vertriebspartner',
|
||||
5 => 'Mitgliedschaft Vertriebspartner',
|
||||
//6 => 'Onboarding Berater',
|
||||
10 => 'zur internen Berechnung',
|
||||
];
|
||||
|
||||
|
||||
public $actions = [
|
||||
|
|
@ -439,13 +420,13 @@ class Product extends Model
|
|||
return isset($this->unitTypes[$this->unit]) ? $this->unitTypes[$this->unit] : '-';
|
||||
}
|
||||
public function getShowAtType(){
|
||||
return isset($this->showATs[$this->show_at]) ? $this->showATs[$this->show_at] : '-';
|
||||
return isset(Type::$showATs[$this->show_at]) ? Type::$showATs[$this->show_at] : '-';
|
||||
}
|
||||
|
||||
public function getShowOnTypes(){
|
||||
$ret = [];
|
||||
foreach($this->show_on as $show){
|
||||
$ret[] = isset($this->showONs[$show]) ? $this->showONs[$show] : '-';
|
||||
$ret[] = isset(Type::$showONs[$show]) ? Type::$showONs[$show] : '-';
|
||||
}
|
||||
return $ret;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
namespace App\Models;
|
||||
|
||||
use App\Services\Type;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
|
|
@ -28,8 +29,12 @@ class ProductCategory extends Model
|
|||
{
|
||||
protected $table = 'product_categories';
|
||||
|
||||
protected $casts = [
|
||||
'show_on' => 'array',
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'product_id', 'category_id',
|
||||
'pos', 'product_id', 'category_id', 'show_on'
|
||||
];
|
||||
|
||||
public function product()
|
||||
|
|
@ -42,4 +47,12 @@ class ProductCategory extends Model
|
|||
return $this->belongsTo('App\Models\Category', 'category_id');
|
||||
}
|
||||
|
||||
public function getShowOnTypes(){
|
||||
$ret = [];
|
||||
foreach($this->show_on as $show){
|
||||
$ret[] = isset(Type::$showONs[$show]) ? Type::$showONs[$show] : '-';
|
||||
}
|
||||
return $ret;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -80,6 +80,13 @@ class Shipping extends Model
|
|||
}
|
||||
|
||||
public function getShippingPricesBy($shipping_for){
|
||||
return $this->hasMany('App\Models\ShippingPrice', 'shipping_id', 'id')->where('shipping_for', $shipping_for);
|
||||
return ShippingPrice::where('shipping_id', $this->id)->where('shipping_for', $shipping_for)->get();
|
||||
}
|
||||
|
||||
public function getShippingPricesFirstBy($shipping_for){
|
||||
return ShippingPrice::where('shipping_id', $this->id)->where('shipping_for', $shipping_for) ->orderBy('price', 'ASC')->first();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -159,6 +159,17 @@ class ProductRepository extends BaseRepository {
|
|||
'attribute_id' => $attribute->attribute_id,
|
||||
]);
|
||||
}
|
||||
//INCS
|
||||
$ingredients = $model->p_ingredients()->pluck('ingredient_id')->toArray();
|
||||
if(is_array($ingredients)){
|
||||
foreach ($ingredients as $incs_id){
|
||||
ProductIngredient::create([
|
||||
'product_id' => $this->model->id,
|
||||
'ingredient_id' => $incs_id,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//images
|
||||
foreach ($model->images as $image){
|
||||
|
|
|
|||
|
|
@ -211,6 +211,19 @@ class HTMLHelper
|
|||
return $ret;
|
||||
}
|
||||
|
||||
public static function getCategoriesOptionsByShowOn($ids = array(), $all = false, $show_on = []){
|
||||
$values = Category::where('active', true)->whereJsonContains('show_on', $show_on)->orderBy('pos', 'ASC')->get();
|
||||
$ret = "";
|
||||
if($all){
|
||||
$ret .= '<option value="">'.$all.'</option>\n';
|
||||
}
|
||||
foreach ($values as $value){
|
||||
$attr = in_array($value->id, $ids) ? 'selected="selected"' : '';
|
||||
$ret .= '<option value="'.$value->id.'" '.$attr.'>'.$value->name.'</option>\n';
|
||||
}
|
||||
return $ret;
|
||||
}
|
||||
|
||||
public static function getProductIngredientsOptions($has_ids = array(), $all = true){
|
||||
$values = Ingredient::where('active', 1)->get();
|
||||
$ret = "";
|
||||
|
|
@ -327,8 +340,20 @@ class HTMLHelper
|
|||
return "not defined";
|
||||
}
|
||||
|
||||
public static function getCountriesForShipping($id, $all=false){#
|
||||
public static function getCountriesForShipping($id, $all=false, $shipping_for = false){#
|
||||
$values = ShippingCountry::all();
|
||||
|
||||
if($shipping_for){
|
||||
$temp = [];
|
||||
foreach($values as $value){
|
||||
if($shipping = $value->shipping){
|
||||
if($shipping->getShippingPricesFirstBy($shipping_for)){
|
||||
$temp[] = $value;
|
||||
}
|
||||
}
|
||||
}
|
||||
$values = $temp;
|
||||
}
|
||||
$ret = "";
|
||||
if($all){
|
||||
$ret .= '<option value="">'.__('please select').'</option>\n';
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ class PromotionCart
|
|||
{
|
||||
if($ShippingCountry = ShippingCountry::all()->first()){
|
||||
if($ShippingCountry->shipping){
|
||||
if($ShippingPrices = $ShippingCountry->shipping->getShippingPricesBy($shipping_for)->orderBy('price', 'ASC')->first()){
|
||||
if($ShippingPrices = $ShippingCountry->shipping->getShippingPricesFirstBy($shipping_for)){
|
||||
return formatNumber($ShippingPrices->price);
|
||||
}
|
||||
}
|
||||
|
|
@ -48,6 +48,18 @@ class PromotionCart
|
|||
|
||||
}
|
||||
|
||||
public static function changeStateShipping($data)
|
||||
{
|
||||
$id = 1;
|
||||
if($ShippingCountry = ShippingCountry::find($data['shipping_country_id'])){
|
||||
$id = $ShippingCountry->id;
|
||||
}
|
||||
Yard::instance('shopping')->setShippingCountryWithPrice($id, 'shop');
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public static function updateProduct($data, $add=false)
|
||||
{
|
||||
if($product = Product::find($data['product_id'])){
|
||||
|
|
@ -100,7 +112,8 @@ class PromotionCart
|
|||
[
|
||||
'image' => $image,
|
||||
'slug' => $product->slug,
|
||||
'weight' => $product->weight,
|
||||
//'weight' => $product->weight,
|
||||
'weight' => 1,
|
||||
'free_product_id' => intval($data['free_product_id']),
|
||||
'product_id' => $product->id
|
||||
]);
|
||||
|
|
|
|||
53
app/Services/Type.php
Normal file
53
app/Services/Type.php
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
<?php
|
||||
namespace App\Services;
|
||||
|
||||
|
||||
|
||||
|
||||
class Type
|
||||
{
|
||||
public static $showATs = [
|
||||
0 => 'Nur Kunden Bestellungen',
|
||||
1 => 'Kunden + Vertriebspartner Bestellungen',
|
||||
2 => 'Nur Vertriebspartner Bestellungen',
|
||||
3 => 'Registrierung / Mitgliedschaft Vertriebspartner',
|
||||
4 => 'Nur Mitgliedschaft Vertriebspartner',
|
||||
//5 => 'Onboarding Vertriebspartner',
|
||||
//6 => 'Onboarding Vertriebspartner + Vertriebspartner Shop',
|
||||
7 => 'zur internen Berechnung',
|
||||
|
||||
];
|
||||
|
||||
public static $showONs = [
|
||||
1 => 'Kunden Bestellungen',
|
||||
2 => 'Vertriebspartner Bestellungen',
|
||||
3 => 'Microsite',
|
||||
4 => 'Registrierung Vertriebspartner',
|
||||
5 => 'Mitgliedschaft Vertriebspartner',
|
||||
//6 => 'Onboarding Berater',
|
||||
10 => 'zur internen Berechnung',
|
||||
];
|
||||
|
||||
|
||||
public static $payShowATs = [
|
||||
0 => 'Nur Kunden Shop',
|
||||
1 => 'Nur Vertriebspartner Shop',
|
||||
2 => 'Kunden + Vertriebspartner Shop',
|
||||
3 => 'Nur Reg/Mitgliedschaft Vertriebspartner',
|
||||
4 => 'Kunden + Vertriebspartner Shop + Reg/Mitgliedschaft',
|
||||
5 => 'Vertriebspartner Shop + Reg/Mitgliedschaft',
|
||||
9 => 'überall',
|
||||
];
|
||||
|
||||
public static $payShowONs = [
|
||||
1 => 'Kunden Bestellungen',
|
||||
2 => 'Vertriebspartner Bestellungen',
|
||||
3 => 'Microsite',
|
||||
4 => 'Registrierung Vertriebspartner',
|
||||
5 => 'Mitgliedschaft Vertriebspartner',
|
||||
//6 => 'Onboarding Berater',
|
||||
10 => 'überall',
|
||||
];
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -181,7 +181,6 @@ class Yard extends Cart
|
|||
return $this->shipping_country_id;
|
||||
}
|
||||
|
||||
|
||||
public function getYContent()
|
||||
{
|
||||
if (is_null($this->ysession->get($this->yinstance))) {
|
||||
|
|
@ -366,11 +365,14 @@ class Yard extends Cart
|
|||
//sec by weight
|
||||
if(!$shipping_price){
|
||||
$shipping_price = $this->shippingPriceByWeight($shipping->getShippingPricesBy($shipping_price_for), $this->weight());
|
||||
|
||||
|
||||
}
|
||||
//default
|
||||
if(!$shipping_price){
|
||||
$shipping_price = $shipping->getShippingPricesBy($shipping_price_for)->first();
|
||||
}
|
||||
|
||||
}
|
||||
if($shipping_price){
|
||||
$price = $shipping_price->price;
|
||||
|
|
@ -443,7 +445,6 @@ class Yard extends Cart
|
|||
private function shippingTax($decimals = null, $decimalPoint = null, $thousandSeperator = null)
|
||||
{
|
||||
return $this->numberFormat($this->shipping_tax, $decimals, $decimalPoint, $thousandSeperator);
|
||||
|
||||
}
|
||||
|
||||
/* private function subShipping($decimals = null, $decimalPoint = null, $thousandSeperator = null){
|
||||
|
|
|
|||
|
|
@ -25,6 +25,8 @@ class CreateCategoriesTable extends Migration
|
|||
$table->text('trans_headline')->nullable();
|
||||
$table->text('trans_name')->nullable();
|
||||
$table->unsignedTinyInteger('pos')->nullable()->default(0);
|
||||
$table->string('show_on')->nullable();
|
||||
|
||||
$table->boolean('active')->default(false);
|
||||
|
||||
$table->string('slug')->unique()->index();
|
||||
|
|
|
|||
|
|
@ -16,8 +16,10 @@ class CreateProductCategoriesTable extends Migration
|
|||
Schema::create('product_categories', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
|
||||
$table->tinyInteger('pos')->unsigned()->nullable();
|
||||
$table->unsignedInteger('product_id')->index();
|
||||
$table->unsignedInteger('category_id')->index();
|
||||
$table->string('show_on')->nullable();
|
||||
|
||||
$table->timestamps();
|
||||
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ html {
|
|||
body.custom-background {
|
||||
background-color: #f4f1ef;
|
||||
color: rgb(119, 119, 119);
|
||||
font-size: 17px;
|
||||
}
|
||||
|
||||
.text-body {
|
||||
|
|
@ -100,7 +101,7 @@ h1, h2, h3, h4, .typo-heading {
|
|||
color: rgb(64, 65, 66);
|
||||
}
|
||||
p {
|
||||
font-size: 16px;
|
||||
font-size: 17px;
|
||||
}
|
||||
|
||||
h4.product-title {
|
||||
|
|
@ -110,7 +111,8 @@ h4.product-title {
|
|||
}
|
||||
|
||||
.product-description {
|
||||
height: 4rem;
|
||||
font-size: 16px;
|
||||
height: 4.3rem;
|
||||
overflow: hidden;
|
||||
margin-bottom: .5rem;
|
||||
}
|
||||
|
|
@ -229,12 +231,14 @@ h4.product-title {
|
|||
|
||||
.dropdown-item:hover,
|
||||
.dropdown-item:focus {
|
||||
background-color: #d6d6d6;
|
||||
color: #46564d;
|
||||
}
|
||||
|
||||
.dropdown-item.active,
|
||||
.dropdown-item:active {
|
||||
background-color: #46564d;
|
||||
color:#fff !important;
|
||||
}
|
||||
|
||||
label {
|
||||
|
|
@ -269,6 +273,11 @@ label .required {
|
|||
}
|
||||
.switcher-label {
|
||||
cursor: pointer;
|
||||
font-size: 16px;
|
||||
|
||||
}
|
||||
.switcher .switcher-indicator {
|
||||
top: 0.1rem;
|
||||
}
|
||||
|
||||
table.table-payment td {
|
||||
|
|
@ -277,8 +286,6 @@ table.table-payment td {
|
|||
border-bottom: 1px solid #c6c2bf;
|
||||
|
||||
}
|
||||
|
||||
|
||||
.yard-items-head {
|
||||
border-bottom: 1px solid #c6c2bf;
|
||||
padding-bottom: 8px;
|
||||
|
|
@ -391,3 +398,63 @@ table.table-payment td {
|
|||
.spinner {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.tab-content p {
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
.btn-add-product-shop {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
@media (max-width: 991px) {
|
||||
|
||||
.intro-media .media {
|
||||
display: block;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.intro-media .media img.d-block {
|
||||
display: inline-block !important;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
}
|
||||
.media-body ul {
|
||||
padding-left: 1.8rem;
|
||||
}
|
||||
|
||||
.media-body .table {
|
||||
font-size:16px;
|
||||
color: rgb(119, 119, 119);
|
||||
}
|
||||
.modal-body .table {
|
||||
font-size:16px;
|
||||
color: rgb(119, 119, 119);
|
||||
}
|
||||
.media-body table th, .media-body .table td {
|
||||
padding: 0.4rem;
|
||||
}
|
||||
.no-border {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.card-header a .fa-caret-collapse {
|
||||
width: 0.8em;
|
||||
}
|
||||
.card-header a.collapsed .fa-caret-collapse:before {
|
||||
content: "\f0da";
|
||||
}
|
||||
|
||||
.card-header a .fa-caret-collapse:before{
|
||||
content: "\f0d7";
|
||||
}
|
||||
|
||||
.not-show {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
.ui-w-150 {
|
||||
width: 150px !important;
|
||||
height: auto;
|
||||
}
|
||||
|
|
@ -19,10 +19,12 @@ var IqPromotionShopCart = {
|
|||
cart_holder: '#promotion_cart_holder',
|
||||
invoice_holder: '#invoice_details_holder',
|
||||
checkout_holder: '#promotion_checkout_holder',
|
||||
show_products_holder: '#show_products_holder',
|
||||
|
||||
|
||||
free_product_id: null,
|
||||
shipping_option: null,
|
||||
|
||||
show_products_option: null,
|
||||
|
||||
init: function () {
|
||||
var _self = this;
|
||||
|
|
@ -47,8 +49,12 @@ var IqPromotionShopCart = {
|
|||
event.preventDefault();
|
||||
_self.switchShipping($(this));
|
||||
});
|
||||
_self.showInit();
|
||||
|
||||
$('select[name=show_products_filter]').on('change', function(event){
|
||||
event.preventDefault();
|
||||
_self.switchShowProducts($(this));
|
||||
});
|
||||
_self.showInit();
|
||||
|
||||
/*$_self.update_poduct_price();*/
|
||||
|
||||
|
|
@ -69,11 +75,21 @@ var IqPromotionShopCart = {
|
|||
_self.performRequest({product_id: $(this).data('product-id'), qty: 0, action: 'remove-shop-product'})
|
||||
.done(_self.refreshItemsAndView);
|
||||
});
|
||||
$('#shipping_state').on('change', function(){
|
||||
if ($('#shipping_address_switch').is(':checked')) {
|
||||
_self.changeStateShipping($(this).val());
|
||||
}
|
||||
});
|
||||
$('#billing_state').on('change', function(){
|
||||
if (!$('#shipping_address_switch').is(':checked')) {
|
||||
_self.changeStateShipping($(this).val());
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
switchShipping: function(_ele){
|
||||
changeStateShipping: function(_state_id){
|
||||
var _self = this;
|
||||
_self.shipping_option = _ele.val();
|
||||
_self.performRequest({shipping_option: _self.shipping_option, action: 'switch-shipping'})
|
||||
_self.performRequest({shipping_country_id: _state_id, action: 'change-state-shipping'})
|
||||
.done(_self.refreshItemsAndView);
|
||||
},
|
||||
switchFreeProduct: function(_ele){
|
||||
|
|
@ -93,7 +109,28 @@ var IqPromotionShopCart = {
|
|||
.done(_self.refreshItemsAndView);
|
||||
}
|
||||
},
|
||||
|
||||
switchShipping: function(_ele){
|
||||
var _self = this;
|
||||
_self.shipping_option = _ele.val();
|
||||
_self.performRequest({shipping_option: _self.shipping_option, action: 'switch-shipping'})
|
||||
.done(_self.refreshItemsAndView);
|
||||
},
|
||||
switchShowProducts: function(_ele){
|
||||
var _self = this;
|
||||
_self.show_products_option = _ele.val();
|
||||
_self.performRequest({show_products_option: _self.show_products_option, action: 'switch-show_products'})
|
||||
.done(_self.refreshShowProducts);
|
||||
},
|
||||
refreshShowProducts: function (data){
|
||||
var _self = IqPromotionShopCart;
|
||||
if(data.shop_products_view){
|
||||
$(_self.show_products_holder).html(data.shop_products_view);
|
||||
}
|
||||
$(_self.btn_shop_add).on('click', function(event){
|
||||
event.preventDefault();
|
||||
_self.addShopProduct($(this));
|
||||
});
|
||||
},
|
||||
updateInputCart: function (_ele){
|
||||
var _self = this;
|
||||
var qty = parseInt(_ele.val());
|
||||
|
|
@ -130,6 +167,11 @@ var IqPromotionShopCart = {
|
|||
if(data.checkout){
|
||||
$(_self.checkout_holder).html(data.checkout);
|
||||
}
|
||||
if(data.response.shipping_price_formated){
|
||||
$('#shipping_price_holder').html(data.response.shipping_price_formated);
|
||||
}
|
||||
|
||||
|
||||
_self.showInit();
|
||||
},
|
||||
performRequest : function(data) {
|
||||
|
|
|
|||
|
|
@ -50,9 +50,9 @@
|
|||
'credit_title' => 'Gutschrift aus Vertriebspartnerbestellungen auf Grüne Seele',
|
||||
'invoice_copy1line' => 'vielen Dank für Deine Bestellung bei Grüne Seele. Nachfolgend senden wir Dir die Rechnung zu deiner Bestellung: ',
|
||||
'credit_copy1line' => 'vielen Dank für Deine Vertriebspartnerschaft bei Grüne Seele. Nachfolgend senden wir Dir Deine Gutschrift zu. Der Betrag wird zeitnah angewiesen, bitte prüfen deine Zahlungsdaten in deinem Konto: <a href="https://partner.gruene-seele.bio/user/edit">Mein Konto -> Meine Daten</a>.',
|
||||
'footer_copy1' => 'GRÜNE SEELE GbR | Hauptstrasse 174 | 51143 Köln | Telefon: (+49) 2203 183 86 14 | E-Mail: service@gruene-seele.bio',
|
||||
'footer_copy1' => 'GRÜNE SEELE GmbH | Hauptstrasse 174 | 51143 Köln | Telefon: (+49) 2203 183 86 14 | E-Mail: service@gruene-seele.bio',
|
||||
'footer_copy2' => '',
|
||||
'footer_copy3' => '© 2021 All Rights Reserved',
|
||||
'footer_copy3' => '© 2022 All Rights Reserved',
|
||||
'checkout_mail_hl1' => 'Du hast folgende Artikel bestellt:',
|
||||
'checkout_mail_shipping' => 'Verpackungs- u. Versandkosten',
|
||||
'checkout_mail_status_info' => 'Statusinfo:',
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
{!! Form::open(['url' => route('admin_product_category_store'), 'class' => 'form-horizontal', 'id'=>'']) !!}
|
||||
|
||||
<input type="hidden" name="id" id="id" value="@if($category->id>0){{$category->id}}@else new @endif">
|
||||
<input type="hidden" name="action" value="save-form">
|
||||
|
||||
<div class="text-left mt-0 mb-2">
|
||||
<button type="submit" class="btn btn-submit">{{ __('save') }}</button>
|
||||
|
|
@ -38,6 +39,7 @@
|
|||
|
||||
{!! Form::close() !!}
|
||||
|
||||
@include('admin.category.products')
|
||||
|
||||
@include('admin.category.images')
|
||||
|
||||
|
|
|
|||
|
|
@ -27,12 +27,20 @@
|
|||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-8">
|
||||
<div class="form-group col">
|
||||
<label class="form-label" for="show_on">{{ __('Kategorie anzeigen (Mehrfachauswahl)') }}</label>
|
||||
{{ Form::select('show_on[]', \App\Services\Type::$showONs, $category->show_on, array('data-live-search'=>'false', 'class'=>'selectpicker', 'id'=>'show_on', 'multiple') ) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
{{--<div class="form-group col-8">
|
||||
<label for="parent_id" class="form-label">{{__('Hauptkategorie')}}</label>
|
||||
<select class="selectpicker" data-style="btn-default" name="">
|
||||
{!! HTMLHelper::getCategoriesWithoutParents($category->parent_id) !!}
|
||||
</select>
|
||||
</div>
|
||||
--}}
|
||||
<div class="form-group col-sm-4">
|
||||
<label class="form-label" for="pos">{{ __('pos') }}</label>
|
||||
{{ Form::text('pos', $category->pos, array('placeholder'=>__('pos'), 'class'=>'form-control', 'id'=>'pos')) }}
|
||||
|
|
|
|||
|
|
@ -11,32 +11,39 @@
|
|||
<tr>
|
||||
<th style="max-width: 60px;"> </th>
|
||||
<th>{{__('Pos')}}</th>
|
||||
<th>{{__('Hauptkategorie')}}</th>
|
||||
<th>{{__('Kategorie')}}</th>
|
||||
{{--<th>{{__('Kategorie')}}</th>--}}
|
||||
<th>{{__('Headline')}}</th>
|
||||
<th>{{__('Translate') }}</th>
|
||||
<th>{{__('Headline')}}</th>
|
||||
<th>{{__('Produkte')}}</th>
|
||||
<th>{{__('sichbar')}}</th>
|
||||
{{-- <th>__('Translate') </th>--}}
|
||||
<th>{{__('Status')}}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($values as $value)
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{route('admin_product_category_edit', [$value->id])}}" class="btn icon-btn btn-sm btn-primary">
|
||||
<span class="far fa-edit"></span>
|
||||
</a>
|
||||
</td>
|
||||
<td>{{ $value->pos }}</td>
|
||||
<td>@if($value->parent) {{ $value->parent->name }} @else {{ $value->name }} @endif</td>
|
||||
<td>@if($value->parent) {{ $value->name }} @else - @endif</td>
|
||||
<td>{{ $value->headline }}</td>
|
||||
<!-- <td>{{ $value->getTranNames() }}</td> -->
|
||||
<td data-sort="{{ $value->active }}">@if($value->active) <span class="badge badge-pill badge-success"><i class="fa fa-check"></i></span>@else<span class="badge badge-pill badge-danger"><i class="fa fa-times"></i></span>@endif</td>
|
||||
<td><a class="text-danger" href="{{ route('admin_product_category_delete', [$value->id]) }}" onclick="return confirm('{{__('Really delete entry?')}}');"><i class="far fa-trash-alt"></i></a></td>
|
||||
@foreach($values as $value)
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{route('admin_product_category_edit', [$value->id])}}" class="btn icon-btn btn-sm btn-primary">
|
||||
<span class="far fa-edit"></span>
|
||||
</a>
|
||||
</td>
|
||||
<td>{{ $value->pos }}</td>
|
||||
<td>@if($value->parent) {{ $value->parent->name }} @else {{ $value->name }} @endif</td>
|
||||
{{-- <td>@if($value->parent) {{ $value->name }} @else - @endif</td>--}}
|
||||
<td>{{ $value->headline }}</td>
|
||||
<td>{{ $value->product_categories->count() }}</td>
|
||||
<td>{!! implode($value->getShowOnTypes(), '<br>') !!}</td>
|
||||
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
{{-- <td>{{ $value->getTranNames() }}</td> --}}
|
||||
<td data-sort="{{ $value->active }}">@if($value->active) <span class="badge badge-pill badge-success"><i class="fa fa-check"></i></span>@else<span class="badge badge-pill badge-danger"><i class="fa fa-times"></i></span>@endif</td>
|
||||
<td><a class="text-danger" href="{{ route('admin_product_category_delete', ['category', $value->id]) }}" onclick="return confirm('{{__('Really delete entry?')}}');"><i class="far fa-trash-alt"></i></a></td>
|
||||
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="mt-4 ml-4">
|
||||
<a href="{{route('admin_product_category_edit', ['new'])}}" class="btn btn-sm btn-primary">
|
||||
|
|
@ -49,21 +56,11 @@
|
|||
|
||||
<script>
|
||||
$( document ).ready(function() {
|
||||
|
||||
|
||||
$('.datatables-style').dataTable({
|
||||
"bLengthChange": false,
|
||||
"iDisplayLength": 50,
|
||||
"order": [[ 1, "asc" ]],
|
||||
"aoColumns": [
|
||||
{ "sWidth": "8%" },
|
||||
{ "sWidth": "8%" },
|
||||
{ "sWidth": "19%" },
|
||||
{ "sWidth": "19%" },
|
||||
{ "sWidth": "30%" },
|
||||
{ "sWidth": "10%" },
|
||||
{ "sWidth": "8%" },
|
||||
],
|
||||
"order": [[ 1, "desc" ]],
|
||||
|
||||
"language": {
|
||||
"url": "/js/German.json"
|
||||
}
|
||||
|
|
|
|||
118
resources/views/admin/category/products.blade.php
Normal file
118
resources/views/admin/category/products.blade.php
Normal file
|
|
@ -0,0 +1,118 @@
|
|||
<div class="card mb-2">
|
||||
<h6 class="card-header">
|
||||
{{__('Produktliste')}} / {{ $category->name }}
|
||||
</h6>
|
||||
<div class="mt-3 ml-3">
|
||||
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-categorie-products"
|
||||
data-id="new"
|
||||
data-pos="0"
|
||||
data-produkt_id=""
|
||||
>{{__('Produkt hinzufügen')}}</button>
|
||||
</div>
|
||||
<div class="card-datatable table-responsive">
|
||||
<table class="datatables-style table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Pos</th>
|
||||
<th>Produkt</th>
|
||||
<th>#</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($category->product_categories as $product_category)
|
||||
<tr>
|
||||
<td>
|
||||
<button type="button" class="btn icon-btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-categorie-products"
|
||||
data-id="{{ $product_category->id }}"
|
||||
data-pos="{{ $product_category->pos }}"
|
||||
data-product_id="{{ $product_category->product_id }}">
|
||||
<span class="far fa-edit"></span>
|
||||
</button>
|
||||
</td>
|
||||
<td>
|
||||
{{ $product_category->pos }}
|
||||
</td>
|
||||
<td>
|
||||
@if($product_category->product)
|
||||
{{ $product_category->product->name }}
|
||||
@if($product_category->product->active)
|
||||
| <span class="badge badge-pill badge-success"><i class="fa fa-check"></i></span>
|
||||
@else
|
||||
| <span class="badge badge-pill badge-danger"><i class="fa fa-times"></i></span>
|
||||
@endif
|
||||
| <span class="small">{!! implode($product_category->product->getShowOnTypes(), ' / ') !!}</span>
|
||||
| <a href="{{ route('admin_product_edit', [$product_category->product->id]) }}" class="btn btn-xs btn-secondary"><i class="fa fa-eye"></i></a>
|
||||
@else
|
||||
-
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
<a class="text-danger" href="{{ route('admin_product_category_delete', ['product_category', $product_category->id]) }}" onclick="return confirm('{{__('Really delete entry?')}}');"><i class="far fa-trash-alt"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="mt-3 ml-3">
|
||||
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-categorie-products"
|
||||
data-id="new"
|
||||
data-pos="0"
|
||||
data-produkt_id=""
|
||||
>{{__('Produkt hinzufügen')}}</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Modal template -->
|
||||
<div class="modal fade" id="modals-categorie-products">
|
||||
<div class="modal-dialog">
|
||||
<form class="modal-content" action="{{ route('admin_product_category_store') }}" method="post">
|
||||
@csrf
|
||||
<input type="hidden" name="id">
|
||||
<input type="hidden" name="category_id" value="{{ $category->id }}">
|
||||
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title"> {{__('Produkt')}} <span class="font-weight-light">{{__('create/edit')}}</span></h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-row">
|
||||
|
||||
<div class="form-group col-md-12">
|
||||
<label class="form-label" for="pos">{{ __('pos') }}</label>
|
||||
{{ Form::text('pos', $category->pos, array('placeholder'=>__('pos'), 'class'=>'form-control')) }}
|
||||
</div>
|
||||
<div class="form-group col-md-12">
|
||||
<label for="country_ids" class="form-label">{{__('Produkt')}}</label>
|
||||
<select class="selectpicker" name="product_id" id="product_id" data-style="btn-light" data-live-search="true" required>
|
||||
{!! HTMLHelper::getProductsOptions() !!}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{__('close')}}</button>
|
||||
<button type="submit" class="btn btn-primary" name="action" value="save-product_category">{{__('save')}}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
$( document ).ready(function() {
|
||||
|
||||
$('#modals-categorie-products').on('show.bs.modal', function (event) {
|
||||
var button = $(event.relatedTarget);
|
||||
$(this).find(".modal-content input[name='id']").val(button.data('id'));
|
||||
$(this).find(".modal-body input[name='pos']").val(button.data('pos'));
|
||||
$(this).find(".modal-body select[name='product_id']").val(button.data('product_id'));
|
||||
$('.selectpicker').selectpicker('refresh');
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
|
@ -102,7 +102,8 @@
|
|||
|
||||
<div class="tab-pane fade" id="shop-product-full-ingredients">
|
||||
<div class="card borderless">
|
||||
<div class="card-body">
|
||||
<div class="card-body p-1">
|
||||
<div class="table-responsive">
|
||||
<table class="datatables-style table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
|
|
@ -121,6 +122,7 @@
|
|||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
data-pos="{{ $value->pos }}"
|
||||
data-name="{{ $value->name }}"
|
||||
data-short="{{ $value->short }}"
|
||||
data-show_at="{{ $value->show_at }}"
|
||||
data-show_on="{{ json_encode($value->show_on) }}"
|
||||
data-max_price="{{ $value->getFormattedMaxPrice() }}"
|
||||
data-default="{{ $value->default }}"
|
||||
data-active="{{ $value->active }}">
|
||||
|
|
@ -35,7 +35,7 @@
|
|||
</td>
|
||||
<td>{{ $value->pos }}</td>
|
||||
<td>{{ $value->name }} ({{ $value->short }})</td>
|
||||
<td>{{ $value->getShowAtType() }}</td>
|
||||
<td>{!! implode($value->getShowOnTypes(), '<br>') !!}</td>
|
||||
<td data-sort="{{ $value->default }}">{!! get_active_badge($value->default) !!}</td>
|
||||
<td data-sort="{{ $value->active }}">{!! get_active_badge($value->active) !!}</td>
|
||||
</tr>
|
||||
|
|
@ -49,7 +49,7 @@
|
|||
data-name=""
|
||||
data-short=""
|
||||
data-max_price=""
|
||||
data-show_at="9"
|
||||
data-show_on="[]"
|
||||
data-default="1"
|
||||
data-active="1"
|
||||
>{{__('Neue Zahlungsart hinzufügen')}}</button>
|
||||
|
|
@ -85,17 +85,25 @@
|
|||
<input type="text" class="form-control" name="short" placeholder="{{__('Abkürzung')}}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="show_on">{{ __('Produkt anzeigen (Mehrfachauswahl)') }}</label>
|
||||
{{ Form::select('show_on[]', \App\Services\Type::$payShowONs, 10, array('data-live-search'=>'false', 'class'=>'selectpicker', 'id'=>'show_on', 'multiple') ) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
|
||||
<div class="form-group col-sm-6">
|
||||
<label class="form-label" for="show_at">{{ __('Produkt anzeigen') }}</label>
|
||||
{{ Form::select('show_at', \App\Models\PaymentMethod::$showATs, 9, array('data-live-search'=>'false', 'class'=>'selectpicker', 'id'=>'show_at') ) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-6">
|
||||
<label class="form-label" for="max_price">{{ __('Max. Preis für Zahlung') }}</label>
|
||||
<input type="text" class="form-control" name="max_price" placeholder="{{__('Aktiv wenn Preis > 0')}}">
|
||||
</div>
|
||||
<div class="form-group col-sm-6">
|
||||
<label class="form-label" for="pos">{{ __('Pos.') }}</label>
|
||||
|
||||
<input type="text" class="form-control" name="pos" placeholder="{{__('Number to move the position if necessary')}}">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
|
|
@ -105,9 +113,7 @@
|
|||
<span class="custom-control-label">{{__('active')}}</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-group col-6">
|
||||
<input type="text" class="form-control" name="pos" placeholder="{{__('Number to move the position if necessary')}}">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-6">
|
||||
|
|
@ -137,7 +143,7 @@
|
|||
$(this).find(".modal-body input[name='short']").val(button.data('short'));
|
||||
$(this).find(".modal-body input[name='max_price']").val(button.data('max_price'));
|
||||
$(this).find(".modal-body input[name='pos']").val(button.data('pos'));
|
||||
$(this).find(".modal-body select[name='show_at']").val(button.data('show_at'));
|
||||
$(this).find(".modal-body select[name='show_on[]']").val(button.data('show_on'));
|
||||
$(this).find(".modal-body input[name='active']").prop( "checked", button.data('active'));
|
||||
$(this).find(".modal-body input[name='default']").prop( "checked", button.data('default'));
|
||||
|
||||
|
|
|
|||
|
|
@ -16,12 +16,13 @@
|
|||
<label class="form-label" for="name">{{ __('Produktname / Titel') }}*</label>
|
||||
{{ Form::text('name', $product->name, array('placeholder'=>__('Name'), 'class'=>'form-control', 'id'=>'name', 'required')) }}
|
||||
</div>
|
||||
<div class="form-row">
|
||||
{{-- <div class="form-row">
|
||||
<div class="form-group col-sm-5">
|
||||
<label class="form-label" for="show_at">{{ __('Produkt anzeigen') }}</label>
|
||||
{{ Form::select('show_at', $product->showATs, $product->show_at, array('data-live-search'=>'false', 'class'=>'selectpicker', 'id'=>'show_at') ) }}
|
||||
{{ Form::select('show_at', \App\Services\Type::$showATs, $product->show_at, array('data-live-search'=>'false', 'class'=>'selectpicker', 'id'=>'show_at') ) }}
|
||||
</div>
|
||||
</div>
|
||||
--}}
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-sm-10">
|
||||
|
|
@ -38,7 +39,7 @@
|
|||
<div class="form-row">
|
||||
<div class="form-group col-md-10">
|
||||
<label class="form-label" for="show_on">{{ __('Produkt anzeigen (Mehrfachauswahl)') }}</label>
|
||||
{{ Form::select('show_on[]', $product->showONs, $product->show_on, array('data-live-search'=>'false', 'class'=>'selectpicker', 'id'=>'show_on', 'multiple') ) }}
|
||||
{{ Form::select('show_on[]', \App\Services\Type::$showONs, $product->show_on, array('data-live-search'=>'false', 'class'=>'selectpicker', 'id'=>'show_on', 'multiple') ) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
|
|
|||
|
|
@ -91,14 +91,11 @@
|
|||
</li>
|
||||
@endif
|
||||
{{-- TODO Remove isAdmin --}}
|
||||
@if(Auth::user()->isActiveAccount() && Auth::user()->isAdmin())
|
||||
@if(Auth::user()->isActiveAccount())
|
||||
<li class="sidenav-item @if(Request::is('user/promotions', '/user/promotion/*')) open @endif">
|
||||
<a href="javascript:void(0)" class="sidenav-link sidenav-toggle">
|
||||
<i class="sidenav-icon ion ion-md-rocket"></i>
|
||||
<div>{{ __('navigation.my_promotions') }}</div>
|
||||
<div class="pl-1 ml-auto">
|
||||
<div class="badge badge-secondary">Admin</div>
|
||||
</div>
|
||||
</a>
|
||||
<ul class="sidenav-menu">
|
||||
<li class="sidenav-item{{ Request::is('user/promotions') ? ' active' : '' }}">
|
||||
|
|
|
|||
|
|
@ -264,7 +264,7 @@
|
|||
</head>
|
||||
<body>
|
||||
<div id="address_box">
|
||||
<div id="address_box_top">GRÜNE SEELE GbR • Hauptstr. 174 • 51143 Köln</div>
|
||||
<div id="address_box_top">GRÜNE SEELE GmbH • Hauptstr. 174 • 51143 Köln</div>
|
||||
@if($user->account)
|
||||
@if($user->account->company)
|
||||
{{ $user->account->company }}<br>
|
||||
|
|
|
|||
|
|
@ -264,7 +264,7 @@
|
|||
</head>
|
||||
<body>
|
||||
<div id="address_box">
|
||||
<div id="address_box_top">GRÜNE SEELE GbR • Hauptstr. 174 • 51143 Köln</div>
|
||||
<div id="address_box_top">GRÜNE SEELE GmbH • Hauptstr. 174 • 51143 Köln</div>
|
||||
|
||||
@if($shopping_order->shopping_user->billing_company)
|
||||
{{ $shopping_order->shopping_user->billing_company }}<br>
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
<div class="form-group col-md-4">
|
||||
@if ($user->hasProfileImage())
|
||||
<div class="text-center" style="border: 1px solid #eee;">
|
||||
<img src="{{ route('response_file', ['user', $user->getProfileImage()]) }}" alt="">
|
||||
<img src="{{ route('response_file', ['user', $user->getProfileImage()]) }}?{{ time() }}" alt="" class=" img-fluid">
|
||||
<br>
|
||||
<a href="{{ route('user_profile_image_delete', ['avatar']) }}"
|
||||
class="btn btn-sm btn-primary mt-2 mb-2"
|
||||
|
|
|
|||
|
|
@ -34,6 +34,6 @@
|
|||
</div>
|
||||
<div class="container py-2 px-2">
|
||||
<hr>
|
||||
<div class="text-center pl-2 mt-2">Copyright since 2019 • GRÜNE SEELE GbR</div>
|
||||
<div class="text-center pl-2 mt-2">Copyright since 2019 • GRÜNE SEELE GmbH</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
@foreach ($promotion_user->promotion_user_products_active as $promotion_user_product)
|
||||
@if ($promotion_user_product->isShow())
|
||||
<div class="col-md-6 col-lg-4 text-center">
|
||||
<div class="col-md-6 col-lg-4 text-center mb-4">
|
||||
@if ($promotion_user_product->product->images)
|
||||
@if ($image = $promotion_user_product->product->images->first())
|
||||
<img src="{{ route('product_image', [$image->slug]) }}" class="mb-2 img-fluid" alt="">
|
||||
|
|
@ -51,7 +51,7 @@
|
|||
@endforeach
|
||||
<div class="col-12">
|
||||
<div id="error-free_product_id" class="text-center"></div>
|
||||
<hr class="">
|
||||
<hr class="mt-0">
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
|
@ -1,18 +1,21 @@
|
|||
<div class="container flex-grow-1 container-p-y pb-0">
|
||||
<style>
|
||||
|
||||
</style>
|
||||
<div class="container intro-media flex-grow-1 container-p-y pb-0">
|
||||
<div class="media align-items-top py-3 mb-3">
|
||||
@if($promotion_user->user->hasProfileImage())
|
||||
<img src="{{ route('response_file', ['user', $promotion_user->user->getProfileImage()]) }}" alt="" class="d-block ui-w-100 rounded-circle mt-3">
|
||||
<img src="{{ route('response_file', ['user', $promotion_user->user->getProfileImage()]) }}?{{ time() }}" alt="" class="d-block ui-w-150 rounded-circle mt-3">
|
||||
@endif
|
||||
<div class="media-body ml-4">
|
||||
<h1 class="text-left">{{ $promotion_user->name }}</h1>
|
||||
<p class="text-left">{!! nl2br($promotion_user->description) !!}</p>
|
||||
<h6 class="card-header bg-light py-2">
|
||||
<a href="#" class="" style="text-decoration: none" data-toggle="collapse" data-target="#collapsePaymentForm" aria-expanded="false" aria-controls="collapsePaymentForm">
|
||||
<i class="fa fa-caret-down"></i> mehr über mich
|
||||
<p class="text-left mb-2">{!! nl2br($promotion_user->description) !!}</p>
|
||||
<h6 class="card-header no-border py-2 text-left px-0">
|
||||
<a href="#" class="collapsed" style="text-decoration: none" data-toggle="collapse" data-target="#collapsePaymentForm" aria-expanded="false" aria-controls="collapsePaymentForm">
|
||||
<i class="fa fa-caret-collapse"></i> Weitere persönliche Infos ...
|
||||
</a>
|
||||
</h6>
|
||||
<div class="collapse" id="collapsePaymentForm">
|
||||
<p class="text-left">{!! nl2br($promotion_user->about_you) !!}</p>
|
||||
<div class="collapse mt-1" id="collapsePaymentForm">
|
||||
<p class="text-left"><i>{!! nl2br($promotion_user->about_you) !!}</i></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,35 @@
|
|||
<h2 class="mt-3">Rechnungsdetails</h2>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="form-group">
|
||||
<label class="switcher switcher-success">
|
||||
{!! Form::checkbox('is_invoice_details_private', 1, true, ['id' => 'switch_invoice_details_private', 'class' => 'switcher-input']) !!}
|
||||
<span class="switcher-indicator">
|
||||
<span class="switcher-yes">
|
||||
<span class="ion ion-md-checkmark"></span>
|
||||
</span>
|
||||
<span class="switcher-no">
|
||||
</span>
|
||||
</span>
|
||||
<span class="switcher-label">Privat (keine Firma)</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="form-group">
|
||||
<label class="switcher switcher-success">
|
||||
{!! Form::checkbox('is_invoice_details_germany', 1, (Yard::instance('shopping')->getShippingCountryId() == 1 ? true : false), ['id' => 'switch_invoice_details_germany', 'class' => 'switcher-input']) !!}
|
||||
<span class="switcher-indicator">
|
||||
<span class="switcher-yes">
|
||||
<span class="ion ion-md-checkmark"></span>
|
||||
</span>
|
||||
<span class="switcher-no">
|
||||
</span>
|
||||
</span>
|
||||
<span class="switcher-label">aus Deutschland</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="form-group {{ $errors->has('billing_salutation') ? 'error' : '' }}">
|
||||
<label for="billing_salutation">Anrede <span class="required">*</span></label>
|
||||
|
|
@ -34,18 +64,18 @@
|
|||
@endif
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="col-12 not-show show_invoice_details_private">
|
||||
<div class="form-group">
|
||||
<label for="billing_company">Firmenname (optional)</label>
|
||||
{!! Form::text('billing_company', '', ['class' => 'form-control', 'id' => 'billing_company']) !!}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="col-12 not-show show_invoice_details_germany">
|
||||
<div class="form-group">
|
||||
<label for="billing_state">Land / Region <span class="required">*</span></label>
|
||||
<select id="billing_state" name="billing_state" class="form-control selectpicker"
|
||||
data-style="btn-default" required>
|
||||
{!! HTMLHelper::getCountriesForShipping(1) !!}
|
||||
data-style="btn-default">
|
||||
{!! HTMLHelper::getCountriesForShipping(Yard::instance('shopping')->getShippingCountryId(), false, 2) !!}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -62,7 +92,7 @@
|
|||
</div>
|
||||
<div class="col-12">
|
||||
<div class="form-group">
|
||||
{!! Form::text('billing_address_2', '', ['placeholder' => 'Wohnung, Suite, Zimmer usw. (optional)', 'class' => 'form-control ' . ($errors->has('billing_address_2') ? 'error' : ''), 'id' => 'billing_address_2']) !!}
|
||||
{!! Form::text('billing_address_2', '', ['placeholder' => 'Zusätzliche Angaben / Hinweise (optional)', 'class' => 'form-control ' . ($errors->has('billing_address_2') ? 'error' : ''), 'id' => 'billing_address_2']) !!}
|
||||
@if ($errors->has('billing_address_2'))
|
||||
<label for="billing_address_2" class="error text-danger small"
|
||||
style="display: block;">{{ $errors->first('billing_address_2') }}</label>
|
||||
|
|
@ -89,16 +119,6 @@
|
|||
@endif
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="form-group">
|
||||
<label for="billing_phone">Telefon (optional)</label>
|
||||
{!! Form::text('billing_phone', '', ['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="col-12">
|
||||
<div class="form-group">
|
||||
<label for="billing_email">E-Mail <span class="required">*</span></label>
|
||||
|
|
@ -167,18 +187,18 @@
|
|||
@endif
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="col-12 not-show show_invoice_details_private">
|
||||
<div class="form-group">
|
||||
<label for="shipping_company">Firmenname (optional)</label>
|
||||
{!! Form::text('shipping_company', '', ['class' => 'form-control', 'id' => 'shipping_company']) !!}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="col-12 not-show show_invoice_details_germany">
|
||||
<div class="form-group">
|
||||
<label for="shipping_state">Land / Region <span class="required">*</span></label>
|
||||
<select id="shipping_state" name="shipping_state" class="form-control selectpicker"
|
||||
data-style="btn-default" required>
|
||||
{!! HTMLHelper::getCountriesForShipping(1) !!}
|
||||
data-style="btn-default">
|
||||
{!! HTMLHelper::getCountriesForShipping(Yard::instance('shopping')->getShippingCountryId(), false, 2) !!}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -195,7 +215,7 @@
|
|||
</div>
|
||||
<div class="col-12">
|
||||
<div class="form-group">
|
||||
{!! Form::text('shipping_address_2', '', ['placeholder' => 'Wohnung, Suite, Zimmer usw. (optional)', 'class' => 'form-control ' . ($errors->has('shipping_address_2') ? 'error' : ''), 'id' => 'shipping_address_2']) !!}
|
||||
{!! Form::text('shipping_address_2', '', ['placeholder' => 'Zusätzliche Angaben / Hinweise (optional)', 'class' => 'form-control ' . ($errors->has('shipping_address_2') ? 'error' : ''), 'id' => 'shipping_address_2']) !!}
|
||||
@if ($errors->has('shipping_address_2'))
|
||||
<label for="shipping_address_2" class="error text-danger small"
|
||||
style="display: block;">{{ $errors->first('shipping_address_2') }}</label>
|
||||
|
|
@ -222,16 +242,6 @@
|
|||
@endif
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="form-group">
|
||||
<label for="shipping_phone">Telefon (optional)</label>
|
||||
{!! Form::text('shipping_phone', '', ['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>
|
||||
|
||||
<script>
|
||||
|
|
@ -289,8 +299,24 @@
|
|||
validator.element($(this));
|
||||
});
|
||||
|
||||
|
||||
|
||||
function switch_invoice_details_germany(){
|
||||
if($('input#switch_invoice_details_germany').is(':checked')){
|
||||
$('.show_invoice_details_germany').hide('slow');
|
||||
}else{
|
||||
$('.show_invoice_details_germany').show('slow');
|
||||
}
|
||||
}
|
||||
switch_invoice_details_germany();
|
||||
$('input#switch_invoice_details_private').on('change', function () {
|
||||
if($(this).is(':checked')){
|
||||
$('.show_invoice_details_private').hide('slow');
|
||||
}else{
|
||||
$('.show_invoice_details_private').show('slow');
|
||||
}
|
||||
});
|
||||
$('input#switch_invoice_details_germany').on('change', function () {
|
||||
switch_invoice_details_germany();
|
||||
});
|
||||
|
||||
// Shipping Address show|hide
|
||||
$("#shipping_address_switch").bind("change", function() {
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
<label for="billing_state">Land / Region <span class="required">*</span></label>
|
||||
<select id="billing_state" name="billing_state" class="form-control selectpicker"
|
||||
data-style="btn-default" required>
|
||||
{!! HTMLHelper::getCountriesForShipping(1) !!}
|
||||
{!! HTMLHelper::getCountriesForShipping(Yard::instance('shopping')->getShippingCountryId(), false, 2) !!}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -32,15 +32,14 @@
|
|||
<img src="{{ asset('/assets/images/1x1.png') }}" class="d-block ui-w-80 ui-bordered mr-4" alt="">
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="col-9 col-sm-10">
|
||||
<div class="row">
|
||||
<div class="col-12 col-sm-6 col-md-7 description">
|
||||
<div class="media-body">
|
||||
<div class="d-block text-body"
|
||||
style="font-size: 15px; font-weight: 500;">{{ $row->name }}
|
||||
style="">{{ $row->name }}
|
||||
</div>
|
||||
<div class="text-body">
|
||||
<div class="text-body" style="font-size: 0.9em">
|
||||
<div>Inhalt: {{ $product->contents }}</div>
|
||||
<div>Art.-Nr.: {{ $product->number }}</div>
|
||||
</div>
|
||||
|
|
@ -53,7 +52,7 @@
|
|||
data-product-id="{{ $product->id }}"><i
|
||||
class="fa fa-times"></i> Artikel entfernen</a>
|
||||
@else
|
||||
gratis Produkt
|
||||
gratis
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -90,10 +89,13 @@
|
|||
<div class="clearfix"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-2 col-12">
|
||||
<p class="small mb-2">Du hast {{ Yard::instance('shopping')->count() }} Artikel in Deinem Warenkorb</p>
|
||||
<div class="mt-0 col-12">
|
||||
<p class="small mt-0 mb-2">Du hast {{ Yard::instance('shopping')->count() }} Artikel in Deinem Warenkorb
|
||||
<span class="float-right">* Preis inkl. gesetzl. MwSt. | zzgl. Versandkosten</span>
|
||||
</p>
|
||||
<button type="button" class="btn btn-default btn-sm" id="clear-products-basket"><i
|
||||
class="ion ion-ios-trash"></i> Warenkorb löschen</button>
|
||||
<p class="small mt-2 mb-2"></p>
|
||||
<hr class="">
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -13,20 +13,8 @@
|
|||
</span>
|
||||
<span class="switcher-no"></span>
|
||||
</span>
|
||||
<span class="switcher-label">0,00 € - Ich hole die Ware bei {{ $promotion_user->user->getFullName() }} persönlich ab</span>
|
||||
<span class="switcher-label">0,00 € - Ich hole die Ware bei {{ $promotion_user->user->getFullName(false) }} persönlich ab (Abholadresse beachten)</span>
|
||||
</label>
|
||||
{{-- <label class="switcher switcher-success">
|
||||
<input type="radio" class="switcher-input" name="switchers_shipping" data-error="#error-switchers_shipping" value="dhl_slow">
|
||||
<span class="switcher-indicator">
|
||||
<span class="switcher-yes">
|
||||
<span class="ion ion-md-checkmark"></span>
|
||||
</span>
|
||||
<span class="switcher-no"></span>
|
||||
</span>
|
||||
<span class="switcher-label">3,50 € - Bücher-/Warensendung mit Deutsche Post (4-6
|
||||
Werktage)</span>
|
||||
</label>
|
||||
--}}
|
||||
<label class="switcher switcher-success">
|
||||
<input type="radio" class="switcher-input" name="switchers_shipping" data-error="#error-switchers_shipping" value="dhl_shipping"
|
||||
@if($shipping_option === 'dhl_shipping') checked @endif>
|
||||
|
|
@ -36,7 +24,7 @@
|
|||
</span>
|
||||
<span class="switcher-no"></span>
|
||||
</span>
|
||||
<span class="switcher-label">ab {{ \App\Services\PromotionCart::getLowestShippingPrice() }} € - Versand mit DHL (1-3 Werktage)</span>
|
||||
<span class="switcher-label"><span id="shipping_price_holder">{{ \App\Services\PromotionCart::getLowestShippingPrice() }}</span> € - Versand mit DHL (1-3 Werktage)</span>
|
||||
</label>
|
||||
</div>
|
||||
<div id="error-switchers_shipping" class="text-left"></div>
|
||||
|
|
|
|||
|
|
@ -1,90 +1,20 @@
|
|||
<section>
|
||||
<h2 class="text-center mt-3">zusätzlich Einkaufen</h2>
|
||||
<h2 class="text-center mt-3">Möchtest Du zusätzlich etwas einkaufen?</h2>
|
||||
<p class="text-center">Vielleicht sagt Dir ja jetzt schon ein Produkt zu und Du nimmst es gleich mit ...</p>
|
||||
<div class="swiper mySwiper">
|
||||
<div class="swiper-wrapper">
|
||||
@foreach ($shop_products as $product)
|
||||
@php($cartItem = Yard::instance('shopping')->getCartItemByProduct($product->id, false, false))
|
||||
@php($qty = isset($cartItem->qty) ? "x".$cartItem->qty : 0)
|
||||
@php($rowId = isset($cartItem->rowId) ? $cartItem->rowId : '')
|
||||
|
||||
<div class="swiper-slide">
|
||||
<div class="text-center">
|
||||
@if ($product->images)
|
||||
@if ($image = $product->images->first())
|
||||
<img src="{{ route('product_image', [$image->slug]) }}" class="mb-2 img-fluid" alt="">
|
||||
@endif
|
||||
@endif
|
||||
<h4 class="product-title px-4">
|
||||
{{ $product->name }}
|
||||
</h4>
|
||||
<div class="mb-2 product-description px-4">
|
||||
{{ $product->getShortCopy(true, 110) }}
|
||||
</div>
|
||||
<div class="more_details">
|
||||
<a href="" class="" data-modal="modal-lg" data-toggle="modal"
|
||||
data-target="#modals-load-content" data-id="{{ $product->id }}"
|
||||
data-route="{{ route('web_promotion_modal_load') }}"
|
||||
data-action="web-show-product" data-view="with-price">
|
||||
<i class="fa fa-search"></i> Mehr Details</a>
|
||||
</div>
|
||||
<div class="product-item-price mt-2 mt-2">
|
||||
{{ $product->getFormattedPrice() }} €*
|
||||
<br><span class="small text-muted">{{ $product->getBasePriceFormattedFull() }} €</span>
|
||||
|
||||
</div>
|
||||
<div class="mt-2 pb-3">
|
||||
<button type="button" class="btn btn-primary btn-add-product-shop" data-product_id="{{ $product->id }}" data-row-id="{{ $cartItem->rowId }}">
|
||||
In den Warenkorb <i class="ion ion-md-basket navbar-icon align-middle"></i>
|
||||
<span class="badge badge-cart indicator" id="badge_cart_indicator_{{ $product->id }}">{{ $qty }}</span>
|
||||
</button>
|
||||
<div class="p-4"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
<div class="row justify-content-center">
|
||||
<div class="form-group col-12 col-md-8 col-lg-6">
|
||||
<select id="show_products_filter" name="show_products_filter" class="form-control selectpicker" data-style="btn-default">
|
||||
{!! HTMLHelper::getCategoriesOptionsByShowOn([], 'Kategorie filtern', ['3']) !!}
|
||||
</select>
|
||||
</div>
|
||||
<div class="swiper-button-next"></div>
|
||||
<div class="swiper-button-prev"></div>
|
||||
<div class="swiper-pagination"></div>
|
||||
</div>
|
||||
<div id="show_products_holder">
|
||||
@include('web.promotion._shop_products_inner')
|
||||
</div>
|
||||
|
||||
<div class="m2-4 text-center small">
|
||||
* Preis inkl. gesetzl. MwSt. | zzgl. Versandkosten
|
||||
<hr class="">
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
var swiper = new Swiper(".mySwiper", {
|
||||
slidesPerView: 1,
|
||||
spaceBetween: 10,
|
||||
pagination: {
|
||||
el: ".swiper-pagination",
|
||||
clickable: true,
|
||||
},
|
||||
navigation: {
|
||||
nextEl: ".swiper-button-next",
|
||||
prevEl: ".swiper-button-prev",
|
||||
},
|
||||
breakpoints: {
|
||||
576: {
|
||||
slidesPerView: 1,
|
||||
spaceBetween: 10,
|
||||
},
|
||||
768: {
|
||||
slidesPerView: 2,
|
||||
spaceBetween: 20,
|
||||
},
|
||||
992: {
|
||||
slidesPerView: 3,
|
||||
spaceBetween: 20,
|
||||
},
|
||||
1200: {
|
||||
slidesPerView: 3,
|
||||
spaceBetween: 20,
|
||||
},
|
||||
},
|
||||
});
|
||||
});
|
||||
</script>
|
||||
82
resources/views/web/promotion/_shop_products_inner.blade.php
Normal file
82
resources/views/web/promotion/_shop_products_inner.blade.php
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
|
||||
<div class="swiper mySwiper">
|
||||
<div class="swiper-wrapper">
|
||||
@foreach ($shop_products as $product)
|
||||
@php($cartItem = Yard::instance('shopping')->getCartItemByProduct($product->id, false, false))
|
||||
@php($qty = isset($cartItem->qty) ? "x".$cartItem->qty : 0)
|
||||
@php($rowId = isset($cartItem->rowId) ? $cartItem->rowId : '')
|
||||
|
||||
<div class="swiper-slide">
|
||||
<div class="text-center">
|
||||
@if ($product->images)
|
||||
@if ($image = $product->images->first())
|
||||
<img src="{{ route('product_image', [$image->slug]) }}" class="mb-2 img-fluid" alt="">
|
||||
@endif
|
||||
@endif
|
||||
<h4 class="product-title px-4">
|
||||
{{ $product->name }}
|
||||
</h4>
|
||||
<div class="mb-2 product-description px-2">
|
||||
{{ $product->getShortCopy(true, 110) }}
|
||||
</div>
|
||||
<div class="more_details">
|
||||
<a href="" class="" data-modal="modal-lg" data-toggle="modal"
|
||||
data-target="#modals-load-content" data-id="{{ $product->id }}"
|
||||
data-route="{{ route('web_promotion_modal_load') }}"
|
||||
data-action="web-show-product" data-view="with-price">
|
||||
<i class="fa fa-search"></i> Mehr Details</a>
|
||||
</div>
|
||||
<div class="product-item-price mt-2 mt-2">
|
||||
{{ $product->getFormattedPrice() }} €*
|
||||
<br><span class="small text-muted">{{ $product->getBasePriceFormattedFull() }} €</span>
|
||||
|
||||
</div>
|
||||
<div class="mt-2 pb-3">
|
||||
<button type="button" class="btn btn-primary btn-add-product-shop" data-product_id="{{ $product->id }}" data-row-id="{{ $cartItem->rowId }}">
|
||||
In den Warenkorb <i class="ion ion-md-basket navbar-icon align-middle"></i>
|
||||
<span class="badge badge-cart indicator" id="badge_cart_indicator_{{ $product->id }}">{{ $qty }}</span>
|
||||
</button>
|
||||
<div class="p-2"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
<div class="swiper-button-next"></div>
|
||||
<div class="swiper-button-prev"></div>
|
||||
<div class="swiper-pagination"></div>
|
||||
</div>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
var swiper = new Swiper(".mySwiper", {
|
||||
slidesPerView: 1,
|
||||
spaceBetween: 10,
|
||||
pagination: {
|
||||
el: ".swiper-pagination",
|
||||
clickable: true,
|
||||
},
|
||||
navigation: {
|
||||
nextEl: ".swiper-button-next",
|
||||
prevEl: ".swiper-button-prev",
|
||||
},
|
||||
breakpoints: {
|
||||
576: {
|
||||
slidesPerView: 1,
|
||||
spaceBetween: 10,
|
||||
},
|
||||
768: {
|
||||
slidesPerView: 2,
|
||||
spaceBetween: 20,
|
||||
},
|
||||
992: {
|
||||
slidesPerView: 3,
|
||||
spaceBetween: 20,
|
||||
},
|
||||
1200: {
|
||||
slidesPerView: 3,
|
||||
spaceBetween: 20,
|
||||
},
|
||||
},
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
|
@ -1,14 +1,11 @@
|
|||
<div class="modal-content">
|
||||
|
||||
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">
|
||||
Produktdetails
|
||||
</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="modal-body p-2 p-md-4">
|
||||
<div class="card mb-3">
|
||||
<div class="media flex-wrap flex-md-nowrap">
|
||||
<div class="d-block col-12 col-md-4 col-lg-4 text-center p-0 m-0">
|
||||
|
|
@ -17,37 +14,36 @@
|
|||
@endif
|
||||
</div>
|
||||
|
||||
<div class="media-body p-4 p-md-5 ">
|
||||
<h4 class="mb-2">
|
||||
<a href="#" class="text-body">{{ $product->name }}</a>
|
||||
</h4>
|
||||
<div class="media-body py-4 px-3 px-md-4">
|
||||
<h3 class="mb-2">
|
||||
{{ $product->name }}
|
||||
</h3>
|
||||
{!! $product->copy !!}
|
||||
|
||||
<table class="table my-4">
|
||||
<table class="table table-bordered table-stripe my-4">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="border-0 text-muted align-middle" style="width: 120px">Inhalt:</td>
|
||||
<td class="border-0">{{ $product->contents }}</td>
|
||||
<td class="align-middle" style="width: 120px">Inhalt:</td>
|
||||
<td class="font-weight-bold">{{ $product->contents }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="border-0 text-muted align-middle">Gewicht:</td>
|
||||
<td class="border-0">{{ $product->weight }} g</td>
|
||||
<td class="align-middle">Gewicht:</td>
|
||||
<td class="font-weight-bold">{{ $product->weight }} g</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="border-0 text-muted align-middle">Art.-Nr.:</td>
|
||||
<td class="border-0">{{ $product->number }}</td>
|
||||
<td class="align-middle">Art.-Nr.:</td>
|
||||
<td class="font-weight-bold">{{ $product->number }}</td>
|
||||
</tr>
|
||||
@if(isset($data['view']) && $data['view'] === 'with-price')
|
||||
<tr>
|
||||
<td class="border-0 text-muted align-middle">Preis:</td>
|
||||
<td class="border-0">{{ $product->getFormattedPrice() }} €*</td>
|
||||
<td class="align-middle">Preis:</td>
|
||||
<td class="font-weight-bold">{{ $product->getFormattedPrice() }} €*</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="border-0 text-muted align-middle">Grundpreis:</td>
|
||||
<td class="border-0">{{ $product->getBasePriceFormattedFull() }} €</td>
|
||||
<td class="align-middle">Grundpreis:</td>
|
||||
<td class="font-weight-bold">{{ $product->getBasePriceFormattedFull() }} €</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="border-0 text-muted">* inkl. gesetzl. MwSt. | zzgl. Versandkosten</td>
|
||||
<td colspan="2" class="">* inkl. gesetzl. MwSt. | zzgl. Versandkosten</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
|
|
@ -58,22 +54,21 @@
|
|||
|
||||
<div class="">
|
||||
|
||||
<ul class="nav nav-tabs tabs-alt justify-content-center border-0 px-4 px-lg-5">
|
||||
<ul class="nav nav-tabs tabs-alt justify-content-center border-0 px-4 px-lg-5 mb-2">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link small font-weight-normal text-expanded py-4 active" data-toggle="tab" href="#shop-product-description">Bechreibung</a>
|
||||
<a class="nav-link small font-weight-normal text-expanded py-2 active" data-toggle="tab" href="#shop-product-description">Bechreibung</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link small font-weight-normal text-expanded py-4" data-toggle="tab" href="#shop-product-usage">Anwendung</a>
|
||||
<a class="nav-link small font-weight-normal text-expanded py-2" data-toggle="tab" href="#shop-product-usage">Anwendung</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link small font-weight-normal text-expanded py-4" data-toggle="tab" href="#shop-product-full-ingredients">Inhaltsstoffe</a>
|
||||
<a class="nav-link small font-weight-normal text-expanded py-2" data-toggle="tab" href="#shop-product-full-ingredients">Inhaltsstoffe</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link small font-weight-normal text-expanded py-4" data-toggle="tab" href="#shop-product-ingredients">Hinweise</a>
|
||||
<a class="nav-link small font-weight-normal text-expanded py-2" data-toggle="tab" href="#shop-product-ingredients">Hinweise</a>
|
||||
</li>
|
||||
</ul>
|
||||
<hr class="m-0">
|
||||
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane fade show active" id="shop-product-description">
|
||||
<div class="card borderless">
|
||||
|
|
@ -92,8 +87,9 @@
|
|||
</div>
|
||||
|
||||
<div class="tab-pane fade" id="shop-product-full-ingredients">
|
||||
<div class="card borderless">
|
||||
<div class="card-body">
|
||||
<div class="card borderless no-border ">
|
||||
<div class="card-body p-0">
|
||||
<div class="table-responsive">
|
||||
<table class="datatables-style table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
|
|
@ -112,11 +108,11 @@
|
|||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="tab-pane fade" id="shop-product-ingredients">
|
||||
<div class="card borderless">
|
||||
<div class="card-body">
|
||||
|
|
@ -128,7 +124,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<div class="modal-footer p-2 p-md-4">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">schließen</button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -24,11 +24,13 @@
|
|||
|
||||
<div class="container flex-grow-1 container-p-y pb-0">
|
||||
<div class="media align-items-center pt-3 mb-3">
|
||||
{{-- <img src="assets/img/avatars/5-small.png" alt="" class="d-block ui-w-100 rounded-circle"> --}}
|
||||
@if($promotion_user->user->hasProfileImage())
|
||||
<img src="{{ route('response_file', ['user', $promotion_user->user->getProfileImage()]) }}" alt="" class="d-block ui-w-100 rounded-circle mt-3">
|
||||
@endif
|
||||
<div class="media-body ml-4">
|
||||
<h1 class="text-center">Super, geschafft!</h1>
|
||||
<p class="text-center">
|
||||
Wir werden dich infomieren ....
|
||||
Ich danke Dir, dass Du unseren Service nutzt, wir werden Dich infomieren wenn die Promotion wieder zur Verfügung steht.
|
||||
</p>
|
||||
<p class="text-center">Liebe Grüße,<br>{{ $promotion_user->user->getFullName() }}<br>Vertriebspartner:in der GRÜNEN SEELE Naturkosmetik</p>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue