Skip to content

Commit

Permalink
Improve process plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
s-cart committed May 5, 2024
1 parent f457a6d commit cc6f540
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 18 deletions.
6 changes: 3 additions & 3 deletions app/Plugins/Cms/Content/Route.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
$prefixCmsCategory = sc_config('PREFIX_CMS_CATEGORY')??'cms-category';
$langUrl = config('app.seoLang');

if (sc_config('Content')) {
if (sc_config_exist('Content')) {
Route::group(
[
'namespace' => 'App\Plugins\Cms\Content\Controllers',
Expand All @@ -23,7 +23,7 @@
);
}


if (sc_config_exist('Content', SC_ID_ROOT)) {
/**
* Route admin
*/
Expand Down Expand Up @@ -66,4 +66,4 @@ function () {

}
);

}
4 changes: 3 additions & 1 deletion app/Plugins/Other/GoogleCaptcha/Route.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Route front
*/
if(sc_config('GoogleCaptcha')) {
if(sc_config_exist('GoogleCaptcha')) {
Route::group(
[
'prefix' => 'plugin/googlecaptcha',
Expand All @@ -17,6 +17,7 @@ function () {
/**
* Route admin
*/
if(sc_config_exist('GoogleCaptcha', SC_ID_ROOT)) {
Route::group(
[
'prefix' => SC_ADMIN_PREFIX.'/googlecaptcha',
Expand All @@ -28,3 +29,4 @@ function () {
->name('admin_googlecaptcha.index');
}
);
}
28 changes: 15 additions & 13 deletions app/Plugins/Total/Discount/Route.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,24 @@
/**
* Route front
*/
if(sc_config('Discount')) {
Route::group(
[
'prefix' => 'plugin/discount',
'namespace' => 'App\Plugins\Total\Discount\Controllers',
],
function () {
Route::post('/discount_process', 'FrontController@useDiscount')
->name('discount.process');
Route::post('/discount_remove', 'FrontController@removeDiscount')
->name('discount.remove');
}
);
if(sc_config_exist('Discount')) {
Route::group(
[
'prefix' => 'plugin/discount',
'namespace' => 'App\Plugins\Total\Discount\Controllers',
],
function () {
Route::post('/discount_process', 'FrontController@useDiscount')
->name('discount.process');
Route::post('/discount_remove', 'FrontController@removeDiscount')
->name('discount.remove');
}
);
}
/**
* Route admin
*/
if(sc_config_exist('Discount', SC_ID_ROOT)) {
Route::group(
[
'prefix' => SC_ADMIN_PREFIX.'/shop_discount',
Expand All @@ -40,3 +41,4 @@ function () {
->name('admin_discount.delete');
}
);
}
2 changes: 1 addition & 1 deletion config/s-cart.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
return [
'version' => '9.0',
'sub-version' => '9.0.0',
'sub-version' => '9.0.1',
'type' => 'basic',
'homepage' => 'https://s-cart.org',
'title' => 'Free Open Source eCommerce for Business',
Expand Down

0 comments on commit cc6f540

Please sign in to comment.