Merge branch 'master' into cancel-order-test-case
Merged With Master
This commit is contained in:
commit
fdf0a0bb1c
|
|
@ -5,9 +5,9 @@
|
|||
"framework",
|
||||
"laravel"
|
||||
],
|
||||
|
||||
"license": "MIT",
|
||||
"type": "project",
|
||||
|
||||
"require": {
|
||||
"php": "^7.2.5",
|
||||
"ext-curl": "*",
|
||||
|
|
@ -25,6 +25,7 @@
|
|||
"doctrine/dbal": "2.9.2",
|
||||
"fideloper/proxy": "^4.2",
|
||||
"flynsarmy/db-blade-compiler": "^5.5",
|
||||
"fzaninotto/faker": "^1.4",
|
||||
"guzzlehttp/guzzle": "~6.3",
|
||||
"intervention/image": "^2.4",
|
||||
"intervention/imagecache": "^2.3",
|
||||
|
|
@ -48,7 +49,6 @@
|
|||
"codeception/module-laravel5": "^1.0",
|
||||
"codeception/module-webdriver": "^1.0",
|
||||
"filp/whoops": "^2.0",
|
||||
"fzaninotto/faker": "^1.4",
|
||||
"mockery/mockery": "^1.3.1",
|
||||
"nunomaduro/collision": "^4.1",
|
||||
"phpunit/phpunit": "^8.5"
|
||||
|
|
@ -123,7 +123,6 @@
|
|||
"extra": {
|
||||
"laravel": {
|
||||
"dont-discover": [
|
||||
"barryvdh/laravel-debugbar",
|
||||
"laravel/dusk"
|
||||
]
|
||||
}
|
||||
|
|
@ -143,6 +142,7 @@
|
|||
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
|
||||
"@php artisan package:discover"
|
||||
],
|
||||
|
||||
"test": [
|
||||
"set -e",
|
||||
"@php artisan migrate:fresh --env=testing",
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -246,8 +246,6 @@ return [
|
|||
//Laravel Maatwebsite
|
||||
Maatwebsite\Excel\ExcelServiceProvider::class,
|
||||
|
||||
Barryvdh\Debugbar\ServiceProvider::class,
|
||||
|
||||
//Repository
|
||||
Prettus\Repository\Providers\RepositoryServiceProvider::class,
|
||||
Konekt\Concord\ConcordServiceProvider::class,
|
||||
|
|
|
|||
|
|
@ -2,20 +2,19 @@
|
|||
|
||||
namespace Webkul\API\Http\Controllers\Shop;
|
||||
|
||||
use Illuminate\Support\Facades\Event;
|
||||
use Webkul\Checkout\Repositories\CartRepository;
|
||||
use Webkul\Checkout\Repositories\CartItemRepository;
|
||||
use Webkul\Shipping\Facades\Shipping;
|
||||
use Webkul\Payment\Facades\Payment;
|
||||
use Webkul\API\Http\Resources\Checkout\Cart as CartResource;
|
||||
use Webkul\API\Http\Resources\Checkout\CartShippingRate as CartShippingRateResource;
|
||||
use Webkul\API\Http\Resources\Sales\Order as OrderResource;
|
||||
use Webkul\Checkout\Http\Requests\CustomerAddressForm;
|
||||
use Webkul\Sales\Repositories\OrderRepository;
|
||||
use Illuminate\Support\Str;
|
||||
use Cart;
|
||||
use Exception;
|
||||
use Illuminate\Support\Str;
|
||||
use Webkul\Payment\Facades\Payment;
|
||||
use Webkul\Shipping\Facades\Shipping;
|
||||
use Webkul\Sales\Repositories\OrderRepository;
|
||||
use Webkul\Checkout\Repositories\CartRepository;
|
||||
use Webkul\Shop\Http\Controllers\OnepageController;
|
||||
use Webkul\Checkout\Repositories\CartItemRepository;
|
||||
use Webkul\Checkout\Http\Requests\CustomerAddressForm;
|
||||
use Webkul\API\Http\Resources\Sales\Order as OrderResource;
|
||||
use Webkul\API\Http\Resources\Checkout\Cart as CartResource;
|
||||
use Webkul\API\Http\Resources\Checkout\CartShippingRate as CartShippingRateResource;
|
||||
|
||||
class CheckoutController extends Controller
|
||||
{
|
||||
|
|
@ -162,6 +161,30 @@ class CheckoutController extends Controller
|
|||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check for minimum order.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function checkMinimumOrder()
|
||||
{
|
||||
$cart = Cart::getCart();
|
||||
|
||||
$cartBaseSubTotal = (float) $cart->base_sub_total;
|
||||
|
||||
$minimumOrderAmount = (float) core()->getConfigData('sales.orderSettings.minimum-order.minimum_order_amount') ?? 0;
|
||||
|
||||
$status = $cartBaseSubTotal > $minimumOrderAmount;
|
||||
|
||||
return response()->json([
|
||||
'status' => ! $status ? false : true,
|
||||
'message' => ! $status ? trans('shop::app.checkout.cart.minimum-order-message', ['amount' => $minimumOrderAmount]) : 'Success',
|
||||
'data' => [
|
||||
'cart' => new CartResource($cart),
|
||||
]
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Saves order.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -31,6 +31,8 @@ class Product extends JsonResource
|
|||
{
|
||||
$product = $this->product ? $this->product : $this;
|
||||
|
||||
$prices = $product->getTypeInstance()->getProductPrices();
|
||||
|
||||
return [
|
||||
'id' => $product->id,
|
||||
'type' => $product->type,
|
||||
|
|
@ -49,13 +51,21 @@ class Product extends JsonResource
|
|||
'super_attributes' => Attribute::collection($product->super_attributes),
|
||||
]),
|
||||
'special_price' => $this->when(
|
||||
$product->getTypeInstance()->haveSpecialPrice(),
|
||||
$product->getTypeInstance()->getSpecialPrice()
|
||||
),
|
||||
$product->getTypeInstance()->haveSpecialPrice(),
|
||||
$product->getTypeInstance()->getSpecialPrice()
|
||||
),
|
||||
'formated_special_price' => $this->when(
|
||||
$product->getTypeInstance()->haveSpecialPrice(),
|
||||
core()->currency($product->getTypeInstance()->getSpecialPrice())
|
||||
),
|
||||
$product->getTypeInstance()->haveSpecialPrice(),
|
||||
core()->currency($product->getTypeInstance()->getSpecialPrice())
|
||||
),
|
||||
'regular_price' => $this->when(
|
||||
$product->getTypeInstance()->haveSpecialPrice(),
|
||||
data_get($prices, 'regular_price.price')
|
||||
),
|
||||
'formated_regular_price' => $this->when(
|
||||
$product->getTypeInstance()->haveSpecialPrice(),
|
||||
data_get($prices, 'regular_price.formated_price')
|
||||
),
|
||||
'reviews' => [
|
||||
'total' => $total = $this->productReviewHelper->getTotalReviews($product),
|
||||
'total_rating' => $total ? $this->productReviewHelper->getTotalRating($product) : 0,
|
||||
|
|
@ -67,4 +77,4 @@ class Product extends JsonResource
|
|||
'updated_at' => $this->updated_at,
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -270,6 +270,8 @@ Route::group(['prefix' => 'api'], function ($router) {
|
|||
|
||||
Route::post('save-payment', 'CheckoutController@savePayment');
|
||||
|
||||
Route::post('check-minimum-order', 'CheckoutController@checkMinimumOrder');
|
||||
|
||||
Route::post('save-order', 'CheckoutController@saveOrder');
|
||||
});
|
||||
});
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"/js/admin.js": "/js/admin.js?id=b022291aa1cad7dfcc84",
|
||||
"/js/admin.js": "/js/admin.js?id=c849d3c02afc5071f801",
|
||||
"/css/admin.css": "/css/admin.css?id=f2b20e4283a639808ef6"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,11 +12,15 @@ class CartRuleCouponDataGrid extends DataGrid
|
|||
protected $sortOrder = 'desc';
|
||||
|
||||
public function prepareQueryBuilder()
|
||||
{
|
||||
$queryBuilder = DB::table('cart_rule_coupons')
|
||||
->addSelect('id', 'code', 'created_at', 'expired_at', 'times_used')
|
||||
->where('cart_rule_coupons.cart_rule_id', collect(request()->segments())->last());
|
||||
{
|
||||
$route = request()->route() ? request()->route()->getName() : "" ;
|
||||
|
||||
$cartRuleId = $route == 'admin.cart-rules.edit' ? collect(request()->segments())->last() : last(explode("/", url()->previous()));
|
||||
|
||||
$queryBuilder = DB::table('cart_rule_coupons')
|
||||
->addSelect('id', 'code', 'created_at', 'expired_at', 'times_used')
|
||||
->where('cart_rule_coupons.cart_rule_id', $cartRuleId);
|
||||
|
||||
$this->setQueryBuilder($queryBuilder);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -99,6 +99,14 @@ class CategoryDataGrid extends DataGrid
|
|||
'route' => 'admin.catalog.categories.delete',
|
||||
'confirm_text' => trans('ui::app.datagrid.massaction.delete', ['resource' => 'product']),
|
||||
'icon' => 'icon trash-icon',
|
||||
'function' => 'deleteFunction($event, "delete")'
|
||||
]);
|
||||
|
||||
$this->addMassAction([
|
||||
'type' => 'delete',
|
||||
'label' => trans('admin::app.datagrid.delete'),
|
||||
'action' => route('admin.catalog.categories.massdelete'),
|
||||
'method' => 'DELETE',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
@ -66,6 +66,7 @@ class ProductDataGrid extends DataGrid
|
|||
'product_flat.channel',
|
||||
'product_flat.product_id',
|
||||
'products.sku as product_sku',
|
||||
'product_flat.product_number',
|
||||
'product_flat.name as product_name',
|
||||
'products.type as product_type',
|
||||
'product_flat.status',
|
||||
|
|
@ -82,6 +83,7 @@ class ProductDataGrid extends DataGrid
|
|||
$this->addFilter('product_id', 'product_flat.product_id');
|
||||
$this->addFilter('product_name', 'product_flat.name');
|
||||
$this->addFilter('product_sku', 'products.sku');
|
||||
$this->addFilter('product_number', 'product_flat.product_number');
|
||||
$this->addFilter('status', 'product_flat.status');
|
||||
$this->addFilter('product_type', 'products.type');
|
||||
$this->addFilter('attribute_family', 'attribute_families.name');
|
||||
|
|
@ -109,6 +111,15 @@ class ProductDataGrid extends DataGrid
|
|||
'filterable' => true,
|
||||
]);
|
||||
|
||||
$this->addColumn([
|
||||
'index' => 'product_number',
|
||||
'label' => trans('admin::app.datagrid.product-number'),
|
||||
'type' => 'string',
|
||||
'searchable' => true,
|
||||
'sortable' => true,
|
||||
'filterable' => true,
|
||||
]);
|
||||
|
||||
$this->addColumn([
|
||||
'index' => 'product_name',
|
||||
'label' => trans('admin::app.datagrid.name'),
|
||||
|
|
|
|||
|
|
@ -7,17 +7,6 @@ use Excel;
|
|||
|
||||
class ExportController extends Controller
|
||||
{
|
||||
protected $exportableGrids = [
|
||||
'OrderDataGrid',
|
||||
'OrderInvoicesDataGrid',
|
||||
'OrderShipmentsDataGrid',
|
||||
'OrderRefundDataGrid',
|
||||
'CustomerDataGrid',
|
||||
'TaxRateDataGrid',
|
||||
'ProductDataGrid',
|
||||
'CMSPageDataGrid',
|
||||
];
|
||||
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
*
|
||||
|
|
@ -43,18 +32,6 @@ class ExportController extends Controller
|
|||
|
||||
$path = '\Webkul\Admin\DataGrids'.'\\'.last($gridName);
|
||||
|
||||
$proceed = false;
|
||||
|
||||
foreach ($this->exportableGrids as $exportableGrid) {
|
||||
if (last($gridName) == $exportableGrid) {
|
||||
$proceed = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (! $proceed) {
|
||||
return redirect()->back();
|
||||
}
|
||||
|
||||
$gridInstance = new $path;
|
||||
|
||||
$records = $gridInstance->export();
|
||||
|
|
|
|||
|
|
@ -335,6 +335,13 @@ Route::group(['middleware' => ['web']], function () {
|
|||
|
||||
Route::post('/categories/delete/{id}', 'Webkul\Category\Http\Controllers\CategoryController@destroy')->name('admin.catalog.categories.delete');
|
||||
|
||||
//category massdelete
|
||||
Route::post('categories/massdelete', 'Webkul\Category\Http\Controllers\CategoryController@massDestroy')->defaults('_config', [
|
||||
'redirect' => 'admin.catalog.categories.index',
|
||||
])->name('admin.catalog.categories.massdelete');
|
||||
|
||||
Route::post('/categories/product/count', 'Webkul\Category\Http\Controllers\CategoryController@categoryProductCount')->name('admin.catalog.categories.product.count');
|
||||
|
||||
|
||||
// Catalog Attribute Routes
|
||||
Route::get('/attributes', 'Webkul\Attribute\Http\Controllers\AttributeController@index')->defaults('_config', [
|
||||
|
|
|
|||
|
|
@ -17,6 +17,8 @@ Vue.use(VeeValidate, {
|
|||
});
|
||||
Vue.prototype.$http = axios
|
||||
|
||||
Vue.component('required-if', require('./components/validators/required-if').default);
|
||||
|
||||
window.eventBus = new Vue();
|
||||
|
||||
$(document).ready(function () {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,78 @@
|
|||
<template>
|
||||
<div class="control-group" :class="[errors.has(name) ? 'has-error' : '']">
|
||||
<label :for="name" :class="checkValidations">
|
||||
{{ label }}
|
||||
<span class="locale"> [{{ channel_locale }}] </span>
|
||||
</label>
|
||||
|
||||
<select v-if="this.options.length" v-validate="checkValidations" class="control" :id = "name" :name = "name" v-model="savedValue"
|
||||
:data-vv-as="label">
|
||||
<option v-for='(option, index) in this.options' :value="option.value"> {{ option.title }} </option>
|
||||
</select>
|
||||
|
||||
<input v-else type="text" class="control" v-validate="checkValidations" :id = "name" :name = "name" v-model="savedValue"
|
||||
:data-vv-as="label">
|
||||
|
||||
<span class="control-error" v-if="errors.has(name)">
|
||||
{{ errors.first(name) }}
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: [
|
||||
'name',
|
||||
'label',
|
||||
'options',
|
||||
'result',
|
||||
'validations',
|
||||
|
||||
'depend',
|
||||
'dependResult',
|
||||
|
||||
'channel_locale',
|
||||
],
|
||||
|
||||
inject: ['$validator'],
|
||||
|
||||
data: function() {
|
||||
return {
|
||||
isRequire: false,
|
||||
checkValidations: [],
|
||||
|
||||
savedValue: this.result,
|
||||
dependSavedValue: parseInt(this.dependResult)
|
||||
}
|
||||
},
|
||||
|
||||
mounted: function () {
|
||||
this.isRequire = this.dependSavedValue ? true : false;
|
||||
this.updateValidations();
|
||||
|
||||
$(document.getElementById(this.depend)).on('change', (e) => {
|
||||
this.dependSavedValue = !this.dependSavedValue;
|
||||
this.dependSavedValue = this.dependSavedValue ? 1 : 0;
|
||||
this.isRequire = this.dependSavedValue ? true : false;
|
||||
|
||||
this.updateValidations();
|
||||
});
|
||||
},
|
||||
|
||||
methods: {
|
||||
updateValidations: function () {
|
||||
this.checkValidations = this.validations.split('|').filter(validation => !this.validations.includes('required_if'));
|
||||
|
||||
if (this.isRequire) {
|
||||
this.checkValidations.push('required');
|
||||
} else {
|
||||
this.checkValidations = this.checkValidations.filter((value) => {
|
||||
return value !== 'required';
|
||||
});
|
||||
}
|
||||
|
||||
this.checkValidations = this.checkValidations.join('|');
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
@ -189,6 +189,7 @@ return [
|
|||
'shipment-date' => 'تاريخ الشحن',
|
||||
'shipment-to' => 'الشحن إلى',
|
||||
'sku' => 'SKU',
|
||||
'product-number' => 'رقم المنتج',
|
||||
'price' => 'السعر',
|
||||
'qty' => 'كمية',
|
||||
'permission-type' => 'نوع الإذن',
|
||||
|
|
@ -1317,6 +1318,8 @@ return [
|
|||
'order-number-length' => 'طول رقم الطلب',
|
||||
'order-number-suffix' => 'لاحقة رقم الطلب',
|
||||
'order-number-generator-class' => 'مولد رقم الطلب',
|
||||
'minimum-order' => 'Minimum Order Settings',
|
||||
'minimum-order-amount' => 'Minimum Order Amount',
|
||||
'default' => 'إفتراضي',
|
||||
'sandbox' => 'صندوق الرمل',
|
||||
'all-channels' => 'الكل',
|
||||
|
|
@ -1355,12 +1358,19 @@ return [
|
|||
'vat-number' => 'ظريبه الشراء',
|
||||
'contact-number' => 'رقم الاتصال',
|
||||
'bank-details' => 'التفاصيل المصرفية',
|
||||
'instructions' => 'Instructions',
|
||||
'custom-scripts' => 'Custom Scripts',
|
||||
'custom-css' => 'Custom CSS',
|
||||
'custom-javascript' => 'Custom Javascript',
|
||||
'paypal-smart-button' => 'PayPal',
|
||||
'client-id' => 'Client Id',
|
||||
'client-id-info' => 'Use "sb" for testing.',
|
||||
'mailing-address' => 'أرسل الشيك إلى',
|
||||
'instructions' => 'تعليمات',
|
||||
'custom-scripts' => 'البرامج النصية المخصصة',
|
||||
'custom-css' => 'لغة تنسيق ويب حسب الطلب',
|
||||
'custom-javascript' => 'جافا سكريبت مخصص',
|
||||
'paypal-smart-button' => 'زر Paypal الذكي',
|
||||
'paypal-smart-button' => 'زر PayPal الذكي',
|
||||
'client-id' => 'معرف العميل',
|
||||
'client-id-info' => 'استخدم "sb" للاختبار.'
|
||||
]
|
||||
|
|
|
|||
|
|
@ -188,6 +188,7 @@ return [
|
|||
'shipment-date' => 'Versand Datum',
|
||||
'shipment-to' => 'Versand',
|
||||
'sku' => 'SKU',
|
||||
'product-number' => 'Produktnummer',
|
||||
'price' => 'Preis',
|
||||
'qty' => 'Menge',
|
||||
'permission-type' => 'Berechtigungsart',
|
||||
|
|
@ -1323,6 +1324,8 @@ return [
|
|||
'order-number-length' => 'Auftragsnummer Länge',
|
||||
'order-number-suffix' => 'Auftragsnummer Suffix',
|
||||
'order-number-generator-class' => 'Bestell nummern generator',
|
||||
'minimum-order' => 'Minimum Order Settings',
|
||||
'minimum-order-amount' => 'Minimum Order Amount',
|
||||
'default' => 'Standard',
|
||||
'sandbox' => 'Sandbox',
|
||||
'all-channels' => 'Alle',
|
||||
|
|
@ -1338,7 +1341,7 @@ return [
|
|||
'custom-scripts' => 'Custom Scripts',
|
||||
'custom-css' => 'Custom CSS',
|
||||
'custom-javascript' => 'Custom Javascript',
|
||||
'paypal-smart-button' => 'Paypal Smart Button',
|
||||
'paypal-smart-button' => 'PayPal',
|
||||
'client-id' => 'Client Id',
|
||||
'client-id-info' => 'Use "sb" for testing.'
|
||||
],
|
||||
|
|
|
|||
|
|
@ -189,6 +189,7 @@ return [
|
|||
'shipment-date' => 'Shipment Date',
|
||||
'shipment-to' => 'Shipping To',
|
||||
'sku' => 'SKU',
|
||||
'product-number' => 'Product Number',
|
||||
'price' => 'Price',
|
||||
'qty' => 'Quantity',
|
||||
'permission-type' => 'Permission Type',
|
||||
|
|
@ -1290,7 +1291,7 @@ return [
|
|||
'payment-methods' => 'Payment Methods',
|
||||
'cash-on-delivery' => 'Cash On Delivery',
|
||||
'money-transfer' => 'Money Transfer',
|
||||
'paypal-standard' => 'Paypal Standard',
|
||||
'paypal-standard' => 'PayPal Standard',
|
||||
'business-account' => 'Business Account',
|
||||
'newsletter' => 'NewsLetter Subscription',
|
||||
'newsletter-subscription' => 'Allow NewsLetter Subscription',
|
||||
|
|
@ -1322,6 +1323,8 @@ return [
|
|||
'order-number-length' => 'Order Number Length',
|
||||
'order-number-suffix' => 'Order Number Suffix',
|
||||
'order-number-generator-class' => 'Order Number Generator',
|
||||
'minimum-order' => 'Minimum Order Settings',
|
||||
'minimum-order-amount' => 'Minimum Order Amount',
|
||||
'default' => 'Default',
|
||||
'sandbox' => 'Sandbox',
|
||||
'all-channels' => 'All Channels',
|
||||
|
|
@ -1364,7 +1367,7 @@ return [
|
|||
'custom-scripts' => 'Custom Scripts',
|
||||
'custom-css' => 'Custom CSS',
|
||||
'custom-javascript' => 'Custom Javascript',
|
||||
'paypal-smart-button' => 'Paypal Smart Button',
|
||||
'paypal-smart-button' => 'PayPal',
|
||||
'client-id' => 'Client Id',
|
||||
'client-id-info' => 'Use "sb" for testing.'
|
||||
]
|
||||
|
|
|
|||
|
|
@ -186,6 +186,7 @@ return [
|
|||
'shipment-date' => 'Fecha de envío',
|
||||
'shipment-to' => 'Enviar hacia',
|
||||
'sku' => 'SKU',
|
||||
'product-number' => 'Número de producto',
|
||||
'price' => 'Precio',
|
||||
'qty' => 'Cantidad',
|
||||
'permission-type' => 'Tipo de permiso',
|
||||
|
|
@ -1274,7 +1275,7 @@ return [
|
|||
'payment-methods' => 'Métodos de pago',
|
||||
'cash-on-delivery' => 'Pago contraentrega',
|
||||
'money-transfer' => 'Transferencia',
|
||||
'paypal-standard' => 'Paypal',
|
||||
'paypal-standard' => 'PayPal',
|
||||
'business-account' => 'Cuenta de negocio',
|
||||
'newsletter' => 'Suscripción a newsletter',
|
||||
'newsletter-subscription' => 'Permitir suscripciones a newsletter',
|
||||
|
|
@ -1305,6 +1306,8 @@ return [
|
|||
'order-number-prefix' => 'Prefijo para Pedido #',
|
||||
'order-number-length' => 'Largo para Pedido #',
|
||||
'order-number-suffix' => 'Sufijo para Pedido #',
|
||||
'minimum-order' => 'Minimum Order Settings',
|
||||
'minimum-order-amount' => 'Minimum Order Amount',
|
||||
'default' => 'Predeterminado',
|
||||
'sandbox' => 'Sandbox',
|
||||
'all-channels' => 'Todos',
|
||||
|
|
@ -1320,7 +1323,7 @@ return [
|
|||
'custom-scripts' => 'Custom Scripts',
|
||||
'custom-css' => 'Custom CSS',
|
||||
'custom-javascript' => 'Custom Javascript',
|
||||
'paypal-smart-button' => 'Paypal Smart Button',
|
||||
'paypal-smart-button' => 'PayPal',
|
||||
'client-id' => 'Client Id',
|
||||
'client-id-info' => 'Use "sb" for testing.'
|
||||
]
|
||||
|
|
|
|||
|
|
@ -187,6 +187,7 @@ return [
|
|||
'shipment-date' => 'تاریخ ارسال',
|
||||
'shipment-to' => 'حمل و نقل به',
|
||||
'sku' => 'واحد نگهداری موجودی',
|
||||
'product-number' => 'شماره محصول',
|
||||
'price' => 'قیمت',
|
||||
'qty' => 'مقدار',
|
||||
'permission-type' => 'نوع مجوز',
|
||||
|
|
@ -1312,6 +1313,8 @@ return [
|
|||
'order-number-length' => 'طول شماره سفارش',
|
||||
'order-number-suffix' => 'تعداد کافی شماره سفارش',
|
||||
'order-number-generator-class' => 'تولید کننده شماره سفارش',
|
||||
'minimum-order' => 'Minimum Order Settings',
|
||||
'minimum-order-amount' => 'Minimum Order Amount',
|
||||
'default' => 'پیش فرض',
|
||||
'sandbox' => 'Sandbox',
|
||||
'all-channels' => 'همه',
|
||||
|
|
@ -1356,7 +1359,7 @@ return [
|
|||
'custom-scripts' => 'Custom Scripts',
|
||||
'custom-css' => 'Custom CSS',
|
||||
'custom-javascript' => 'Custom Javascript',
|
||||
'paypal-smart-button' => 'Paypal Smart Button',
|
||||
'paypal-smart-button' => 'PayPal',
|
||||
'client-id' => 'Client Id',
|
||||
'client-id-info' => 'Use "sb" for testing.'
|
||||
]
|
||||
|
|
|
|||
|
|
@ -188,6 +188,7 @@ return [
|
|||
'shipment-date' => 'Data Spedizione',
|
||||
'shipment-to' => 'Spedizione A',
|
||||
'sku' => 'SKU',
|
||||
'product-number' => 'Numero del prodotto',
|
||||
'price' => 'Prezzo',
|
||||
'qty' => 'Quantità',
|
||||
'permission-type' => 'Tipo Permessi',
|
||||
|
|
@ -1285,7 +1286,7 @@ return [
|
|||
'payment-methods' => 'Metodi di Pagamento',
|
||||
'cash-on-delivery' => 'Contrassegno',
|
||||
'money-transfer' => 'Bonifico',
|
||||
'paypal-standard' => 'Paypal Standard',
|
||||
'paypal-standard' => 'PayPal Standard',
|
||||
'business-account' => 'Account Business',
|
||||
'newsletter' => 'Iscrizione a NewsLetter',
|
||||
'newsletter-subscription' => 'Consenti Iscrizione a NewsLetter',
|
||||
|
|
@ -1317,6 +1318,8 @@ return [
|
|||
'order-number-length' => 'Lunghezza Numero Ordine',
|
||||
'order-number-suffix' => 'Suffisso Numero Ordine',
|
||||
'order-number-generator-class' => 'Generatore di numeri dordine',
|
||||
'minimum-order' => 'Minimum Order Settings',
|
||||
'minimum-order-amount' => 'Minimum Order Amount',
|
||||
'default' => 'Default',
|
||||
'sandbox' => 'Sandbox',
|
||||
'all-channels' => 'Tutti',
|
||||
|
|
@ -1361,7 +1364,7 @@ return [
|
|||
'custom-scripts' => 'Custom Scripts',
|
||||
'custom-css' => 'Custom CSS',
|
||||
'custom-javascript' => 'Custom Javascript',
|
||||
'paypal-smart-button' => 'Paypal Smart Button',
|
||||
'paypal-smart-button' => 'PayPal',
|
||||
'client-id' => 'Client Id',
|
||||
'client-id-info' => 'Use "sb" for testing.'
|
||||
]
|
||||
|
|
|
|||
|
|
@ -188,6 +188,7 @@ return [
|
|||
'shipment-date' => 'Verzenddatum',
|
||||
'shipment-to' => 'Shipping To',
|
||||
'sku' => 'SKU',
|
||||
'product-number' => 'Productnummer',
|
||||
'price' => 'Prijs',
|
||||
'qty' => 'Aantal',
|
||||
'permission-type' => 'Permission Type',
|
||||
|
|
@ -1281,7 +1282,7 @@ return [
|
|||
'payment-methods' => 'Betaalmethodes',
|
||||
'cash-on-delivery' => 'Rembours',
|
||||
'money-transfer' => 'Overschrijving',
|
||||
'paypal-standard' => 'Paypal Standard',
|
||||
'paypal-standard' => 'PayPal Standard',
|
||||
'business-account' => 'Zakelijk account',
|
||||
'newsletter' => 'Nieuwsbrief',
|
||||
'newsletter-subscription' => 'Abonnement op Nieuwsbrief toestaan',
|
||||
|
|
@ -1313,6 +1314,8 @@ return [
|
|||
'order-number-length' => 'Bestelnummer Lengte',
|
||||
'order-number-suffix' => 'Achtervoegsel bestelnummer',
|
||||
'order-number-generator-class' => 'Ordernummer Generator',
|
||||
'minimum-order' => 'Minimum Order Settings',
|
||||
'minimum-order-amount' => 'Minimum Order Amount',
|
||||
'default' => 'Standaard',
|
||||
'sandbox' => 'Sandbox',
|
||||
'all-channels' => 'Alles',
|
||||
|
|
@ -1356,7 +1359,7 @@ return [
|
|||
'custom-scripts' => 'Custom Scripts',
|
||||
'custom-css' => 'Custom CSS',
|
||||
'custom-javascript' => 'Custom Javascript',
|
||||
'paypal-smart-button' => 'Paypal Smart Button',
|
||||
'paypal-smart-button' => 'PayPal',
|
||||
'client-id' => 'Client Id',
|
||||
'client-id-info' => 'Use "sb" for testing.'
|
||||
]
|
||||
|
|
|
|||
|
|
@ -186,6 +186,7 @@ return [
|
|||
'shipment-date' => 'Data wysyłki',
|
||||
'shipment-to' => 'Wysyłka do',
|
||||
'sku' => 'SKU',
|
||||
'product-number' => 'Numer produktu',
|
||||
'price' => 'Cena',
|
||||
'qty' => 'Ilość',
|
||||
'permission-type' => 'Rodzaj zezwolenia',
|
||||
|
|
@ -1282,7 +1283,7 @@ return [
|
|||
'payment-methods' => 'Metody płatności',
|
||||
'cash-on-delivery' => 'Za pobraniem',
|
||||
'money-transfer' => 'Przekaz pieniężny',
|
||||
'paypal-standard' => 'Paypal Standard',
|
||||
'paypal-standard' => 'PayPal Standard',
|
||||
'business-account' => 'Konto biznesowe',
|
||||
'newsletter' => 'Subskrypcja newslettera',
|
||||
'newsletter-subscription' => 'Zezwól na subskrypcję newslettera',
|
||||
|
|
@ -1314,6 +1315,8 @@ return [
|
|||
'order-number-length' => 'Długość numeru zamówienia',
|
||||
'order-number-suffix' => 'Sufiks numeru zamówienia”',
|
||||
'order-number-generator-class' => 'Generator numeru zamówienia',
|
||||
'minimum-order' => 'Minimum Order Settings',
|
||||
'minimum-order-amount' => 'Minimum Order Amount',
|
||||
'default' => 'Domyślna',
|
||||
'sandbox' => 'Piaskownica',
|
||||
'all-channels' => 'Wszystkie kanały',
|
||||
|
|
@ -1345,7 +1348,7 @@ return [
|
|||
'custom-scripts' => 'Custom Scripts',
|
||||
'custom-css' => 'Custom CSS',
|
||||
'custom-javascript' => 'Custom Javascript',
|
||||
'paypal-smart-button' => 'Paypal Smart Button',
|
||||
'paypal-smart-button' => 'PayPal',
|
||||
'client-id' => 'Client Id',
|
||||
'client-id-info' => 'Use "sb" for testing.'
|
||||
]
|
||||
|
|
|
|||
|
|
@ -187,6 +187,7 @@ return [
|
|||
'shipment-date' => 'Data de Envio',
|
||||
'shipment-to' => 'Enviado para',
|
||||
'sku' => 'SKU',
|
||||
'product-number' => 'Número de produto',
|
||||
'price' => 'Preço',
|
||||
'qty' => 'Quantidade',
|
||||
'permission-type' => 'Tipo de Permissão',
|
||||
|
|
@ -1281,7 +1282,7 @@ return [
|
|||
'payment-methods' => 'Métodos de Pagamento',
|
||||
'cash-on-delivery' => 'Dinheiro na entrega',
|
||||
'money-transfer' => 'Transferência de dinheiro',
|
||||
'paypal-standard' => 'Padrão Paypal',
|
||||
'paypal-standard' => 'Padrão PayPal',
|
||||
'business-account' => 'Conta de negócios',
|
||||
'newsletter' => 'Assinatura de Newsletter',
|
||||
'newsletter-subscription' => 'Permitir assinatura do NewsLetter',
|
||||
|
|
@ -1315,6 +1316,8 @@ return [
|
|||
'order-number-length' => 'Tamanho do Número do Pedido',
|
||||
'order-number-suffix' => 'Sufixo do Número de Pedido',
|
||||
'order-number-generator-class' => 'Gerador de número de pedido',
|
||||
'minimum-order' => 'Minimum Order Settings',
|
||||
'minimum-order-amount' => 'Minimum Order Amount',
|
||||
'default' => 'Padrão',
|
||||
'sandbox' => 'Sandbox',
|
||||
'all-channels' => 'Todos',
|
||||
|
|
@ -1359,7 +1362,7 @@ return [
|
|||
'custom-scripts' => 'Custom Scripts',
|
||||
'custom-css' => 'Custom CSS',
|
||||
'custom-javascript' => 'Custom Javascript',
|
||||
'paypal-smart-button' => 'Paypal Smart Button',
|
||||
'paypal-smart-button' => 'PayPal',
|
||||
'client-id' => 'Client Id',
|
||||
'client-id-info' => 'Use "sb" for testing.'
|
||||
]
|
||||
|
|
|
|||
|
|
@ -185,6 +185,7 @@ return [
|
|||
'shipment-date' => 'Kargo Tarihi',
|
||||
'shipment-to' => 'Kargo Bilgileri',
|
||||
'sku' => 'Barkod',
|
||||
'product-number' => 'Ürün numarası',
|
||||
'price' => 'Fiyat',
|
||||
'qty' => 'Miktar',
|
||||
'permission-type' => 'İzin Tipi',
|
||||
|
|
@ -1269,7 +1270,7 @@ return [
|
|||
'payment-methods' => 'Ödeme Türleri',
|
||||
'cash-on-delivery' => 'Kapıda Ödeme',
|
||||
'money-transfer' => 'Havale/EFT',
|
||||
'paypal-standard' => 'Paypal',
|
||||
'paypal-standard' => 'PayPal',
|
||||
'business-account' => 'İş Hesabı',
|
||||
'newsletter' => 'Bülten Aboneliği',
|
||||
'newsletter-subscription' => 'Bülten Aboneliğine İzin Ver',
|
||||
|
|
@ -1301,6 +1302,8 @@ return [
|
|||
'order-number-length' => 'Numara Uzunluğu',
|
||||
'order-number-suffix' => 'Numara Son Eki',
|
||||
'order-number-generator-class' => 'Sipariş Numarası Üreticisi',
|
||||
'minimum-order' => 'Minimum Order Settings',
|
||||
'minimum-order-amount' => 'Minimum Order Amount',
|
||||
'default' => 'Varsayılan',
|
||||
'sandbox' => 'Havuz',
|
||||
'all-channels' => 'Tümü',
|
||||
|
|
@ -1342,7 +1345,7 @@ return [
|
|||
'custom-scripts' => 'Custom Scripts',
|
||||
'custom-css' => 'Custom CSS',
|
||||
'custom-javascript' => 'Custom Javascript',
|
||||
'paypal-smart-button' => 'Paypal Smart Button',
|
||||
'paypal-smart-button' => 'PayPal',
|
||||
'client-id' => 'Client Id',
|
||||
'client-id-info' => 'Use "sb" for testing.'
|
||||
]
|
||||
|
|
|
|||
|
|
@ -26,4 +26,58 @@
|
|||
|
||||
{!! view_render_event('bagisto.admin.catalog.categories.list.after') !!}
|
||||
</div>
|
||||
@stop
|
||||
@stop
|
||||
|
||||
@push('scripts')
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$("input[type='checkbox']").change(deleteFunction);
|
||||
});
|
||||
|
||||
var deleteFunction = function(e,type) {
|
||||
if (type == 'delete') {
|
||||
var indexes = $(e.target).parent().attr('id');
|
||||
} else {
|
||||
$("input[type='checkbox']").attr('disabled', true);
|
||||
|
||||
var formData = {};
|
||||
$.each($('form').serializeArray(), function(i, field) {
|
||||
formData[field.name] = field.value;
|
||||
});
|
||||
|
||||
var indexes = formData.indexes;
|
||||
}
|
||||
|
||||
if (indexes) {
|
||||
$.ajax({
|
||||
type : 'POST',
|
||||
url : '{{route("admin.catalog.categories.product.count")}}',
|
||||
data : {
|
||||
_token: '{{csrf_token()}}',
|
||||
indexes: indexes
|
||||
},
|
||||
success:function(data) {
|
||||
$("input[type='checkbox']").attr('disabled', false);
|
||||
if (data.product_count > 0) {
|
||||
var message = "{{trans('ui::app.datagrid.massaction.delete-category-product')}}";
|
||||
if (type == 'delete') {
|
||||
doAction(e, message);
|
||||
} else {
|
||||
$('form').attr('onsubmit', 'return confirm("'+message+'")');
|
||||
}
|
||||
} else {
|
||||
var message = "{{ __('ui::app.datagrid.click_on_action') }}";
|
||||
if (type == 'delete') {
|
||||
doAction(e, message);
|
||||
} else {
|
||||
$('form').attr('onsubmit', 'return confirm("'+message+'")');
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
$("input[type='checkbox']").attr('disabled', false);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@endpush
|
||||
|
|
@ -85,7 +85,7 @@
|
|||
|
||||
<div class="control-group">
|
||||
<div class="control-group" :class="[errors.has(inputName + '[value]') ? 'has-error' : '']">
|
||||
<input type="number" v-validate="'required|min_value:0'" :name="[inputName + '[value]']" v-model="customerGroupPrice.value" class="control" data-vv-as=""{{ __('admin::app.datagrid.price') }}""/>
|
||||
<input type="number" v-validate="{required: true, min_value: 0, ...(customerGroupPrice.value_type === 'discount' ? {max_value: 100} : {})}" :name="[inputName + '[value]']" v-model="customerGroupPrice.value" class="control" data-vv-as=""{{ __('admin::app.datagrid.price') }}""/>
|
||||
<span class="control-error" v-if="errors.has(inputName + '[value]')">@{{ errors.first(inputName + '[value]') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -159,4 +159,4 @@
|
|||
}
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
@endpush
|
||||
|
|
|
|||
|
|
@ -65,18 +65,33 @@
|
|||
}
|
||||
|
||||
$selectedOption = core()->getConfigData($name) ?? '';
|
||||
$dependSelectedOption = core()->getConfigData(implode('.', [$firstField, $secondField, $thirdField, $dependField])) ?? '';
|
||||
?>
|
||||
|
||||
<depends
|
||||
:options = '@json($field['options'])'
|
||||
:name = "'{{ $firstField }}[{{ $secondField }}][{{ $thirdField }}][{{ $field['name'] }}]'"
|
||||
:validations = "'{{ $validations }}'"
|
||||
:depend = "'{{ $firstField }}[{{ $secondField }}][{{ $thirdField }}][{{ $dependField }}]'"
|
||||
:value = "'{{ $dependValue }}'"
|
||||
:field_name = "'{{ trans($field['title']) }}'"
|
||||
:channel_locale = "'{{ $channel_locale }}'"
|
||||
:result = "'{{ $selectedOption }}'"
|
||||
></depends>
|
||||
@if (strpos($field['validation'], 'required_if') !== false)
|
||||
<required-if
|
||||
:name = "'{{ $firstField }}[{{ $secondField }}][{{ $thirdField }}][{{ $field['name'] }}]'"
|
||||
:label = "'{{ trans($field['title']) }}'"
|
||||
:options = '@json($field['options'])'
|
||||
:result = "'{{ $selectedOption }}'"
|
||||
:validations = "'{{ $validations }}'"
|
||||
:depend = "'{{ $firstField }}[{{ $secondField }}][{{ $thirdField }}][{{ $dependField }}]'"
|
||||
:depend-result= "'{{ $dependSelectedOption }}'"
|
||||
:channel_locale = "'{{ $channel_locale }}'"
|
||||
></required-if>
|
||||
@else
|
||||
<depends
|
||||
:options = '@json($field['options'])'
|
||||
:name = "'{{ $firstField }}[{{ $secondField }}][{{ $thirdField }}][{{ $field['name'] }}]'"
|
||||
:validations = "'{{ $validations }}'"
|
||||
:depend = "'{{ $firstField }}[{{ $secondField }}][{{ $thirdField }}][{{ $dependField }}]'"
|
||||
:value = "'{{ $dependValue }}'"
|
||||
:field_name = "'{{ trans($field['title']) }}'"
|
||||
:channel_locale = "'{{ $channel_locale }}'"
|
||||
:result = "'{{ $selectedOption }}'"
|
||||
:depend-saved-value= "'{{ $dependSelectedOption }}'"
|
||||
></depends>
|
||||
@endif
|
||||
|
||||
@else
|
||||
|
||||
|
|
@ -99,7 +114,7 @@
|
|||
@elseif ($field['type'] == 'password')
|
||||
|
||||
<input type="password" v-validate="'{{ $validations }}'" class="control" id="{{ $firstField }}[{{ $secondField }}][{{ $thirdField }}][{{ $field['name'] }}]" name="{{ $firstField }}[{{ $secondField }}][{{ $thirdField }}][{{ $field['name'] }}]" value="{{ old($name) ?: core()->getConfigData($name) }}" data-vv-as=""{{ trans($field['title']) }}"">
|
||||
|
||||
|
||||
@elseif ($field['type'] == 'number')
|
||||
|
||||
<input type="number" min="0" v-validate="'{{ $validations }}'" class="control" id="{{ $firstField }}[{{ $secondField }}][{{ $thirdField }}][{{ $field['name'] }}]" name="{{ $firstField }}[{{ $secondField }}][{{ $thirdField }}][{{ $field['name'] }}]" value="{{ old($name) ?: core()->getConfigData($name) }}" data-vv-as=""{{ trans($field['title']) }}"">
|
||||
|
|
@ -111,7 +126,7 @@
|
|||
|
||||
@elseif ($field['type'] == 'textarea')
|
||||
|
||||
<textarea v-validate="'{{ $validations }}'" class="control" id="{{ $firstField }}[{{ $secondField }}][{{ $thirdField }}][{{ $field['name'] }}]" name="{{ $firstField }}[{{ $secondField }}][{{ $thirdField }}][{{ $field['name'] }}]" data-vv-as=""{{ trans($field['title']) }}"">{{ old($name) ?: core()->getConfigData($name) }}</textarea>
|
||||
<textarea v-validate="'{{ $validations }}'" class="control" id="{{ $firstField }}[{{ $secondField }}][{{ $thirdField }}][{{ $field['name'] }}]" name="{{ $firstField }}[{{ $secondField }}][{{ $thirdField }}][{{ $field['name'] }}]" data-vv-as=""{{ trans($field['title']) }}"">{{ old($name) ? core()->getConfigData($name) : (isset($field['default_value']) ? $field['default_value'] : '') }}</textarea>
|
||||
|
||||
@elseif ($field['type'] == 'select')
|
||||
|
||||
|
|
@ -215,7 +230,7 @@
|
|||
|
||||
@elseif ($field['type'] == 'boolean')
|
||||
|
||||
<?php $selectedOption = core()->getConfigData($name) ?? ''; ?>
|
||||
<?php $selectedOption = core()->getConfigData($name) ?? (isset($field['default_value']) ? $field['default_value'] : ''); ?>
|
||||
|
||||
<label class="switch">
|
||||
<input type="hidden" name="{{ $firstField }}[{{ $secondField }}][{{ $thirdField }}][{{ $field['name'] }}]" value="0" />
|
||||
|
|
|
|||
|
|
@ -457,12 +457,38 @@
|
|||
|
||||
</form>
|
||||
|
||||
|
||||
<div class="content">
|
||||
<div class="page-header">
|
||||
<div class="page-action">
|
||||
<div class="export-import" @click="showModal('downloadDataGrid')">
|
||||
<i class="export-icon"></i>
|
||||
<span >
|
||||
{{ __('admin::app.export.export') }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<modal id="downloadDataGrid" :is-open="this.$root.modalIds.downloadDataGrid">
|
||||
<h3 slot="header">{{ __('admin::app.export.download') }}</h3>
|
||||
<div slot="body">
|
||||
<export-form></export-form>
|
||||
</div>
|
||||
</modal>
|
||||
|
||||
@inject('cartRuleCouponGrid','Webkul\Admin\DataGrids\CartRuleCouponDataGrid')
|
||||
|
||||
{!! $cartRuleCouponGrid->render() !!}
|
||||
</div>
|
||||
</script>
|
||||
|
||||
@push('scripts')
|
||||
@include('admin::export.export', ['gridName' => $cartRuleCouponGrid])
|
||||
@endpush
|
||||
|
||||
<script>
|
||||
Vue.component('cart-rule', {
|
||||
|
||||
|
|
@ -754,7 +780,11 @@
|
|||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
showModal(id) {
|
||||
this.$root.$set(this.$root.modalIds, id, true);
|
||||
},
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -454,8 +454,14 @@
|
|||
|
||||
<tr class="bold">
|
||||
<td>{{ __('admin::app.sales.orders.total-due') }}</td>
|
||||
|
||||
<td>-</td>
|
||||
<td>{{ core()->formatBasePrice($order->base_total_due) }}</td>
|
||||
|
||||
@if($order->status !== 'canceled')
|
||||
<td>{{ core()->formatBasePrice($order->base_total_due) }}</td>
|
||||
@else
|
||||
<td id="due-amount-on-cancelled">{{ core()->formatBasePrice(0.00) }}</td>
|
||||
@endif
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -25,26 +25,26 @@ class AttributeGroupTableSeeder extends Seeder
|
|||
'is_user_defined' => '0',
|
||||
'attribute_family_id' => '1',
|
||||
], [
|
||||
'id' => '2',
|
||||
'name' => 'Description',
|
||||
'id' => '2',
|
||||
'name' => 'Description',
|
||||
'position' => '2',
|
||||
'is_user_defined' => '0',
|
||||
'attribute_family_id' => '1',
|
||||
], [
|
||||
'id' => '3',
|
||||
'id' => '3',
|
||||
'name' => 'Meta Description',
|
||||
'position' => '3',
|
||||
'is_user_defined' => '0',
|
||||
'attribute_family_id' => '1',
|
||||
], [
|
||||
'id' => '4',
|
||||
'name' => 'Price',
|
||||
'id' => '4',
|
||||
'name' => 'Price',
|
||||
'position' => '4',
|
||||
'is_user_defined' => '0',
|
||||
'attribute_family_id' => '1',
|
||||
], [
|
||||
'id' => '5',
|
||||
'name' => 'Shipping',
|
||||
'id' => '5',
|
||||
'name' => 'Shipping',
|
||||
'position' => '5',
|
||||
'is_user_defined' => '0',
|
||||
'attribute_family_id' => '1'
|
||||
|
|
@ -59,31 +59,31 @@ class AttributeGroupTableSeeder extends Seeder
|
|||
], [
|
||||
'attribute_id' => '2',
|
||||
'attribute_group_id' => '1',
|
||||
'position' => '2',
|
||||
'position' => '3',
|
||||
], [
|
||||
'attribute_id' => '3',
|
||||
'attribute_group_id' => '1',
|
||||
'position' => '3',
|
||||
'position' => '4',
|
||||
], [
|
||||
'attribute_id' => '4',
|
||||
'attribute_group_id' => '1',
|
||||
'position' => '4',
|
||||
'position' => '5',
|
||||
], [
|
||||
'attribute_id' => '5',
|
||||
'attribute_group_id' => '1',
|
||||
'position' => '5',
|
||||
'position' => '6',
|
||||
], [
|
||||
'attribute_id' => '6',
|
||||
'attribute_group_id' => '1',
|
||||
'position' => '6',
|
||||
'position' => '7',
|
||||
], [
|
||||
'attribute_id' => '7',
|
||||
'attribute_group_id' => '1',
|
||||
'position' => '7',
|
||||
'position' => '8',
|
||||
], [
|
||||
'attribute_id' => '8',
|
||||
'attribute_group_id' => '1',
|
||||
'position' => '8',
|
||||
'position' => '10',
|
||||
], [
|
||||
'attribute_id' => '9',
|
||||
'attribute_group_id' => '2',
|
||||
|
|
@ -143,19 +143,23 @@ class AttributeGroupTableSeeder extends Seeder
|
|||
], [
|
||||
'attribute_id' => '23',
|
||||
'attribute_group_id' => '1',
|
||||
'position' => '10',
|
||||
'position' => '11',
|
||||
], [
|
||||
'attribute_id' => '24',
|
||||
'attribute_group_id' => '1',
|
||||
'position' => '11',
|
||||
'position' => '12',
|
||||
], [
|
||||
'attribute_id' => '25',
|
||||
'attribute_group_id' => '1',
|
||||
'position' => '12',
|
||||
'position' => '13',
|
||||
], [
|
||||
'attribute_id' => '26',
|
||||
'attribute_group_id' => '1',
|
||||
'position' => '9',
|
||||
], [
|
||||
'attribute_id' => '27',
|
||||
'attribute_group_id' => '1',
|
||||
'position' => '2',
|
||||
]
|
||||
]);
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ class AttributeTableSeeder extends Seeder
|
|||
public function run()
|
||||
{
|
||||
DB::table('attributes')->delete();
|
||||
|
||||
|
||||
DB::table('attribute_translations')->delete();
|
||||
|
||||
$now = Carbon::now();
|
||||
|
|
@ -43,7 +43,7 @@ class AttributeTableSeeder extends Seeder
|
|||
'admin_name' => 'Name',
|
||||
'type' => 'text',
|
||||
'validation' => NULL,
|
||||
'position' => '2',
|
||||
'position' => '3',
|
||||
'is_required' => '1',
|
||||
'is_unique' => '0',
|
||||
'value_per_locale' => '1',
|
||||
|
|
@ -62,7 +62,7 @@ class AttributeTableSeeder extends Seeder
|
|||
'admin_name' => 'URL Key',
|
||||
'type' => 'text',
|
||||
'validation' => NULL,
|
||||
'position' => '3',
|
||||
'position' => '4',
|
||||
'is_required' => '1',
|
||||
'is_unique' => '1',
|
||||
'value_per_locale' => '0',
|
||||
|
|
@ -81,7 +81,7 @@ class AttributeTableSeeder extends Seeder
|
|||
'admin_name' => 'Tax Category',
|
||||
'type' => 'select',
|
||||
'validation' => NULL,
|
||||
'position' => '4',
|
||||
'position' => '5',
|
||||
'is_required' => '0',
|
||||
'is_unique' => '0',
|
||||
'value_per_locale' => '0',
|
||||
|
|
@ -100,7 +100,7 @@ class AttributeTableSeeder extends Seeder
|
|||
'admin_name' => 'New',
|
||||
'type' => 'boolean',
|
||||
'validation' => NULL,
|
||||
'position' => '5',
|
||||
'position' => '6',
|
||||
'is_required' => '0',
|
||||
'is_unique' => '0',
|
||||
'value_per_locale' => '0',
|
||||
|
|
@ -119,7 +119,7 @@ class AttributeTableSeeder extends Seeder
|
|||
'admin_name' => 'Featured',
|
||||
'type' => 'boolean',
|
||||
'validation' => NULL,
|
||||
'position' => '6',
|
||||
'position' => '7',
|
||||
'is_required' => '0',
|
||||
'is_unique' => '0',
|
||||
'value_per_locale' => '0',
|
||||
|
|
@ -138,7 +138,7 @@ class AttributeTableSeeder extends Seeder
|
|||
'admin_name' => 'Visible Individually',
|
||||
'type' => 'boolean',
|
||||
'validation' => NULL,
|
||||
'position' => '7',
|
||||
'position' => '9',
|
||||
'is_required' => '1',
|
||||
'is_unique' => '0',
|
||||
'value_per_locale' => '0',
|
||||
|
|
@ -157,7 +157,7 @@ class AttributeTableSeeder extends Seeder
|
|||
'admin_name' => 'Status',
|
||||
'type' => 'boolean',
|
||||
'validation' => NULL,
|
||||
'position' => '8',
|
||||
'position' => '10',
|
||||
'is_required' => '1',
|
||||
'is_unique' => '0',
|
||||
'value_per_locale' => '0',
|
||||
|
|
@ -176,7 +176,7 @@ class AttributeTableSeeder extends Seeder
|
|||
'admin_name' => 'Short Description',
|
||||
'type' => 'textarea',
|
||||
'validation' => NULL,
|
||||
'position' => '9',
|
||||
'position' => '11',
|
||||
'is_required' => '1',
|
||||
'is_unique' => '0',
|
||||
'value_per_locale' => '1',
|
||||
|
|
@ -195,7 +195,7 @@ class AttributeTableSeeder extends Seeder
|
|||
'admin_name' => 'Description',
|
||||
'type' => 'textarea',
|
||||
'validation' => NULL,
|
||||
'position' => '10',
|
||||
'position' => '12',
|
||||
'is_required' => '1',
|
||||
'is_unique' => '0',
|
||||
'value_per_locale' => '1',
|
||||
|
|
@ -214,7 +214,7 @@ class AttributeTableSeeder extends Seeder
|
|||
'admin_name' => 'Price',
|
||||
'type' => 'price',
|
||||
'validation' => 'decimal',
|
||||
'position' => '11',
|
||||
'position' => '13',
|
||||
'is_required' => '1',
|
||||
'is_unique' => '0',
|
||||
'value_per_locale' => '0',
|
||||
|
|
@ -233,7 +233,7 @@ class AttributeTableSeeder extends Seeder
|
|||
'admin_name' => 'Cost',
|
||||
'type' => 'price',
|
||||
'validation' => 'decimal',
|
||||
'position' => '12',
|
||||
'position' => '14',
|
||||
'is_required' => '0',
|
||||
'is_unique' => '0',
|
||||
'value_per_locale' => '0',
|
||||
|
|
@ -252,7 +252,7 @@ class AttributeTableSeeder extends Seeder
|
|||
'admin_name' => 'Special Price',
|
||||
'type' => 'price',
|
||||
'validation' => 'decimal',
|
||||
'position' => '13',
|
||||
'position' => '15',
|
||||
'is_required' => '0',
|
||||
'is_unique' => '0',
|
||||
'value_per_locale' => '0',
|
||||
|
|
@ -271,7 +271,7 @@ class AttributeTableSeeder extends Seeder
|
|||
'admin_name' => 'Special Price From',
|
||||
'type' => 'date',
|
||||
'validation' => NULL,
|
||||
'position' => '14',
|
||||
'position' => '16',
|
||||
'is_required' => '0',
|
||||
'is_unique' => '0',
|
||||
'value_per_locale' => '0',
|
||||
|
|
@ -290,7 +290,7 @@ class AttributeTableSeeder extends Seeder
|
|||
'admin_name' => 'Special Price To',
|
||||
'type' => 'date',
|
||||
'validation' => NULL,
|
||||
'position' => '15',
|
||||
'position' => '17',
|
||||
'is_required' => '0',
|
||||
'is_unique' => '0',
|
||||
'value_per_locale' => '0',
|
||||
|
|
@ -309,7 +309,7 @@ class AttributeTableSeeder extends Seeder
|
|||
'admin_name' => 'Meta Title',
|
||||
'type' => 'textarea',
|
||||
'validation' => NULL,
|
||||
'position' => '16',
|
||||
'position' => '18',
|
||||
'is_required' => '0',
|
||||
'is_unique' => '0',
|
||||
'value_per_locale' => '1',
|
||||
|
|
@ -328,7 +328,7 @@ class AttributeTableSeeder extends Seeder
|
|||
'admin_name' => 'Meta Keywords',
|
||||
'type' => 'textarea',
|
||||
'validation' => NULL,
|
||||
'position' => '17',
|
||||
'position' => '20',
|
||||
'is_required' => '0',
|
||||
'is_unique' => '0',
|
||||
'value_per_locale' => '1',
|
||||
|
|
@ -347,7 +347,7 @@ class AttributeTableSeeder extends Seeder
|
|||
'admin_name' => 'Meta Description',
|
||||
'type' => 'textarea',
|
||||
'validation' => NULL,
|
||||
'position' => '18',
|
||||
'position' => '21',
|
||||
'is_required' => '0',
|
||||
'is_unique' => '0',
|
||||
'value_per_locale' => '1',
|
||||
|
|
@ -366,7 +366,7 @@ class AttributeTableSeeder extends Seeder
|
|||
'admin_name' => 'Width',
|
||||
'type' => 'text',
|
||||
'validation' => 'decimal',
|
||||
'position' => '19',
|
||||
'position' => '22',
|
||||
'is_required' => '0',
|
||||
'is_unique' => '0',
|
||||
'value_per_locale' => '0',
|
||||
|
|
@ -385,7 +385,7 @@ class AttributeTableSeeder extends Seeder
|
|||
'admin_name' => 'Height',
|
||||
'type' => 'text',
|
||||
'validation' => 'decimal',
|
||||
'position' => '20',
|
||||
'position' => '23',
|
||||
'is_required' => '0',
|
||||
'is_unique' => '0',
|
||||
'value_per_locale' => '0',
|
||||
|
|
@ -404,7 +404,7 @@ class AttributeTableSeeder extends Seeder
|
|||
'admin_name' => 'Depth',
|
||||
'type' => 'text',
|
||||
'validation' => 'decimal',
|
||||
'position' => '21',
|
||||
'position' => '24',
|
||||
'is_required' => '0',
|
||||
'is_unique' => '0',
|
||||
'value_per_locale' => '0',
|
||||
|
|
@ -423,7 +423,7 @@ class AttributeTableSeeder extends Seeder
|
|||
'admin_name' => 'Weight',
|
||||
'type' => 'text',
|
||||
'validation' => 'decimal',
|
||||
'position' => '22',
|
||||
'position' => '25',
|
||||
'is_required' => '1',
|
||||
'is_unique' => '0',
|
||||
'value_per_locale' => '0',
|
||||
|
|
@ -442,7 +442,7 @@ class AttributeTableSeeder extends Seeder
|
|||
'admin_name' => 'Color',
|
||||
'type' => 'select',
|
||||
'validation' => NULL,
|
||||
'position' => '23',
|
||||
'position' => '26',
|
||||
'is_required' => '0',
|
||||
'is_unique' => '0',
|
||||
'value_per_locale' => '0',
|
||||
|
|
@ -461,7 +461,7 @@ class AttributeTableSeeder extends Seeder
|
|||
'admin_name' => 'Size',
|
||||
'type' => 'select',
|
||||
'validation' => NULL,
|
||||
'position' => '24',
|
||||
'position' => '27',
|
||||
'is_required' => '0',
|
||||
'is_unique' => '0',
|
||||
'value_per_locale' => '0',
|
||||
|
|
@ -480,7 +480,7 @@ class AttributeTableSeeder extends Seeder
|
|||
'admin_name' => 'Brand',
|
||||
'type' => 'select',
|
||||
'validation' => NULL,
|
||||
'position' => '25',
|
||||
'position' => '28',
|
||||
'is_required' => '0',
|
||||
'is_unique' => '0',
|
||||
'value_per_locale' => '0',
|
||||
|
|
@ -512,6 +512,25 @@ class AttributeTableSeeder extends Seeder
|
|||
'created_at' => $now,
|
||||
'updated_at' => $now,
|
||||
'is_comparable' => '0',
|
||||
], [
|
||||
'id' => '27',
|
||||
'code' => 'product_number',
|
||||
'admin_name' => 'Product Number',
|
||||
'type' => 'text',
|
||||
'validation' => NULL,
|
||||
'position' => '2',
|
||||
'is_required' => '0',
|
||||
'is_unique' => '1',
|
||||
'value_per_locale' => '0',
|
||||
'value_per_channel' => '0',
|
||||
'is_filterable' => '0',
|
||||
'is_configurable' => '0',
|
||||
'is_user_defined' => '0',
|
||||
'is_visible_on_front' => '0',
|
||||
'use_in_flat' => '1',
|
||||
'created_at' => $now,
|
||||
'updated_at' => $now,
|
||||
'is_comparable' => '0',
|
||||
]
|
||||
]);
|
||||
|
||||
|
|
@ -646,6 +665,11 @@ class AttributeTableSeeder extends Seeder
|
|||
'locale' => 'en',
|
||||
'name' => 'Allow Guest Checkout',
|
||||
'attribute_id' => '26',
|
||||
], [
|
||||
'id' => '27',
|
||||
'locale' => 'en',
|
||||
'name' => 'Product Number',
|
||||
'attribute_id' => '27',
|
||||
]
|
||||
]);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -153,7 +153,10 @@ class CategoryController extends Controller
|
|||
try {
|
||||
Event::dispatch('catalog.category.delete.before', $id);
|
||||
|
||||
$this->categoryRepository->delete($id);
|
||||
if($category->products->count() > 0) {
|
||||
$category->products()->delete();
|
||||
}
|
||||
$category->delete();
|
||||
|
||||
Event::dispatch('catalog.category.delete.after', $id);
|
||||
|
||||
|
|
@ -175,36 +178,52 @@ class CategoryController extends Controller
|
|||
*/
|
||||
public function massDestroy()
|
||||
{
|
||||
$suppressFlash = false;
|
||||
$suppressFlash = true;
|
||||
$categoryIds = explode(',', request()->input('indexes'));
|
||||
|
||||
if (request()->isMethod('delete') || request()->isMethod('post')) {
|
||||
$indexes = explode(',', request()->input('indexes'));
|
||||
foreach ($categoryIds as $categoryId) {
|
||||
$category = $this->categoryRepository->find($categoryId);
|
||||
|
||||
foreach ($indexes as $key => $value) {
|
||||
try {
|
||||
Event::dispatch('catalog.category.delete.before', $value);
|
||||
if (isset($category)) {
|
||||
if(strtolower($category->name) == "root") {
|
||||
$suppressFlash = false;
|
||||
session()->flash('warning', trans('admin::app.response.delete-category-root', ['name' => 'Category']));
|
||||
} else {
|
||||
try {
|
||||
$suppressFlash = true;
|
||||
Event::dispatch('catalog.category.delete.before', $categoryId);
|
||||
|
||||
$this->categoryRepository->delete($value);
|
||||
if($category->products->count() > 0) {
|
||||
$category->products()->delete();
|
||||
}
|
||||
$category->delete();
|
||||
|
||||
Event::dispatch('catalog.category.delete.after', $value);
|
||||
} catch(\Exception $e) {
|
||||
$suppressFlash = true;
|
||||
|
||||
continue;
|
||||
Event::dispatch('catalog.category.delete.after', $categoryId);
|
||||
|
||||
} catch(\Exception $e) {
|
||||
session()->flash('error', trans('admin::app.response.delete-failed', ['name' => 'Category']));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (! $suppressFlash) {
|
||||
session()->flash('success', trans('admin::app.datagrid.mass-ops.delete-success'));
|
||||
} else {
|
||||
session()->flash('info', trans('admin::app.datagrid.mass-ops.partial-action', ['resource' => 'Attribute Family']));
|
||||
}
|
||||
|
||||
return redirect()->back();
|
||||
} else {
|
||||
session()->flash('error', trans('admin::app.datagrid.mass-ops.method-error'));
|
||||
|
||||
return redirect()->back();
|
||||
}
|
||||
|
||||
if (count($categoryIds) != 1 || $suppressFlash == true) {
|
||||
session()->flash('success', trans('admin::app.datagrid.mass-ops.delete-success', ['resource' => 'Category']));
|
||||
}
|
||||
|
||||
return redirect()->route($this->_config['redirect']);
|
||||
}
|
||||
|
||||
|
||||
public function categoryProductCount() {
|
||||
$indexes = explode(",", request()->input('indexes'));
|
||||
$product_count = 0;
|
||||
|
||||
foreach($indexes as $index) {
|
||||
$category = $this->categoryRepository->find($index);
|
||||
$product_count += $category->products->count();
|
||||
}
|
||||
|
||||
return response()->json(['product_count' => $product_count], 200);
|
||||
}
|
||||
}
|
||||
|
|
@ -9,6 +9,7 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
|||
use Webkul\Category\Contracts\Category as CategoryContract;
|
||||
use Webkul\Attribute\Models\AttributeProxy;
|
||||
use Webkul\Category\Repositories\CategoryRepository;
|
||||
use Webkul\Product\Models\ProductProxy;
|
||||
|
||||
/**
|
||||
* Class Category
|
||||
|
|
@ -129,4 +130,12 @@ class Category extends TranslatableModel implements CategoryContract
|
|||
|
||||
return $this->findInTree($category->children);
|
||||
}
|
||||
|
||||
/**
|
||||
* The products that belong to the category.
|
||||
*/
|
||||
public function products()
|
||||
{
|
||||
return $this->belongsToMany(ProductProxy::modelClass(), 'product_categories');
|
||||
}
|
||||
}
|
||||
|
|
@ -20,8 +20,8 @@ class ChannelTableSeeder extends Seeder
|
|||
'root_category_id' => 1,
|
||||
'home_page_content' => '<p>@include("shop::home.slider") @include("shop::home.featured-products") @include("shop::home.new-products")</p>
|
||||
<div class="banner-container">
|
||||
<div class="left-banner"><img data-src="themes/default/assets/images/1.webp" class="lazyload" alt="test" width="720" height="720" /></div>
|
||||
<div class="right-banner"><img data-src="themes/default/assets/images/2.webp" class="lazyload" alt="test" width="460" height="330" /> <img data-src="themes/default/assets/images/3.webp" class="lazyload" alt="test" width="460" height="330" /></div>
|
||||
<div class="left-banner"><img src='.asset("/themes/default/assets/images/1.webp").' data-src='.asset("/themes/default/assets/images/1.webp").' class="lazyload" alt="test" width="720" height="720" /></div>
|
||||
<div class="right-banner"><img src='. asset("/themes/default/assets/images/2.webp").' data-src='. asset("/themes/default/assets/images/2.webp").' class="lazyload" alt="test" width="460" height="330" /> <img src='.asset("/themes/default/assets/images/3.webp").' data-src='.asset("/themes/default/assets/images/3.webp").' class="lazyload" alt="test" width="460" height="330" /></div>
|
||||
</div>',
|
||||
'footer_content' => '<div class="list-container"><span class="list-heading">Quick Links</span><ul class="list-group"><li><a href="@php echo route(\'shop.cms.page\', \'about-us\') @endphp">About Us</a></li><li><a href="@php echo route(\'shop.cms.page\', \'return-policy\') @endphp">Return Policy</a></li><li><a href="@php echo route(\'shop.cms.page\', \'refund-policy\') @endphp">Refund Policy</a></li><li><a href="@php echo route(\'shop.cms.page\', \'terms-conditions\') @endphp">Terms and conditions</a></li><li><a href="@php echo route(\'shop.cms.page\', \'terms-of-use\') @endphp">Terms of Use</a></li><li><a href="@php echo route(\'shop.cms.page\', \'contact-us\') @endphp">Contact Us</a></li></ul></div><div class="list-container"><span class="list-heading">Connect With Us</span><ul class="list-group"><li><a href="#"><span class="icon icon-facebook"></span>Facebook </a></li><li><a href="#"><span class="icon icon-twitter"></span> Twitter </a></li><li><a href="#"><span class="icon icon-instagram"></span> Instagram </a></li><li><a href="#"> <span class="icon icon-google-plus"></span>Google+ </a></li><li><a href="#"> <span class="icon icon-linkedin"></span>LinkedIn </a></li></ul></div>',
|
||||
'name' => 'Default',
|
||||
|
|
|
|||
|
|
@ -29,7 +29,6 @@
|
|||
}
|
||||
|
||||
.main-container-wrapper .product-card .product-image img {
|
||||
height: auto;
|
||||
max-width: 100%;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -102,7 +101,7 @@
|
|||
}
|
||||
|
||||
$('.path-hint-tooltip').css('left', left - minus)
|
||||
|
||||
|
||||
$('.path-hint-tooltip').css('top', currentElement.offset().top + 20)
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -17,8 +17,9 @@ return [
|
|||
[
|
||||
'name' => 'title',
|
||||
'title' => 'admin::app.admin.system.title',
|
||||
'type' => 'text',
|
||||
'validation' => 'required',
|
||||
'type' => 'depends',
|
||||
'depend' => 'active:1',
|
||||
'validation' => 'required_if:active,1',
|
||||
'channel_based' => false,
|
||||
'locale_based' => true,
|
||||
], [
|
||||
|
|
@ -69,8 +70,9 @@ return [
|
|||
[
|
||||
'name' => 'title',
|
||||
'title' => 'admin::app.admin.system.title',
|
||||
'type' => 'text',
|
||||
'validation' => 'required',
|
||||
'type' => 'depends',
|
||||
'depend' => 'active:1',
|
||||
'validation' => 'required_if:active,1',
|
||||
'channel_based' => false,
|
||||
'locale_based' => true,
|
||||
], [
|
||||
|
|
|
|||
|
|
@ -1,24 +1,24 @@
|
|||
<?php
|
||||
return [
|
||||
'paypal_smart_button' => [
|
||||
'code' => 'paypal_smart_button',
|
||||
'title' => 'PayPal',
|
||||
'description' => 'PayPal',
|
||||
'client_id' => 'sb',
|
||||
'class' => 'Webkul\Paypal\Payment\SmartButton',
|
||||
'sandbox' => true,
|
||||
'active' => true,
|
||||
'sort' => 0,
|
||||
],
|
||||
|
||||
'paypal_standard' => [
|
||||
'code' => 'paypal_standard',
|
||||
'title' => 'Paypal Standard',
|
||||
'description' => 'Paypal Standard',
|
||||
'title' => 'PayPal Standard',
|
||||
'description' => 'PayPal Standard',
|
||||
'class' => 'Webkul\Paypal\Payment\Standard',
|
||||
'sandbox' => true,
|
||||
'active' => true,
|
||||
'business_account' => 'test@webkul.com',
|
||||
'sort' => 3,
|
||||
],
|
||||
|
||||
'paypal_smart_button' => [
|
||||
'code' => 'paypal_smart_button',
|
||||
'title' => 'Paypal Smart Button',
|
||||
'description' => 'Paypal Smart Button',
|
||||
'client_id' => 'sb',
|
||||
'class' => 'Webkul\Paypal\Payment\SmartButton',
|
||||
'sandbox' => true,
|
||||
'active' => true,
|
||||
'sort' => 4,
|
||||
]
|
||||
];
|
||||
|
|
@ -9,8 +9,9 @@ return [
|
|||
[
|
||||
'name' => 'title',
|
||||
'title' => 'admin::app.admin.system.title',
|
||||
'type' => 'text',
|
||||
'validation' => 'required',
|
||||
'type' => 'depends',
|
||||
'depend' => 'active:1',
|
||||
'validation' => 'required_if:active,1',
|
||||
'channel_based' => false,
|
||||
'locale_based' => true,
|
||||
], [
|
||||
|
|
@ -20,11 +21,11 @@ return [
|
|||
'channel_based' => false,
|
||||
'locale_based' => true,
|
||||
], [
|
||||
'name' => 'business_account',
|
||||
'title' => 'admin::app.admin.system.business-account',
|
||||
'type' => 'select',
|
||||
'type' => 'text',
|
||||
'validation' => 'required',
|
||||
'name' => 'business_account',
|
||||
'title' => 'admin::app.admin.system.business-account',
|
||||
'type' => 'depends',
|
||||
'depend' => 'active:1',
|
||||
'validation' => 'required_if:active,1',
|
||||
], [
|
||||
'name' => 'active',
|
||||
'title' => 'admin::app.admin.system.status',
|
||||
|
|
@ -36,7 +37,6 @@ return [
|
|||
'name' => 'sandbox',
|
||||
'title' => 'admin::app.admin.system.sandbox',
|
||||
'type' => 'boolean',
|
||||
'validation' => 'required',
|
||||
'channel_based' => false,
|
||||
'locale_based' => true,
|
||||
], [
|
||||
|
|
@ -63,13 +63,14 @@ return [
|
|||
], [
|
||||
'key' => 'sales.paymentmethods.paypal_smart_button',
|
||||
'name' => 'admin::app.admin.system.paypal-smart-button',
|
||||
'sort' => 3,
|
||||
'sort' => 0,
|
||||
'fields' => [
|
||||
[
|
||||
'name' => 'title',
|
||||
'title' => 'admin::app.admin.system.title',
|
||||
'type' => 'text',
|
||||
'validation' => 'required',
|
||||
'type' => 'depends',
|
||||
'depend' => 'active:1',
|
||||
'validation' => 'required_if:active,1',
|
||||
'channel_based' => false,
|
||||
'locale_based' => true,
|
||||
], [
|
||||
|
|
@ -82,9 +83,9 @@ return [
|
|||
'name' => 'client_id',
|
||||
'title' => 'admin::app.admin.system.client-id',
|
||||
'info' => 'admin::app.admin.system.client-id-info',
|
||||
'type' => 'select',
|
||||
'type' => 'text',
|
||||
'validation' => 'required',
|
||||
'type' => 'depends',
|
||||
'depend' => 'active:1',
|
||||
'validation' => 'required_if:active,1',
|
||||
], [
|
||||
'name' => 'active',
|
||||
'title' => 'admin::app.admin.system.status',
|
||||
|
|
|
|||
|
|
@ -80,7 +80,12 @@ class SmartButtonController extends Controller
|
|||
],
|
||||
|
||||
'application_context' => [
|
||||
'shipping_preference' => 'NO_SHIPPING'
|
||||
'user_action' => 'PAY_NOW',
|
||||
'shipping_preference' => 'SET_PROVIDED_ADDRESS',
|
||||
|
||||
'payment_method' => [
|
||||
'payee_preferred' => 'IMMEDIATE_PAYMENT_REQUIRED',
|
||||
]
|
||||
],
|
||||
|
||||
'purchase_units' => [
|
||||
|
|
@ -156,6 +161,7 @@ class SmartButtonController extends Controller
|
|||
'quantity' => $item->quantity,
|
||||
'name' => $item->name,
|
||||
'sku' => $item->sku,
|
||||
'category' => $item->product->getTypeInstance()->isStockable() ? 'PHYSICAL_GOODS' : 'DIGITAL_GOODS',
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -46,26 +46,46 @@
|
|||
onApprove: function(data, actions) {
|
||||
app.showLoader();
|
||||
|
||||
return actions.order.capture().then(function(details) {
|
||||
return window.axios.post("{{ route('paypal.smart_button.save_order') }}", {
|
||||
'_token': "{{ csrf_token() }}",
|
||||
'data' : details
|
||||
})
|
||||
.then(function(response) {
|
||||
if (response.data.success) {
|
||||
if (response.data.redirect_url) {
|
||||
window.location.href = response.data.redirect_url;
|
||||
} else {
|
||||
window.location.href = "{{ route('shop.checkout.success') }}";
|
||||
return actions.order.capture()
|
||||
.then(function(response) {
|
||||
if (response.error == 'INSTRUMENT_DECLINED') {
|
||||
return actions.restart();
|
||||
} else {
|
||||
return response;
|
||||
}
|
||||
})
|
||||
.then(function(details) {
|
||||
return window.axios.post("{{ route('paypal.smart_button.save_order') }}", {
|
||||
'_token': "{{ csrf_token() }}",
|
||||
'data' : details
|
||||
})
|
||||
.then(function(response) {
|
||||
if (response.data.success) {
|
||||
if (response.data.redirect_url) {
|
||||
window.location.href = response.data.redirect_url;
|
||||
} else {
|
||||
window.location.href = "{{ route('shop.checkout.success') }}";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
app.hideLoader()
|
||||
})
|
||||
.catch(function (error) {
|
||||
window.location.href = "{{ route('shop.checkout.cart.index') }}";
|
||||
})
|
||||
});
|
||||
app.hideLoader()
|
||||
})
|
||||
.catch(function (error) {
|
||||
window.location.href = "{{ route('shop.checkout.cart.index') }}";
|
||||
})
|
||||
});
|
||||
},
|
||||
|
||||
onCancel: function (data) {
|
||||
console.log('Canceled payment')
|
||||
},
|
||||
|
||||
onError: function (err) {
|
||||
window.flashMessages = [{'type': 'alert-error', 'message': err }];
|
||||
|
||||
window.flashMessages.alertMessage = err;
|
||||
|
||||
app.addFlashMessages();
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddProductNumberColumnInProductFlatTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('product_flat', function (Blueprint $table) {
|
||||
$table->string('product_number')->after('sku')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('product_flat', function (Blueprint $table) {
|
||||
$table->dropColumn('product_number');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -5,7 +5,7 @@ return [
|
|||
'key' => 'sales.orderSettings',
|
||||
'name' => 'admin::app.admin.system.order-settings',
|
||||
'sort' => 3,
|
||||
],[
|
||||
], [
|
||||
'key' => 'sales.orderSettings.order_number',
|
||||
'name' => 'admin::app.admin.system.orderNumber',
|
||||
'sort' => 0,
|
||||
|
|
@ -43,10 +43,24 @@ return [
|
|||
'locale_based' => true,
|
||||
],
|
||||
]
|
||||
], [
|
||||
'key' => 'sales.orderSettings.minimum-order',
|
||||
'name' => 'admin::app.admin.system.minimum-order',
|
||||
'sort' => 1,
|
||||
'fields' => [
|
||||
[
|
||||
'name' => 'minimum_order_amount',
|
||||
'title' => 'admin::app.admin.system.minimum-order-amount',
|
||||
'type' => 'text',
|
||||
'validation' => 'numeric',
|
||||
'channel_based' => true,
|
||||
'locale_based' => true,
|
||||
],
|
||||
]
|
||||
], [
|
||||
'key' => 'sales.orderSettings.invoice_slip_design',
|
||||
'name' => 'admin::app.admin.system.invoice-slip-design',
|
||||
'sort' => 1,
|
||||
'sort' => 2,
|
||||
'fields' => [
|
||||
[
|
||||
'name' => 'logo',
|
||||
|
|
|
|||
|
|
@ -17,8 +17,9 @@ return [
|
|||
[
|
||||
'name' => 'title',
|
||||
'title' => 'admin::app.admin.system.title',
|
||||
'type' => 'text',
|
||||
'validation' => 'required',
|
||||
'type' => 'depends',
|
||||
'depend' => 'active:1',
|
||||
'validation' => 'required_if:active,1',
|
||||
'channel_based' => false,
|
||||
'locale_based' => true,
|
||||
], [
|
||||
|
|
@ -44,8 +45,9 @@ return [
|
|||
[
|
||||
'name' => 'title',
|
||||
'title' => 'admin::app.admin.system.title',
|
||||
'type' => 'text',
|
||||
'validation' => 'required',
|
||||
'type' => 'depends',
|
||||
'depend' => 'active:1',
|
||||
'validation' => 'required_if:active,1',
|
||||
'channel_based' => true,
|
||||
'locale_based' => true,
|
||||
], [
|
||||
|
|
@ -57,14 +59,16 @@ return [
|
|||
], [
|
||||
'name' => 'default_rate',
|
||||
'title' => 'admin::app.admin.system.rate',
|
||||
'type' => 'text',
|
||||
'validation' => 'required',
|
||||
'type' => 'depends',
|
||||
'depend' => 'active:1',
|
||||
'validation' => 'required_if:active,1',
|
||||
'channel_based' => true,
|
||||
'locale_based' => false,
|
||||
], [
|
||||
'name' => 'type',
|
||||
'title' => 'admin::app.admin.system.type',
|
||||
'type' => 'select',
|
||||
'type' => 'depends',
|
||||
'depend' => 'active:1',
|
||||
'options' => [
|
||||
[
|
||||
'title' => 'Per Unit',
|
||||
|
|
@ -74,7 +78,7 @@ return [
|
|||
'value' => 'per_order',
|
||||
]
|
||||
],
|
||||
'validation' => 'required'
|
||||
'validation' => 'required_if:active,1'
|
||||
], [
|
||||
'name' => 'active',
|
||||
'title' => 'admin::app.admin.system.status',
|
||||
|
|
|
|||
|
|
@ -1,10 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="18px" height="18px" viewBox="0 0 18 18" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Generator: Sketch 50.2 (55047) - http://www.bohemiancoding.com/sketch -->
|
||||
<title>arrow-down</title>
|
||||
<desc>Created with Sketch.</desc>
|
||||
<defs></defs>
|
||||
<g id="arrow-down" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<polygon id="Rectangle-2" fill="#A5A5A5" transform="translate(9.000000, 8.000000) rotate(-45.000000) translate(-9.000000, -8.000000) " points="6 5 12 11 6 11"></polygon>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 633 B |
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 7.1 KiB |
File diff suppressed because one or more lines are too long
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"/js/shop.js": "/js/shop.js?id=c4dfdb6d0482241432f9",
|
||||
"/js/shop.js": "/js/shop.js?id=f9b25f1c2f22de85711d",
|
||||
"/css/shop.css": "/css/shop.css?id=45a1e46876af32f30871"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,8 +12,13 @@ return [
|
|||
'type' => 'boolean',
|
||||
'locale_based' => true,
|
||||
'channel_based' => true,
|
||||
],
|
||||
[
|
||||
], [
|
||||
'name' => 'wishlist_option',
|
||||
'title' => 'shop::app.products.wishlist-options',
|
||||
'type' => 'boolean',
|
||||
'locale_based' => true,
|
||||
'channel_based' => true,
|
||||
], [
|
||||
'name' => 'image_search',
|
||||
'title' => 'shop::app.search.image-search-option',
|
||||
'type' => 'boolean',
|
||||
|
|
|
|||
|
|
@ -228,6 +228,12 @@ class OnepageController extends Controller
|
|||
{
|
||||
$cart = Cart::getCart();
|
||||
|
||||
$minimumOrderAmount = (int) core()->getConfigData('sales.orderSettings.minimum-order.minimum_order_amount') ?? 0;
|
||||
|
||||
if (! ($cart->base_sub_total > $minimumOrderAmount)) {
|
||||
throw new \Exception(trans('shop::app.checkout.cart.minimum-order-message', ['amount' => $minimumOrderAmount]));
|
||||
}
|
||||
|
||||
if ($cart->haveStockableItems() && ! $cart->shipping_address) {
|
||||
throw new \Exception(trans('Please check shipping address.'));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="18px" height="18px" viewBox="0 0 18 18" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Generator: Sketch 50.2 (55047) - http://www.bohemiancoding.com/sketch -->
|
||||
<title>arrow-down</title>
|
||||
<desc>Created with Sketch.</desc>
|
||||
<defs></defs>
|
||||
<g id="arrow-down" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<polygon id="Rectangle-2" fill="#A5A5A5" transform="translate(9.000000, 8.000000) rotate(-45.000000) translate(-9.000000, -8.000000) " points="6 5 12 11 6 11"></polygon>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 633 B |
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 7.1 KiB |
|
|
@ -29,8 +29,10 @@ Vue.prototype.$http = axios
|
|||
|
||||
window.eventBus = new Vue();
|
||||
|
||||
Vue.component("image-slider", ImageSlider);
|
||||
Vue.component("vue-slider", VueSlider);
|
||||
Vue.component('image-slider', ImageSlider);
|
||||
Vue.component('vue-slider', VueSlider);
|
||||
Vue.component('proceed-to-checkout', require('./components/checkout/proceed-to-checkout').default);
|
||||
|
||||
Vue.filter('currency', function (value, argument) {
|
||||
return accounting.formatMoney(value, argument);
|
||||
})
|
||||
|
|
|
|||
|
|
@ -0,0 +1,33 @@
|
|||
<template>
|
||||
<a :href="href" :class="addClass" v-text="text" @click="checkMinimumOrder($event)"></a>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: [
|
||||
'href',
|
||||
'addClass',
|
||||
'text',
|
||||
'cartDetails',
|
||||
'minimumOrderAmount',
|
||||
'minimumOrderMessage'
|
||||
],
|
||||
|
||||
methods: {
|
||||
checkMinimumOrder: function (e) {
|
||||
let base_sub_total = parseFloat(this.getCartDetails().base_sub_total);
|
||||
let minimumOrderAmount = parseFloat(this.minimumOrderAmount);
|
||||
|
||||
if (! (base_sub_total > minimumOrderAmount)) {
|
||||
e.preventDefault();
|
||||
window.flashMessages = [{'type': 'alert-warning', 'message': this.minimumOrderMessage}];
|
||||
this.$root.addFlashMessages();
|
||||
}
|
||||
},
|
||||
|
||||
getCartDetails: function () {
|
||||
return JSON.parse(this.cartDetails);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
@ -17,6 +17,7 @@ return [
|
|||
|
||||
'common' => [
|
||||
'error' => 'حدث خطأ. الرجاء المحاولة لاحقاً.',
|
||||
'image-upload-limit' => 'أقصى حجم لتحميل الصورة هو 2 ميغا بايت',
|
||||
'no-result-found' => 'لا توجد نتائج.'
|
||||
],
|
||||
|
||||
|
|
@ -441,6 +442,7 @@ return [
|
|||
'available-for-order' => 'متوفر لطلب الشراء',
|
||||
'settings' => 'Settings',
|
||||
'compare_options' => 'قارن الخيارات',
|
||||
'wishlist-options' => 'Wishlist Options'
|
||||
],
|
||||
|
||||
// 'reviews' => [
|
||||
|
|
@ -495,7 +497,8 @@ return [
|
|||
'link-missing' => '',
|
||||
'event' => [
|
||||
'expired' => 'This event has been expired.'
|
||||
]
|
||||
],
|
||||
'minimum-order-message' => 'Your order should be greater than :amount'
|
||||
],
|
||||
|
||||
'onepage' => [
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ return [
|
|||
|
||||
'common' => [
|
||||
'error' => 'Es ist ein Fehler aufgetreten. Bitte versuchen Sie es später erneut.',
|
||||
'image-upload-limit' => 'Die maximale Upload-Größe des Bildes beträgt 2 MB',
|
||||
'no-result-found' => 'Wir konnten keine Aufzeichnungen finden.'
|
||||
],
|
||||
|
||||
|
|
@ -438,6 +439,7 @@ return [
|
|||
'available' => 'Verfügbar',
|
||||
'settings' => 'Settings',
|
||||
'compare_options' => 'Compare Options',
|
||||
'wishlist-options' => 'Wishlist Options'
|
||||
],
|
||||
|
||||
// 'reviews' => [
|
||||
|
|
@ -489,7 +491,8 @@ return [
|
|||
'cart-subtotal' => 'Warenkorb Zwischensumme',
|
||||
'cart-remove-action' => 'Wollen Sie dies wirklich tun?',
|
||||
'partial-cart-update' => 'Nur einige der Produkte wurden aktualisiert',
|
||||
'link-missing' => ''
|
||||
'link-missing' => '',
|
||||
'minimum-order-message' => 'Your order should be greater than :amount'
|
||||
],
|
||||
|
||||
'onepage' => [
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ return [
|
|||
|
||||
'common' => [
|
||||
'error' => 'Something went wrong, please try again later.',
|
||||
'image-upload-limit' => 'Image max upload size is 2MB',
|
||||
'no-result-found' => 'We could not find any records.'
|
||||
],
|
||||
|
||||
|
|
@ -441,6 +442,7 @@ return [
|
|||
'available-for-order' => 'Available for Order',
|
||||
'settings' => 'Settings',
|
||||
'compare_options' => 'Compare Options',
|
||||
'wishlist-options' => 'Wishlist Options'
|
||||
],
|
||||
|
||||
// 'reviews' => [
|
||||
|
|
@ -495,7 +497,8 @@ return [
|
|||
'link-missing' => '',
|
||||
'event' => [
|
||||
'expired' => 'This event has been expired.'
|
||||
]
|
||||
],
|
||||
'minimum-order-message' => 'Your order should be greater than :amount'
|
||||
],
|
||||
|
||||
'onepage' => [
|
||||
|
|
|
|||
|
|
@ -15,7 +15,8 @@ return [
|
|||
],
|
||||
|
||||
'common' => [
|
||||
'error' => 'Algo ha ido mal, por favor prueba más tarde.'
|
||||
'error' => 'Algo ha ido mal, por favor prueba más tarde.',
|
||||
'image-upload-limit' => 'El tamaño máximo de carga de la imagen es de 2 MB'
|
||||
],
|
||||
|
||||
'home' => [
|
||||
|
|
@ -411,6 +412,7 @@ return [
|
|||
'available-for-order' => 'Disponible para ordenar',
|
||||
'settings' => 'Settings',
|
||||
'compare_options' => 'Compare Options',
|
||||
'wishlist-options' => 'Wishlist Options'
|
||||
],
|
||||
|
||||
// 'reviews' => [
|
||||
|
|
@ -461,7 +463,8 @@ return [
|
|||
'partial-cart-update' => 'Solo algunos de los productos se han actualizado',
|
||||
'event' => [
|
||||
'expired' => 'This event has been expired.'
|
||||
]
|
||||
],
|
||||
'minimum-order-message' => 'Your order should be greater than :amount'
|
||||
],
|
||||
|
||||
'onepage' => [
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ return [
|
|||
|
||||
'common' => [
|
||||
'error' => 'مشکلی رخ داده است. لطفا بعدا دوباره امتحان کنید.',
|
||||
'image-upload-limit' => 'حداکثر اندازه بارگذاری تصویر 2 مگابایت است',
|
||||
'no-result-found' => 'ما هیچ سابقه ای پیدا نکردیم.'
|
||||
],
|
||||
|
||||
|
|
@ -440,6 +441,7 @@ return [
|
|||
'available-for-order' => 'Available for Order',
|
||||
'settings' => 'Settings',
|
||||
'compare_options' => 'Compare Options',
|
||||
'wishlist-options' => 'Wishlist Options'
|
||||
],
|
||||
|
||||
// 'reviews' => [
|
||||
|
|
@ -494,7 +496,8 @@ return [
|
|||
'partial-cart-update' => 'فقط برخی از محصولات (های) به روز شده اند',
|
||||
'event' => [
|
||||
'expired' => 'This event has been expired.'
|
||||
]
|
||||
],
|
||||
'minimum-order-message' => 'Your order should be greater than :amount'
|
||||
],
|
||||
|
||||
'onepage' => [
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ return [
|
|||
|
||||
'common' => [
|
||||
'error' => 'Qualcosa è andato storto, per favore prova ancora più tardi.',
|
||||
'image-upload-limit' => 'La dimensione massima di caricamento dell\'immagine è 2 MB',
|
||||
'no-result-found' => 'Non abbiamo trovato risultati.'
|
||||
],
|
||||
|
||||
|
|
@ -438,6 +439,7 @@ return [
|
|||
'available-for-order' => 'Disponibile per lordine',
|
||||
'settings' => 'Settings',
|
||||
'compare_options' => 'Compare Options',
|
||||
'wishlist-options' => 'Wishlist Options'
|
||||
],
|
||||
|
||||
// 'reviews' => [
|
||||
|
|
@ -492,7 +494,8 @@ return [
|
|||
'link-missing' => '',
|
||||
'event' => [
|
||||
'expired' => 'Questo evento è terminato.'
|
||||
]
|
||||
],
|
||||
'minimum-order-message' => 'Your order should be greater than :amount'
|
||||
],
|
||||
|
||||
'onepage' => [
|
||||
|
|
|
|||
|
|
@ -15,7 +15,8 @@ return [
|
|||
],
|
||||
|
||||
'common' => [
|
||||
'error' => 'エラーが発生しました。しばらく待ってから、再度アクセスしてください。'
|
||||
'error' => 'エラーが発生しました。しばらく待ってから、再度アクセスしてください。',
|
||||
'image-upload-limit' => '画像の最大アップロードサイズは2MBです',
|
||||
],
|
||||
|
||||
'home' => [
|
||||
|
|
@ -407,6 +408,7 @@ return [
|
|||
'available-for-order' => '注文可能',
|
||||
'settings' => 'Settings',
|
||||
'compare_options' => 'Compare Options',
|
||||
'wishlist-options' => 'Wishlist Options'
|
||||
],
|
||||
|
||||
'buynow' => [
|
||||
|
|
@ -453,7 +455,8 @@ return [
|
|||
'cart-subtotal' => '小計',
|
||||
'cart-remove-action' => '手続きを進めますか。',
|
||||
'partial-cart-update' => 'Only some of the product(s) were updated',
|
||||
'link-missing' => ''
|
||||
'link-missing' => '',
|
||||
'minimum-order-message' => 'Your order should be greater than :amount'
|
||||
],
|
||||
|
||||
'onepage' => [
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ return [
|
|||
|
||||
'common' => [
|
||||
'error' => 'Something went wrong, please try again later.',
|
||||
'image-upload-limit' => 'De maximale uploadgrootte van de afbeelding is 2 MB',
|
||||
'no-result-found' => 'We could not find any records.'
|
||||
],
|
||||
|
||||
|
|
@ -445,6 +446,7 @@ return [
|
|||
'available-for-order' => 'Beschikbaar voor bestelling',
|
||||
'settings' => 'Settings',
|
||||
'compare_options' => 'Compare Options',
|
||||
'wishlist-options' => 'Wishlist Options'
|
||||
],
|
||||
|
||||
// 'reviews' => [
|
||||
|
|
@ -499,7 +501,8 @@ return [
|
|||
'link-missing' => '',
|
||||
'event' => [
|
||||
'expired' => 'This event has been expired.'
|
||||
]
|
||||
],
|
||||
'minimum-order-message' => 'Your order should be greater than :amount'
|
||||
],
|
||||
|
||||
'onepage' => [
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ return [
|
|||
|
||||
'common' => [
|
||||
'error' => 'Coś poszło nie tak. Proszę spróbować później.',
|
||||
'image-upload-limit' => 'Maksymalny rozmiar przesyłanego obrazu to 2 MB',
|
||||
'no-result-found' => 'Nie znaleźliśmy żadnych zapisów.'
|
||||
],
|
||||
|
||||
|
|
@ -438,6 +439,7 @@ return [
|
|||
'available-for-order' => 'Dostępne na zamówienie',
|
||||
'settings' => 'Settings',
|
||||
'compare_options' => 'Compare Options',
|
||||
'wishlist-options' => 'Wishlist Options'
|
||||
],
|
||||
|
||||
// 'reviews' => [
|
||||
|
|
@ -491,7 +493,8 @@ return [
|
|||
'partial-cart-update' => 'Tylko niektóre produkty zostały zaktualizowane',
|
||||
'event' => [
|
||||
'expired' => 'To wydarzenie wygasło.'
|
||||
]
|
||||
],
|
||||
'minimum-order-message' => 'Your order should be greater than :amount'
|
||||
],
|
||||
|
||||
'onepage' => [
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ return [
|
|||
|
||||
'common' => [
|
||||
'error' => 'Algo deu errado, por favor, tente novamente mais tarde.',
|
||||
'image-upload-limit' => 'O tamanho máximo de upload da imagem é 2 MB',
|
||||
'no-result-found' => 'We could not find any records.'
|
||||
],
|
||||
|
||||
|
|
@ -428,6 +429,7 @@ return [
|
|||
'available-for-order' => 'Disponível para encomenda',
|
||||
'settings' => 'Settings',
|
||||
'compare_options' => 'Compare Options',
|
||||
'wishlist-options' => 'Wishlist Options'
|
||||
],
|
||||
|
||||
// 'reviews' => [
|
||||
|
|
@ -484,7 +486,8 @@ return [
|
|||
'link-missing' => '',
|
||||
'event' => [
|
||||
'expired' => 'This event has been expired.'
|
||||
]
|
||||
],
|
||||
'minimum-order-message' => 'Your order should be greater than :amount'
|
||||
],
|
||||
|
||||
'onepage' => [
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ return [
|
|||
|
||||
'common' => [
|
||||
'error' => 'Bir şeyler ters gitti, lütfen tekrar deneyin.',
|
||||
'image-upload-limit' => 'Maksimum resim yükleme boyutu 2 MB',
|
||||
'no-result-found' => 'Kayıt bulunamadı.'
|
||||
],
|
||||
|
||||
|
|
@ -438,6 +439,7 @@ return [
|
|||
'available-for-order' => 'Sipariş İçin Uygun',
|
||||
'settings' => 'Settings',
|
||||
'compare_options' => 'Compare Options',
|
||||
'wishlist-options' => 'Wishlist Options'
|
||||
],
|
||||
|
||||
// 'reviews' => [
|
||||
|
|
@ -492,7 +494,8 @@ return [
|
|||
'link-missing' => '',
|
||||
'event' => [
|
||||
'expired' => 'Bu eylemin geçerliliği sona erdi.'
|
||||
]
|
||||
],
|
||||
'minimum-order-message' => 'Your order should be greater than :amount'
|
||||
],
|
||||
|
||||
'onepage' => [
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
@section('content-wrapper')
|
||||
@inject ('productImageHelper', 'Webkul\Product\Helpers\ProductImage')
|
||||
|
||||
<section class="cart">
|
||||
@if ($cart)
|
||||
<div class="title">
|
||||
|
|
@ -87,13 +88,19 @@
|
|||
<a href="{{ route('shop.checkout.cart.remove', $item->id) }}" onclick="removeLink('{{ __('shop::app.checkout.cart.cart-remove-action') }}')">{{ __('shop::app.checkout.cart.remove-link') }}</a></span>
|
||||
|
||||
@auth('customer')
|
||||
<span class="towishlist">
|
||||
@if ($item->parent_id != 'null' ||$item->parent_id != null)
|
||||
<a href="{{ route('shop.movetowishlist', $item->id) }}" onclick="removeLink('{{ __('shop::app.checkout.cart.cart-remove-action') }}')">{{ __('shop::app.checkout.cart.move-to-wishlist') }}</a>
|
||||
@else
|
||||
<a href="{{ route('shop.movetowishlist', $item->child->id) }}" onclick="removeLink('{{ __('shop::app.checkout.cart.cart-remove-action') }}')">{{ __('shop::app.checkout.cart.move-to-wishlist') }}</a>
|
||||
@php
|
||||
$showWishlist = core()->getConfigData('general.content.shop.wishlist_option') == "1" ? true : false;
|
||||
@endphp
|
||||
|
||||
@if ($showWishlist)
|
||||
<span class="towishlist">
|
||||
@if ($item->parent_id != 'null' ||$item->parent_id != null)
|
||||
<a href="{{ route('shop.movetowishlist', $item->id) }}" onclick="removeLink('{{ __('shop::app.checkout.cart.cart-remove-action') }}')">{{ __('shop::app.checkout.cart.move-to-wishlist') }}</a>
|
||||
@else
|
||||
<a href="{{ route('shop.movetowishlist', $item->child->id) }}" onclick="removeLink('{{ __('shop::app.checkout.cart.cart-remove-action') }}')">{{ __('shop::app.checkout.cart.move-to-wishlist') }}</a>
|
||||
@endif
|
||||
</span>
|
||||
@endif
|
||||
</span>
|
||||
@endauth
|
||||
</div>
|
||||
|
||||
|
|
@ -123,9 +130,18 @@
|
|||
@endif
|
||||
|
||||
@if (! cart()->hasError())
|
||||
<a href="{{ route('shop.checkout.onepage.index') }}" class="btn btn-lg btn-primary">
|
||||
{{ __('shop::app.checkout.cart.proceed-to-checkout') }}
|
||||
</a>
|
||||
@php
|
||||
$minimumOrderAmount = (int) core()->getConfigData('sales.orderSettings.minimum-order.minimum_order_amount') ?? 0;
|
||||
@endphp
|
||||
|
||||
<proceed-to-checkout
|
||||
href="{{ route('shop.checkout.onepage.index') }}"
|
||||
add-class="btn btn-lg btn-primary"
|
||||
text="{{ __('shop::app.checkout.cart.proceed-to-checkout') }}"
|
||||
cart-details="{{ $cart }}"
|
||||
minimum-order-amount="{{ $minimumOrderAmount }}"
|
||||
minimum-order-message="{{ __('shop::app.checkout.cart.minimum-order-message', ['amount' => $minimumOrderAmount]) }}">
|
||||
</proceed-to-checkout>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -88,7 +88,19 @@
|
|||
<div class="dropdown-footer">
|
||||
<a href="{{ route('shop.checkout.cart.index') }}">{{ __('shop::app.minicart.view-cart') }}</a>
|
||||
|
||||
<a class="btn btn-primary btn-lg" style="color: white;" href="{{ route('shop.checkout.onepage.index') }}">{{ __('shop::app.minicart.checkout') }}</a>
|
||||
@php
|
||||
$minimumOrderAmount = (int) core()->getConfigData('sales.orderSettings.minimum-order.minimum_order_amount') ?? 0;
|
||||
@endphp
|
||||
|
||||
<proceed-to-checkout
|
||||
href="{{ route('shop.checkout.onepage.index') }}"
|
||||
add-class="btn btn-primary btn-lg"
|
||||
text="{{ __('shop::app.minicart.checkout') }}"
|
||||
cart-details="{{ $cart }}"
|
||||
minimum-order-amount="{{ $minimumOrderAmount }}"
|
||||
minimum-order-message="{{ __('shop::app.checkout.cart.minimum-order-message', ['amount' => $minimumOrderAmount]) }}"
|
||||
style="color: white;">
|
||||
</proceed-to-checkout>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -194,8 +194,14 @@
|
|||
|
||||
<tr class="bold">
|
||||
<td>{{ __('shop::app.customer.account.order.view.total-due') }}</td>
|
||||
|
||||
<td>-</td>
|
||||
<td>{{ core()->formatPrice($order->total_due, $order->order_currency_code) }}</td>
|
||||
|
||||
@if($order->status !== 'canceled')
|
||||
<td>{{ core()->formatPrice($order->total_due, $order->order_currency_code) }}</td>
|
||||
@else
|
||||
<td>{{ core()->formatPrice(0.00, $order->order_currency_code) }}</td>
|
||||
@endif
|
||||
</tr>
|
||||
<tbody>
|
||||
</table>
|
||||
|
|
|
|||
|
|
@ -11,6 +11,8 @@
|
|||
<ul class="menubar">
|
||||
@php
|
||||
$showCompare = core()->getConfigData('general.content.shop.compare_option') == "1" ? true : false;
|
||||
|
||||
$showWishlist = core()->getConfigData('general.content.shop.wishlist_option') == "1" ? true : false;
|
||||
@endphp
|
||||
|
||||
@if (! $showCompare)
|
||||
|
|
@ -19,6 +21,12 @@
|
|||
@endphp
|
||||
@endif
|
||||
|
||||
@if (! $showWishlist)
|
||||
@php
|
||||
unset($menuItem['children']['wishlist']);
|
||||
@endphp
|
||||
@endif
|
||||
|
||||
@foreach ($menuItem['children'] as $subMenuItem)
|
||||
<li class="menu-item {{ $menu->getActive($subMenuItem) }}">
|
||||
<a href="{{ $subMenuItem['url'] }}">
|
||||
|
|
|
|||
|
|
@ -150,6 +150,10 @@
|
|||
@endguest
|
||||
|
||||
@auth('customer')
|
||||
@php
|
||||
$showWishlist = core()->getConfigData('general.content.shop.wishlist_option') == "1" ? true : false;
|
||||
@endphp
|
||||
|
||||
<ul class="dropdown-list account customer">
|
||||
<li>
|
||||
<div>
|
||||
|
|
@ -163,9 +167,11 @@
|
|||
<a href="{{ route('customer.profile.index') }}">{{ __('shop::app.header.profile') }}</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="{{ route('customer.wishlist.index') }}">{{ __('shop::app.header.wishlist') }}</a>
|
||||
</li>
|
||||
@if ($showWishlist)
|
||||
<li>
|
||||
<a href="{{ route('customer.wishlist.index') }}">{{ __('shop::app.header.wishlist') }}</a>
|
||||
</li>
|
||||
@endif
|
||||
|
||||
<li>
|
||||
<a href="{{ route('shop.checkout.cart.index') }}">{{ __('shop::app.header.cart') }}</a>
|
||||
|
|
@ -256,75 +262,90 @@
|
|||
if (imageInput.files[0].type.includes('image/')) {
|
||||
var self = this;
|
||||
|
||||
self.$root.showLoader();
|
||||
if (imageInput.files[0].size <= 2000000) {
|
||||
self.$root.showLoader();
|
||||
|
||||
var formData = new FormData();
|
||||
var formData = new FormData();
|
||||
|
||||
formData.append('image', imageInput.files[0]);
|
||||
formData.append('image', imageInput.files[0]);
|
||||
|
||||
axios.post("{{ route('shop.image.search.upload') }}", formData, {headers: {'Content-Type': 'multipart/form-data'}})
|
||||
.then(function(response) {
|
||||
self.uploaded_image_url = response.data;
|
||||
axios.post("{{ route('shop.image.search.upload') }}", formData, {headers: {'Content-Type': 'multipart/form-data'}})
|
||||
.then(function(response) {
|
||||
self.uploaded_image_url = response.data;
|
||||
|
||||
var net;
|
||||
var net;
|
||||
|
||||
async function app() {
|
||||
var analysedResult = [];
|
||||
async function app() {
|
||||
var analysedResult = [];
|
||||
|
||||
var queryString = '';
|
||||
var queryString = '';
|
||||
|
||||
net = await mobilenet.load();
|
||||
net = await mobilenet.load();
|
||||
|
||||
const imgElement = document.getElementById('uploaded-image-url-' + + self._uid);
|
||||
const imgElement = document.getElementById('uploaded-image-url-' + + self._uid);
|
||||
|
||||
try {
|
||||
const result = await net.classify(imgElement);
|
||||
try {
|
||||
const result = await net.classify(imgElement);
|
||||
|
||||
result.forEach(function(value) {
|
||||
queryString = value.className.split(',');
|
||||
result.forEach(function(value) {
|
||||
queryString = value.className.split(',');
|
||||
|
||||
if (queryString.length > 1) {
|
||||
analysedResult = analysedResult.concat(queryString)
|
||||
} else {
|
||||
analysedResult.push(queryString[0])
|
||||
}
|
||||
});
|
||||
} catch (error) {
|
||||
self.$root.hideLoader();
|
||||
|
||||
window.flashMessages = [
|
||||
{
|
||||
'type': 'alert-error',
|
||||
'message': "{{ __('shop::app.common.error') }}"
|
||||
}
|
||||
];
|
||||
|
||||
self.$root.addFlashMessages();
|
||||
};
|
||||
|
||||
localStorage.searched_image_url = self.uploaded_image_url;
|
||||
|
||||
queryString = localStorage.searched_terms = analysedResult.join('_');
|
||||
|
||||
if (queryString.length > 1) {
|
||||
analysedResult = analysedResult.concat(queryString)
|
||||
} else {
|
||||
analysedResult.push(queryString[0])
|
||||
}
|
||||
});
|
||||
} catch (error) {
|
||||
self.$root.hideLoader();
|
||||
|
||||
window.flashMessages = [
|
||||
{
|
||||
'type': 'alert-error',
|
||||
'message': "{{ __('shop::app.common.error') }}"
|
||||
}
|
||||
];
|
||||
|
||||
self.$root.addFlashMessages();
|
||||
};
|
||||
|
||||
localStorage.searched_image_url = self.uploaded_image_url;
|
||||
|
||||
queryString = localStorage.searched_terms = analysedResult.join('_');
|
||||
window.location.href = "{{ route('shop.search.index') }}" + '?term=' + queryString + '&image-search=1';
|
||||
}
|
||||
|
||||
app();
|
||||
})
|
||||
.catch(function(error) {
|
||||
self.$root.hideLoader();
|
||||
|
||||
window.location.href = "{{ route('shop.search.index') }}" + '?term=' + queryString + '&image-search=1';
|
||||
}
|
||||
window.flashMessages = [
|
||||
{
|
||||
'type': 'alert-error',
|
||||
'message': "{{ __('shop::app.common.error') }}"
|
||||
}
|
||||
];
|
||||
|
||||
app();
|
||||
})
|
||||
.catch(function(error) {
|
||||
self.$root.hideLoader();
|
||||
self.$root.addFlashMessages();
|
||||
});
|
||||
} else {
|
||||
|
||||
window.flashMessages = [
|
||||
{
|
||||
'type': 'alert-error',
|
||||
'message': "{{ __('shop::app.common.error') }}"
|
||||
}
|
||||
];
|
||||
imageInput.value = '';
|
||||
|
||||
self.$root.addFlashMessages();
|
||||
});
|
||||
window.flashMessages = [
|
||||
{
|
||||
'type': 'alert-error',
|
||||
'message': "{{ __('shop::app.common.image-upload-limit') }}"
|
||||
}
|
||||
];
|
||||
|
||||
self.$root.addFlashMessages();
|
||||
|
||||
}
|
||||
} else {
|
||||
imageInput.value = '';
|
||||
|
||||
|
|
@ -391,4 +412,4 @@
|
|||
}
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
@endpush
|
||||
|
|
@ -1,5 +1,7 @@
|
|||
@php
|
||||
$showCompare = core()->getConfigData('general.content.shop.compare_option') == "1" ? true : false
|
||||
$showCompare = core()->getConfigData('general.content.shop.compare_option') == "1" ? true : false;
|
||||
|
||||
$showWishlist = core()->getConfigData('general.content.shop.wishlist_option') == "1" ? true : false;
|
||||
@endphp
|
||||
|
||||
<div class="cart-wish-wrap">
|
||||
|
|
@ -10,8 +12,10 @@
|
|||
<button class="btn btn-lg btn-primary addtocart" {{ $product->isSaleable() ? '' : 'disabled' }}>{{ ($product->type == 'booking') ? __('shop::app.products.book-now') : __('shop::app.products.add-to-cart') }}</button>
|
||||
</form>
|
||||
|
||||
@include('shop::products.wishlist')
|
||||
|
||||
@if ($showWishlist)
|
||||
@include('shop::products.wishlist')
|
||||
@endif
|
||||
|
||||
@if ($showCompare)
|
||||
@include('shop::products.compare', [
|
||||
'productId' => $product->id
|
||||
|
|
|
|||
|
|
@ -39,12 +39,20 @@
|
|||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<div class="product-hero-image" id="product-hero-image">
|
||||
<img :src="currentLargeImageUrl" id="pro-img" :data-image="currentOriginalImageUrl" alt=""/>
|
||||
|
||||
@auth('customer')
|
||||
<a @if ($wishListHelper->getWishlistProduct($product)) class="add-to-wishlist already" @else class="add-to-wishlist" @endif href="{{ route('customer.wishlist.add', $product->product_id) }}">
|
||||
</a>
|
||||
@php
|
||||
$showWishlist = core()->getConfigData('general.content.shop.wishlist_option') == "1" ? true : false;
|
||||
@endphp
|
||||
|
||||
@if ($showWishlist)
|
||||
<a @if ($wishListHelper->getWishlistProduct($product)) class="add-to-wishlist already" @else class="add-to-wishlist" @endif href="{{ route('customer.wishlist.add', $product->product_id) }}">
|
||||
</a>
|
||||
@endif
|
||||
@endauth
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -479,6 +479,146 @@ abstract class DataGrid
|
|||
$filter_value
|
||||
);
|
||||
}
|
||||
} elseif ($columnType === 'boolean') {
|
||||
if ($this->enableFilterMap && isset($this->filterMap[$columnName])) {
|
||||
if ($this->operators[$condition] == '=') {
|
||||
if ($filter_value == 1) {
|
||||
$collection->Where(function($query) use($columnName, $condition, $filter_value) {
|
||||
$query->where(
|
||||
$this->filterMap[$columnName],
|
||||
$this->operators[$condition],
|
||||
$filter_value
|
||||
)->orWhereNotNull($this->filterMap[$columnName]);
|
||||
});
|
||||
} else {
|
||||
$collection->Where(function($query) use($columnName, $condition, $filter_value) {
|
||||
$query->where(
|
||||
$this->filterMap[$columnName],
|
||||
$this->operators[$condition],
|
||||
$filter_value
|
||||
)->orWhereNull($this->filterMap[$columnName]);
|
||||
});
|
||||
}
|
||||
} elseif ($this->operators[$condition] == '<>') {
|
||||
if ($filter_value == 1) {
|
||||
$collection->Where(function($query) use($columnName, $condition, $filter_value) {
|
||||
$query->where(
|
||||
$this->filterMap[$columnName],
|
||||
$this->operators[$condition],
|
||||
$filter_value
|
||||
)->orWhereNull($this->filterMap[$columnName]);
|
||||
});
|
||||
} else {
|
||||
$collection->Where(function($query) use($columnName, $condition, $filter_value) {
|
||||
$query->where(
|
||||
$this->filterMap[$columnName],
|
||||
$this->operators[$condition],
|
||||
$filter_value
|
||||
)->orWhereNotNull($this->filterMap[$columnName]);
|
||||
});
|
||||
}
|
||||
} else {
|
||||
$collection->Where(function($query) use($columnName, $condition, $filter_value) {
|
||||
$query->where(
|
||||
$this->filterMap[$columnName],
|
||||
$this->operators[$condition],
|
||||
$filter_value
|
||||
);
|
||||
});
|
||||
}
|
||||
} elseif ($this->enableFilterMap && ! isset($this->filterMap[$columnName])) {
|
||||
if ($this->operators[$condition] == '=') {
|
||||
if ($filter_value == 1) {
|
||||
$collection->Where(function($query) use($columnName, $condition, $filter_value) {
|
||||
$query->where(
|
||||
$columnName,
|
||||
$this->operators[$condition],
|
||||
$filter_value
|
||||
)->orWhereNotNull($this->filterMap[$columnName]);
|
||||
});
|
||||
} else {
|
||||
$collection->Where(function($query) use($columnName, $condition, $filter_value) {
|
||||
$query->where(
|
||||
$columnName,
|
||||
$this->operators[$condition],
|
||||
$filter_value
|
||||
)->orWhereNull($this->filterMap[$columnName]);
|
||||
});
|
||||
}
|
||||
} elseif ($this->operators[$condition] == '<>') {
|
||||
if ($filter_value == 1) {
|
||||
$collection->Where(function($query) use($columnName, $condition, $filter_value) {
|
||||
$query->where(
|
||||
$columnName,
|
||||
$this->operators[$condition],
|
||||
$filter_value
|
||||
)->orWhereNull($this->filterMap[$columnName]);
|
||||
});
|
||||
} else {
|
||||
$collection->Where(function($query) use($columnName, $condition, $filter_value) {
|
||||
$query->where(
|
||||
$columnName,
|
||||
$this->operators[$condition],
|
||||
$filter_value
|
||||
)->orWhereNotNull($this->filterMap[$columnName]);
|
||||
});
|
||||
}
|
||||
} else {
|
||||
$collection->Where(function($query) use($columnName, $condition, $filter_value) {
|
||||
$query->where(
|
||||
$columnName,
|
||||
$this->operators[$condition],
|
||||
$filter_value
|
||||
);
|
||||
});
|
||||
}
|
||||
} else {
|
||||
if ($this->operators[$condition] == '=') {
|
||||
if ($filter_value == 1) {
|
||||
$collection->Where(function($query) use($columnName, $condition, $filter_value) {
|
||||
$query->where(
|
||||
$columnName,
|
||||
$this->operators[$condition],
|
||||
$filter_value
|
||||
)->orWhereNotNull($this->filterMap[$columnName]);
|
||||
});
|
||||
} else {
|
||||
$collection->Where(function($query) use($columnName, $condition, $filter_value) {
|
||||
$query->where(
|
||||
$columnName,
|
||||
$this->operators[$condition],
|
||||
$filter_value
|
||||
)->orWhereNull($this->filterMap[$columnName]);
|
||||
});
|
||||
}
|
||||
} elseif ($this->operators[$condition] == '<>') {
|
||||
if ($filter_value == 1) {
|
||||
$collection->Where(function($query) use($columnName, $condition, $filter_value) {
|
||||
$query->where(
|
||||
$columnName,
|
||||
$this->operators[$condition],
|
||||
$filter_value
|
||||
)->orWhereNull($this->filterMap[$columnName]);
|
||||
});
|
||||
} else {
|
||||
$collection->Where(function($query) use($columnName, $condition, $filter_value) {
|
||||
$query->where(
|
||||
$columnName,
|
||||
$this->operators[$condition],
|
||||
$filter_value
|
||||
)->orWhereNotNull($this->filterMap[$columnName]);
|
||||
});
|
||||
}
|
||||
} else {
|
||||
$collection->Where(function($query) use($columnName, $condition, $filter_value) {
|
||||
$query->where(
|
||||
$columnName,
|
||||
$this->operators[$condition],
|
||||
$filter_value
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if ($this->enableFilterMap && isset($this->filterMap[$columnName])) {
|
||||
$collection->where(
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ return [
|
|||
'mass-update-status' => 'هل تريد حقا تحديث الحالة من منتقى :resource?',
|
||||
'delete' => 'هل تريد حقا حذف هذا :resource?',
|
||||
'edit' => 'هل تريد حقا تحرير هذا :resource?',
|
||||
'delete-category-product' => 'The selected categories contains products. Performing this action will remove the related products. Do you really want to perform this action?'
|
||||
],
|
||||
|
||||
'zero-index' => 'يمكن أن تحتوي أعمدة الفهرس على قيم أكبر من الصفر فقط',
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ return [
|
|||
'mass-update-status' => 'Möchten Sie den Status der ausgewählten :resource wirklich aktualisieren?',
|
||||
'delete' => 'Möchten Sie diese Aktion wirklich ausführen?',
|
||||
'edit' => 'Möchten Sie :resource wirklich bearbeiten?',
|
||||
'delete-category-product' => 'The selected categories contains products. Performing this action will remove the related products. Do you really want to perform this action?'
|
||||
],
|
||||
|
||||
'zero-index' => 'Indexspalten können nur Werte größer als Null haben',
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ return [
|
|||
'mass-update-status' => 'Do you really want to update status of these selected :resource?',
|
||||
'delete' => 'Do you really want to perform this action?',
|
||||
'edit' => 'Do you really want to edit this :resource?',
|
||||
'delete-category-product' => 'The selected categories contains products. Performing this action will remove the related products. Do you really want to perform this action?'
|
||||
],
|
||||
|
||||
'zero-index' => 'Index columns can have values greater than zero only',
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ return [
|
|||
'mass-update-status' => 'آیا واقعاً می خواهید وضعیت انتخاب شده را به روز کنید :resource?',
|
||||
'delete' => 'آیا واقعاً می خواهید این عمل را انجام دهید؟',
|
||||
'edit' => 'آیا واقعاً می خواهید این را ویرایش کنید :resource?',
|
||||
'delete-category-product' => 'The selected categories contains products. Performing this action will remove the related products. Do you really want to perform this action?'
|
||||
],
|
||||
|
||||
'zero-index' => 'ستون های فهرست می توانند مقادیری بیشتر از صفر داشته باشند',
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ return [
|
|||
'mass-update-status' => 'Vuoi aggiornare davvero lo stato dei :resource selezionati?',
|
||||
'delete' => 'Vuoi davvero effettuare questa azione?',
|
||||
'edit' => 'Vuoi davvero modificare questo :resource?',
|
||||
'delete-category-product' => 'The selected categories contains products. Performing this action will remove the related products. Do you really want to perform this action?'
|
||||
],
|
||||
|
||||
'zero-index' => 'Le colonnne indice possono avere solo valori maggiori di zero',
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ return [
|
|||
'mass-update-status' => 'Do you really want to update status of these selected :resource?',
|
||||
'delete' => 'Wilt u deze actie echt uitvoeren?',
|
||||
'edit' => 'Wil je dit echt bewerken :resource?',
|
||||
'delete-category-product' => 'The selected categories contains products. Performing this action will remove the related products. Do you really want to perform this action?'
|
||||
],
|
||||
|
||||
'zero-index' => 'Index columns can have values greater than zero only',
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ return [
|
|||
'mass-update-status' => 'Czy naprawdę chcesz zaktualizować status tych wybranych :resource?',
|
||||
'delete' => 'Czy naprawdę chcesz wykonać tę akcję?',
|
||||
'edit' => 'Czy naprawdę chcesz edytować :resource?',
|
||||
'delete-category-product' => 'The selected categories contains products. Performing this action will remove the related products. Do you really want to perform this action?'
|
||||
],
|
||||
|
||||
'zero-index' => 'Kolumny indeksu mogą mieć wartości większe niż tylko zero',
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ return [
|
|||
'mass-update-status' => 'Você realmente deseja atualizar o status desses itens selecionados :resource?',
|
||||
'delete' => 'Você realmente deseja excluir este :resource?',
|
||||
'edit' => 'Você realmente quer editar este :resource?',
|
||||
'delete-category-product' => 'The selected categories contains products. Performing this action will remove the related products. Do you really want to perform this action?'
|
||||
],
|
||||
|
||||
'zero-index' => 'Colunas do índice podem ter valores maiores que zero apenas',
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ return [
|
|||
'mass-update-status' => 'Seçili :resource kayıtlarının durumunu güncellemek istediğinizden emin misiniz?',
|
||||
'delete' => 'Bu işlemi gerçekleştirmek istediğinizden emin misiniz?',
|
||||
'edit' => ':resource kaydını düzenlemek istediğinizden emin misiniz?',
|
||||
'delete-category-product' => 'The selected categories contains products. Performing this action will remove the related products. Do you really want to perform this action?'
|
||||
],
|
||||
|
||||
'zero-index' => 'Index sütunları sadece sıfırdan büyük değere sahip olmalı',
|
||||
|
|
|
|||
|
|
@ -48,25 +48,32 @@
|
|||
|
||||
@if ($toDisplay)
|
||||
<a
|
||||
@if ($action['method'] == 'GET')
|
||||
href="{{ route($action['route'], $record->{$action['index'] ?? $index}) }}"
|
||||
@endif
|
||||
id="{{ $record->{$action['index'] ?? $index} }}"
|
||||
|
||||
@if ($action['method'] != 'GET')
|
||||
v-on:click="doAction($event)"
|
||||
@endif
|
||||
@if ($action['method'] == 'GET')
|
||||
href="{{ route($action['route'], $record->{$action['index'] ?? $index}) }}"
|
||||
@endif
|
||||
|
||||
data-method="{{ $action['method'] }}"
|
||||
data-action="{{ route($action['route'], $record->{$index}) }}"
|
||||
data-token="{{ csrf_token() }}"
|
||||
@if ($action['method'] != 'GET')
|
||||
@if (isset($action['function']))
|
||||
v-on:click="{{$action['function']}}"
|
||||
@else
|
||||
v-on:click="doAction($event)"
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@if (isset($action['target']))
|
||||
target="{{ $action['target'] }}"
|
||||
@endif
|
||||
data-method="{{ $action['method'] }}"
|
||||
data-action="{{ route($action['route'], $record->{$index}) }}"
|
||||
data-token="{{ csrf_token() }}"
|
||||
|
||||
@if (isset($action['title']))
|
||||
title="{{ $action['title'] }}"
|
||||
@endif>
|
||||
@if (isset($action['target']))
|
||||
target="{{ $action['target'] }}"
|
||||
@endif
|
||||
|
||||
@if (isset($action['title']))
|
||||
title="{{ $action['title'] }}"
|
||||
@endif
|
||||
>
|
||||
<span class="{{ $action['icon'] }}"></span>
|
||||
</a>
|
||||
@endif
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
<span class="icon checkbox-dash-icon"></span>
|
||||
</span>
|
||||
|
||||
<form method="POST" id="mass-action-form" style="display: inline-flex;" action="" onsubmit="return confirm('{{ __('ui::app.datagrid.click_on_action') }}')">
|
||||
<form method="POST" id="mass-action-form" style="display: inline-flex;" action="" :onsubmit="`return confirm('${massActionConfirmText}')`">
|
||||
@csrf()
|
||||
|
||||
<input type="hidden" id="indexes" name="indexes" v-model="dataIds">
|
||||
|
|
|
|||
|
|
@ -272,6 +272,7 @@
|
|||
massActions: @json($results['massactions']),
|
||||
massActionsToggle: false,
|
||||
massActionTarget: null,
|
||||
massActionConfirmText: '{{ __('ui::app.datagrid.click_on_action') }}',
|
||||
massActionType: null,
|
||||
massActionValues: [],
|
||||
massActionTargets: [],
|
||||
|
|
@ -457,7 +458,8 @@
|
|||
for (let id in this.massActions) {
|
||||
targetObj = {
|
||||
'type': this.massActions[id].type,
|
||||
'action': this.massActions[id].action
|
||||
'action': this.massActions[id].action,
|
||||
'confirm_text': this.massActions[id].confirm_text
|
||||
};
|
||||
|
||||
this.massActionTargets.push(targetObj);
|
||||
|
|
@ -483,6 +485,7 @@
|
|||
for (let i in this.massActionTargets) {
|
||||
if (this.massActionTargets[i].type === 'delete') {
|
||||
this.massActionTarget = this.massActionTargets[i].action;
|
||||
this.massActionConfirmText = this.massActionTargets[i].confirm_text ? this.massActionTargets[i].confirm_text : this.massActionConfirmText;
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
@ -493,6 +496,7 @@
|
|||
for (let i in this.massActionTargets) {
|
||||
if (this.massActionTargets[i].type === 'update') {
|
||||
this.massActionTarget = this.massActionTargets[i].action;
|
||||
this.massActionConfirmText = this.massActionTargets[i].confirm_text ? this.massActionTargets[i].confirm_text : this.massActionConfirmText;
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
@ -816,31 +820,6 @@
|
|||
}
|
||||
},
|
||||
|
||||
doAction: function (e) {
|
||||
var element = e.currentTarget;
|
||||
|
||||
if (confirm('{{__('ui::app.datagrid.massaction.delete') }}')) {
|
||||
axios.post(element.getAttribute('data-action'), {
|
||||
_token: element.getAttribute('data-token'),
|
||||
_method: element.getAttribute('data-method')
|
||||
}).then(function (response) {
|
||||
this.result = response;
|
||||
|
||||
if (response.data.redirect) {
|
||||
window.location.href = response.data.redirect;
|
||||
} else {
|
||||
location.reload();
|
||||
}
|
||||
}).catch(function (error) {
|
||||
location.reload();
|
||||
});
|
||||
|
||||
e.preventDefault();
|
||||
} else {
|
||||
e.preventDefault();
|
||||
}
|
||||
},
|
||||
|
||||
captureColumn: function (id) {
|
||||
element = document.getElementById(id);
|
||||
|
||||
|
|
@ -869,6 +848,37 @@
|
|||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
function doAction(e, message, type) {
|
||||
var element = e.currentTarget;
|
||||
if (message) {
|
||||
element = e.target.parentElement;
|
||||
}
|
||||
|
||||
message = message || '{{__('ui::app.datagrid.massaction.delete') }}';
|
||||
|
||||
if (confirm(message)) {
|
||||
axios.post(element.getAttribute('data-action'), {
|
||||
_token: element.getAttribute('data-token'),
|
||||
_method: element.getAttribute('data-method')
|
||||
}).then(function (response) {
|
||||
this.result = response;
|
||||
|
||||
if (response.data.redirect) {
|
||||
window.location.href = response.data.redirect;
|
||||
} else {
|
||||
location.reload();
|
||||
}
|
||||
}).catch(function (error) {
|
||||
location.reload();
|
||||
});
|
||||
|
||||
e.preventDefault();
|
||||
} else {
|
||||
e.preventDefault();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@endpush
|
||||
</div>
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"/js/velocity.js": "/js/velocity.js?id=ec2fcac08b9c220c4ec6",
|
||||
"/js/velocity.js": "/js/velocity.js?id=1b8afaddd07cc3f668b1",
|
||||
"/css/velocity-admin.css": "/css/velocity-admin.css?id=4322502d80a0e4a0affd",
|
||||
"/css/velocity.css": "/css/velocity.css?id=deeefa4677371b494de3"
|
||||
"/css/velocity.css": "/css/velocity.css?id=d1461e1147981876a7fd"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -132,6 +132,104 @@ class VelocityMetaDataSeeder extends Seeder
|
|||
'updated_at' => $now,
|
||||
],
|
||||
|
||||
//Wishlist show config data
|
||||
[
|
||||
'code' => 'general.content.shop.wishlist_option',
|
||||
'value' => '1',
|
||||
'channel_code' => 'default',
|
||||
'locale_code' => 'en',
|
||||
'created_at' => $now,
|
||||
'updated_at' => $now,
|
||||
],
|
||||
[
|
||||
'code' => 'general.content.shop.wishlist_option',
|
||||
'value' => '1',
|
||||
'channel_code' => 'default',
|
||||
'locale_code' => 'fr',
|
||||
'created_at' => $now,
|
||||
'updated_at' => $now,
|
||||
],
|
||||
[
|
||||
'code' => 'general.content.shop.wishlist_option',
|
||||
'value' => '1',
|
||||
'channel_code' => 'default',
|
||||
'locale_code' => 'ar',
|
||||
'created_at' => $now,
|
||||
'updated_at' => $now,
|
||||
],
|
||||
[
|
||||
'code' => 'general.content.shop.wishlist_option',
|
||||
'value' => '1',
|
||||
'channel_code' => 'default',
|
||||
'locale_code' => 'de',
|
||||
'created_at' => $now,
|
||||
'updated_at' => $now,
|
||||
],
|
||||
[
|
||||
'code' => 'general.content.shop.wishlist_option',
|
||||
'value' => '1',
|
||||
'channel_code' => 'default',
|
||||
'locale_code' => 'es',
|
||||
'created_at' => $now,
|
||||
'updated_at' => $now,
|
||||
],
|
||||
[
|
||||
'code' => 'general.content.shop.wishlist_option',
|
||||
'value' => '1',
|
||||
'channel_code' => 'default',
|
||||
'locale_code' => 'fa',
|
||||
'created_at' => $now,
|
||||
'updated_at' => $now,
|
||||
],
|
||||
[
|
||||
'code' => 'general.content.shop.wishlist_option',
|
||||
'value' => '1',
|
||||
'channel_code' => 'default',
|
||||
'locale_code' => 'it',
|
||||
'created_at' => $now,
|
||||
'updated_at' => $now,
|
||||
],
|
||||
[
|
||||
'code' => 'general.content.shop.wishlist_option',
|
||||
'value' => '1',
|
||||
'channel_code' => 'default',
|
||||
'locale_code' => 'ja',
|
||||
'created_at' => $now,
|
||||
'updated_at' => $now,
|
||||
],
|
||||
[
|
||||
'code' => 'general.content.shop.wishlist_option',
|
||||
'value' => '1',
|
||||
'channel_code' => 'default',
|
||||
'locale_code' => 'nl',
|
||||
'created_at' => $now,
|
||||
'updated_at' => $now,
|
||||
],
|
||||
[
|
||||
'code' => 'general.content.shop.wishlist_option',
|
||||
'value' => '1',
|
||||
'channel_code' => 'default',
|
||||
'locale_code' => 'pl',
|
||||
'created_at' => $now,
|
||||
'updated_at' => $now,
|
||||
],
|
||||
[
|
||||
'code' => 'general.content.shop.wishlist_option',
|
||||
'value' => '1',
|
||||
'channel_code' => 'default',
|
||||
'locale_code' => 'pt_BR',
|
||||
'created_at' => $now,
|
||||
'updated_at' => $now,
|
||||
],
|
||||
[
|
||||
'code' => 'general.content.shop.wishlist_option',
|
||||
'value' => '1',
|
||||
'channel_code' => 'default',
|
||||
'locale_code' => 'tr',
|
||||
'created_at' => $now,
|
||||
'updated_at' => $now,
|
||||
],
|
||||
|
||||
/* Image search core config data starts here */
|
||||
[
|
||||
'code' => 'general.content.shop.image_search',
|
||||
|
|
@ -232,4 +330,4 @@ class VelocityMetaDataSeeder extends Seeder
|
|||
/* Image search core config data ends here */
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -253,6 +253,7 @@ class ConfigurationController extends Controller
|
|||
\DB::table('velocity_meta_data')->insert([
|
||||
'locale' => $locale,
|
||||
'channel' => $channel,
|
||||
'header_content_count' => '5',
|
||||
|
||||
'home_page_content' => "<p>@include('shop::home.advertisements.advertisement-four')@include('shop::home.featured-products') @include('shop::home.product-policy') @include('shop::home.advertisements.advertisement-three') @include('shop::home.new-products') @include('shop::home.advertisements.advertisement-two')</p>",
|
||||
'footer_left_content' => __('velocity::app.admin.meta-data.footer-left-raw-content'),
|
||||
|
|
|
|||
|
|
@ -26,6 +26,9 @@ class CartController extends Controller
|
|||
$cartDetails = [];
|
||||
$cartDetails['base_sub_total'] = core()->currency($cart->base_sub_total);
|
||||
|
||||
/* needed raw data for comparison */
|
||||
$cartDetails['raw']['base_sub_total'] = $cart->base_sub_total;
|
||||
|
||||
foreach ($items as $index => $item) {
|
||||
$images = $item->product->getTypeInstance()->getBaseImage($item);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,98 +0,0 @@
|
|||
<template>
|
||||
<div class="container-fluid remove-padding-margin">
|
||||
<shimmer-component v-if="isLoading && !isMobileView"></shimmer-component>
|
||||
|
||||
<template v-else-if="categoryProducts.length > 0">
|
||||
<card-list-header
|
||||
:heading="categoryDetails.name"
|
||||
:view-all="`${this.baseUrl}/${categoryDetails.slug}`">
|
||||
</card-list-header>
|
||||
|
||||
<div class="carousel-products vc-full-screen ltr" v-if="!isMobileView">
|
||||
<carousel-component
|
||||
slides-per-page="6"
|
||||
navigation-enabled="hide"
|
||||
pagination-enabled="hide"
|
||||
:slides-count="categoryProducts.length"
|
||||
locale-direction="localeDirection"
|
||||
:id="`${categoryDetails.name}-carousel`">
|
||||
|
||||
<slide
|
||||
:key="index"
|
||||
:slot="`slide-${index}`"
|
||||
v-for="(product, index) in categoryProducts">
|
||||
<product-card
|
||||
:list="list"
|
||||
:product="product">
|
||||
</product-card>
|
||||
</slide>
|
||||
</carousel-component>
|
||||
</div>
|
||||
|
||||
<div class="carousel-products vc-small-screen" v-else>
|
||||
<carousel-component
|
||||
slides-per-page="2"
|
||||
navigation-enabled="hide"
|
||||
pagination-enabled="hide"
|
||||
:slides-count="categoryProducts.length"
|
||||
locale-direction="localeDirection"
|
||||
:id="`${categoryDetails.name}-carousel`">
|
||||
|
||||
<slide
|
||||
:key="index"
|
||||
:slot="`slide-${index}`"
|
||||
v-for="(product, index) in categoryProducts">
|
||||
<product-card
|
||||
:list="list"
|
||||
:product="product">
|
||||
</product-card>
|
||||
</slide>
|
||||
</carousel-component>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: [
|
||||
'categorySlug',
|
||||
'localeDirection'
|
||||
],
|
||||
|
||||
data: function () {
|
||||
return {
|
||||
isLoading: true,
|
||||
isCategory: false,
|
||||
heading: 'customer',
|
||||
categoryProducts: [],
|
||||
isMobileView: this.$root.isMobile(),
|
||||
}
|
||||
},
|
||||
|
||||
mounted: function () {
|
||||
this.getCategoryDetails();
|
||||
},
|
||||
|
||||
methods: {
|
||||
'getCategoryDetails': function () {
|
||||
this.$http.get(`${this.baseUrl}/category-details?category-slug=${this.categorySlug}`)
|
||||
.then(response => {
|
||||
if (response.data.status) {
|
||||
this.list = response.data.list;
|
||||
this.categoryDetails = response.data.categoryDetails;
|
||||
this.categoryProducts = response.data.categoryProducts;
|
||||
|
||||
this.isCategory = true;
|
||||
}
|
||||
|
||||
this.isLoading = false;
|
||||
})
|
||||
.catch(error => {
|
||||
this.isLoading = false;
|
||||
console.log(this.__('error.something_went_wrong'));
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<div class="magnifier col-12 text-center no-padding">
|
||||
<div class="magnifier">
|
||||
<img
|
||||
:src="src"
|
||||
:data-zoom-image="src"
|
||||
|
|
@ -12,7 +12,6 @@
|
|||
</template>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
export default {
|
||||
props: ['src'],
|
||||
|
||||
|
|
@ -24,19 +23,25 @@
|
|||
},
|
||||
|
||||
mounted: function () {
|
||||
// store image related info in global variables
|
||||
/* store image related info in global variables */
|
||||
this.activeImageElement = this.$refs.activeProductImage;
|
||||
|
||||
// convert into jQuery object
|
||||
/* convert into jQuery object */
|
||||
this.activeImage = new jQuery.fn.init(this.activeImageElement);
|
||||
|
||||
/* initialise zoom */
|
||||
this.elevateZoom();
|
||||
|
||||
this.$root.$on('changeMagnifiedImage', ({smallImageUrl, largeImageUrl}) => {
|
||||
this.activeImageElement.src = smallImageUrl;
|
||||
/* removed old instance */
|
||||
$('.zoomContainer').remove();
|
||||
this.activeImage.removeData('elevateZoom');
|
||||
|
||||
/* update source for images */
|
||||
this.activeImageElement.src = smallImageUrl;
|
||||
this.activeImage.data('zoom-image', (largeImageUrl ? largeImageUrl : smallImageUrl));
|
||||
|
||||
/* reinitialize zoom */
|
||||
this.elevateZoom();
|
||||
});
|
||||
},
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@
|
|||
<a class="col text-left fs16 link-color remove-decoration" :href="viewCart">{{ cartText }}</a>
|
||||
|
||||
<div class="col text-right no-padding">
|
||||
<a :href="checkoutUrl">
|
||||
<a :href="checkoutUrl" @click="checkMinimumOrder($event)">
|
||||
<button
|
||||
type="button"
|
||||
class="theme-btn fs16 fw6">
|
||||
|
|
@ -74,6 +74,8 @@
|
|||
'checkoutUrl',
|
||||
'checkoutText',
|
||||
'subtotalText',
|
||||
'minimumOrderAmount',
|
||||
'minimumOrderMessage'
|
||||
],
|
||||
|
||||
data: function () {
|
||||
|
|
@ -117,6 +119,16 @@
|
|||
.catch(exception => {
|
||||
console.log(this.__('error.something_went_wrong'));
|
||||
});
|
||||
},
|
||||
|
||||
checkMinimumOrder: function (e) {
|
||||
let base_sub_total = parseFloat(this.cartInformation.raw.base_sub_total);
|
||||
let minimumOrderAmount = parseFloat(this.minimumOrderAmount);
|
||||
|
||||
if (! (base_sub_total > minimumOrderAmount)) {
|
||||
e.preventDefault();
|
||||
window.showAlert(`alert-warning`, 'Warning', this.minimumOrderMessage);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,32 @@
|
|||
<template>
|
||||
<a :href="href" :class="addClass" v-text="text" @click="checkMinimumOrder($event)"></a>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: [
|
||||
'href',
|
||||
'addClass',
|
||||
'text',
|
||||
'cartDetails',
|
||||
'minimumOrderAmount',
|
||||
'minimumOrderMessage'
|
||||
],
|
||||
|
||||
methods: {
|
||||
checkMinimumOrder: function (e) {
|
||||
let base_sub_total = parseFloat(this.getCartDetails().base_sub_total);
|
||||
let minimumOrderAmount = parseFloat(this.minimumOrderAmount);
|
||||
|
||||
if (! (base_sub_total > minimumOrderAmount)) {
|
||||
e.preventDefault();
|
||||
window.showAlert(`alert-warning`, 'Warning', this.minimumOrderMessage);
|
||||
}
|
||||
},
|
||||
|
||||
getCartDetails: function () {
|
||||
return JSON.parse(this.cartDetails);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
@ -0,0 +1,147 @@
|
|||
<template>
|
||||
<div class="container-fluid">
|
||||
<shimmer-component v-if="isLoading"></shimmer-component>
|
||||
|
||||
<template v-else-if="productCollections.length > 0">
|
||||
<card-list-header
|
||||
:heading="isCategory ? categoryDetails.name : productTitle"
|
||||
:view-all="isCategory ? `${this.baseUrl}/${categoryDetails.slug}` : ''">
|
||||
</card-list-header>
|
||||
|
||||
<div class="row" :class="localeDirection">
|
||||
<div
|
||||
class="col-md-12 no-padding carousel-products"
|
||||
:class="showRecentlyViewed ? 'with-recent-viewed col-lg-9' : 'col-lg-12'">
|
||||
<carousel-component
|
||||
:slides-per-page="slidesPerPage"
|
||||
navigation-enabled="hide"
|
||||
pagination-enabled="hide"
|
||||
:id="isCategory ? `${categoryDetails.name}-carousel` : productId"
|
||||
:locale-direction="localeDirection"
|
||||
:slides-count="productCollections.length"
|
||||
v-if="count != 0">
|
||||
|
||||
<slide
|
||||
:key="index"
|
||||
:slot="`slide-${index}`"
|
||||
v-for="(product, index) in productCollections">
|
||||
<product-card
|
||||
:list="list"
|
||||
:product="product">
|
||||
</product-card>
|
||||
</slide>
|
||||
</carousel-component>
|
||||
</div>
|
||||
|
||||
<recently-viewed
|
||||
:title="recentlyViewedTitle"
|
||||
:no-data-text="noDataText"
|
||||
:add-class="`col-lg-3 col-md-12 ${localeDirection}`"
|
||||
quantity="3"
|
||||
add-class-wrapper=""
|
||||
v-if="showRecentlyViewed">
|
||||
</recently-viewed>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
count: {
|
||||
type: Number,
|
||||
default: 10
|
||||
},
|
||||
productId: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
productTitle: String,
|
||||
productRoute: String,
|
||||
localeDirection: String,
|
||||
showRecentlyViewed: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
recentlyViewedTitle: String,
|
||||
noDataText: String,
|
||||
},
|
||||
|
||||
data: function () {
|
||||
return {
|
||||
list: false,
|
||||
isLoading: true,
|
||||
isCategory: false,
|
||||
productCollections: [],
|
||||
slidesPerPage: 6,
|
||||
windowWidth: window.innerWidth,
|
||||
}
|
||||
},
|
||||
|
||||
mounted: function () {
|
||||
this.$nextTick(() => {
|
||||
window.addEventListener('resize', this.onResize);
|
||||
});
|
||||
|
||||
this.getProducts();
|
||||
this.setSlidesPerPage(this.windowWidth);
|
||||
},
|
||||
|
||||
watch: {
|
||||
/* checking the window width */
|
||||
windowWidth(newWidth, oldWidth) {
|
||||
this.setSlidesPerPage(newWidth);
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
/* fetch product collections */
|
||||
getProducts: function () {
|
||||
this.$http.get(this.productRoute)
|
||||
.then(response => {
|
||||
let count = this.count;
|
||||
|
||||
if (response.data.status && count != 0) {
|
||||
if (response.data.categoryProducts !== undefined) {
|
||||
this.isCategory = true;
|
||||
this.categoryDetails = response.data.categoryDetails;
|
||||
this.productCollections = response.data.categoryProducts;
|
||||
} else {
|
||||
this.productCollections = response.data.products;
|
||||
}
|
||||
} else {
|
||||
this.productCollections = 0;
|
||||
}
|
||||
|
||||
this.isLoading = false;
|
||||
})
|
||||
.catch(error => {
|
||||
this.isLoading = false;
|
||||
console.log(this.__('error.something_went_wrong'));
|
||||
})
|
||||
},
|
||||
|
||||
/* on resize set window width */
|
||||
onResize: function () {
|
||||
this.windowWidth = window.innerWidth;
|
||||
},
|
||||
|
||||
/* setting slides on the basis of window width */
|
||||
setSlidesPerPage: function (width) {
|
||||
if (width >= 992) {
|
||||
this.slidesPerPage = 6;
|
||||
} else if (width < 992 && width >= 420) {
|
||||
this.slidesPerPage = 4;
|
||||
} else {
|
||||
this.slidesPerPage = 2;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/* removing event */
|
||||
beforeDestroy: function () {
|
||||
window.removeEventListener('resize', this.onResize);
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
|
@ -0,0 +1,98 @@
|
|||
<template>
|
||||
<div :class="addClass">
|
||||
<div class="row remove-padding-margin">
|
||||
<div class="col-12 no-padding">
|
||||
<h2 class="fs20 fw6 mb15" v-text="title"></h2>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div :class="`recetly-viewed-products-wrapper ${addClassWrapper}`">
|
||||
<div
|
||||
:key="Math.random()"
|
||||
class="row small-card-container"
|
||||
v-for="(product, index) in recentlyViewed">
|
||||
|
||||
<div class="col-4 product-image-container mr15">
|
||||
<a :href="`${baseUrl}/${product.urlKey}`" class="unset">
|
||||
<div class="product-image" :style="`background-image: url(${product.image})`"></div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="col-8 no-padding card-body align-vertical-top" v-if="product.urlKey">
|
||||
<a :href="`${baseUrl}/${product.urlKey}`" class="unset no-padding">
|
||||
<div class="product-name">
|
||||
<span class="fs16 text-nowrap" v-text="product.name"></span>
|
||||
</div>
|
||||
|
||||
<div
|
||||
v-html="product.priceHTML"
|
||||
class="fs18 card-current-price fw6">
|
||||
</div>
|
||||
|
||||
<star-ratings v-if="product.rating > 0"
|
||||
push-class="display-inbl"
|
||||
:ratings="product.rating">
|
||||
</star-ratings>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<span
|
||||
class="fs16"
|
||||
v-if="!recentlyViewed ||(recentlyViewed && Object.keys(recentlyViewed).length == 0)"
|
||||
v-text="noDataText">
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: [
|
||||
'title',
|
||||
'noDataText',
|
||||
'quantity',
|
||||
'addClass',
|
||||
'addClassWrapper'
|
||||
],
|
||||
|
||||
data: function () {
|
||||
return {
|
||||
recentlyViewed: (() => {
|
||||
let storedRecentlyViewed = window.localStorage.recentlyViewed;
|
||||
if (storedRecentlyViewed) {
|
||||
var slugs = JSON.parse(storedRecentlyViewed);
|
||||
var updatedSlugs = {};
|
||||
|
||||
slugs = slugs.reverse();
|
||||
|
||||
slugs.forEach(slug => {
|
||||
updatedSlugs[slug] = {};
|
||||
});
|
||||
|
||||
return updatedSlugs;
|
||||
}
|
||||
})(),
|
||||
}
|
||||
},
|
||||
|
||||
created: function () {
|
||||
for (const slug in this.recentlyViewed) {
|
||||
if (slug) {
|
||||
this.$http(`${this.baseUrl}/product-details/${slug}`)
|
||||
.then(response => {
|
||||
if (response.data.status) {
|
||||
this.$set(this.recentlyViewed, response.data.details.urlKey, response.data.details);
|
||||
} else {
|
||||
delete this.recentlyViewed[response.data.slug];
|
||||
this.$set(this, 'recentlyViewed', this.recentlyViewed);
|
||||
|
||||
this.$forceUpdate();
|
||||
}
|
||||
})
|
||||
.catch(error => {})
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
|
@ -40,6 +40,7 @@ Vue.component('modal-component', require('./UI/components/modal'));
|
|||
Vue.component("add-to-cart", require("./UI/components/add-to-cart"));
|
||||
Vue.component('star-ratings', require('./UI/components/star-rating'));
|
||||
Vue.component('quantity-btn', require('./UI/components/quantity-btn'));
|
||||
Vue.component('proceed-to-checkout', require('./UI/components/proceed-to-checkout'));
|
||||
Vue.component('sidebar-component', require('./UI/components/sidebar'));
|
||||
Vue.component("product-card", require("./UI/components/product-card"));
|
||||
Vue.component("wishlist-component", require("./UI/components/wishlist"));
|
||||
|
|
@ -52,7 +53,8 @@ Vue.component("shimmer-component", require("./UI/components/shimmer-component"))
|
|||
Vue.component('responsive-sidebar', require('./UI/components/responsive-sidebar'));
|
||||
Vue.component('product-quick-view', require('./UI/components/product-quick-view'));
|
||||
Vue.component('product-quick-view-btn', require('./UI/components/product-quick-view-btn'));
|
||||
Vue.component('category-products', require('./UI/components/category-products'));
|
||||
Vue.component('recently-viewed', require('./UI/components/recently-viewed'));
|
||||
Vue.component('product-collections', require('./UI/components/product-collections'));
|
||||
Vue.component('hot-category', require('./UI/components/hot-category'));
|
||||
Vue.component('popular-category', require('./UI/components/popular-category'));
|
||||
|
||||
|
|
|
|||
|
|
@ -241,7 +241,7 @@
|
|||
|
||||
img {
|
||||
width: 100%;
|
||||
height: 190px;
|
||||
min-height: 190px;
|
||||
max-height: 190px;
|
||||
}
|
||||
}
|
||||
|
|
@ -1866,6 +1866,7 @@
|
|||
top: -1px;
|
||||
left: 100%;
|
||||
height: 100%;
|
||||
min-height: 330px;
|
||||
z-index: 100;
|
||||
padding-top: 10px;
|
||||
position: absolute;
|
||||
|
|
@ -2285,6 +2286,7 @@
|
|||
@extend .scrollable;
|
||||
|
||||
max-height: 670px;
|
||||
overflow-x: hidden;
|
||||
margin-bottom: 42px;
|
||||
padding: 42px 10px 0 10px;
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,25 @@
|
|||
display: none !important;
|
||||
}
|
||||
|
||||
/* large devices */
|
||||
@media only screen and (max-width: 1192px) {
|
||||
|
||||
.sticky-header {
|
||||
display: block !important;
|
||||
}
|
||||
|
||||
.vc-full-screen {
|
||||
display: block !important;
|
||||
}
|
||||
|
||||
.vc-small-screen {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
#main-category {
|
||||
display: block !important;
|
||||
}
|
||||
|
||||
.footer {
|
||||
.footer-content {
|
||||
.newsletter-subscription {
|
||||
|
|
@ -30,6 +48,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
/* medium devices */
|
||||
@media only screen and (max-width: 992px) {
|
||||
$header-height: 50px;
|
||||
|
||||
|
|
@ -41,14 +60,33 @@
|
|||
}
|
||||
}
|
||||
|
||||
.main-container-wrapper {
|
||||
// position: relative;
|
||||
#webheader {
|
||||
display: none !important;
|
||||
position: fixed;
|
||||
background-color: $white-color;
|
||||
}
|
||||
|
||||
#main-category {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
#home-right-bar-container {
|
||||
position: relative;
|
||||
top: -48px;
|
||||
}
|
||||
|
||||
.vc-full-screen {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.vc-small-screen {
|
||||
display: block !important;
|
||||
}
|
||||
|
||||
.force-center {
|
||||
margin: 0 auto !important;
|
||||
}
|
||||
|
||||
.main-content-wrapper {
|
||||
z-index: 100;
|
||||
margin-bottom: 25px;
|
||||
|
|
@ -133,13 +171,9 @@
|
|||
|
||||
.product-card-new {
|
||||
|
||||
max-width: 16rem;
|
||||
max-width: 19rem;
|
||||
|
||||
&.grid-card {
|
||||
.product-image-container {
|
||||
height: 165px;
|
||||
}
|
||||
|
||||
.card-body {
|
||||
.product-name {
|
||||
width: 13rem;
|
||||
|
|
@ -444,6 +478,7 @@
|
|||
}
|
||||
|
||||
#search-form {
|
||||
background: transparent;
|
||||
width: 100%;
|
||||
|
||||
.selectdiv {
|
||||
|
|
@ -496,16 +531,11 @@
|
|||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.main-product-image {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.product-detail {
|
||||
#product-form {
|
||||
.form-container {
|
||||
.left {
|
||||
top: 0px;
|
||||
padding: 0px;
|
||||
position: relative;
|
||||
margin-bottom: 20px;
|
||||
|
||||
|
|
@ -513,10 +543,6 @@
|
|||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.right {
|
||||
padding: 0px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -757,6 +783,7 @@
|
|||
|
||||
font-size: 18px;
|
||||
padding-right: 5px;
|
||||
display: contents;
|
||||
|
||||
&.profile::before {
|
||||
content: "\E995";
|
||||
|
|
@ -959,7 +986,17 @@
|
|||
}
|
||||
}
|
||||
|
||||
/* medium devices */
|
||||
@media only screen and (max-width: 768px) {
|
||||
.sticky-header {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
#home-right-bar-container {
|
||||
position: unset;
|
||||
top: unset;
|
||||
}
|
||||
|
||||
.modal-container {
|
||||
left: 10%;
|
||||
max-width: 80%;
|
||||
|
|
@ -1004,15 +1041,6 @@
|
|||
margin-left: -158px;
|
||||
}
|
||||
|
||||
.lg-card-container.list-card .product-image {
|
||||
max-height: 85px;
|
||||
}
|
||||
|
||||
.quick-view-btn-container {
|
||||
left: -26px;
|
||||
width: 109px;
|
||||
}
|
||||
|
||||
.quick-view-btn-container span {
|
||||
left: 24%;
|
||||
top: -24px;
|
||||
|
|
@ -1022,4 +1050,36 @@
|
|||
.quick-view-in-list {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.product-card-new {
|
||||
max-width: 18rem;
|
||||
}
|
||||
}
|
||||
|
||||
/* small devices */
|
||||
@media only screen and (max-width: 420px) {
|
||||
.sticky-header {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
#home-right-bar-container {
|
||||
position: unset;
|
||||
top: unset;
|
||||
}
|
||||
}
|
||||
|
||||
/* very small devices */
|
||||
@media only screen and (max-width: 320px) {
|
||||
.sticky-header {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
#home-right-bar-container {
|
||||
position: unset;
|
||||
top: unset;
|
||||
}
|
||||
|
||||
.quick-view-in-list {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue