Merge pull request #2244 from shubhwebkul/velocity-updated
Velocity theme update
This commit is contained in:
commit
f8451ebb84
|
|
@ -1186,6 +1186,10 @@
|
|||
width: 200px !important;
|
||||
}
|
||||
|
||||
.customer-options .customer-session {
|
||||
padding: 10px 20px 0 20px;
|
||||
}
|
||||
|
||||
.customer-options .customer-session label {
|
||||
font-size: 18px;
|
||||
color: #9e9e9e;
|
||||
|
|
@ -1663,6 +1667,13 @@
|
|||
color: #4D7EA8;
|
||||
}
|
||||
|
||||
.account-content .account-layout .account-table-content .filter-row-two .filter-tag .cross-icon::before {
|
||||
top: 1px;
|
||||
content: "\E91F";
|
||||
margin-left: 4px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.account-content .account-layout .account-items-list.wishlist-container {
|
||||
width: 100%;
|
||||
margin: 0 auto;
|
||||
|
|
@ -4261,6 +4272,13 @@ select:focus,
|
|||
color: #F05153;
|
||||
}
|
||||
|
||||
.mandatory::after {
|
||||
content: "*";
|
||||
font-size: 16px;
|
||||
margin-left: -1px;
|
||||
color: #F05153;
|
||||
}
|
||||
|
||||
a.default {
|
||||
color: rgba(0, 0, 0, 0.83) !important;
|
||||
text-decoration: none !important;
|
||||
|
|
@ -4376,7 +4394,7 @@ button[disabled] {
|
|||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.rango-default, .account-content .sidebar .customer-sidebar .navigation li i.icon, .account-content .account-layout .account-table-content #datagrid-filters ~ table.table tbody tr .action .eye-icon, .account-content .account-layout .bottom-toolbar .pagination .page-item.next .angle-right-icon,
|
||||
.rango-default, .account-content .sidebar .customer-sidebar .navigation li i.icon, .account-content .account-layout .account-table-content #datagrid-filters ~ table.table tbody tr .action .eye-icon, .account-content .account-layout .account-table-content .filter-row-two .filter-tag .cross-icon, .account-content .account-layout .bottom-toolbar .pagination .page-item.next .angle-right-icon,
|
||||
.account-content .account-layout .bottom-toolbar .pagination .page-item.next .angle-left-icon, .account-content .account-layout .bottom-toolbar .pagination .page-item.previous .angle-right-icon,
|
||||
.account-content .account-layout .bottom-toolbar .pagination .page-item.previous .angle-left-icon {
|
||||
speak: none;
|
||||
|
|
@ -13634,6 +13652,22 @@ body {
|
|||
justify-content: unset;
|
||||
}
|
||||
|
||||
#top #account + .account-modal .modal-content {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#top #account + .account-modal .modal-content ul li:hover {
|
||||
background-color: #ECECEC;
|
||||
}
|
||||
|
||||
#top #account + .account-modal .modal-content ul li a {
|
||||
padding: 10px 20px;
|
||||
}
|
||||
|
||||
#top #account + .account-modal .modal-content ul li:last-child {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
#top > div:last-child {
|
||||
height: 32px;
|
||||
}
|
||||
|
|
@ -13777,7 +13811,6 @@ header #search-form {
|
|||
height: 40px;
|
||||
margin: 5px 0px;
|
||||
background: #FFFFFF;
|
||||
padding: 4px 1px 0px 0px;
|
||||
}
|
||||
|
||||
header #search-form * {
|
||||
|
|
@ -13857,7 +13890,7 @@ header #search-form #header-search-icon i {
|
|||
|
||||
header .mini-cart-container {
|
||||
height: 50px;
|
||||
padding: 5px 22px;
|
||||
padding: 5px 17px;
|
||||
}
|
||||
|
||||
header .mini-cart-container #mini-cart .mini-cart-content {
|
||||
|
|
|
|||
|
|
@ -1147,7 +1147,8 @@ $(document).ready(function () {
|
|||
'navContainer': false,
|
||||
'responsiveSidebarTemplate': '',
|
||||
'responsiveSidebarKey': Math.random(),
|
||||
'sharedRootCategories': []
|
||||
'sharedRootCategories': [],
|
||||
'imageObserver': null
|
||||
};
|
||||
},
|
||||
|
||||
|
|
@ -1271,6 +1272,7 @@ $(document).ready(function () {
|
|||
this.$validator.localize(document.documentElement.lang);
|
||||
|
||||
this.loadCategories();
|
||||
this.addIntersectionObserver();
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
|
@ -1353,10 +1355,22 @@ $(document).ready(function () {
|
|||
}).catch(function (error) {
|
||||
console.log('failed to load categories');
|
||||
});
|
||||
},
|
||||
|
||||
addIntersectionObserver: function addIntersectionObserver() {
|
||||
this.imageObserver = new IntersectionObserver(function (entries, imgObserver) {
|
||||
entries.forEach(function (entry) {
|
||||
if (entry.isIntersecting) {
|
||||
var lazyImage = entry.target;
|
||||
lazyImage.src = lazyImage.dataset.src;
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// for compilation of html coming from server
|
||||
__WEBPACK_IMPORTED_MODULE_0_vue___default.a.component('vnode-injector', {
|
||||
functional: true,
|
||||
props: ['nodes'],
|
||||
|
|
@ -36538,6 +36552,8 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
|
|||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
|
||||
// compile add to cart html (it contains wishlist component)
|
||||
/* harmony default export */ __webpack_exports__["default"] = ({
|
||||
|
|
@ -36668,11 +36684,12 @@ var render = function() {
|
|||
},
|
||||
[
|
||||
_c("img", {
|
||||
staticClass: "card-img-top",
|
||||
staticClass: "card-img-top lzy_img",
|
||||
attrs: {
|
||||
loading: "lazy",
|
||||
alt: _vm.product.name,
|
||||
src: _vm.product.image,
|
||||
alt: _vm.product.name
|
||||
"data-src": _vm.product.image
|
||||
}
|
||||
})
|
||||
]
|
||||
|
|
|
|||
|
|
@ -1,39 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateVelocityCategoryTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('velocity_category', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
|
||||
$table->integer('category_id')->unsigned()->nullable();
|
||||
$table->foreign('category_id')->references('id')->on('categories')->onDelete('cascade');
|
||||
|
||||
$table->string('icon', 250)->nullable();
|
||||
$table->string('tooltip', 250)->nullable();
|
||||
$table->boolean('status')->default(0);
|
||||
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('velocity_category');
|
||||
}
|
||||
}
|
||||
|
|
@ -24,7 +24,7 @@ class VelocityMetaDataSeeder extends Seeder
|
|||
|
||||
'subscription_bar_content' => '<div class="social-icons col-lg-6"><a href="https://webkul.com" target="_blank" class="unset" rel="noopener noreferrer"><i class="fs24 within-circle rango-facebook" title="facebook"></i> </a> <a href="https://webkul.com" target="_blank" class="unset" rel="noopener noreferrer"><i class="fs24 within-circle rango-twitter" title="twitter"></i> </a> <a href="https://webkul.com" target="_blank" class="unset" rel="noopener noreferrer"><i class="fs24 within-circle rango-linked-in" title="linkedin"></i> </a> <a href="https://webkul.com" target="_blank" class="unset" rel="noopener noreferrer"><i class="fs24 within-circle rango-pintrest" title="Pinterest"></i> </a> <a href="https://webkul.com" target="_blank" class="unset" rel="noopener noreferrer"><i class="fs24 within-circle rango-youtube" title="Youtube"></i> </a> <a href="https://webkul.com" target="_blank" class="unset" rel="noopener noreferrer"><i class="fs24 within-circle rango-instagram" title="instagram"></i></a></div>',
|
||||
|
||||
'product_policy' => '<div class="row col-12 remove-padding-margin"><div class="col-lg-4 col-sm-12 product-policy-wrapper"><div class="card"><div class="policy"><div class="left"><i class="rango-van-ship fs40"></i></div> <div class="right"><span class="font-setting fs20">Free Shippingon Order $20 or More</span></div></div></div></div> <div class="col-lg-4 col-sm-12 product-policy-wrapper"><div class="card"><div class="policy"><div class="left"><i class="rango-exchnage fs40"></i></div> <div class="right"><span class="font-setting fs20">ProductReplace & Return Available </span></div></div></div></div> <div class="col-lg-4 col-sm-12 product-policy-wrapper"><div class="card"><div class="policy"><div class="left"><i class="rango-exchnage fs40"></i></div> <div class="right"><span class="font-setting fs20">ProductExchange and EMI Available </span></div></div></div></div></div>',
|
||||
'product_policy' => '<div class="row col-12 remove-padding-margin"><div class="col-lg-4 col-sm-12 product-policy-wrapper"><div class="card"><div class="policy"><div class="left"><i class="rango-van-ship fs40"></i></div> <div class="right"><span class="font-setting fs20">Free Shippingon Order $20 or More</span></div></div></div></div> <div class="col-lg-4 col-sm-12 product-policy-wrapper"><div class="card"><div class="policy"><div class="left"><i class="rango-exchnage fs40"></i></div> <div class="right"><span class="font-setting fs20">Product Replace & Return Available </span></div></div></div></div> <div class="col-lg-4 col-sm-12 product-policy-wrapper"><div class="card"><div class="policy"><div class="left"><i class="rango-exchnage fs40"></i></div> <div class="right"><span class="font-setting fs20">Product Exchange and EMI Available </span></div></div></div></div></div>',
|
||||
]);
|
||||
|
||||
DB::table('locales')->where('code', 'en')->update([
|
||||
|
|
|
|||
|
|
@ -32,11 +32,20 @@ class AdminHelper
|
|||
return $locale;
|
||||
}
|
||||
|
||||
public function storeCategoryIcon($categoryId)
|
||||
public function storeCategoryIcon($category)
|
||||
{
|
||||
$category = $this->categoryRepository->findOrFail($categoryId);
|
||||
$oldPath = null;
|
||||
$iconName = 'category_icon_path.image_1';
|
||||
|
||||
$uploadedImagePath = $this->uploadImage($category, 'category_icon_path.image_1');
|
||||
if (gettype($category) !== "object") {
|
||||
// getting id on update
|
||||
$iconName = 'category_icon_path.image_0';
|
||||
$category = $this->categoryRepository->findOrFail($category);
|
||||
|
||||
$oldPath = $category->category_icon_path;
|
||||
}
|
||||
|
||||
$uploadedImagePath = $this->uploadImage($category, $iconName, $oldPath);
|
||||
|
||||
if ($uploadedImagePath) {
|
||||
$category->category_icon_path = $uploadedImagePath;
|
||||
|
|
@ -46,7 +55,7 @@ class AdminHelper
|
|||
return $category;
|
||||
}
|
||||
|
||||
public function uploadImage($record, $type)
|
||||
public function uploadImage($record, $type, $oldPath = null)
|
||||
{
|
||||
$request = request();
|
||||
|
||||
|
|
@ -55,11 +64,8 @@ class AdminHelper
|
|||
$dir = 'velocity/' . $type;
|
||||
|
||||
if ($request->hasFile($file)) {
|
||||
if ($type == 'locale_image.image_0' && $record->locale_image) {
|
||||
Storage::delete($record->locale_image);
|
||||
}
|
||||
if ($type == 'category_icon_path.image_1' && $record->category_icon_path) {
|
||||
Storage::delete($record->category_icon_path);
|
||||
if ($oldPath) {
|
||||
Storage::delete($oldPath);
|
||||
}
|
||||
|
||||
$image = $request->file($file)->store($dir);
|
||||
|
|
|
|||
|
|
@ -68,14 +68,17 @@ class ConfigurationController extends Controller
|
|||
}
|
||||
}
|
||||
|
||||
foreach ($params['product_view_images'] as $index => $productViewImage) {
|
||||
if ($productViewImage !== "") {
|
||||
$params['product_view_images'][$index] = $this->uploadImage($productViewImage, $index);
|
||||
if (isset($params['product_view_images'])) {
|
||||
foreach ($params['product_view_images'] as $index => $productViewImage) {
|
||||
if ($productViewImage !== "") {
|
||||
$params['product_view_images'][$index] = $this->uploadImage($productViewImage, $index);
|
||||
}
|
||||
}
|
||||
|
||||
$params['product_view_images'] = json_encode($params['product_view_images']);
|
||||
}
|
||||
|
||||
$params['advertisement'] = json_encode($params['advertisement']);
|
||||
$params['product_view_images'] = json_encode($params['product_view_images']);
|
||||
$params['home_page_content'] = str_replace('=>', '=>', $params['home_page_content']);
|
||||
|
||||
unset($params['images']);
|
||||
|
|
|
|||
|
|
@ -95,7 +95,8 @@ use Webkul\Velocity\Repositories\Product\ProductRepository as VelocityProductRep
|
|||
];
|
||||
} else {
|
||||
$response = [
|
||||
'status' => false
|
||||
'status' => false,
|
||||
'slug' => $slug,
|
||||
];
|
||||
}
|
||||
|
||||
|
|
@ -176,6 +177,22 @@ use Webkul\Velocity\Repositories\Product\ProductRepository as VelocityProductRep
|
|||
];
|
||||
}
|
||||
|
||||
public function fetchFancyCategoryDetails($slug)
|
||||
{
|
||||
$categoryDetails = app('Webkul\Category\Repositories\CategoryRepository')->findByPath($slug);
|
||||
|
||||
if ($categoryDetails) {
|
||||
$response = [
|
||||
'status' => true,
|
||||
'categoryDetails' => $this->getCategoryFilteredData($categoryDetails)
|
||||
];
|
||||
}
|
||||
|
||||
return $response ?? [
|
||||
'status' => false,
|
||||
];
|
||||
}
|
||||
|
||||
private function getCategoryFilteredData($category)
|
||||
{
|
||||
$formattedChildCategory = [];
|
||||
|
|
|
|||
|
|
@ -12,5 +12,7 @@ Route::group(['middleware' => ['web', 'locale', 'theme', 'currency']], function
|
|||
Route::get('/categories', 'ShopController@fetchCategories')->name('velocity.categoriest');
|
||||
|
||||
Route::get('/category-details', 'ShopController@categoryDetails')->name('velocity.category.details');
|
||||
|
||||
Route::get('/fancy-category-details/{slug}', 'ShopController@fetchFancyCategoryDetails')->name('velocity.fancy.category.details');
|
||||
});
|
||||
});
|
||||
|
|
@ -70,9 +70,9 @@ class VelocityServiceProvider extends ServiceProvider
|
|||
*/
|
||||
protected function registerConfig()
|
||||
{
|
||||
$this->mergeConfigFrom(
|
||||
dirname(__DIR__) . '/Config/system.php', 'core'
|
||||
);
|
||||
// $this->mergeConfigFrom(
|
||||
// dirname(__DIR__) . '/Config/system.php', 'core'
|
||||
// );
|
||||
|
||||
$this->mergeConfigFrom(
|
||||
dirname(__DIR__) . '/Config/admin-menu.php', 'menu.admin'
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ class ContentRepository extends Repository
|
|||
{
|
||||
$query = $this->model::orderBy('position', 'ASC');
|
||||
|
||||
$content = $query
|
||||
$contentCollection = $query
|
||||
->select('velocity_contents.*', 'velocity_contents_translations.*')
|
||||
->where('velocity_contents.status', 1)
|
||||
->leftJoin('velocity_contents_translations', 'velocity_contents.id', 'velocity_contents_translations.content_id')
|
||||
|
|
@ -131,6 +131,16 @@ class ContentRepository extends Repository
|
|||
->limit(5)
|
||||
->get();
|
||||
|
||||
return $content;
|
||||
$formattedContent = [];
|
||||
foreach ($contentCollection as $content) {
|
||||
array_push($formattedContent, [
|
||||
'title' => $content->title,
|
||||
'page_link' => $content->page_link,
|
||||
'link_target' => $content->link_target,
|
||||
'content_type' => $content->content_type,
|
||||
]);
|
||||
}
|
||||
|
||||
return $formattedContent;
|
||||
}
|
||||
}
|
||||
|
|
@ -34,9 +34,11 @@
|
|||
<a :href="`${baseUrl}/${product.slug}`" :title="product.name" class="product-image-container">
|
||||
<img
|
||||
loading="lazy"
|
||||
:src="product.image"
|
||||
:alt="product.name"
|
||||
class="card-img-top">
|
||||
:src="product.image"
|
||||
:data-src="product.image"
|
||||
class="card-img-top lzy_img" />
|
||||
<!-- :src="`${$root.baseUrl}/vendor/webkul/ui/assets/images/product/meduim-product-placeholder.png`" /> -->
|
||||
|
||||
<!-- <quick-view-btn details="{{ $product }}"></quick-view-btn> -->
|
||||
</a>
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@ $(document).ready(function () {
|
|||
'responsiveSidebarTemplate': '',
|
||||
'responsiveSidebarKey': Math.random(),
|
||||
'sharedRootCategories': [],
|
||||
'imageObserver': null,
|
||||
}
|
||||
},
|
||||
|
||||
|
|
@ -178,6 +179,7 @@ $(document).ready(function () {
|
|||
this.$validator.localize(document.documentElement.lang);
|
||||
|
||||
this.loadCategories();
|
||||
this.addIntersectionObserver();
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
|
@ -257,10 +259,22 @@ $(document).ready(function () {
|
|||
.catch(error => {
|
||||
console.log('failed to load categories');
|
||||
})
|
||||
},
|
||||
|
||||
addIntersectionObserver: function () {
|
||||
this.imageObserver = new IntersectionObserver((entries, imgObserver) => {
|
||||
entries.forEach((entry) => {
|
||||
if (entry.isIntersecting) {
|
||||
const lazyImage = entry.target
|
||||
lazyImage.src = lazyImage.dataset.src
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// for compilation of html coming from server
|
||||
Vue.component('vnode-injector', {
|
||||
functional: true,
|
||||
props: ['nodes'],
|
||||
|
|
|
|||
|
|
@ -220,6 +220,26 @@ body {
|
|||
.modal-footer {
|
||||
justify-content: unset;
|
||||
}
|
||||
|
||||
.modal-content {
|
||||
padding: 0;
|
||||
|
||||
ul {
|
||||
li {
|
||||
&:hover {
|
||||
background-color: $border-light;
|
||||
}
|
||||
|
||||
a {
|
||||
padding: 10px 20px;
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -374,7 +394,6 @@ header {
|
|||
height: 40px;
|
||||
margin: 5px 0px;
|
||||
background: $white-color;
|
||||
padding: 4px 1px 0px 0px;
|
||||
|
||||
* {
|
||||
height: 100%;
|
||||
|
|
@ -455,7 +474,7 @@ header {
|
|||
|
||||
.mini-cart-container {
|
||||
height: 50px;
|
||||
padding: 5px 22px;
|
||||
padding: 5px 17px;
|
||||
|
||||
#mini-cart {
|
||||
.mini-cart-content {
|
||||
|
|
|
|||
|
|
@ -442,6 +442,8 @@
|
|||
|
||||
|
||||
.customer-session {
|
||||
padding: 10px 20px 0 20px;
|
||||
|
||||
label {
|
||||
font-size: 18px;
|
||||
color: $light-grey-clr;
|
||||
|
|
@ -967,6 +969,21 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.filter-row-two {
|
||||
.filter-tag {
|
||||
.cross-icon {
|
||||
@extend .rango-default;
|
||||
|
||||
&::before {
|
||||
top: 1px;
|
||||
content: "\e91f";
|
||||
margin-left: 4px;
|
||||
position: relative;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.account-items-list {
|
||||
|
|
|
|||
|
|
@ -703,6 +703,12 @@ select:focus,
|
|||
.control-error {
|
||||
color: $color-danger;
|
||||
}
|
||||
.mandatory::after {
|
||||
content: "*";
|
||||
font-size: 16px;
|
||||
margin-left: -1px;
|
||||
color: $color-danger;
|
||||
}
|
||||
|
||||
a {
|
||||
&.default {
|
||||
|
|
|
|||
|
|
@ -75,6 +75,7 @@ return [
|
|||
'custom-title' => 'Custom Title',
|
||||
'custom-heading' => 'Custom Heading',
|
||||
'page-link' => 'Page Link [e.g. http://example.com/../../]',
|
||||
'category-slug' => 'Category Slug',
|
||||
'link-target' => 'Page Link Target',
|
||||
'catalog-type' => 'Product Catalog Type',
|
||||
'custom-product' => 'Store Products',
|
||||
|
|
@ -229,6 +230,7 @@ return [
|
|||
'write-your-review' => 'Write Your Review',
|
||||
'quick-view' => 'Quick View',
|
||||
'recently-viewed' => 'Recently Viewed Products',
|
||||
'not-available' => 'Not Available',
|
||||
'review-by' => 'Review by',
|
||||
'be-first-review' => 'Be the first to write a review',
|
||||
'submit-review' => 'Submit Review',
|
||||
|
|
|
|||
|
|
@ -0,0 +1,38 @@
|
|||
|
||||
{!! view_render_event('bagisto.admin.content.create_form_accordian.content.link.before') !!}
|
||||
|
||||
<div class="control-group" :class="[errors.has('page_link') ? 'has-error' : '']">
|
||||
<label for="page_link" class="required">
|
||||
{{ __('velocity::app.admin.contents.content.category-slug') }}
|
||||
</label>
|
||||
|
||||
<input
|
||||
type="text"
|
||||
id="page_link"
|
||||
class="control"
|
||||
name="page_link"
|
||||
v-validate="'required|max:150'"
|
||||
value="{{ isset($locale) ? (old($locale)['page_link'] ?: $content->translate($locale)['page_link']) : '' }}"
|
||||
data-vv-as=""{{ __('velocity::app.admin.contents.content.page-link') }}"" />
|
||||
|
||||
<span class="control-error" v-if="errors.has('page_link')">
|
||||
@{{ errors.first('page_link') }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label for="link_target">
|
||||
{{ __('velocity::app.admin.contents.content.link-target') }}
|
||||
</label>
|
||||
|
||||
<select class="control" id="link_target" name="link_target" value="">
|
||||
<option value="0">
|
||||
{{ __('velocity::app.admin.contents.self') }}
|
||||
</option>
|
||||
<option value="1">
|
||||
{{ __('velocity::app.admin.contents.new-tab') }}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.admin.content.create_form_accordian.content.link.after') !!}
|
||||
|
|
@ -56,12 +56,12 @@
|
|||
<div class="control-group" :class="[errors.has('status') ? 'has-error' : '']">
|
||||
<label for="status" class="required">{{ __('velocity::app.admin.contents.page.status') }}</label>
|
||||
<select class="control" v-validate="'required'" id="status" name="status" data-vv-as=""{{ __('velocity::app.admin.contents.page.status') }}"">
|
||||
<option value="0">
|
||||
{{ __('velocity::app.admin.contents.inactive') }}
|
||||
</option>
|
||||
<option value="1">
|
||||
{{ __('velocity::app.admin.contents.active') }}
|
||||
</option>
|
||||
<option value="0">
|
||||
{{ __('velocity::app.admin.contents.inactive') }}
|
||||
</option>
|
||||
</select>
|
||||
<span class="control-error" v-if="errors.has('status')">@{{ errors.first('status') }}</span>
|
||||
</div>
|
||||
|
|
@ -141,11 +141,14 @@
|
|||
<div v-else-if="content_type == 'static'">
|
||||
@include ('velocity::admin.content.content-type.static')
|
||||
</div>
|
||||
<div v-else-if="content_type == 'category'">
|
||||
@include ('velocity::admin.content.content-type.category')
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</script>
|
||||
|
||||
<script>
|
||||
<script type="text/javascript">
|
||||
Vue.component('content-type', {
|
||||
template: '#content-type-template',
|
||||
|
||||
|
|
@ -158,10 +161,9 @@
|
|||
},
|
||||
methods: {
|
||||
loadFields(event) {
|
||||
var thisthis = this;
|
||||
thisthis.content_type = event.target.value;
|
||||
this.content_type = event.target.value;
|
||||
|
||||
if ( thisthis.content_type == 'static') {
|
||||
if (this.content_type == 'static') {
|
||||
$(document).ready(function () {
|
||||
tinymce.init({
|
||||
selector: 'textarea#description',
|
||||
|
|
|
|||
|
|
@ -276,6 +276,10 @@
|
|||
|
||||
{!! view_render_event('bagisto.admin.content.edit_form_accordian.content.static.after', ['content' => $content]) !!}
|
||||
</div>
|
||||
|
||||
<div v-else-if="content_type == 'category'">
|
||||
@include ('velocity::admin.content.content-type.category')
|
||||
</div>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
|
|
|
|||
|
|
@ -130,22 +130,22 @@
|
|||
</image-wrapper>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
{{-- <div class="control-group">
|
||||
<label>{{ __('velocity::app.admin.meta-data.advertisement-one') }}</label>
|
||||
|
||||
<image-wrapper
|
||||
:button-label="'{{ __('admin::app.catalog.products.add-image-btn-title') }}'"
|
||||
input-name="images[1]">
|
||||
</image-wrapper>
|
||||
</div>
|
||||
</div> --}}
|
||||
|
||||
<div class="control-group product-view-image">
|
||||
{{-- <div class="control-group product-view-image">
|
||||
<label>{{ __('velocity::app.admin.meta-data.product-view-image') }}</label>
|
||||
|
||||
<image-wrapper
|
||||
input-name="product_view_images">
|
||||
</image-wrapper>
|
||||
</div>
|
||||
</div> --}}
|
||||
</div>
|
||||
</accordian>
|
||||
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@
|
|||
name="term"
|
||||
type="search"
|
||||
class="form-control"
|
||||
:value="searchedQuery.term"
|
||||
:value="searchedQuery.term ? searchedQuery.term.split('+').join(' ') : ''"
|
||||
placeholder="{{ __('velocity::app.header.search-text') }}" />
|
||||
|
||||
<button class="btn" type="submit" id="header-search-icon">
|
||||
|
|
@ -503,7 +503,7 @@
|
|||
<a
|
||||
v-text="content.title"
|
||||
:href="`${$root.baseUrl}/${content['page_link']}`"
|
||||
v-if="(content['content_type'] == 'link')"
|
||||
v-if="(content['content_type'] == 'link' || content['content_type'] == 'category')"
|
||||
:target="content['link_target'] ? '_blank' : '_self'">
|
||||
</a>
|
||||
</li>
|
||||
|
|
|
|||
|
|
@ -117,7 +117,11 @@
|
|||
@endauth
|
||||
|
||||
<a
|
||||
class="unset ml30"
|
||||
class="unset
|
||||
@auth('customer')
|
||||
ml30
|
||||
@endauth
|
||||
"
|
||||
href="{{ route('shop.checkout.cart.remove', ['id' => $item->id]) }}"
|
||||
onclick="removeLink('{{ __('shop::app.checkout.cart.cart-remove-action') }}')">
|
||||
|
||||
|
|
|
|||
|
|
@ -20,6 +20,24 @@
|
|||
|
||||
{!! view_render_event('bagisto.shop.customers.account.address.create_form_controls.before') !!}
|
||||
|
||||
<div class="control-group" :class="[errors.has('company_name') ? 'has-error' : '']">
|
||||
<label for="company_name">{{ __('shop::app.customer.account.address.create.company_name') }}</label>
|
||||
<input value="<?= old('company_name'); ?>" type="text" class="control" name="company_name" data-vv-as=""{{ __('shop::app.customer.account.address.create.company_name') }}"">
|
||||
<span class="control-error" v-if="errors.has('company_name')">@{{ errors.first('company_name') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="control-group" :class="[errors.has('first_name') ? 'has-error' : '']">
|
||||
<label for="first_name" class="required">{{ __('shop::app.customer.account.address.create.first_name') }}</label>
|
||||
<input value="<?= old('first_name'); ?>" type="text" class="control" name="first_name" v-validate="'required'" data-vv-as=""{{ __('shop::app.customer.account.address.create.first_name') }}"">
|
||||
<span class="control-error" v-if="errors.has('first_name')">@{{ errors.first('first_name') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="control-group" :class="[errors.has('last_name') ? 'has-error' : '']">
|
||||
<label for="last_name" class="required">{{ __('shop::app.customer.account.address.create.last_name') }}</label>
|
||||
<input value="<?= old('last_name'); ?>" type="text" class="control" name="last_name" v-validate="'required'" data-vv-as=""{{ __('shop::app.customer.account.address.create.last_name') }}"">
|
||||
<span class="control-error" v-if="errors.has('last_name')">@{{ errors.first('last_name') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="control-group" :class="[errors.has('address1[]') ? 'has-error' : '']">
|
||||
<label for="address_0" class="required">{{ __('shop::app.customer.account.address.create.street-address') }}</label>
|
||||
<input type="text" class="control" name="address1[]" id="address_0" v-validate="'required'" data-vv-as=""{{ __('shop::app.customer.account.address.create.street-address') }}"">
|
||||
|
|
@ -61,9 +79,7 @@
|
|||
{{ __('shop::app.customer.account.address.create.submit') }}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.address.create.after') !!}
|
||||
|
|
|
|||
|
|
@ -24,6 +24,24 @@
|
|||
|
||||
<?php $addresses = explode(PHP_EOL, $address->address1); ?>
|
||||
|
||||
<div class="control-group" :class="[errors.has('company_name') ? 'has-error' : '']">
|
||||
<label for="company_name">{{ __('shop::app.customer.account.address.edit.company_name') }}</label>
|
||||
<input type="text" value="{{ $address->company_name }}" class="control" name="company_name" data-vv-as=""{{ __('shop::app.customer.account.address.edit.company_name') }}"">
|
||||
<span class="control-error" v-if="errors.has('company_name')">@{{ errors.first('company_name') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="control-group" :class="[errors.has('first_name') ? 'has-error' : '']">
|
||||
<label for="first_name" class="required">{{ __('shop::app.customer.account.address.create.first_name') }}</label>
|
||||
<input type="text" class="control" name="first_name" v-validate="'required'" value="{{ $address->first_name }}" data-vv-as=""{{ __('shop::app.customer.account.address.create.first_name') }}"">
|
||||
<span class="control-error" v-if="errors.has('first_name')">@{{ errors.first('first_name') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="control-group" :class="[errors.has('last_name') ? 'has-error' : '']">
|
||||
<label for="last_name" class="required">{{ __('shop::app.customer.account.address.create.last_name') }}</label>
|
||||
<input type="text" class="control" name="last_name" v-validate="'required'" value="{{ $address->last_name }}" data-vv-as=""{{ __('shop::app.customer.account.address.create.last_name') }}"">
|
||||
<span class="control-error" v-if="errors.has('last_name')">@{{ errors.first('last_name') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="control-group" :class="[errors.has('address1[]') ? 'has-error' : '']">
|
||||
<label for="address_0" class="required">{{ __('shop::app.customer.account.address.edit.street-address') }}</label>
|
||||
<input type="text" class="control" name="address1[]" id="address_0" v-validate="'required'" value="{{ isset($addresses[0]) ? $addresses[0] : '' }}" data-vv-as=""{{ __('shop::app.customer.account.address.create.street-address') }}"">
|
||||
|
|
|
|||
|
|
@ -34,10 +34,10 @@
|
|||
<div class="col-lg-4 col-md-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title fw6">{{ auth()->guard('customer')->user()->name }} {{ $address->name }}</h5>
|
||||
<h5 class="card-title fw6">{{ $address->first_name }} {{ $address->last_name }}</h5>
|
||||
|
||||
<ul type="none">
|
||||
{{-- <li>{{ $address->name }}</li> --}}
|
||||
{{-- <li>{{ $address->company_name }}</li> --}}
|
||||
<li>{{ $address->address1 }},</li>
|
||||
<li>{{ $address->city }},</li>
|
||||
<li>{{ $address->state }},</li>
|
||||
|
|
|
|||
|
|
@ -30,12 +30,13 @@
|
|||
@csrf
|
||||
|
||||
<div class="row">
|
||||
<label class="col-12">
|
||||
<label class="col-12 mandatory">
|
||||
{{ __('shop::app.customer.account.profile.fname') }}
|
||||
</label>
|
||||
|
||||
<div class="col-12">
|
||||
<input value="{{ $customer->first_name }}" name="first_name" type="text" />
|
||||
<input value="{{ $customer->first_name }}" name="first_name" type="text" v-validate="'required'" />
|
||||
<span class="control-error" v-if="errors.has('first_name')">@{{ errors.first('first_name') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -109,12 +110,13 @@
|
|||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label class="col-12">
|
||||
<label class="col-12 mandatory">
|
||||
{{ __('shop::app.customer.account.profile.email') }}
|
||||
</label>
|
||||
|
||||
<div class="col-12">
|
||||
<input value="{{ $customer->email }}" name="email" type="text" />
|
||||
<input value="{{ $customer->email }}" name="email" type="text" v-validate="'required'" />
|
||||
<span class="control-error" v-if="errors.has('email')">@{{ errors.first('email') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@
|
|||
<img class="media" src="{{ $image['small_image_url'] }}"/>
|
||||
</a>
|
||||
|
||||
<div class="col-10">
|
||||
<div class="col-8">
|
||||
<div class="product-name">
|
||||
<a
|
||||
class="remove-decoration"
|
||||
|
|
@ -59,13 +59,14 @@
|
|||
|
||||
<p>{{ $review->comment }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- <div class="">
|
||||
<a href="{{ route('customer.review.delete', $review->id) }}">
|
||||
<span class="icon trash-icon"></span>
|
||||
</a>
|
||||
</div> --}}
|
||||
<div class="col-2">
|
||||
<a class="unset" href="{{ route('customer.review.delete', $review->id) }}">
|
||||
<span class="rango-delete fs24"></span>
|
||||
<span class="align-vertical-top">{{ __('shop::app.checkout.cart.remove') }}</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
|
||||
|
|
|
|||
|
|
@ -83,6 +83,13 @@
|
|||
this.categoryProducts = response.data.categoryProducts;
|
||||
|
||||
this.isCategory = true;
|
||||
|
||||
// setTimeout(() => {
|
||||
// let imagesCollection = document.querySelectorAll('img.lzy_img');
|
||||
// imagesCollection.forEach((image) => {
|
||||
// this.$root.imageObserver.observe(image);
|
||||
// });
|
||||
// }, 0);
|
||||
}
|
||||
})
|
||||
.catch(error => {});
|
||||
|
|
|
|||
|
|
@ -4,39 +4,69 @@
|
|||
|
||||
<div class="row">
|
||||
@foreach ($category as $slug)
|
||||
@php
|
||||
$categoryDetails = app('Webkul\Category\Repositories\CategoryRepository')->findByPath($slug);
|
||||
@endphp
|
||||
|
||||
@if ($categoryDetails)
|
||||
<div class="col-lg-3 col-md-12 hot-category-wrapper">
|
||||
<div class="card">
|
||||
<div class="row velocity-divide-page">
|
||||
<div class="left">
|
||||
<img src="{{ asset('/storage/' . $categoryDetails->category_icon_path) }}" />
|
||||
</div>
|
||||
|
||||
<div class="right">
|
||||
<h3 class="fs20 clr-light text-uppercase">
|
||||
<a href="{{ $slug }}" class="unset">
|
||||
{{ $categoryDetails->name }}
|
||||
</a>
|
||||
</h3>
|
||||
|
||||
<ul type="none">
|
||||
@foreach ($categoryDetails->children as $subCategory)
|
||||
<li>
|
||||
<a href="{{ $slug . '/' . $subCategory->slug }}" class="remove-decoration normal-text">
|
||||
{{ $subCategory->name }}
|
||||
</a>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
<hot-category slug="{{ $slug }}"></hot-category>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@push('scripts')
|
||||
<script type="text/x-template" id="hot-category-template">
|
||||
<div class="col-lg-3 col-md-12 hot-category-wrapper" v-if="hotCategoryDetails">
|
||||
<div class="card">
|
||||
<div class="row velocity-divide-page">
|
||||
<div class="left">
|
||||
<img :src="`${$root.baseUrl}/storage/${hotCategoryDetails.category_icon_path}`" />
|
||||
</div>
|
||||
|
||||
<div class="right">
|
||||
<h3 class="fs20 clr-light text-uppercase">
|
||||
<a href="${slug}" class="unset">
|
||||
@{{ hotCategoryDetails.name }}
|
||||
</a>
|
||||
</h3>
|
||||
|
||||
<ul type="none">
|
||||
<li :key="index" v-for="(subCategory, index) in hotCategoryDetails.children">
|
||||
<a :href="`${slug}/${subCategory.slug}`" class="remove-decoration normal-text">
|
||||
@{{ subCategory.name }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
(() => {
|
||||
Vue.component('hot-category', {
|
||||
template: '#hot-category-template',
|
||||
props: ['slug'],
|
||||
|
||||
data: function () {
|
||||
return {
|
||||
'hotCategoryDetails': null
|
||||
}
|
||||
},
|
||||
|
||||
mounted: function () {
|
||||
this.getHotCategories();
|
||||
},
|
||||
|
||||
methods: {
|
||||
'getHotCategories': function () {
|
||||
this.$http.get(`${this.baseUrl}/fancy-category-details/${this.slug}`)
|
||||
.then(response => {
|
||||
if (response.data.status)
|
||||
this.hotCategoryDetails = response.data.categoryDetails;
|
||||
})
|
||||
.catch(error => {
|
||||
console.log('something went wrong');
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
})()
|
||||
</script>
|
||||
@endpush
|
||||
|
|
|
|||
|
|
@ -65,7 +65,6 @@
|
|||
@include ('shop::products.list.recently-viewed', [
|
||||
'quantity' => 3,
|
||||
'addClass' => 'col-lg-3 col-md-12',
|
||||
'addClassWrapper' => 'scrollable max-height-350',
|
||||
])
|
||||
</div>
|
||||
@else
|
||||
|
|
|
|||
|
|
@ -2,7 +2,9 @@
|
|||
$direction = core()->getCurrentLocale()->direction;
|
||||
@endphp
|
||||
|
||||
<slider-component direction="{{ $direction }}"></slider-component>
|
||||
@if ($velocityMetaData->slider)
|
||||
<slider-component direction="{{ $direction }}"></slider-component>
|
||||
@endif
|
||||
|
||||
@push('scripts')
|
||||
<script type="text/x-template" id="slider-template">
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
</a>
|
||||
</div>
|
||||
|
||||
<div class="col-8 no-padding card-body align-vertical-top">
|
||||
<div class="col-8 no-padding card-body align-vertical-top" v-if="product.name">
|
||||
<a :href="`${baseUrl}/${product.urlKey}`" class="unset no-padding">
|
||||
<div class="product-name">
|
||||
<span class="fs16 text-nowrap">@{{ product.name }}</span>
|
||||
|
|
@ -52,8 +52,8 @@
|
|||
|
||||
<span
|
||||
class="fs16"
|
||||
v-if="!recentlyViewed"
|
||||
v-text="'Not available'">
|
||||
v-if="!recentlyViewed ||(recentlyViewed && Object.keys(recentlyViewed).length == 0)"
|
||||
v-text="'{{ __('velocity::app.products.not-available') }}'">
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -94,6 +94,11 @@
|
|||
.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 => {})
|
||||
|
|
|
|||
|
|
@ -12,9 +12,10 @@ class Velocity
|
|||
* @var mixed
|
||||
*/
|
||||
protected $content_type = [
|
||||
'link' => 'Link CMS Page',
|
||||
'product' => 'Catalog Products',
|
||||
'static' => 'Static Content',
|
||||
// 'link' => 'Link CMS Page',
|
||||
// 'product' => 'Catalog Products',
|
||||
// 'static' => 'Static Content',
|
||||
'category' => 'Category Slug',
|
||||
];
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue