Removed stripe fees visibility from every where
This commit is contained in:
parent
a30b16e9a0
commit
0c79d87503
|
|
@ -93,7 +93,6 @@
|
|||
"Webkul\\CMS\\": "packages/Webkul/CMS/src",
|
||||
"Webkul\\CustomerDocument\\": "packages/Webkul/CustomerDocument",
|
||||
"Webkul\\BulkAddToCart\\": "packages/Webkul/BulkAddToCart",
|
||||
"Webkul\\SAASCustomizer\\": "packages/Webkul/SAASCustomizer/src",
|
||||
"Webkul\\AdminAuthCheck\\": "packages/Webkul/AdminAuthCheck/src",
|
||||
"Webkul\\StripeConnect\\": "packages/Webkul/StripeConnect/src",
|
||||
"Webkul\\CustomerCreditMax\\": "packages/Webkul/CustomerCreditMax",
|
||||
|
|
@ -101,7 +100,9 @@
|
|||
"Webkul\\ShowPriceAfterLogin\\": "packages/Webkul/ShowPriceAfterLogin/src",
|
||||
"Webkul\\PreOrder\\": "packages/Webkul/PreOrder/src",
|
||||
"Webkul\\Webfont\\": "packages/Webkul/Webfont/src",
|
||||
"Webkul\\GTM\\": "packages/Webkul/GTM/src"
|
||||
"Webkul\\GTM\\": "packages/Webkul/GTM/src",
|
||||
"Webkul\\Custom\\": "packages/Webkul/Custom/src",
|
||||
"Webkul\\SAASCustomizer\\": "packages/Webkul/SAASCustomizer/src"
|
||||
}
|
||||
},
|
||||
"autoload-dev": {
|
||||
|
|
|
|||
|
|
@ -255,8 +255,9 @@ return [
|
|||
Webkul\ShowPriceAfterLogin\Providers\ShowPriceAfterLoginServiceProvider::class,
|
||||
Webkul\CustomerCreditMax\Providers\CustomerCreditMaxServiceProvider::class,
|
||||
Webkul\PreOrder\Providers\PreOrderServiceProvider::class,
|
||||
Webkul\SAASCustomizer\Providers\SAASCustomizerServiceProvider::class,
|
||||
Webkul\CustomerGroupCatalog\Providers\CustomerGroupCatalogServiceProvider::class
|
||||
Webkul\CustomerGroupCatalog\Providers\CustomerGroupCatalogServiceProvider::class,
|
||||
Webkul\Custom\Providers\CustomServiceProvider::class,
|
||||
Webkul\SAASCustomizer\Providers\SAASCustomizerServiceProvider::class
|
||||
],
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -26,6 +26,9 @@
|
|||
<div class="page-content">
|
||||
<div class="form-container">
|
||||
@csrf()
|
||||
|
||||
{!! view_render_event('bagisto.admin.settings.slider.create.before') !!}
|
||||
|
||||
<div class="control-group" :class="[errors.has('title') ? 'has-error' : '']">
|
||||
<label for="title" class="required">{{ __('admin::app.settings.sliders.title') }}</label>
|
||||
<input type="text" class="control" name="title" v-validate="'required'" data-vv-as=""{{ __('admin::app.settings.sliders.title') }}"">
|
||||
|
|
@ -64,6 +67,8 @@
|
|||
|
||||
<span class="control-error" v-if="errors.has('content')">@{{ errors.first('content') }}</span>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.admin.settings.slider.create.after') !!}
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
|
|
|||
|
|
@ -28,6 +28,8 @@
|
|||
|
||||
@csrf()
|
||||
|
||||
{!! view_render_event('bagisto.admin.settings.slider.edit.before') !!}
|
||||
|
||||
<div class="control-group" :class="[errors.has('title') ? 'has-error' : '']">
|
||||
<label for="title" class="required">{{ __('admin::app.settings.sliders.title') }}</label>
|
||||
<input type="text" class="control" name="title" v-validate="'required'" data-vv-as=""{{ __('admin::app.settings.sliders.title') }}"" value="{{ $slider->title ?: old('title') }}">
|
||||
|
|
@ -69,6 +71,7 @@
|
|||
<span class="control-error" v-if="errors.has('content')">@{{ errors.first('content') }}</span>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.admin.settings.slider.edit.after') !!}
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,2 @@
|
|||
/node_modules
|
||||
/package-lock.json
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"name": "bagisto/laravel-custom",
|
||||
"description": "Custom package to over ride settings",
|
||||
"license": "MIT",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Webkul",
|
||||
"email": "support@webkul.com"
|
||||
}
|
||||
],
|
||||
"require": {},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Webkul\\Custom\\": "src/"
|
||||
}
|
||||
},
|
||||
"extra": {
|
||||
"laravel": {
|
||||
"providers": [
|
||||
"Webkul\\Custom\\Providers\\CustomServiceProvider"
|
||||
],
|
||||
"aliases": {}
|
||||
}
|
||||
},
|
||||
"minimum-stability": "dev"
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddUrlKeyColumnInSlidersTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('sliders', function (Blueprint $table) {
|
||||
$table->string('url_type')->nullable();
|
||||
$table->string('url_key')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('sliders', function (Blueprint $table) {
|
||||
$this->dropColumn('url_type');
|
||||
$this->dropColumn('url_key');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,72 @@
|
|||
<?php
|
||||
|
||||
namespace Webkul\Custom\Helpers;
|
||||
|
||||
use Webkul\Category\Repositories\CategoryRepository as Category;
|
||||
use Webkul\Product\Repositories\ProductFlatRepository as Product;
|
||||
|
||||
class CollectURLKeys
|
||||
{
|
||||
/**
|
||||
* Will hold CategoryRepository instance
|
||||
*/
|
||||
protected $category;
|
||||
|
||||
/**
|
||||
* Will hold ProductRepository instance
|
||||
*/
|
||||
protected $product;
|
||||
|
||||
public function __construct(
|
||||
Category $category,
|
||||
Product $product
|
||||
)
|
||||
{
|
||||
$this->category = $category;
|
||||
|
||||
$this->product = $product;
|
||||
}
|
||||
|
||||
public function getCategoryKeys()
|
||||
{
|
||||
$categories = $this->category->all();
|
||||
|
||||
$categoryURLKeys = collect();
|
||||
|
||||
foreach ($categories as $category) {
|
||||
if (strtolower($category->slug) != 'root') {
|
||||
$categoryURLKeys->push([
|
||||
'id' => $category->id,
|
||||
'name' => $category->name,
|
||||
'url_key' => $category->slug
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
return $categoryURLKeys;
|
||||
}
|
||||
|
||||
public function getProductKeys()
|
||||
{
|
||||
$products = $this->product->findWhere(
|
||||
[
|
||||
'status' => 1,
|
||||
'visible_individually' => 1,
|
||||
'channel' => core()->getCurrentChannel()->code,
|
||||
'locale' => core()->getCurrentlocale()->code
|
||||
]
|
||||
);
|
||||
|
||||
$productURLKeys = collect();
|
||||
|
||||
foreach ($products as $product) {
|
||||
$productURLKeys->push([
|
||||
'id' => $product->id,
|
||||
'name' => $product->name,
|
||||
'url_key' => $product->url_key
|
||||
]);
|
||||
}
|
||||
|
||||
return $productURLKeys;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
|
||||
namespace Webkul\Custom\Http\Controllers;
|
||||
|
||||
use Illuminate\Foundation\Bus\DispatchesJobs;
|
||||
use Illuminate\Routing\Controller as BaseController;
|
||||
use Illuminate\Foundation\Validation\ValidatesRequests;
|
||||
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
|
||||
|
||||
class Controller extends BaseController
|
||||
{
|
||||
use AuthorizesRequests, DispatchesJobs, ValidatesRequests;
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
|
||||
namespace Webkul\Custom\Http\Listeners;
|
||||
|
||||
class CustomEventsHandler {
|
||||
|
||||
/**
|
||||
* Handle Customer login events.
|
||||
*/
|
||||
public function onCustomerLogin($event)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Register the listeners for the subscriber.
|
||||
*
|
||||
* @param Illuminate\Events\Dispatcher $events
|
||||
* @return void
|
||||
*/
|
||||
public function subscribe($events)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
<?php
|
||||
|
||||
namespace Webkul\Custom\Listeners;
|
||||
|
||||
class CustomSliderEventsHandler
|
||||
{
|
||||
public function createAfter()
|
||||
{
|
||||
return view('custom::customslider');
|
||||
}
|
||||
|
||||
public function editAfter()
|
||||
{
|
||||
return view('custom::customslider');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
<?php
|
||||
|
||||
namespace Webkul\Custom\Models;
|
||||
|
||||
use Webkul\Core\Models\Slider as BaseModel;
|
||||
|
||||
use Company;
|
||||
|
||||
class Slider extends BaseModel
|
||||
{
|
||||
protected $fillable = [
|
||||
'title', 'path', 'content', 'channel_id', 'url_type', 'url_key'
|
||||
];
|
||||
|
||||
/**
|
||||
* Create a new Eloquent query builder for the model.
|
||||
*
|
||||
* @param \Illuminate\Database\Query\Builder $query
|
||||
* @return \Illuminate\Database\Eloquent\Builder|static
|
||||
*/
|
||||
public function newEloquentBuilder($query)
|
||||
{
|
||||
$company = Company::getCurrent();
|
||||
|
||||
if (auth()->guard('super-admin')->check() || ! isset($company->id)) {
|
||||
return new \Illuminate\Database\Eloquent\Builder($query);
|
||||
} else {
|
||||
return new \Illuminate\Database\Eloquent\Builder($query->where('sliders' . '.company_id', $company->id));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
<?php
|
||||
|
||||
namespace Webkul\Custom\Providers;
|
||||
|
||||
use Webkul\Custom\Providers\EventServiceProvider;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Illuminate\Routing\Router;
|
||||
|
||||
class CustomServiceProvider extends ServiceProvider
|
||||
{
|
||||
public function boot(Router $router)
|
||||
{
|
||||
$this->loadViewsFrom(__DIR__ . '/../Resources/views', 'custom');
|
||||
|
||||
$this->loadTranslationsFrom(__DIR__ . '/../Resources/lang', 'custom');
|
||||
|
||||
$this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations');
|
||||
|
||||
$this->app->concord->registerModel(\Webkul\Core\Contracts\Slider::class, \Webkul\Custom\Models\Slider::class);
|
||||
}
|
||||
|
||||
public function register()
|
||||
{
|
||||
$this->app->register(EventServiceProvider::class);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
<?php
|
||||
|
||||
namespace Webkul\Custom\Providers;
|
||||
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Illuminate\Support\Facades\Event;
|
||||
|
||||
class EventServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* Bootstrap services.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
Event::listen('bagisto.admin.settings.slider.create.after', function($viewRenderEventManager) {
|
||||
$viewRenderEventManager->addTemplate('custom::customslider');
|
||||
});
|
||||
|
||||
// Event::listen('bagisto.admin.settings.slider.create.after', 'Webkul\Custom\Listeners\CustomSliderEventsHandler@createAfter');
|
||||
|
||||
Event::listen('bagisto.admin.settings.slider.edit.after', function($viewRenderEventManager) {
|
||||
$viewRenderEventManager->addTemplate('custom::customslider');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
|
||||
namespace Webkul\Custom\Providers;
|
||||
|
||||
use Konekt\Concord\BaseModuleServiceProvider;
|
||||
|
||||
class ModuleServiceProvider extends BaseModuleServiceProvider
|
||||
{
|
||||
protected $models = [
|
||||
];
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
@php
|
||||
$link = app('Webkul\Custom\Helpers\CollectURLKeys');
|
||||
|
||||
$categoryKeys = $link->getCategoryKeys();
|
||||
|
||||
$productKeys = $link->getProductKeys();
|
||||
@endphp
|
||||
|
||||
<div class="control-group">
|
||||
<label for="select-link">Select Link</label>
|
||||
|
||||
<select class="control" name="url_key">
|
||||
@if (count($categoryKeys))
|
||||
<optgroup label="categories">
|
||||
@foreach ($categoryKeys as $categoryKey)
|
||||
<option value="categories/{{ $categoryKey['url_key'] }}">{{ $categoryKey['name'] }}</option>
|
||||
@endforeach
|
||||
</optgroup>
|
||||
@endif
|
||||
|
||||
@if (count($productKeys))
|
||||
<optgroup label="products">
|
||||
@foreach ($productKeys as $productKey)
|
||||
<option value="products/{{ $productKey['url_key'] }}">{{ $productKey['name'] }}</option>
|
||||
@endforeach
|
||||
</optgroup>
|
||||
@endif
|
||||
</select>
|
||||
</div>
|
||||
|
|
@ -29,7 +29,6 @@ class Handler extends ExceptionHandler
|
|||
public function render($request, Exception $exception)
|
||||
{
|
||||
$path = 'saas';
|
||||
dd($exception->getMessage());
|
||||
|
||||
if ($exception->getMessage() == 'domain_not_found') {
|
||||
return $this->response($path, 400, trans('saas::app.exceptions.domain-not-found'), 'domain_not_found');
|
||||
|
|
|
|||
|
|
@ -257,7 +257,6 @@ class StripeConnectController extends Controller
|
|||
$applicationFee = ($this->stripeAdminFees * $cart->base_grand_total) / 100;
|
||||
|
||||
if (core()->getConfigData('stripe.connect.details.stripefees') == "customer") {
|
||||
|
||||
$result = StripeCharge::create([
|
||||
"amount" => round(Cart::getCart()->base_grand_total + $applicationFee, 2) * 100,
|
||||
"currency" => Cart::getCart()->base_currency_code,
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
@if(core()->getConfigData('stripe.connect.details.stripefees') == 'customer' && isset($cart->payment) && $cart->payment->method == 'stripe')
|
||||
<div class="item-detail">
|
||||
@php
|
||||
$applicationFee = (0.029 * $cart->base_grand_total) + (env('STRIPE_ADMIN_COMMISSION', 0.0001) / 100 * $cart->base_grand_total) + 0.3;
|
||||
$applicationFee = env('STRIPE_ADMIN_COMMISSION', 0.0000) / 100 * $cart->base_grand_total;
|
||||
@endphp
|
||||
|
||||
<label>
|
||||
|
|
|
|||
Loading…
Reference in New Issue