assets compiled for product

This commit is contained in:
Prashant Singh 2019-02-04 15:18:20 +05:30
commit 8b3bf5a6ab
25 changed files with 225 additions and 43305 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
{
"/js/admin.js": "/js/admin.js?id=da5ebef9c25a064e7ed6",
"/css/admin.css": "/css/admin.css?id=f9b723e338ec03ec5c50"
}
"/js/admin.js": "/js/admin.js?id=7683c8f127f6ad2ac3ce",
"/css/admin.css": "/css/admin.css?id=7381eeebea31109e7088"
}

View File

@ -74,7 +74,7 @@ class CustomerReviewDataGrid extends DataGrid
'wrapper' => function ($value) {
if ($value->product_review_status == 'approved')
return '<span class="badge badge-md badge-success">Approved</span>';
else if ($value == "pending")
else if ($value->product_review_status == "pending")
return '<span class="badge badge-md badge-warning">Pending</span>';
},
]);

View File

@ -19,7 +19,9 @@ class OrderDataGrid extends DataGrid
public function prepareQueryBuilder()
{
$queryBuilder = DB::table('orders')->select('id', 'base_sub_total', 'base_grand_total', 'created_at', 'channel_name', 'status')->addSelect(DB::raw('CONCAT(customer_first_name, " ", customer_last_name) as full_name'));
$queryBuilder = DB::table('orders')
->select('id', 'base_sub_total', 'base_grand_total', 'created_at', 'channel_name', 'status')
->addSelect(DB::raw('CONCAT(customer_first_name, " ", customer_last_name) as full_name'));
$this->addFilter('full_name', DB::raw('CONCAT(customer_first_name, " ", customer_last_name)'));

View File

@ -761,6 +761,7 @@ return [
'user-define-error' => 'Can not delete system :name',
'attribute-error' => ':name is used in configurable products.',
'attribute-product-error' => ':name is used in products.',
'customer-associate' => ':name can not be deleted because customer is associated with this group.'
'customer-associate' => ':name can not be deleted because customer is associated with this group.',
'currency-delete-error' => 'This currency is set as channel base currency so it can not be deleted.'
],
];

View File

@ -12,7 +12,7 @@
<div class="page-title">
<h1>
<i class="icon angle-left-icon back-link" onclick="history.length > 1 ? history.go(-1) : window.location = '{{ url('/admin/dashboard') }}';"></i>
{{ __('admin::app.catalog.families.edit-title') }}
</h1>
</div>
@ -343,7 +343,7 @@
},
removeAttribute (attribute) {
var confirmDelete = confirm('Are u sure to do this?')
var confirmDelete = confirm('Are you sure to do this?')
if (confirmDelete) {
this.$emit('onAttributeRemove', attribute)

View File

@ -1,8 +1,8 @@
const { mix } = require("laravel-mix");
require("laravel-mix-merge-manifest");
// var publicPath = 'publishable/assets';
var publicPath = "../../../public/vendor/webkul/admin/assets";
var publicPath = 'publishable/assets';
// var publicPath = "../../../public/vendor/webkul/admin/assets";
mix.setPublicPath(publicPath).mergeManifest();
mix.disableNotifications();

View File

@ -19,6 +19,9 @@ class Category extends TranslatableModel
*/
public function image_url()
{
if (! $this->image)
return;
return Storage::url($this->image);
}

View File

@ -145,6 +145,8 @@ class CurrencyController extends Controller
session()->flash('error', trans('admin::app.response.last-delete-error', ['name' => 'Currency']));
} catch (\Exception $e) {
session()->flash('error', $e->getMessage());
session()->flash('error', trans('admin::app.response.currency-delete-error', ['name' => 'Currency']));
}
return redirect()->back();

View File

@ -4,6 +4,7 @@ namespace Webkul\Product\Listeners;
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Webkul\Attribute\Repositories\AttributeRepository;
use Webkul\Attribute\Repositories\AttributeOptionRepository;
use Webkul\Product\Repositories\ProductFlatRepository;
use Webkul\Product\Repositories\ProductAttributeValueRepository;
@ -18,6 +19,13 @@ use Webkul\Product\Models\ProductAttributeValue;
*/
class ProductFlat
{
/**
* AttributeRepository Repository Object
*
* @var object
*/
protected $attributeRepository;
/**
* AttributeOptionRepository Repository Object
*
@ -63,17 +71,21 @@ class ProductFlat
/**
* Create a new listener instance.
*
* @param Webkul\Attribute\Repositories\AttributeRepository $attributeRepository
* @param Webkul\Attribute\Repositories\AttributeOptionRepository $attributeOptionRepository
* @param Webkul\Product\Repositories\ProductFlatRepository $productFlatRepository
* @param Webkul\Product\Repositories\ProductAttributeValueRepository $productAttributeValueRepository
* @return void
*/
public function __construct(
AttributeRepository $attributeRepository,
AttributeOptionRepository $attributeOptionRepository,
ProductFlatRepository $productFlatRepository,
ProductAttributeValueRepository $productAttributeValueRepository
)
{
$this->attributeRepository = $attributeRepository;
$this->attributeOptionRepository = $attributeOptionRepository;
$this->productAttributeValueRepository = $productAttributeValueRepository;
@ -105,8 +117,10 @@ class ProductFlat
}
}
public function afterAttributeDeleted($attribute)
public function afterAttributeDeleted($attributeId)
{
$attribute = $this->attributeRepository->find($attributeId);
if (Schema::hasTable('product_flat')) {
if (Schema::hasColumn('product_flat', strtolower($attribute->code))) {
Schema::table('product_flat', function (Blueprint $table) use($attribute) {

View File

@ -156,10 +156,6 @@ class ProductRepository extends Repository
$product->update($data);
if (isset($data['categories'])) {
$product->categories()->sync($data['categories']);
}
$attributes = $product->attribute_family->custom_attributes;
foreach ($attributes as $attribute) {
@ -189,38 +185,44 @@ class ProductRepository extends Repository
}
}
$previousVariantIds = $product->variants->pluck('id');
if (request()->route()->getName() != 'admin.catalog.products.massupdate') {
if (isset($data['categories'])) {
$product->categories()->sync($data['categories']);
}
$previousVariantIds = $product->variants->pluck('id');
if (isset($data['variants'])) {
foreach ($data['variants'] as $variantId => $variantData) {
if (str_contains($variantId, 'variant_')) {
$permutation = [];
foreach ($product->super_attributes as $superAttribute) {
$permutation[$superAttribute->id] = $variantData[$superAttribute->code];
if (isset($data['variants'])) {
foreach ($data['variants'] as $variantId => $variantData) {
if (str_contains($variantId, 'variant_')) {
$permutation = [];
foreach ($product->super_attributes as $superAttribute) {
$permutation[$superAttribute->id] = $variantData[$superAttribute->code];
}
$this->createVariant($product, $permutation, $variantData);
} else {
if (is_numeric($index = $previousVariantIds->search($variantId))) {
$previousVariantIds->forget($index);
}
$variantData['channel'] = $data['channel'];
$variantData['locale'] = $data['locale'];
$this->updateVariant($variantData, $variantId);
}
$this->createVariant($product, $permutation, $variantData);
} else {
if (is_numeric($index = $previousVariantIds->search($variantId))) {
$previousVariantIds->forget($index);
}
$variantData['channel'] = $data['channel'];
$variantData['locale'] = $data['locale'];
$this->updateVariant($variantData, $variantId);
}
}
foreach ($previousVariantIds as $variantId) {
$this->delete($variantId);
}
$this->productInventory->saveInventories($data, $product);
$this->productImage->uploadImages($data, $product);
}
foreach ($previousVariantIds as $variantId) {
$this->delete($variantId);
}
$this->productInventory->saveInventories($data, $product);
$this->productImage->uploadImages($data, $product);
Event::fire('catalog.product.update.after', $product);
return $product;
@ -385,6 +387,9 @@ class ProductRepository extends Repository
$matchCount = 0;
foreach ($superAttributeCodes as $attributeCode) {
if (! isset($data[$attributeCode]))
return false;
if ($data[$attributeCode] == $variant->{$attributeCode})
$matchCount++;
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
{
"/js/shop.js": "/js/shop.js",
"/css/shop.css": "/css/shop.css"
"/js/shop.js": "/js/shop.js?id=0076f480705e7ce1f8e0",
"/css/shop.css": "/css/shop.css?id=69d51d46b4e6507c42ab"
}

View File

@ -823,12 +823,13 @@ section.slider-block {
}
}
.cart-link {
pointer-events: none;
.cart-dropdown-container {
border-right: 0;
padding-right: 0;
}
.search-box, .menu-box {
display: none;
.cart-link {
pointer-events: none;
}
ul.dropdown-list {
@ -967,6 +968,10 @@ section.slider-block {
}
}
}
.search-box, .menu-box {
display: none;
}
}
}
@ -1093,29 +1098,21 @@ section.slider-block {
.search-content {
border-bottom: 1px solid $border-color;
height: 48px;
border-top: 1px solid $border-color;
height: 50px;
display: flex;
align-items: center;
justify-content: space-between;
.search {
width: 70%;
margin-left: 20px;
height: 30px;
width: 80%;
border: none;
font-size: 16px;
position: absolute;
}
.right {
float: right;
}
.suggestion {
position: absolute;
margin-left:20px;
}
}
.search-content:first-child {
border-top: 1px solid $border-color;
}
}
}
@ -1128,6 +1125,18 @@ section.slider-block {
.header-top {
div.right-content {
display: inherit;
.menu-box {
display: inline-block;
margin-left:10px;
}
.search-box {
display: inline-block;
margin-right: 10px;
}
.right-content-menu {
> li {
border-right: none;
@ -1142,14 +1151,10 @@ section.slider-block {
pointer-events: all;
}
.arrow-down-icon, .name, .account-text {
.arrow-down-icon, .name {
display: none;
}
.search-box, .menu-box {
display: inline-block;
}
.cart-dropdown-container {
.dropdown-container {
display: none;
@ -1845,7 +1850,8 @@ section.product-detail {
margin-right: 0px;
max-width: none;
width: auto;
// height: auto;
min-height: 400px;
height: auto;
.loader {
margin-left: 47%;
@ -1855,7 +1861,7 @@ section.product-detail {
flex-direction: column-reverse;
.thumb-list {
height: 120px !important;
margin-top: 5px;
flex-direction: row;
overflow-x: scroll;
@ -1911,18 +1917,6 @@ section.product-detail {
}
}
@media only screen and (max-width: 480px) {
section.product-detail div.layouter .form-container .details {
margin-top: 0px;
}
}
@media only screen and (max-width: 360px) {
section.product-detail div.layouter .form-container .details {
margin-top: -120px;
}
}
//product pages responsive css end here
//rating and reviews of product pages
@ -2156,7 +2150,7 @@ section.cart {
}
// cart pages responsive css start
@media only screen and (max-width: 770px) {
@media only screen and (max-width: 815px) {
section.cart {
.cart-content {
display: block;
@ -2167,7 +2161,8 @@ section.cart {
.misc-controls {
position: relative;
top: 200px;
top: 180px;
margin-top: 0px;
}
}
@ -2181,15 +2176,15 @@ section.cart {
}
}
@media only screen and (max-width: 560px) {
@media only screen and (max-width: 600px) {
section.cart {
.cart-content {
.left-side {
.cart-item-list {
.item {
.item-image {
height: 90px;
width: 90px;
height: 120px;
width: 120px;
}
.item-details .misc {
display: flex;
@ -2198,47 +2193,53 @@ section.cart {
}
}
}
.misc-controls {
display: block;
top: 180px;
div {
margin-top: 10px;
}
}
}
.right-side {
top: -80px;
}
}
}
}
@media only screen and (max-width: 386px) {
@media only screen and (max-width: 574px) {
section.cart {
.cart-content {
.left-side {
.misc-controls div {
button {
width: 100%;
}
.misc-controls {
display: block;
top:160px;
a {
margin-top: 10px;
width: 100%;
text-align: center;
}
}
div {
button {
width: 100%;
margin-top: 10px;
}
.box, .remove{
margin-right: 15px !important;
a {
margin-top: 10px;
width: 100%;
text-align: center;
}
}
}
}
.right-side {
top: -130px;
top: -120px;
}
}
}
}
@media only screen and (max-width: 400px) {
section.cart {
.cart-content {
.left-side {
.cart-item-list {
.item {
.item-image {
height: 85px;
width: 85px;
}
}
}
}
}
}
@ -2728,8 +2729,6 @@ section.review {
margin-left: 0px;
.heading {
margin-bottom: 70px;
.right {
margin-top: 50px;
}
@ -2846,6 +2845,10 @@ section.review {
.menu-block-title {
padding-bottom: 10px;
font-size: 18px;
.right {
display: none;
}
}
.menubar {
@ -3002,31 +3005,40 @@ section.review {
.account-content {
flex-direction: column;
.account-side-menu {
display: none;
width:100%;
border: none;
.sidebar {
width: 100%;
li {
margin-left: 0%;
width: 100%;
.menu-block {
.menu-block-title {
height: 50px;
padding-top: 13px;
border-bottom: 1px solid $border-color;
border-top: 1px solid $border-color;
a {
color : $font-color;
.right {
display: block;
float: right;
align-self: center;
}
}
}
}
.responsive-side-menu {
cursor: pointer;
padding-top:13px;
display: block !important;
height: 46px;
border-bottom: 1px solid $border-color;
border-top: 1px solid $border-color;
.menubar {
border: 0;
display: none;
.right {
float: right;
> li {
margin-left: 0;
width: 100%;
.icon {
right: 0px;
}
}
> li:last-child {
border-bottom: 1px solid $border-color;
}
}
}
}
@ -3039,7 +3051,7 @@ section.review {
justify-content: space-between;
border-bottom: 1px solid $border-color;
border-top: 1px solid $border-color;
height: 46px;
height: 50px;
.account-action {
margin-top: 12px;
@ -3051,7 +3063,7 @@ section.review {
}
span {
margin-top: 12px;
margin-top: 13px;
font-size: 18px;
}
@ -3193,6 +3205,9 @@ section.review {
.sale-container {
.sale-section {
.section-content {
border-bottom: none;
padding: 10px 0;
.row {
display: flex;
flex-direction: column;
@ -3203,6 +3218,8 @@ section.review {
}
.totals {
border-top: none;
.sale-summary {
width: 100%;
@ -3223,6 +3240,10 @@ section.review {
margin: 10px auto;
}
}
.qty-row {
display: inline;
}
}
}
}
@ -3667,34 +3688,6 @@ section.review {
display: flex;
}
}
@media only screen and (max-width: 770px) {
.account-content {
.account-layout {
margin-right: 0px;
.account-head {
.account-action {
margin-right: 15px;
margin-left: 0px;
}
.back-icon {
transform: rotate(180deg);
margin-bottom: 10px;
}
}
}
.responsive-side-menu .right {
float: left;
}
.account-side-menu li {
margin-right: 0%;
}
}
}
//customer page end here
// footer start

View File

@ -1,14 +1,10 @@
<div class="responsive-side-menu" id="responsive-side-menu" style="display: none">
{{ __('shop::app.customer.account.menu') }}
<i class="icon icon-arrow-down right" id="down-icon"></i>
</div>
<div class="sidebar">
@foreach ($menu->items as $menuItem)
<div class="menu-block">
<div class="menu-block-title">
{{ trans($menuItem['name']) }}
<i class="icon icon-arrow-down right" id="down-icon"></i>
</div>
<div class="menu-block-content">
@ -31,11 +27,10 @@
@push('scripts')
<script>
$(document).ready(function() {
var sideMenuTitle = document.getElementById("responsive-side-menu");
var downIcon = document.getElementById("down-icon");
var accountSideMenu = document.getElementsByClassName("account-side-menu");
var accountSideMenu = document.getElementsByClassName("menubar");
sideMenuTitle.addEventListener("click", function() {
downIcon.addEventListener("click", function() {
if (downIcon.className == 'icon icon-arrow-down right') {
for(let i=0 ; i < accountSideMenu.length ; i++) {
accountSideMenu[i].style.display="block";

View File

@ -28,10 +28,12 @@
</ul>
</div>
<div class="right-content">
<ul class="right-content-menu">
<li class="search-box"><span class="icon icon-search" id="search"></span></li>
<div class="right-content">
<span class="search-box"><span class="icon icon-search" id="search"></span></span>
<ul class="right-content-menu">
{!! view_render_event('bagisto.shop.layout.header.currency-item.before') !!}
@ -62,7 +64,7 @@
<span class="dropdown-toggle">
<i class="icon account-icon"></i>
<span class="account-text">{{ __('shop::app.header.account') }}</span>
<span class="name">{{ __('shop::app.header.account') }}</span>
<i class="icon arrow-down-icon"></i>
</span>
@ -137,8 +139,9 @@
{!! view_render_event('bagisto.shop.layout.header.cart-item.after') !!}
<li class="menu-box" ><span class="icon icon-menu" id="hammenu"></span></li>
</ul>
<span class="menu-box" ><span class="icon icon-menu" id="hammenu"></span>
</div>
</div>
@ -149,20 +152,13 @@
<div class="search-responsive mt-10" id="search-responsive">
<form role="search" action="{{ route('shop.search.index') }}" method="GET" style="display: inherit;">
<div class="search-content">
<button class="" style="background: none; border: none; padding: 0px;">
<i class="icon icon-search mt-10"></i>
</button>
<input type="search" name="term" class="search mt-5">
<button class="" style="background: none; float: right; border: none; padding: 0px;">
<i class="icon icon-menu-back right mt-10"></i>
<button style="background: none; border: none; padding: 0px;">
<i class="icon icon-search"></i>
</button>
<input type="search" name="term" class="search">
<i class="icon icon-menu-back right"></i>
</div>
</form>
{{-- <div class="search-content">
<i class="icon icon-search mt-10"></i>
<span class="suggestion mt-15">Designer sarees</span>
</div> --}}
</div>
</div>
@ -170,7 +166,7 @@
<script>
$(document).ready(function() {
$('body').delegate('.icon.icon-search, .icon-menu-close, .icon.icon-menu', 'click', function(e) {
$('body').delegate('#search, .icon-menu-close, .icon.icon-menu', 'click', function(e) {
toggleDropdown(e);
});

View File

@ -162,9 +162,11 @@
thumbFrame[i].style.width = (productHeroImage.offsetHeight/4)+ "px";
}
thumbList.style.width = (productHeroImage.offsetHeight/4) + "px";
thumbList.style.minWidth = (productHeroImage.offsetHeight/4) + "px";
thumbList.style.height = productHeroImage.offsetHeight + "px";
if (screen.width > 720) {
thumbList.style.width = (productHeroImage.offsetHeight/4) + "px";
thumbList.style.minWidth = (productHeroImage.offsetHeight/4) + "px";
thumbList.style.height = productHeroImage.offsetHeight + "px";
}
}
window.onresize = function() {
@ -175,9 +177,11 @@
thumbFrame[i].style.width = (productHeroImage.offsetHeight/4)+ "px";
}
thumbList.style.width = (productHeroImage.offsetHeight/4) + "px";
thumbList.style.minWidth = (productHeroImage.offsetHeight/4) + "px";
thumbList.style.height = productHeroImage.offsetHeight + "px";
if (screen.width > 720) {
thumbList.style.width = (productHeroImage.offsetHeight/4) + "px";
thumbList.style.minWidth = (productHeroImage.offsetHeight/4) + "px";
thumbList.style.height = productHeroImage.offsetHeight + "px";
}
}
}
};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
{
"/js/ui.js": "/js/ui.js",
"/css/ui.css": "/css/ui.css"
"/js/ui.js": "/js/ui.js?id=d984bc35663c0fd9cf3f",
"/css/ui.css": "/css/ui.css?id=54c156da88929b5a04ea"
}

View File

@ -9,4 +9,5 @@ $border-color: rgba(162, 162, 162, 0.2);
$filter-toggle-color : #8e8e8e;
$color-white: #ffffff;
$color-black: #000000;
$color-black-shade : #000311;
$color-black-shade : #000311;
$border-color: #e8e8e8;

View File

@ -292,6 +292,7 @@ h2 {
.control-group {
width: 100%;
margin-bottom: 0;
min-width: 140px;
.control {
width: 100%;
@ -320,7 +321,7 @@ h2 {
}
tr {
border: 1px solid #C7C7C7;
border: 1px solid $control-border-color;
}
}
}

View File

@ -1,8 +1,8 @@
const { mix } = require("laravel-mix");
require("laravel-mix-merge-manifest");
// var publicPath = 'publishable/assets';
var publicPath = "../../../public/vendor/webkul/ui/assets";
var publicPath = 'publishable/assets';
// var publicPath = "../../../public/vendor/webkul/ui/assets";
mix.setPublicPath(publicPath).mergeManifest();
mix.disableNotifications();