Fixed remaining issues
This commit is contained in:
parent
99a0590c69
commit
7c63dac032
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "jitendra-webkul/bagisto",
|
"name": "bagisto/bagisto",
|
||||||
"description": "The Laravel Framework.",
|
"description": "Bagisto Ecommerce",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"framework",
|
"framework",
|
||||||
"laravel"
|
"laravel"
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ return [
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'timezone' => 'UTC',
|
'timezone' => 'Asia/Kolkata',
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
|
@ -180,6 +180,7 @@ class DashboardController extends Controller
|
||||||
'stock_threshold' => $this->getStockThreshold(),
|
'stock_threshold' => $this->getStockThreshold(),
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
foreach (core()->getTimeInterval($this->startDate, $this->endDate) as $interval) {
|
foreach (core()->getTimeInterval($this->startDate, $this->endDate) as $interval) {
|
||||||
$statistics['sale_graph']['label'][] = $interval['start']->format('d M');
|
$statistics['sale_graph']['label'][] = $interval['start']->format('d M');
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ class NewInvoiceNotification extends Mailable
|
||||||
$order = $this->invoice->order;
|
$order = $this->invoice->order;
|
||||||
|
|
||||||
return $this->to($order->customer_email, $order->customer_full_name)
|
return $this->to($order->customer_email, $order->customer_full_name)
|
||||||
->subject(trans('admin::app.mail.invoice.subject', ['order_id' => $order->id]))
|
->subject(trans('shop::app.mail.invoice.subject', ['order_id' => $order->id]))
|
||||||
->view('shop::emails.sales.new-invoice');
|
->view('shop::emails.sales.new-invoice');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ class NewOrderNotification extends Mailable
|
||||||
public function build()
|
public function build()
|
||||||
{
|
{
|
||||||
return $this->to($this->order->customer_email, $this->order->customer_full_name)
|
return $this->to($this->order->customer_email, $this->order->customer_full_name)
|
||||||
->subject(trans('admin::app.mail.order.subject'))
|
->subject(trans('shop::app.mail.order.subject'))
|
||||||
->view('shop::emails.sales.new-order');
|
->view('shop::emails.sales.new-order');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ class NewShipmentNotification extends Mailable
|
||||||
$order = $this->shipment->order;
|
$order = $this->shipment->order;
|
||||||
|
|
||||||
return $this->to($order->customer_email, $order->customer_full_name)
|
return $this->to($order->customer_email, $order->customer_full_name)
|
||||||
->subject(trans('admin::app.mail.shipment.subject', ['order_id' => $order->id]))
|
->subject(trans('shop::app.mail.shipment.subject', ['order_id' => $order->id]))
|
||||||
->view('shop::emails.sales.new-shipment');
|
->view('shop::emails.sales.new-shipment');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -219,7 +219,13 @@
|
||||||
@if ($item->qty_to_invoice > 0)
|
@if ($item->qty_to_invoice > 0)
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ $item->type == 'configurable' ? $item->child->sku : $item->sku }}</td>
|
<td>{{ $item->type == 'configurable' ? $item->child->sku : $item->sku }}</td>
|
||||||
<td>{{ $item->name }}</td>
|
<td>
|
||||||
|
{{ $item->name }}
|
||||||
|
|
||||||
|
@if ($html = $item->getOptionDetailHtml())
|
||||||
|
<p>{{ $html }}</p>
|
||||||
|
@endif
|
||||||
|
</td>
|
||||||
<td>{{ $item->qty_ordered }}</td>
|
<td>{{ $item->qty_ordered }}</td>
|
||||||
<td>
|
<td>
|
||||||
<div class="control-group" :class="[errors.has('invoice[items][{{ $item->id }}]') ? 'has-error' : '']">
|
<div class="control-group" :class="[errors.has('invoice[items][{{ $item->id }}]') ? 'has-error' : '']">
|
||||||
|
|
|
||||||
|
|
@ -218,7 +218,13 @@
|
||||||
@foreach ($invoice->items as $item)
|
@foreach ($invoice->items as $item)
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ $item->child ? $item->child->sku : $item->sku }}</td>
|
<td>{{ $item->child ? $item->child->sku : $item->sku }}</td>
|
||||||
<td>{{ $item->name }}</td>
|
<td>
|
||||||
|
{{ $item->name }}
|
||||||
|
|
||||||
|
@if ($html = $item->getOptionDetailHtml())
|
||||||
|
<p>{{ $html }}</p>
|
||||||
|
@endif
|
||||||
|
</td>
|
||||||
<td>{{ core()->formatBasePrice($item->base_price) }}</td>
|
<td>{{ core()->formatBasePrice($item->base_price) }}</td>
|
||||||
<td>{{ $item->qty }}</td>
|
<td>{{ $item->qty }}</td>
|
||||||
<td>{{ core()->formatBasePrice($item->base_total) }}</td>
|
<td>{{ core()->formatBasePrice($item->base_total) }}</td>
|
||||||
|
|
|
||||||
|
|
@ -232,7 +232,13 @@
|
||||||
<td>
|
<td>
|
||||||
{{ $item->type == 'configurable' ? $item->child->sku : $item->sku }}
|
{{ $item->type == 'configurable' ? $item->child->sku : $item->sku }}
|
||||||
</td>
|
</td>
|
||||||
<td>{{ $item->name }}</td>
|
<td>
|
||||||
|
{{ $item->name }}
|
||||||
|
|
||||||
|
@if ($html = $item->getOptionDetailHtml())
|
||||||
|
<p>{{ $html }}</p>
|
||||||
|
@endif
|
||||||
|
</td>
|
||||||
<td>{{ core()->formatBasePrice($item->base_price) }}</td>
|
<td>{{ core()->formatBasePrice($item->base_price) }}</td>
|
||||||
<td>{{ $item->qty_ordered }}</td>
|
<td>{{ $item->qty_ordered }}</td>
|
||||||
<td>
|
<td>
|
||||||
|
|
|
||||||
|
|
@ -235,7 +235,13 @@
|
||||||
@if ($item->qty_to_ship > 0)
|
@if ($item->qty_to_ship > 0)
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ $item->type == 'configurable' ? $item->child->sku : $item->sku }}</td>
|
<td>{{ $item->type == 'configurable' ? $item->child->sku : $item->sku }}</td>
|
||||||
<td>{{ $item->name }}</td>
|
<td>
|
||||||
|
{{ $item->name }}
|
||||||
|
|
||||||
|
@if ($html = $item->getOptionDetailHtml())
|
||||||
|
<p>{{ $html }}</p>
|
||||||
|
@endif
|
||||||
|
</td>
|
||||||
<td>{{ $item->qty_ordered }}</td>
|
<td>{{ $item->qty_ordered }}</td>
|
||||||
<td>
|
<td>
|
||||||
<div class="control-group" :class="[errors.has('shipment[items][{{ $item->id }}]') ? 'has-error' : '']">
|
<div class="control-group" :class="[errors.has('shipment[items][{{ $item->id }}]') ? 'has-error' : '']">
|
||||||
|
|
|
||||||
|
|
@ -233,7 +233,13 @@
|
||||||
@foreach ($shipment->items as $item)
|
@foreach ($shipment->items as $item)
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ $item->sku }}</td>
|
<td>{{ $item->sku }}</td>
|
||||||
<td>{{ $item->name }}</td>
|
<td>
|
||||||
|
{{ $item->name }}
|
||||||
|
|
||||||
|
@if ($html = $item->getOptionDetailHtml())
|
||||||
|
<p>{{ $html }}</p>
|
||||||
|
@endif
|
||||||
|
</td>
|
||||||
<td>{{ $item->qty }}</td>
|
<td>{{ $item->qty }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
@endforeach
|
@endforeach
|
||||||
|
|
|
||||||
|
|
@ -3,153 +3,16 @@
|
||||||
namespace Webkul\Attribute\Database\Seeders;
|
namespace Webkul\Attribute\Database\Seeders;
|
||||||
|
|
||||||
use Illuminate\Database\Seeder;
|
use Illuminate\Database\Seeder;
|
||||||
use Webkul\Attribute\Repositories\AttributeFamilyRepository;
|
use DB;
|
||||||
|
|
||||||
class AttributeFamilyTableSeeder extends Seeder
|
class AttributeFamilyTableSeeder extends Seeder
|
||||||
{
|
{
|
||||||
/**
|
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
protected $rawData = [
|
|
||||||
[
|
|
||||||
"code" => "default",
|
|
||||||
"name" => "Default",
|
|
||||||
"is_user_defined" => 0,
|
|
||||||
'attribute_groups' => [
|
|
||||||
[
|
|
||||||
"name" => "General",
|
|
||||||
"is_user_defined" => 0,
|
|
||||||
"position" => 1,
|
|
||||||
"custom_attributes" => [
|
|
||||||
[
|
|
||||||
'code' => 'sku',
|
|
||||||
'position' => 1
|
|
||||||
], [
|
|
||||||
'code' => 'name',
|
|
||||||
'position' => 2
|
|
||||||
], [
|
|
||||||
'code' => 'url_key',
|
|
||||||
'position' => 3
|
|
||||||
], [
|
|
||||||
'code' => 'tax_category_id',
|
|
||||||
'position' => 4
|
|
||||||
], [
|
|
||||||
'code' => 'new',
|
|
||||||
'position' => 5
|
|
||||||
], [
|
|
||||||
'code' => 'featured',
|
|
||||||
'position' => 6
|
|
||||||
], [
|
|
||||||
'code' => 'visible_individually',
|
|
||||||
'position' => 7
|
|
||||||
], [
|
|
||||||
'code' => 'status',
|
|
||||||
'position' => 8
|
|
||||||
], [
|
|
||||||
'code' => 'color',
|
|
||||||
'position' => 9
|
|
||||||
], [
|
|
||||||
'code' => 'size',
|
|
||||||
'position' => 10
|
|
||||||
]
|
|
||||||
]
|
|
||||||
], [
|
|
||||||
"name" => "Description",
|
|
||||||
"is_user_defined" => 0,
|
|
||||||
"position" => 2,
|
|
||||||
"custom_attributes" => [
|
|
||||||
[
|
|
||||||
'code' => 'short_description',
|
|
||||||
'position' => 1
|
|
||||||
], [
|
|
||||||
'code' => 'description',
|
|
||||||
'position' => 2
|
|
||||||
]
|
|
||||||
]
|
|
||||||
], [
|
|
||||||
"name" => "Meta Description",
|
|
||||||
"is_user_defined" => 0,
|
|
||||||
"position" => 3,
|
|
||||||
"custom_attributes" => [
|
|
||||||
[
|
|
||||||
'code' => 'meta_title',
|
|
||||||
'position' => 1
|
|
||||||
], [
|
|
||||||
'code' => 'meta_keywords',
|
|
||||||
'position' => 2
|
|
||||||
], [
|
|
||||||
'code' => 'meta_description',
|
|
||||||
'position' => 3
|
|
||||||
]
|
|
||||||
]
|
|
||||||
], [
|
|
||||||
"name" => "Price",
|
|
||||||
"is_user_defined" => 0,
|
|
||||||
"position" => 4,
|
|
||||||
"custom_attributes" => [
|
|
||||||
[
|
|
||||||
'code' => 'price',
|
|
||||||
'position' => 1
|
|
||||||
], [
|
|
||||||
'code' => 'cost',
|
|
||||||
'position' => 2
|
|
||||||
], [
|
|
||||||
'code' => 'special_price',
|
|
||||||
'position' => 3
|
|
||||||
], [
|
|
||||||
'code' => 'special_price_from',
|
|
||||||
'position' => 4
|
|
||||||
], [
|
|
||||||
'code' => 'special_price_to',
|
|
||||||
'position' => 5
|
|
||||||
]
|
|
||||||
]
|
|
||||||
], [
|
|
||||||
"name" => "Shipping",
|
|
||||||
"is_user_defined" => 0,
|
|
||||||
"position" => 5,
|
|
||||||
"custom_attributes" => [
|
|
||||||
[
|
|
||||||
'code' => 'width',
|
|
||||||
'position' => 1
|
|
||||||
], [
|
|
||||||
'code' => 'height',
|
|
||||||
'position' => 2
|
|
||||||
], [
|
|
||||||
'code' => 'depth',
|
|
||||||
'position' => 3
|
|
||||||
], [
|
|
||||||
'code' => 'weight',
|
|
||||||
'position' => 4
|
|
||||||
]
|
|
||||||
]
|
|
||||||
]
|
|
||||||
]
|
|
||||||
]
|
|
||||||
];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* AttributeFamilyRepository object
|
|
||||||
*
|
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
protected $attributeFamily;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Create a new controller instance.
|
|
||||||
*
|
|
||||||
* @param Webkul\Attribute\Repositories\AttributeFamilyRepository $attributeFamily
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function __construct(AttributeFamilyRepository $attributeFamily)
|
|
||||||
{
|
|
||||||
$this->attributeFamily = $attributeFamily;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function run()
|
public function run()
|
||||||
{
|
{
|
||||||
foreach($this->rawData as $row) {
|
DB::table('attribute_families')->delete();
|
||||||
$this->attributeFamily->create($row);
|
|
||||||
}
|
DB::table('attribute_families')->insert([
|
||||||
|
['id' => '1','code' => 'default','name' => 'Default','status' => '0','is_user_defined' => '1']
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -0,0 +1,49 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Webkul\Attribute\Database\Seeders;
|
||||||
|
|
||||||
|
use Illuminate\Database\Seeder;
|
||||||
|
use DB;
|
||||||
|
|
||||||
|
class AttributeGroupTableSeeder extends Seeder
|
||||||
|
{
|
||||||
|
public function run()
|
||||||
|
{
|
||||||
|
DB::table('attribute_groups')->delete();
|
||||||
|
|
||||||
|
DB::table('attribute_groups')->insert([
|
||||||
|
['id' => '1','name' => 'General','position' => '1','is_user_defined' => '0','attribute_family_id' => '1'],
|
||||||
|
['id' => '2','name' => 'Description','position' => '2','is_user_defined' => '0','attribute_family_id' => '1'],
|
||||||
|
['id' => '3','name' => 'Meta Description','position' => '3','is_user_defined' => '0','attribute_family_id' => '1'],
|
||||||
|
['id' => '4','name' => 'Price','position' => '4','is_user_defined' => '0','attribute_family_id' => '1'],
|
||||||
|
['id' => '5','name' => 'Shipping','position' => '5','is_user_defined' => '0','attribute_family_id' => '1']
|
||||||
|
]);
|
||||||
|
|
||||||
|
DB::table('attribute_group_mappings')->insert([
|
||||||
|
['attribute_id' => '1','attribute_group_id' => '1','position' => '1'],
|
||||||
|
['attribute_id' => '2','attribute_group_id' => '1','position' => '2'],
|
||||||
|
['attribute_id' => '3','attribute_group_id' => '1','position' => '3'],
|
||||||
|
['attribute_id' => '4','attribute_group_id' => '1','position' => '4'],
|
||||||
|
['attribute_id' => '5','attribute_group_id' => '1','position' => '5'],
|
||||||
|
['attribute_id' => '6','attribute_group_id' => '1','position' => '6'],
|
||||||
|
['attribute_id' => '7','attribute_group_id' => '1','position' => '7'],
|
||||||
|
['attribute_id' => '8','attribute_group_id' => '1','position' => '8'],
|
||||||
|
['attribute_id' => '9','attribute_group_id' => '2','position' => '1'],
|
||||||
|
['attribute_id' => '10','attribute_group_id' => '2','position' => '2'],
|
||||||
|
['attribute_id' => '11','attribute_group_id' => '4','position' => '1'],
|
||||||
|
['attribute_id' => '12','attribute_group_id' => '4','position' => '2'],
|
||||||
|
['attribute_id' => '13','attribute_group_id' => '4','position' => '3'],
|
||||||
|
['attribute_id' => '14','attribute_group_id' => '4','position' => '4'],
|
||||||
|
['attribute_id' => '15','attribute_group_id' => '4','position' => '5'],
|
||||||
|
['attribute_id' => '16','attribute_group_id' => '3','position' => '1'],
|
||||||
|
['attribute_id' => '17','attribute_group_id' => '3','position' => '2'],
|
||||||
|
['attribute_id' => '18','attribute_group_id' => '3','position' => '3'],
|
||||||
|
['attribute_id' => '19','attribute_group_id' => '5','position' => '1'],
|
||||||
|
['attribute_id' => '20','attribute_group_id' => '5','position' => '2'],
|
||||||
|
['attribute_id' => '21','attribute_group_id' => '5','position' => '3'],
|
||||||
|
['attribute_id' => '22','attribute_group_id' => '5','position' => '4'],
|
||||||
|
['attribute_id' => '23','attribute_group_id' => '1','position' => '9'],
|
||||||
|
['attribute_id' => '24','attribute_group_id' => '1','position' => '10']
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,39 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Webkul\Attribute\Database\Seeders;
|
||||||
|
|
||||||
|
use Illuminate\Database\Seeder;
|
||||||
|
use DB;
|
||||||
|
|
||||||
|
class AttributeOptionTableSeeder extends Seeder
|
||||||
|
{
|
||||||
|
|
||||||
|
public function run()
|
||||||
|
{
|
||||||
|
DB::table('attribute_options')->delete();
|
||||||
|
|
||||||
|
DB::table('attribute_options')->insert([
|
||||||
|
['id' => '1','admin_name' => 'Red','sort_order' => '1','attribute_id' => '23'],
|
||||||
|
['id' => '2','admin_name' => 'Green','sort_order' => '2','attribute_id' => '23'],
|
||||||
|
['id' => '3','admin_name' => 'Yellow','sort_order' => '3','attribute_id' => '23'],
|
||||||
|
['id' => '4','admin_name' => 'Black','sort_order' => '4','attribute_id' => '23'],
|
||||||
|
['id' => '5','admin_name' => 'White','sort_order' => '5','attribute_id' => '23'],
|
||||||
|
['id' => '6','admin_name' => 'S','sort_order' => '1','attribute_id' => '24'],
|
||||||
|
['id' => '7','admin_name' => 'M','sort_order' => '2','attribute_id' => '24'],
|
||||||
|
['id' => '8','admin_name' => 'L','sort_order' => '3','attribute_id' => '24'],
|
||||||
|
['id' => '9','admin_name' => 'XL','sort_order' => '4','attribute_id' => '24']
|
||||||
|
]);
|
||||||
|
|
||||||
|
DB::table('attribute_option_translations')->insert([
|
||||||
|
['id' => '1','locale' => 'en','label' => 'Red','attribute_option_id' => '1'],
|
||||||
|
['id' => '2','locale' => 'en','label' => 'Green','attribute_option_id' => '2'],
|
||||||
|
['id' => '3','locale' => 'en','label' => 'Yellow','attribute_option_id' => '3'],
|
||||||
|
['id' => '4','locale' => 'en','label' => 'Black','attribute_option_id' => '4'],
|
||||||
|
['id' => '5','locale' => 'en','label' => 'White','attribute_option_id' => '5'],
|
||||||
|
['id' => '6','locale' => 'en','label' => 'S','attribute_option_id' => '6'],
|
||||||
|
['id' => '7','locale' => 'en','label' => 'M','attribute_option_id' => '7'],
|
||||||
|
['id' => '8','locale' => 'en','label' => 'L','attribute_option_id' => '8'],
|
||||||
|
['id' => '9','locale' => 'en','label' => 'XL','attribute_option_id' => '9']
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -3,444 +3,71 @@
|
||||||
namespace Webkul\Attribute\Database\Seeders;
|
namespace Webkul\Attribute\Database\Seeders;
|
||||||
|
|
||||||
use Illuminate\Database\Seeder;
|
use Illuminate\Database\Seeder;
|
||||||
use Webkul\Attribute\Repositories\AttributeRepository;
|
use DB;
|
||||||
|
use Carbon\Carbon;
|
||||||
|
|
||||||
class AttributeTableSeeder extends Seeder
|
class AttributeTableSeeder extends Seeder
|
||||||
{
|
{
|
||||||
/**
|
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
protected $rawData = [
|
|
||||||
[
|
|
||||||
'code' => 'sku',
|
|
||||||
'admin_name' => 'SKU',
|
|
||||||
'en' => [
|
|
||||||
'name' => 'SKU'
|
|
||||||
],
|
|
||||||
'type' => 'text',
|
|
||||||
'position' => 1,
|
|
||||||
'is_unique' => 1,
|
|
||||||
'is_required' => 1,
|
|
||||||
'value_per_locale' => 0,
|
|
||||||
'value_per_channel' => 0,
|
|
||||||
'is_filterable' => 0,
|
|
||||||
'is_configurable' => 0,
|
|
||||||
'is_user_defined' => 0
|
|
||||||
], [
|
|
||||||
'code' => 'name',
|
|
||||||
'admin_name' => 'Name',
|
|
||||||
'en' => [
|
|
||||||
'name' => 'Name'
|
|
||||||
],
|
|
||||||
'type' => 'text',
|
|
||||||
'position' => 2,
|
|
||||||
'is_required' => 1,
|
|
||||||
'value_per_locale' => 1,
|
|
||||||
'value_per_channel' => 1,
|
|
||||||
'is_filterable' => 0,
|
|
||||||
'is_configurable' => 0,
|
|
||||||
'is_user_defined' => 0
|
|
||||||
], [
|
|
||||||
'code' => 'url_key',
|
|
||||||
'admin_name' => 'URL Key',
|
|
||||||
'en' => [
|
|
||||||
'name' => 'URL Key'
|
|
||||||
],
|
|
||||||
'type' => 'text',
|
|
||||||
'position' => 3,
|
|
||||||
'is_unique' => 1,
|
|
||||||
'is_required' => 1,
|
|
||||||
'value_per_locale' => 0,
|
|
||||||
'value_per_channel' => 0,
|
|
||||||
'is_filterable' => 0,
|
|
||||||
'is_configurable' => 0,
|
|
||||||
'is_user_defined' => 0
|
|
||||||
], [
|
|
||||||
'code' => 'tax_category_id',
|
|
||||||
'admin_name' => 'Tax Category',
|
|
||||||
'en' => [
|
|
||||||
'name' => 'Tax Category'
|
|
||||||
],
|
|
||||||
'type' => 'select',
|
|
||||||
'position' => 4,
|
|
||||||
'is_unique' => 0,
|
|
||||||
'is_required' => 0,
|
|
||||||
'value_per_locale' => 0,
|
|
||||||
'value_per_channel' => 1,
|
|
||||||
'is_filterable' => 0,
|
|
||||||
'is_configurable' => 0,
|
|
||||||
'is_user_defined' => 0
|
|
||||||
], [
|
|
||||||
'code' => 'new',
|
|
||||||
'admin_name' => 'New',
|
|
||||||
'en' => [
|
|
||||||
'name' => 'New'
|
|
||||||
],
|
|
||||||
'type' => 'boolean',
|
|
||||||
'position' => 5,
|
|
||||||
'is_required' => 0,
|
|
||||||
'value_per_locale' => 0,
|
|
||||||
'value_per_channel' => 0,
|
|
||||||
'is_filterable' => 0,
|
|
||||||
'is_configurable' => 0,
|
|
||||||
'is_user_defined' => 0
|
|
||||||
], [
|
|
||||||
'code' => 'featured',
|
|
||||||
'admin_name' => 'Featured',
|
|
||||||
'en' => [
|
|
||||||
'name' => 'Featured'
|
|
||||||
],
|
|
||||||
'type' => 'boolean',
|
|
||||||
'position' => 6,
|
|
||||||
'is_required' => 0,
|
|
||||||
'value_per_locale' => 0,
|
|
||||||
'value_per_channel' => 0,
|
|
||||||
'is_filterable' => 0,
|
|
||||||
'is_configurable' => 0,
|
|
||||||
'is_user_defined' => 0
|
|
||||||
], [
|
|
||||||
'code' => 'visible_individually',
|
|
||||||
'admin_name' => 'Visible Individually',
|
|
||||||
'en' => [
|
|
||||||
'name' => 'Visible Individually'
|
|
||||||
],
|
|
||||||
'type' => 'boolean',
|
|
||||||
'position' => 7,
|
|
||||||
'is_required' => 1,
|
|
||||||
'value_per_locale' => 0,
|
|
||||||
'value_per_channel' => 0,
|
|
||||||
'is_filterable' => 0,
|
|
||||||
'is_configurable' => 0,
|
|
||||||
'is_user_defined' => 0
|
|
||||||
], [
|
|
||||||
'code' => 'status',
|
|
||||||
'admin_name' => 'Status',
|
|
||||||
'en' => [
|
|
||||||
'name' => 'Status'
|
|
||||||
],
|
|
||||||
'type' => 'boolean',
|
|
||||||
'position' => 8,
|
|
||||||
'is_required' => 1,
|
|
||||||
'value_per_locale' => 0,
|
|
||||||
'value_per_channel' => 0,
|
|
||||||
'is_filterable' => 0,
|
|
||||||
'is_configurable' => 0,
|
|
||||||
'is_user_defined' => 0
|
|
||||||
], [
|
|
||||||
'code' => 'short_description',
|
|
||||||
'admin_name' => 'Short Description',
|
|
||||||
'en' => [
|
|
||||||
'name' => 'Short Description'
|
|
||||||
],
|
|
||||||
'type' => 'textarea',
|
|
||||||
'position' => 9,
|
|
||||||
'is_required' => 1,
|
|
||||||
'value_per_locale' => 1,
|
|
||||||
'value_per_channel' => 1,
|
|
||||||
'is_filterable' => 0,
|
|
||||||
'is_configurable' => 0,
|
|
||||||
'is_user_defined' => 0
|
|
||||||
], [
|
|
||||||
'code' => 'description',
|
|
||||||
'admin_name' => 'Description',
|
|
||||||
'en' => [
|
|
||||||
'name' => 'Description'
|
|
||||||
],
|
|
||||||
'type' => 'textarea',
|
|
||||||
'position' => 10,
|
|
||||||
'is_required' => 1,
|
|
||||||
'value_per_locale' => 1,
|
|
||||||
'value_per_channel' => 1,
|
|
||||||
'is_filterable' => 0,
|
|
||||||
'is_configurable' => 0,
|
|
||||||
'is_user_defined' => 0
|
|
||||||
], [
|
|
||||||
'code' => 'price',
|
|
||||||
'admin_name' => 'Price',
|
|
||||||
'en' => [
|
|
||||||
'name' => 'Price'
|
|
||||||
],
|
|
||||||
'type' => 'price',
|
|
||||||
'position' => 11,
|
|
||||||
'is_required' => 1,
|
|
||||||
'value_per_locale' => 0,
|
|
||||||
'value_per_channel' => 0,
|
|
||||||
'is_filterable' => 1,
|
|
||||||
'is_configurable' => 0,
|
|
||||||
'is_user_defined' => 0
|
|
||||||
], [
|
|
||||||
'code' => 'cost',
|
|
||||||
'admin_name' => 'Cost',
|
|
||||||
'en' => [
|
|
||||||
'name' => 'Cost'
|
|
||||||
],
|
|
||||||
'type' => 'price',
|
|
||||||
'position' => 12,
|
|
||||||
'is_required' => 0,
|
|
||||||
'value_per_locale' => 0,
|
|
||||||
'value_per_channel' => 1,
|
|
||||||
'is_filterable' => 0,
|
|
||||||
'is_configurable' => 0,
|
|
||||||
'is_user_defined' => 1
|
|
||||||
], [
|
|
||||||
'code' => 'special_price',
|
|
||||||
'admin_name' => 'Special Price',
|
|
||||||
'en' => [
|
|
||||||
'name' => 'Special Price'
|
|
||||||
],
|
|
||||||
'type' => 'price',
|
|
||||||
'position' => 13,
|
|
||||||
'is_required' => 0,
|
|
||||||
'value_per_locale' => 0,
|
|
||||||
'value_per_channel' => 0,
|
|
||||||
'is_filterable' => 0,
|
|
||||||
'is_configurable' => 0,
|
|
||||||
'is_user_defined' => 0
|
|
||||||
], [
|
|
||||||
'code' => 'special_price_from',
|
|
||||||
'admin_name' => 'Special Price From',
|
|
||||||
'en' => [
|
|
||||||
'name' => 'Special Price From'
|
|
||||||
],
|
|
||||||
'type' => 'date',
|
|
||||||
'position' => 14,
|
|
||||||
'is_required' => 0,
|
|
||||||
'value_per_locale' => 0,
|
|
||||||
'value_per_channel' => 1,
|
|
||||||
'is_filterable' => 0,
|
|
||||||
'is_configurable' => 0,
|
|
||||||
'is_user_defined' => 0
|
|
||||||
], [
|
|
||||||
'code' => 'special_price_to',
|
|
||||||
'admin_name' => 'Special Price To',
|
|
||||||
'en' => [
|
|
||||||
'name' => 'Special Price To'
|
|
||||||
],
|
|
||||||
'type' => 'date',
|
|
||||||
'position' => 15,
|
|
||||||
'is_required' => 0,
|
|
||||||
'value_per_locale' => 0,
|
|
||||||
'value_per_channel' => 1,
|
|
||||||
'is_filterable' => 0,
|
|
||||||
'is_configurable' => 0,
|
|
||||||
'is_user_defined' => 0
|
|
||||||
], [
|
|
||||||
'code' => 'meta_title',
|
|
||||||
'admin_name' => 'Meta Title',
|
|
||||||
'en' => [
|
|
||||||
'name' => 'Meta Description'
|
|
||||||
],
|
|
||||||
'type' => 'textarea',
|
|
||||||
'position' => 16,
|
|
||||||
'is_required' => 0,
|
|
||||||
'value_per_locale' => 1,
|
|
||||||
'value_per_channel' => 1,
|
|
||||||
'is_filterable' => 0,
|
|
||||||
'is_configurable' => 0,
|
|
||||||
'is_user_defined' => 0
|
|
||||||
], [
|
|
||||||
'code' => 'meta_keywords',
|
|
||||||
'admin_name' => 'Meta Keywords',
|
|
||||||
'en' => [
|
|
||||||
'name' => 'Meta Keywords'
|
|
||||||
],
|
|
||||||
'type' => 'textarea',
|
|
||||||
'position' => 17,
|
|
||||||
'is_required' => 0,
|
|
||||||
'value_per_locale' => 1,
|
|
||||||
'value_per_channel' => 1,
|
|
||||||
'is_filterable' => 0,
|
|
||||||
'is_configurable' => 0,
|
|
||||||
'is_user_defined' => 0
|
|
||||||
], [
|
|
||||||
'code' => 'meta_description',
|
|
||||||
'admin_name' => 'Meta Description',
|
|
||||||
'en' => [
|
|
||||||
'name' => 'Meta Description'
|
|
||||||
],
|
|
||||||
'type' => 'textarea',
|
|
||||||
'position' => 18,
|
|
||||||
'is_required' => 0,
|
|
||||||
'value_per_locale' => 1,
|
|
||||||
'value_per_channel' => 1,
|
|
||||||
'is_filterable' => 0,
|
|
||||||
'is_configurable' => 0,
|
|
||||||
'is_user_defined' => 1
|
|
||||||
], [
|
|
||||||
'code' => 'width',
|
|
||||||
'admin_name' => 'Width',
|
|
||||||
'en' => [
|
|
||||||
'name' => 'Width'
|
|
||||||
],
|
|
||||||
'type' => 'text',
|
|
||||||
'validation' => 'numeric',
|
|
||||||
'position' => 19,
|
|
||||||
'is_required' => 0,
|
|
||||||
'value_per_locale' => 0,
|
|
||||||
'value_per_channel' => 0,
|
|
||||||
'is_filterable' => 0,
|
|
||||||
'is_configurable' => 0,
|
|
||||||
'is_user_defined' => 1
|
|
||||||
], [
|
|
||||||
'code' => 'height',
|
|
||||||
'admin_name' => 'Height',
|
|
||||||
'en' => [
|
|
||||||
'name' => 'Height'
|
|
||||||
],
|
|
||||||
'type' => 'text',
|
|
||||||
'validation' => 'numeric',
|
|
||||||
'position' => 20,
|
|
||||||
'is_required' => 0,
|
|
||||||
'value_per_locale' => 0,
|
|
||||||
'value_per_channel' => 0,
|
|
||||||
'is_filterable' => 0,
|
|
||||||
'is_configurable' => 0,
|
|
||||||
'is_user_defined' => 1
|
|
||||||
], [
|
|
||||||
'code' => 'depth',
|
|
||||||
'admin_name' => 'Depth',
|
|
||||||
'en' => [
|
|
||||||
'name' => 'Depth'
|
|
||||||
],
|
|
||||||
'type' => 'text',
|
|
||||||
'validation' => 'numeric',
|
|
||||||
'position' => 21,
|
|
||||||
'is_required' => 0,
|
|
||||||
'value_per_locale' => 0,
|
|
||||||
'value_per_channel' => 0,
|
|
||||||
'is_filterable' => 0,
|
|
||||||
'is_configurable' => 0,
|
|
||||||
'is_user_defined' => 1
|
|
||||||
], [
|
|
||||||
'code' => 'weight',
|
|
||||||
'admin_name' => 'Weight',
|
|
||||||
'en' => [
|
|
||||||
'name' => 'Weight'
|
|
||||||
],
|
|
||||||
'type' => 'text',
|
|
||||||
'validation' => 'numeric',
|
|
||||||
'position' => 22,
|
|
||||||
'is_required' => 1,
|
|
||||||
'value_per_locale' => 0,
|
|
||||||
'value_per_channel' => 0,
|
|
||||||
'is_filterable' => 0,
|
|
||||||
'is_configurable' => 0,
|
|
||||||
'is_user_defined' => 0
|
|
||||||
], [
|
|
||||||
'code' => 'color',
|
|
||||||
'admin_name' => 'Color',
|
|
||||||
'en' => [
|
|
||||||
'name' => 'Color'
|
|
||||||
],
|
|
||||||
'type' => 'select',
|
|
||||||
'position' => 23,
|
|
||||||
'is_required' => 0,
|
|
||||||
'value_per_locale' => 0,
|
|
||||||
'value_per_channel' => 0,
|
|
||||||
'is_filterable' => 1,
|
|
||||||
'is_configurable' => 1,
|
|
||||||
'is_user_defined' => 1,
|
|
||||||
'options' => [
|
|
||||||
[
|
|
||||||
'admin_name' => 'Red',
|
|
||||||
'en' => [
|
|
||||||
'label' => 'Red'
|
|
||||||
],
|
|
||||||
'sort_order' => 1
|
|
||||||
], [
|
|
||||||
'admin_name' => 'Green',
|
|
||||||
'en' => [
|
|
||||||
'label' => 'Green'
|
|
||||||
],
|
|
||||||
'sort_order' => 2
|
|
||||||
], [
|
|
||||||
'admin_name' => 'Yellow',
|
|
||||||
'en' => [
|
|
||||||
'label' => 'Yellow'
|
|
||||||
],
|
|
||||||
'sort_order' => 3
|
|
||||||
], [
|
|
||||||
'admin_name' => 'Black',
|
|
||||||
'en' => [
|
|
||||||
'label' => 'Black'
|
|
||||||
],
|
|
||||||
'sort_order' => 4
|
|
||||||
], [
|
|
||||||
'admin_name' => 'White',
|
|
||||||
'en' => [
|
|
||||||
'label' => 'White'
|
|
||||||
],
|
|
||||||
'sort_order' => 5
|
|
||||||
]
|
|
||||||
]
|
|
||||||
], [
|
|
||||||
'code' => 'size',
|
|
||||||
'admin_name' => 'Size',
|
|
||||||
'en' => [
|
|
||||||
'name' => 'Size'
|
|
||||||
],
|
|
||||||
'type' => 'select',
|
|
||||||
'position' => 24,
|
|
||||||
'is_required' => 0,
|
|
||||||
'value_per_locale' => 0,
|
|
||||||
'value_per_channel' => 0,
|
|
||||||
'is_filterable' => 1,
|
|
||||||
'is_configurable' => 1,
|
|
||||||
'is_user_defined' => 1,
|
|
||||||
'options' => [
|
|
||||||
[
|
|
||||||
'admin_name' => 'S',
|
|
||||||
'en' => [
|
|
||||||
'label' => 'S'
|
|
||||||
],
|
|
||||||
'sort_order' => 1
|
|
||||||
], [
|
|
||||||
'admin_name' => 'M',
|
|
||||||
'en' => [
|
|
||||||
'label' => 'M'
|
|
||||||
],
|
|
||||||
'sort_order' => 2
|
|
||||||
], [
|
|
||||||
'admin_name' => 'L',
|
|
||||||
'en' => [
|
|
||||||
'label' => 'L'
|
|
||||||
],
|
|
||||||
'sort_order' => 3
|
|
||||||
], [
|
|
||||||
'admin_name' => 'XL',
|
|
||||||
'en' => [
|
|
||||||
'label' => 'XL'
|
|
||||||
],
|
|
||||||
'sort_order' => 4
|
|
||||||
]
|
|
||||||
]
|
|
||||||
]
|
|
||||||
];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* AttributeRepository object
|
|
||||||
*
|
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
protected $attribute;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Create a new controller instance.
|
|
||||||
*
|
|
||||||
* @param Webkul\Attribute\Repositories\AttributeRepository $attribute
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function __construct(AttributeRepository $attribute)
|
|
||||||
{
|
|
||||||
$this->attribute = $attribute;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function run()
|
public function run()
|
||||||
{
|
{
|
||||||
\Illuminate\Database\Eloquent\Model::reguard();
|
DB::table('attributes')->delete();
|
||||||
|
|
||||||
foreach($this->rawData as $row) {
|
$now = Carbon::now();
|
||||||
$this->attribute->create($row);
|
|
||||||
}
|
DB::table('attributes')->insert([
|
||||||
|
['id' => '1','code' => 'sku','admin_name' => 'SKU','type' => 'text','validation' => NULL,'position' => '1','is_required' => '1','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','created_at' => $now,'updated_at' => $now],
|
||||||
|
['id' => '2','code' => 'name','admin_name' => 'Name','type' => 'text','validation' => NULL,'position' => '2','is_required' => '1','is_unique' => '0','value_per_locale' => '1','value_per_channel' => '1','is_filterable' => '0','is_configurable' => '0','is_user_defined' => '0','is_visible_on_front' => '0','created_at' => $now,'updated_at' => $now],
|
||||||
|
['id' => '3','code' => 'url_key','admin_name' => 'URL Key','type' => 'text','validation' => NULL,'position' => '3','is_required' => '1','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','created_at' => $now,'updated_at' => $now],
|
||||||
|
['id' => '4','code' => 'tax_category_id','admin_name' => 'Tax Category','type' => 'select','validation' => NULL,'position' => '4','is_required' => '0','is_unique' => '0','value_per_locale' => '0','value_per_channel' => '1','is_filterable' => '0','is_configurable' => '0','is_user_defined' => '0','is_visible_on_front' => '0','created_at' => $now,'updated_at' => $now],
|
||||||
|
['id' => '5','code' => 'new','admin_name' => 'New','type' => 'boolean','validation' => NULL,'position' => '5','is_required' => '0','is_unique' => '0','value_per_locale' => '0','value_per_channel' => '0','is_filterable' => '0','is_configurable' => '0','is_user_defined' => '0','is_visible_on_front' => '0','created_at' => $now,'updated_at' => $now],
|
||||||
|
['id' => '6','code' => 'featured','admin_name' => 'Featured','type' => 'boolean','validation' => NULL,'position' => '6','is_required' => '0','is_unique' => '0','value_per_locale' => '0','value_per_channel' => '0','is_filterable' => '0','is_configurable' => '0','is_user_defined' => '0','is_visible_on_front' => '0','created_at' => $now,'updated_at' => $now],
|
||||||
|
['id' => '7','code' => 'visible_individually','admin_name' => 'Visible Individually','type' => 'boolean','validation' => NULL,'position' => '7','is_required' => '1','is_unique' => '0','value_per_locale' => '0','value_per_channel' => '0','is_filterable' => '0','is_configurable' => '0','is_user_defined' => '0','is_visible_on_front' => '0','created_at' => $now,'updated_at' => $now],
|
||||||
|
['id' => '8','code' => 'status','admin_name' => 'Status','type' => 'boolean','validation' => NULL,'position' => '8','is_required' => '1','is_unique' => '0','value_per_locale' => '0','value_per_channel' => '0','is_filterable' => '0','is_configurable' => '0','is_user_defined' => '0','is_visible_on_front' => '0','created_at' => $now,'updated_at' => $now],
|
||||||
|
['id' => '9','code' => 'short_description','admin_name' => 'Short Description','type' => 'textarea','validation' => NULL,'position' => '9','is_required' => '1','is_unique' => '0','value_per_locale' => '1','value_per_channel' => '1','is_filterable' => '0','is_configurable' => '0','is_user_defined' => '0','is_visible_on_front' => '0','created_at' => $now,'updated_at' => $now],
|
||||||
|
['id' => '10','code' => 'description','admin_name' => 'Description','type' => 'textarea','validation' => NULL,'position' => '10','is_required' => '1','is_unique' => '0','value_per_locale' => '1','value_per_channel' => '1','is_filterable' => '0','is_configurable' => '0','is_user_defined' => '0','is_visible_on_front' => '0','created_at' => $now,'updated_at' => $now],
|
||||||
|
['id' => '11','code' => 'price','admin_name' => 'Price','type' => 'price','validation' => NULL,'position' => '11','is_required' => '1','is_unique' => '0','value_per_locale' => '0','value_per_channel' => '0','is_filterable' => '1','is_configurable' => '0','is_user_defined' => '0','is_visible_on_front' => '0','created_at' => $now,'updated_at' => $now],
|
||||||
|
['id' => '12','code' => 'cost','admin_name' => 'Cost','type' => 'price','validation' => NULL,'position' => '12','is_required' => '0','is_unique' => '0','value_per_locale' => '0','value_per_channel' => '1','is_filterable' => '0','is_configurable' => '0','is_user_defined' => '1','is_visible_on_front' => '0','created_at' => $now,'updated_at' => $now],
|
||||||
|
['id' => '13','code' => 'special_price','admin_name' => 'Special Price','type' => 'price','validation' => NULL,'position' => '13','is_required' => '0','is_unique' => '0','value_per_locale' => '0','value_per_channel' => '0','is_filterable' => '0','is_configurable' => '0','is_user_defined' => '0','is_visible_on_front' => '0','created_at' => $now,'updated_at' => $now],
|
||||||
|
['id' => '14','code' => 'special_price_from','admin_name' => 'Special Price From','type' => 'date','validation' => NULL,'position' => '14','is_required' => '0','is_unique' => '0','value_per_locale' => '0','value_per_channel' => '1','is_filterable' => '0','is_configurable' => '0','is_user_defined' => '0','is_visible_on_front' => '0','created_at' => $now,'updated_at' => $now],
|
||||||
|
['id' => '15','code' => 'special_price_to','admin_name' => 'Special Price To','type' => 'date','validation' => NULL,'position' => '15','is_required' => '0','is_unique' => '0','value_per_locale' => '0','value_per_channel' => '1','is_filterable' => '0','is_configurable' => '0','is_user_defined' => '0','is_visible_on_front' => '0','created_at' => $now,'updated_at' => $now],
|
||||||
|
['id' => '16','code' => 'meta_title','admin_name' => 'Meta Title','type' => 'textarea','validation' => NULL,'position' => '16','is_required' => '0','is_unique' => '0','value_per_locale' => '1','value_per_channel' => '1','is_filterable' => '0','is_configurable' => '0','is_user_defined' => '0','is_visible_on_front' => '0','created_at' => $now,'updated_at' => $now],
|
||||||
|
['id' => '17','code' => 'meta_keywords','admin_name' => 'Meta Keywords','type' => 'textarea','validation' => NULL,'position' => '17','is_required' => '0','is_unique' => '0','value_per_locale' => '1','value_per_channel' => '1','is_filterable' => '0','is_configurable' => '0','is_user_defined' => '0','is_visible_on_front' => '0','created_at' => $now,'updated_at' => $now],
|
||||||
|
['id' => '18','code' => 'meta_description','admin_name' => 'Meta Description','type' => 'textarea','validation' => NULL,'position' => '18','is_required' => '0','is_unique' => '0','value_per_locale' => '1','value_per_channel' => '1','is_filterable' => '0','is_configurable' => '0','is_user_defined' => '1','is_visible_on_front' => '0','created_at' => $now,'updated_at' => $now],
|
||||||
|
['id' => '19','code' => 'width','admin_name' => 'Width','type' => 'text','validation' => NULL,'position' => '19','is_required' => '0','is_unique' => '0','value_per_locale' => '0','value_per_channel' => '0','is_filterable' => '0','is_configurable' => '0','is_user_defined' => '1','is_visible_on_front' => '0','created_at' => $now,'updated_at' => $now],
|
||||||
|
['id' => '20','code' => 'height','admin_name' => 'Height','type' => 'text','validation' => NULL,'position' => '20','is_required' => '0','is_unique' => '0','value_per_locale' => '0','value_per_channel' => '0','is_filterable' => '0','is_configurable' => '0','is_user_defined' => '1','is_visible_on_front' => '0','created_at' => $now,'updated_at' => $now],
|
||||||
|
['id' => '21','code' => 'depth','admin_name' => 'Depth','type' => 'text','validation' => NULL,'position' => '21','is_required' => '0','is_unique' => '0','value_per_locale' => '0','value_per_channel' => '0','is_filterable' => '0','is_configurable' => '0','is_user_defined' => '1','is_visible_on_front' => '0','created_at' => $now,'updated_at' => $now],
|
||||||
|
['id' => '22','code' => 'weight','admin_name' => 'Weight','type' => 'text','validation' => NULL,'position' => '22','is_required' => '1','is_unique' => '0','value_per_locale' => '0','value_per_channel' => '0','is_filterable' => '0','is_configurable' => '0','is_user_defined' => '0','is_visible_on_front' => '0','created_at' => $now,'updated_at' => $now],
|
||||||
|
['id' => '23','code' => 'color','admin_name' => 'Color','type' => 'select','validation' => NULL,'position' => '23','is_required' => '0','is_unique' => '0','value_per_locale' => '0','value_per_channel' => '0','is_filterable' => '1','is_configurable' => '1','is_user_defined' => '1','is_visible_on_front' => '0','created_at' => $now,'updated_at' => $now],
|
||||||
|
['id' => '24','code' => 'size','admin_name' => 'Size','type' => 'select','validation' => NULL,'position' => '24','is_required' => '0','is_unique' => '0','value_per_locale' => '0','value_per_channel' => '0','is_filterable' => '1','is_configurable' => '1','is_user_defined' => '1','is_visible_on_front' => '0','created_at' => $now,'updated_at' => $now]
|
||||||
|
]);
|
||||||
|
|
||||||
|
|
||||||
|
DB::table('attribute_translations')->insert([
|
||||||
|
['id' => '1','locale' => 'en','name' => 'SKU','attribute_id' => '1'],
|
||||||
|
['id' => '2','locale' => 'en','name' => 'Name','attribute_id' => '2'],
|
||||||
|
['id' => '3','locale' => 'en','name' => 'URL Key','attribute_id' => '3'],
|
||||||
|
['id' => '4','locale' => 'en','name' => 'Tax Category','attribute_id' => '4'],
|
||||||
|
['id' => '5','locale' => 'en','name' => 'New','attribute_id' => '5'],
|
||||||
|
['id' => '6','locale' => 'en','name' => 'Featured','attribute_id' => '6'],
|
||||||
|
['id' => '7','locale' => 'en','name' => 'Visible Individually','attribute_id' => '7'],
|
||||||
|
['id' => '8','locale' => 'en','name' => 'Status','attribute_id' => '8'],
|
||||||
|
['id' => '9','locale' => 'en','name' => 'Short Description','attribute_id' => '9'],
|
||||||
|
['id' => '10','locale' => 'en','name' => 'Description','attribute_id' => '10'],
|
||||||
|
['id' => '11','locale' => 'en','name' => 'Price','attribute_id' => '11'],
|
||||||
|
['id' => '12','locale' => 'en','name' => 'Cost','attribute_id' => '12'],
|
||||||
|
['id' => '13','locale' => 'en','name' => 'Special Price','attribute_id' => '13'],
|
||||||
|
['id' => '14','locale' => 'en','name' => 'Special Price From','attribute_id' => '14'],
|
||||||
|
['id' => '15','locale' => 'en','name' => 'Special Price To','attribute_id' => '15'],
|
||||||
|
['id' => '16','locale' => 'en','name' => 'Meta Description','attribute_id' => '16'],
|
||||||
|
['id' => '17','locale' => 'en','name' => 'Meta Keywords','attribute_id' => '17'],
|
||||||
|
['id' => '18','locale' => 'en','name' => 'Meta Description','attribute_id' => '18'],
|
||||||
|
['id' => '19','locale' => 'en','name' => 'Width','attribute_id' => '19'],
|
||||||
|
['id' => '20','locale' => 'en','name' => 'Height','attribute_id' => '20'],
|
||||||
|
['id' => '21','locale' => 'en','name' => 'Depth','attribute_id' => '21'],
|
||||||
|
['id' => '22','locale' => 'en','name' => 'Weight','attribute_id' => '22'],
|
||||||
|
['id' => '23','locale' => 'en','name' => 'Color','attribute_id' => '23'],
|
||||||
|
['id' => '24','locale' => 'en','name' => 'Size','attribute_id' => '24']
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -14,6 +14,8 @@ class DatabaseSeeder extends Seeder
|
||||||
public function run()
|
public function run()
|
||||||
{
|
{
|
||||||
$this->call(AttributeTableSeeder::class);
|
$this->call(AttributeTableSeeder::class);
|
||||||
|
$this->call(AttributeOptionTableSeeder::class);
|
||||||
$this->call(AttributeFamilyTableSeeder::class);
|
$this->call(AttributeFamilyTableSeeder::class);
|
||||||
|
$this->call(AttributeGroupTableSeeder::class);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,37 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Webkul\Category\Database\Seeders;
|
||||||
|
|
||||||
|
use Illuminate\Database\Seeder;
|
||||||
|
use DB;
|
||||||
|
use Carbon\Carbon;
|
||||||
|
|
||||||
|
class CategoryTableSeeder extends Seeder
|
||||||
|
{
|
||||||
|
public function run()
|
||||||
|
{
|
||||||
|
DB::table('categories')->delete();
|
||||||
|
|
||||||
|
$now = Carbon::now();
|
||||||
|
|
||||||
|
DB::table('categories')->insert([
|
||||||
|
['id' => '1','position' => '1','image' => NULL,'status' => '1','_lft' => '1','_rgt' => '14','parent_id' => NULL, 'created_at' => $now, 'updated_at' => $now],
|
||||||
|
['id' => '2','position' => '1','image' => NULL,'status' => '1','_lft' => '2','_rgt' => '7','parent_id' => '1', 'created_at' => $now, 'updated_at' => $now],
|
||||||
|
['id' => '3','position' => '2','image' => NULL,'status' => '1','_lft' => '8','_rgt' => '13','parent_id' => '1', 'created_at' => $now, 'updated_at' => $now],
|
||||||
|
['id' => '4','position' => '1','image' => NULL,'status' => '1','_lft' => '5','_rgt' => '6','parent_id' => '2', 'created_at' => $now, 'updated_at' => $now],
|
||||||
|
['id' => '5','position' => '2','image' => NULL,'status' => '1','_lft' => '3','_rgt' => '4','parent_id' => '2', 'created_at' => $now, 'updated_at' => $now],
|
||||||
|
['id' => '6','position' => '1','image' => NULL,'status' => '1','_lft' => '9','_rgt' => '10','parent_id' => '3', 'created_at' => $now, 'updated_at' => $now],
|
||||||
|
['id' => '7','position' => '2','image' => NULL,'status' => '1','_lft' => '11','_rgt' => '12','parent_id' => '3', 'created_at' => $now, 'updated_at' => $now]
|
||||||
|
]);
|
||||||
|
|
||||||
|
DB::table('category_translations')->insert([
|
||||||
|
['id' => '1','name' => 'Root','slug' => 'root','description' => 'Root','meta_title' => '','meta_description' => '','meta_keywords' => '','category_id' => '1','locale' => 'en'],
|
||||||
|
['id' => '2','name' => 'Women','slug' => 'women','description' => 'Women','meta_title' => '','meta_description' => '','meta_keywords' => '','category_id' => '2','locale' => 'en'],
|
||||||
|
['id' => '3','name' => 'Men','slug' => 'men','description' => 'Men','meta_title' => '','meta_description' => '','meta_keywords' => '','category_id' => '3','locale' => 'en'],
|
||||||
|
['id' => '4','name' => 'Tops','slug' => 'tops-women','description' => 'Tops','meta_title' => '','meta_description' => '','meta_keywords' => '','category_id' => '4','locale' => 'en'],
|
||||||
|
['id' => '5','name' => 'Bottoms','slug' => 'bottoms-women','description' => 'Bottoms','meta_title' => '','meta_description' => '','meta_keywords' => '','category_id' => '5','locale' => 'en'],
|
||||||
|
['id' => '6','name' => 'Tops','slug' => 'tops-men','description' => 'Tops','meta_title' => '','meta_description' => '','meta_keywords' => '','category_id' => '6','locale' => 'en'],
|
||||||
|
['id' => '7','name' => 'Bottoms','slug' => 'bottoms-men','description' => 'Bottoms','meta_title' => '','meta_description' => '','meta_keywords' => '','category_id' => '7','locale' => 'en']
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Webkul\Category\Database\Seeders;
|
||||||
|
|
||||||
|
use Illuminate\Database\Seeder;
|
||||||
|
|
||||||
|
class DatabaseSeeder extends Seeder
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Seed the application's database.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function run()
|
||||||
|
{
|
||||||
|
$this->call(CategoryTableSeeder::class);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -73,7 +73,7 @@ class CategoryController extends Controller
|
||||||
public function store()
|
public function store()
|
||||||
{
|
{
|
||||||
$this->validate(request(), [
|
$this->validate(request(), [
|
||||||
'slug' => ['required', 'unique:category_translations,slug', new \Webkul\Core\Contracts\Validations\Code],
|
'slug' => ['required', 'unique:category_translations,slug', new \Webkul\Core\Contracts\Validations\Slug],
|
||||||
'name' => 'required'
|
'name' => 'required'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -121,18 +121,16 @@ class Cart {
|
||||||
}
|
}
|
||||||
|
|
||||||
$child = $childData = null;
|
$child = $childData = null;
|
||||||
|
$additional = [];
|
||||||
if($product->type == 'configurable') {
|
if($product->type == 'configurable') {
|
||||||
$child = $this->product->findOneByField('id', $data['selected_configurable_option']);
|
$child = $this->product->findOneByField('id', $data['selected_configurable_option']);
|
||||||
|
|
||||||
$productAddtionalData = $this->getProductAttributeOptionDetails($child);
|
$additional = $this->getProductAttributeOptionDetails($child);
|
||||||
|
|
||||||
unset($productAddtionalData['html']);
|
unset($additional['html']);
|
||||||
|
|
||||||
$additional = [
|
$additional['request'] = $data;
|
||||||
'request' => $data,
|
$additional['variant_id'] = $data['selected_configurable_option'];
|
||||||
'variant_id' => $data['selected_configurable_option'],
|
|
||||||
'attributes' => $productAddtionalData
|
|
||||||
];
|
|
||||||
|
|
||||||
$childData = [
|
$childData = [
|
||||||
'product_id' => $data['selected_configurable_option'],
|
'product_id' => $data['selected_configurable_option'],
|
||||||
|
|
@ -157,7 +155,7 @@ class Cart {
|
||||||
'weight' => $weight = ($product->type == 'configurable' ? $child->weight : $product->weight),
|
'weight' => $weight = ($product->type == 'configurable' ? $child->weight : $product->weight),
|
||||||
'total_weight' => $weight * $data['quantity'],
|
'total_weight' => $weight * $data['quantity'],
|
||||||
'base_total_weight' => $weight * $data['quantity'],
|
'base_total_weight' => $weight * $data['quantity'],
|
||||||
'additional' => json_encode($additional)
|
'additional' => $additional
|
||||||
];
|
];
|
||||||
|
|
||||||
return ['parent' => $parentData, 'child' => $childData];
|
return ['parent' => $parentData, 'child' => $childData];
|
||||||
|
|
@ -175,8 +173,7 @@ class Cart {
|
||||||
{
|
{
|
||||||
if($prepared == false) {
|
if($prepared == false) {
|
||||||
$itemData = $this->prepareItemData($id, $data);
|
$itemData = $this->prepareItemData($id, $data);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
$itemData = $preparedData;
|
$itemData = $preparedData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -521,8 +521,8 @@ class Core
|
||||||
public function getTimeInterval($startDate, $endDate) {
|
public function getTimeInterval($startDate, $endDate) {
|
||||||
$timeIntervals = [];
|
$timeIntervals = [];
|
||||||
|
|
||||||
$totalDays = $startDate->diffInDays($endDate);
|
$totalDays = $startDate->diffInDays($endDate) + 1;
|
||||||
$totalMonths = $startDate->diffInMonths($endDate);
|
$totalMonths = $startDate->diffInMonths($endDate) + 1;
|
||||||
|
|
||||||
$startWeekDay = Carbon::createFromTimeString($this->xWeekRange($startDate, 0) . ' 00:00:01');
|
$startWeekDay = Carbon::createFromTimeString($this->xWeekRange($startDate, 0) . ' 00:00:01');
|
||||||
$endWeekDay = Carbon::createFromTimeString($this->xWeekRange($endDate, 1) . ' 23:59:59');
|
$endWeekDay = Carbon::createFromTimeString($this->xWeekRange($endDate, 1) . ' 23:59:59');
|
||||||
|
|
|
||||||
|
|
@ -16,10 +16,10 @@ class CreateWishlistTable extends Migration
|
||||||
Schema::create('wishlist', function (Blueprint $table) {
|
Schema::create('wishlist', function (Blueprint $table) {
|
||||||
$table->increments('id');
|
$table->increments('id');
|
||||||
$table->integer('channel_id')->unsigned();
|
$table->integer('channel_id')->unsigned();
|
||||||
$table->foreign('channel_id')->references('id')->on('channels');
|
$table->foreign('channel_id')->references('id')->on('channels')->onDelete('cascade');
|
||||||
|
|
||||||
$table->integer('product_id')->unsigned();
|
$table->integer('product_id')->unsigned();
|
||||||
$table->foreign('product_id')->references('id')->on('products');
|
$table->foreign('product_id')->references('id')->on('products')->onDelete('cascade');
|
||||||
|
|
||||||
$table->integer('customer_id')->unsigned();
|
$table->integer('customer_id')->unsigned();
|
||||||
$table->foreign('customer_id')->references('id')->on('customers')->onDelete('cascade');
|
$table->foreign('customer_id')->references('id')->on('customers')->onDelete('cascade');
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Webkul\Product\Database\Seeders;
|
||||||
|
|
||||||
|
use Illuminate\Database\Seeder;
|
||||||
|
|
||||||
|
class DatabaseSeeder extends Seeder
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Seed the application's database.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function run()
|
||||||
|
{
|
||||||
|
$this->call(ProductTableSeeder::class);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Webkul\Category\Database\Seeders;
|
||||||
|
|
||||||
|
use Illuminate\Database\Seeder;
|
||||||
|
use DB;
|
||||||
|
|
||||||
|
class ProductTableSeeder extends Seeder
|
||||||
|
{
|
||||||
|
public function run()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -17,19 +17,21 @@ class ProductImage extends AbstractProduct
|
||||||
{
|
{
|
||||||
$images = [];
|
$images = [];
|
||||||
|
|
||||||
foreach($product->images as $image) {
|
if($product) {
|
||||||
if(!Storage::has($image->path))
|
foreach($product->images as $image) {
|
||||||
continue;
|
if(!Storage::has($image->path))
|
||||||
|
continue;
|
||||||
|
|
||||||
$images[] = [
|
$images[] = [
|
||||||
'small_image_url' => url('cache/small/' . $image->path),
|
'small_image_url' => url('cache/small/' . $image->path),
|
||||||
'medium_image_url' => url('cache/medium/' . $image->path),
|
'medium_image_url' => url('cache/medium/' . $image->path),
|
||||||
'large_image_url' => url('cache/large/' . $image->path),
|
'large_image_url' => url('cache/large/' . $image->path),
|
||||||
'original_image_url' => url('cache/original/' . $image->path),
|
'original_image_url' => url('cache/original/' . $image->path),
|
||||||
];
|
];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!$product->parent_id && !count($images)) {
|
if(!$product || (!$product->parent_id && !count($images))) {
|
||||||
$images[] = [
|
$images[] = [
|
||||||
'small_image_url' => bagisto_asset('images/product/small-product-placeholder.png'),
|
'small_image_url' => bagisto_asset('images/product/small-product-placeholder.png'),
|
||||||
'medium_image_url' => bagisto_asset('images/product/meduim-product-placeholder.png'),
|
'medium_image_url' => bagisto_asset('images/product/meduim-product-placeholder.png'),
|
||||||
|
|
@ -49,9 +51,8 @@ class ProductImage extends AbstractProduct
|
||||||
*/
|
*/
|
||||||
public function getProductBaseImage($product)
|
public function getProductBaseImage($product)
|
||||||
{
|
{
|
||||||
$images = $product->images;
|
if($product && $product->images->count()) {
|
||||||
|
$images = $product->images;
|
||||||
if($images->count()) {
|
|
||||||
$image = [
|
$image = [
|
||||||
'small_image_url' => url('cache/small/' . $images[0]->path),
|
'small_image_url' => url('cache/small/' . $images[0]->path),
|
||||||
'medium_image_url' => url('cache/medium/' . $images[0]->path),
|
'medium_image_url' => url('cache/medium/' . $images[0]->path),
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,10 @@ class InvoiceItem extends Model implements InvoiceItemContract
|
||||||
{
|
{
|
||||||
protected $guarded = ['id', 'created_at', 'updated_at'];
|
protected $guarded = ['id', 'created_at', 'updated_at'];
|
||||||
|
|
||||||
|
protected $casts = [
|
||||||
|
'additional' => 'array',
|
||||||
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the invoice record associated with the invoice item.
|
* Get the invoice record associated with the invoice item.
|
||||||
*/
|
*/
|
||||||
|
|
@ -40,4 +44,21 @@ class InvoiceItem extends Model implements InvoiceItemContract
|
||||||
{
|
{
|
||||||
return $this->hasOne(InvoiceItemProxy::modelClass(), 'parent_id');
|
return $this->hasOne(InvoiceItemProxy::modelClass(), 'parent_id');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns configurable option html
|
||||||
|
*/
|
||||||
|
public function getOptionDetailHtml()
|
||||||
|
{
|
||||||
|
|
||||||
|
if($this->type == 'configurable' && isset($this->additional['attributes'])) {
|
||||||
|
$labels = [];
|
||||||
|
|
||||||
|
foreach($this->additional['attributes'] as $attribute) {
|
||||||
|
$labels[] = $attribute['attribute_name'] . ' : ' . $attribute['option_label'];
|
||||||
|
}
|
||||||
|
|
||||||
|
return implode(', ', $labels);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -10,6 +10,10 @@ class OrderItem extends Model implements OrderItemContract
|
||||||
{
|
{
|
||||||
protected $guarded = ['id', 'child', 'created_at', 'updated_at'];
|
protected $guarded = ['id', 'child', 'created_at', 'updated_at'];
|
||||||
|
|
||||||
|
protected $casts = [
|
||||||
|
'additional' => 'array',
|
||||||
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get remaining qty for shipping.
|
* Get remaining qty for shipping.
|
||||||
*/
|
*/
|
||||||
|
|
@ -75,4 +79,21 @@ class OrderItem extends Model implements OrderItemContract
|
||||||
public function shipment_items() {
|
public function shipment_items() {
|
||||||
return $this->hasMany(ShipmentItemProxy::modelClass());
|
return $this->hasMany(ShipmentItemProxy::modelClass());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns configurable option html
|
||||||
|
*/
|
||||||
|
public function getOptionDetailHtml()
|
||||||
|
{
|
||||||
|
|
||||||
|
if($this->type == 'configurable' && isset($this->additional['attributes'])) {
|
||||||
|
$labels = [];
|
||||||
|
|
||||||
|
foreach($this->additional['attributes'] as $attribute) {
|
||||||
|
$labels[] = $attribute['attribute_name'] . ' : ' . $attribute['option_label'];
|
||||||
|
}
|
||||||
|
|
||||||
|
return implode(', ', $labels);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -9,6 +9,10 @@ class ShipmentItem extends Model implements ShipmentItemContract
|
||||||
{
|
{
|
||||||
protected $guarded = ['id', 'child', 'created_at', 'updated_at'];
|
protected $guarded = ['id', 'child', 'created_at', 'updated_at'];
|
||||||
|
|
||||||
|
protected $casts = [
|
||||||
|
'additional' => 'array',
|
||||||
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the shipment record associated with the shipment item.
|
* Get the shipment record associated with the shipment item.
|
||||||
*/
|
*/
|
||||||
|
|
@ -40,4 +44,21 @@ class ShipmentItem extends Model implements ShipmentItemContract
|
||||||
{
|
{
|
||||||
return $this->belongsTo(ShipmentItemProxy::modelClass(), 'parent_id');
|
return $this->belongsTo(ShipmentItemProxy::modelClass(), 'parent_id');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns configurable option html
|
||||||
|
*/
|
||||||
|
public function getOptionDetailHtml()
|
||||||
|
{
|
||||||
|
|
||||||
|
if($this->type == 'configurable' && isset($this->additional['attributes'])) {
|
||||||
|
$labels = [];
|
||||||
|
|
||||||
|
foreach($this->additional['attributes'] as $attribute) {
|
||||||
|
$labels[] = $attribute['attribute_name'] . ' : ' . $attribute['option_label'];
|
||||||
|
}
|
||||||
|
|
||||||
|
return implode(', ', $labels);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -97,7 +97,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@foreach ($invoice->items as $item)
|
@foreach ($invoice->items as $item)
|
||||||
<div style="background: #FFFFFF;border: 1px solid #E8E8E8;border-radius: 3px;padding: 20px">
|
<div style="background: #FFFFFF;border: 1px solid #E8E8E8;border-radius: 3px;padding: 20px;margin-bottom: 10px">
|
||||||
<p style="font-size: 18px;color: #242424;line-height: 24px;margin-top: 0;margin-bottom: 10px;font-weight: bold;">
|
<p style="font-size: 18px;color: #242424;line-height: 24px;margin-top: 0;margin-bottom: 10px;font-weight: bold;">
|
||||||
{{ $item->name }}
|
{{ $item->name }}
|
||||||
</p>
|
</p>
|
||||||
|
|
@ -120,11 +120,13 @@
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style="">
|
@if ($html = $item->getOptionDetailHtml())
|
||||||
<label style="margin-top: 10px; font-size: 16px;color: #5E5E5E; display: block;">
|
<div style="">
|
||||||
Color : Gray, Size : S
|
<label style="margin-top: 10px; font-size: 16px;color: #5E5E5E; display: block;">
|
||||||
</label>
|
{{ $html }}
|
||||||
</div>
|
</label>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
</div>
|
</div>
|
||||||
@endforeach
|
@endforeach
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@foreach ($order->items as $item)
|
@foreach ($order->items as $item)
|
||||||
<div style="background: #FFFFFF;border: 1px solid #E8E8E8;border-radius: 3px;padding: 20px">
|
<div style="background: #FFFFFF;border: 1px solid #E8E8E8;border-radius: 3px;padding: 20px;margin-bottom: 10px">
|
||||||
<p style="font-size: 18px;color: #242424;line-height: 24px;margin-top: 0;margin-bottom: 10px;font-weight: bold;">
|
<p style="font-size: 18px;color: #242424;line-height: 24px;margin-top: 0;margin-bottom: 10px;font-weight: bold;">
|
||||||
{{ $item->name }}
|
{{ $item->name }}
|
||||||
</p>
|
</p>
|
||||||
|
|
@ -118,11 +118,13 @@
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style="">
|
@if ($html = $item->getOptionDetailHtml())
|
||||||
<label style="margin-top: 10px; font-size: 16px;color: #5E5E5E; display: block;">
|
<div style="">
|
||||||
Color : Gray, Size : S
|
<label style="margin-top: 10px; font-size: 16px;color: #5E5E5E; display: block;">
|
||||||
</label>
|
{{ $html }}
|
||||||
</div>
|
</label>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
</div>
|
</div>
|
||||||
@endforeach
|
@endforeach
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -107,7 +107,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@foreach ($shipment->items as $item)
|
@foreach ($shipment->items as $item)
|
||||||
<div style="background: #FFFFFF;border: 1px solid #E8E8E8;border-radius: 3px;padding: 20px">
|
<div style="background: #FFFFFF;border: 1px solid #E8E8E8;border-radius: 3px;padding: 20px;margin-bottom: 10px">
|
||||||
<p style="font-size: 18px;color: #242424;line-height: 24px;margin-top: 0;margin-bottom: 10px;font-weight: bold;">
|
<p style="font-size: 18px;color: #242424;line-height: 24px;margin-top: 0;margin-bottom: 10px;font-weight: bold;">
|
||||||
{{ $item->name }}
|
{{ $item->name }}
|
||||||
</p>
|
</p>
|
||||||
|
|
@ -130,11 +130,13 @@
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style="">
|
@if ($html = $item->getOptionDetailHtml())
|
||||||
<label style="margin-top: 10px; font-size: 16px;color: #5E5E5E; display: block;">
|
<div style="">
|
||||||
Color : Gray, Size : S
|
<label style="margin-top: 10px; font-size: 16px;color: #5E5E5E; display: block;">
|
||||||
</label>
|
{{ $html }}
|
||||||
</div>
|
</label>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
</div>
|
</div>
|
||||||
@endforeach
|
@endforeach
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,79 +1,84 @@
|
||||||
@inject ('reviewHelper', 'Webkul\Product\Helpers\Review')
|
@inject ('reviewHelper', 'Webkul\Product\Helpers\Review')
|
||||||
|
|
||||||
@if ($total = $reviewHelper->getTotalReviews($product))
|
@if ($total = $reviewHelper->getTotalReviews($product))
|
||||||
<div class="rating-reviews">
|
<div class="rating-reviews">
|
||||||
<div class="rating-header">
|
<div class="rating-header">
|
||||||
{{ __('shop::app.products.reviews-title') }}
|
{{ __('shop::app.products.reviews-title') }}
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="overall">
|
|
||||||
<div class="review-info">
|
|
||||||
|
|
||||||
<span class="number">
|
|
||||||
{{ $reviewHelper->getAverageRating($product) }}
|
|
||||||
</span>
|
|
||||||
|
|
||||||
<span class="stars">
|
|
||||||
@for ($i = 1; $i <= round($reviewHelper->getAverageRating($product)); $i++)
|
|
||||||
|
|
||||||
<span class="icon star-icon"></span>
|
|
||||||
|
|
||||||
@endfor
|
|
||||||
</span>
|
|
||||||
|
|
||||||
<div class="total-reviews">
|
|
||||||
{{ __('shop::app.products.total-reviews', ['total' => $total]) }}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@if(!is_null($customer))
|
<div class="overall">
|
||||||
<a href="{{ route('shop.reviews.create', $product->url_key) }}" class="btn btn-lg btn-primary">
|
<div class="review-info">
|
||||||
{{ __('shop::app.products.write-review-btn') }}
|
|
||||||
</a>
|
|
||||||
@endif
|
|
||||||
|
|
||||||
</div>
|
<span class="number">
|
||||||
|
{{ $reviewHelper->getAverageRating($product) }}
|
||||||
<div class="reviews">
|
</span>
|
||||||
|
|
||||||
@foreach ($reviewHelper->getReviews($product)->paginate(10) as $review)
|
|
||||||
<div class="review">
|
|
||||||
<div class="title">
|
|
||||||
{{ $review->title }}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<span class="stars">
|
<span class="stars">
|
||||||
@for ($i = 1; $i <= $review->rating; $i++)
|
@for ($i = 1; $i <= round($reviewHelper->getAverageRating($product)); $i++)
|
||||||
|
|
||||||
<span class="icon star-icon"></span>
|
<span class="icon star-icon"></span>
|
||||||
|
|
||||||
@endfor
|
@endfor
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<div class="message">
|
<div class="total-reviews">
|
||||||
{{ $review->comment }}
|
{{ __('shop::app.products.total-reviews', ['total' => $total]) }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="reviewer-details">
|
|
||||||
<span class="by">
|
|
||||||
{{ __('shop::app.products.by', ['name' => $review->customer->name]) }},
|
|
||||||
</span>
|
|
||||||
|
|
||||||
<span class="when">
|
|
||||||
{{ core()->formatDate($review->created_at) }}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
@endforeach
|
|
||||||
|
|
||||||
<a href="{{ route('shop.reviews.index', $product->url_key) }}" class="view-all">View All</a>
|
@if(!is_null($customer))
|
||||||
|
<a href="{{ route('shop.reviews.create', $product->url_key) }}" class="btn btn-lg btn-primary">
|
||||||
|
{{ __('shop::app.products.write-review-btn') }}
|
||||||
|
</a>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="reviews">
|
||||||
|
|
||||||
|
@foreach ($reviewHelper->getReviews($product)->paginate(10) as $review)
|
||||||
|
<div class="review">
|
||||||
|
<div class="title">
|
||||||
|
{{ $review->title }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<span class="stars">
|
||||||
|
@for ($i = 1; $i <= $review->rating; $i++)
|
||||||
|
|
||||||
|
<span class="icon star-icon"></span>
|
||||||
|
|
||||||
|
@endfor
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<div class="message">
|
||||||
|
{{ $review->comment }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="reviewer-details">
|
||||||
|
<span class="by">
|
||||||
|
{{ __('shop::app.products.by', ['name' => $review->customer->name]) }},
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<span class="when">
|
||||||
|
{{ core()->formatDate($review->created_at) }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endforeach
|
||||||
|
|
||||||
|
<a href="{{ route('shop.reviews.index', $product->url_key) }}" class="view-all">View All</a>
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
@else
|
@else
|
||||||
@if(!is_null($customer))
|
@if(!is_null($customer))
|
||||||
<a href="{{ route('shop.reviews.create', $product->url_key) }}" class="btn btn-lg btn-primary">
|
<div class="rating-reviews">
|
||||||
{{ __('shop::app.products.write-review-btn') }}
|
<div class="rating-header">
|
||||||
</a>
|
<a href="{{ route('shop.reviews.create', $product->url_key) }}" class="btn btn-lg btn-primary">
|
||||||
|
{{ __('shop::app.products.write-review-btn') }}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@endif
|
@endif
|
||||||
@endif
|
@endif
|
||||||
|
|
@ -81,6 +81,7 @@ h2 {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
||||||
font: inherit;
|
font: inherit;
|
||||||
|
display: inline-block;
|
||||||
|
|
||||||
&:hover,
|
&:hover,
|
||||||
&:active,
|
&:active,
|
||||||
|
|
@ -586,11 +587,11 @@ h2 {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.accordian {
|
.accordian, accordian {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
.accordian-header {
|
.accordian-header, div[slot*="header"] {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
|
|
@ -620,7 +621,7 @@ h2 {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.accordian-content {
|
.accordian-content, div[slot*="body"] {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 20px 15px;
|
padding: 20px 15px;
|
||||||
display: none;
|
display: none;
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue