Channel homepage content updated in seeder

This commit is contained in:
jitendra 2019-01-29 18:32:10 +05:30
parent ae4b1cebe2
commit 70c114d3a6
10 changed files with 91 additions and 26 deletions

View File

@ -66,7 +66,6 @@ return array(
|
*/
'lifetime' => 1,
// 'lifetime' => 43200,
'lifetime' => 43200,
);

View File

@ -43,7 +43,7 @@ return [
'webpack' => ['LOWER_NAME'],
'json' => ['LOWER_NAME', 'STUDLY_NAME', 'MODULE_NAMESPACE'],
'views/index' => ['LOWER_NAME'],
'views/master' => ['STUDLY_NAME','LOWER_NAME'],
'views/master' => ['LOWER_NAME', 'STUDLY_NAME'],
'scaffold/config' => ['STUDLY_NAME'],
'composer' => [
'LOWER_NAME',

View File

@ -190,11 +190,7 @@
plugins: 'image imagetools media wordcount save fullscreen code',
toolbar1: 'formatselect | bold italic strikethrough forecolor backcolor | link | alignleft aligncenter alignright alignjustify | numlist bullist outdent indent | removeformat | code',
image_advtab: true,
valid_elements : '*[*]',
templates: [
{ title: 'Test template 1', content: 'Test 1' },
{ title: 'Test template 2', content: 'Test 2' }
],
valid_elements : '*[*]'
});
});
</script>

View File

@ -201,11 +201,7 @@
plugins: 'image imagetools media wordcount save fullscreen code',
toolbar1: 'formatselect | bold italic strikethrough forecolor backcolor | link | alignleft aligncenter alignright alignjustify | numlist bullist outdent indent | removeformat | code',
image_advtab: true,
valid_elements : '*[*]',
templates: [
{ title: 'Test template 1', content: 'Test 1' },
{ title: 'Test template 2', content: 'Test 2' }
],
valid_elements : '*[*]'
});
});
</script>

View File

@ -16,7 +16,7 @@ class ChannelTableSeeder extends Seeder
'code' => 'default',
'name' => 'Default',
'root_category_id' => 1,
'home_page_content' => '<p>@include("shop::home.slider") @include("shop::home.featured-products") @include("shop::home.new-products")</p><div style="width: 100%; float: left; padding: 0 18px; margin-bottom: 40px;"><div style="width: 60%; float: left;"><img src="themes/default/assets/images/1.png" /></div><div style="width: 40%; float: left;"><img src="themes/default/assets/images/2.png" /> <img style="margin-top: 36px;" src="themes/default/assets/images/3.png" /></div></div>',
'home_page_content' => '<p>@include("shop::home.slider") @include("shop::home.featured-products") @include("shop::home.new-products")</p><div class="banner-container" style="width: 100%; float: left; padding: 0 18px; margin-bottom: 40px;"><div class="left-banner" style="width: 60%; float: left;"><img src="themes/default/assets/images/1.png" /></div><div class="right-banner" style="width: 40%; float: left;"><img src="themes/default/assets/images/2.png" /> <img style="margin-top: 36px;" src="themes/default/assets/images/3.png" /></div></div>',
'footer_content' => '<div class="list-container"><span class="list-heading">Quick Links</span><ul class="list-group"><li><a href="#">About Us</a></li><li><a href="#">Return Policy</a></li><li><a href="#">Refund Policy</a></li><li><a href="#">Terms and conditions</a></li><li><a href="#">Terms of Use</a></li><li><a href="#">Contact Us</a></li></ul></div><div class="list-container"><span class="list-heading">Connect With Us</span><ul class="list-group"><li><a href="#"><span class="icon icon-facebook"></span>Facebook </a></li><li><a href="#"><span class="icon icon-twitter"></span> Twitter </a></li><li><a href="#"><span class="icon icon-instagram"></span> Instagram </a></li><li><a href="#"> <span class="icon icon-google-plus"></span>Google+ </a></li><li><a href="#"> <span class="icon icon-linkedin"></span>LinkedIn </a></li></ul></div>',
'name' => 'Default',
'default_locale_id' => 1,

View File

@ -401,16 +401,11 @@ class ProductRepository extends Repository
* @param integer $categoryId
* @return Collection
*/
public function findAllByCategory($categoryId = null)
public function findAllByCategoryQueryBuilder($categoryId = null)
{
// IF( special_price_from IS NOT NULL
// AND special_price_to IS NOT NULL , IF( NOW( ) >= special_price_from
// AND NOW( ) <= special_price_to, IF( special_price IS NULL OR special_price = 0 , price, LEAST( special_price, price ) ) , price ) , IF( special_price_from IS NULL , IF( special_price_to IS NULL , IF( special_price IS NULL OR special_price = 0 , price, LEAST( special_price, price ) ) , IF( NOW( ) <= special_price_to, IF( special_price IS NULL OR special_price = 0 , price, LEAST( special_price, price ) ) , price ) ) , IF( special_price_to IS NULL , IF( NOW( ) >= special_price_from, IF( special_price IS NULL OR special_price = 0 , price, LEAST( special_price, price ) ) , price ) , price ) ) ) AS min_price
$params = request()->input();
$results = app('Webkul\Product\Repositories\ProductFlatRepository')->scopeQuery(function($query) use($params, $categoryId) {
return app('Webkul\Product\Repositories\ProductFlatRepository')->scopeQuery(function($query) use($params, $categoryId) {
$channel = request()->get('channel') ?: (core()->getCurrentChannelCode() ?: core()->getDefaultChannelCode());
$locale = request()->get('locale') ?: app()->getLocale();
@ -471,7 +466,18 @@ class ProductRepository extends Repository
});
return $qb;
})->paginate(isset($params['limit']) ? $params['limit'] : 9);
});
}
/**
* @param integer $categoryId
* @return Collection
*/
public function findAllByCategory($categoryId = null)
{
$params = request()->input();
$results = $this->findAllByCategoryQueryBuilder($categoryId)->paginate(isset($params['limit']) ? $params['limit'] : 9);
return $results;
}

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
{
"/js/shop.js": "/js/shop.js?id=e25827d4b84cbe5d76fb",
"/css/shop.css": "/css/shop.css?id=05b33c270b2e9a29a698"
"/css/shop.css": "/css/shop.css?id=8ea4c669f95db0fcee6e"
}

View File

@ -1741,6 +1741,10 @@ section.product-detail {
.product-price {
margin-bottom: 14px;
.sticker {
display: none;
}
}
.product-ratings {
@ -1765,7 +1769,6 @@ section.product-detail {
.product-price {
margin-bottom: 15px;
font-size: 24px;
.special-price {
font-size: 24px;
@ -3747,3 +3750,68 @@ section.review {
}
}
/// rtl css end here
.banner-container {
width: 100%;
float: left;
padding: 0 18px;
margin-bottom: 40px;
.left-banner {
padding-right: 20px;
width: 60%;
float: left;
img {
width: 100%;
}
}
.right-banner {
padding-left: 20px;
width: 40%;
float: left;
img {
width: 100%;
&:first-child {
padding-bottom: 20px;
height: 50%;
display: block;
}
&:last-child {
padding-top: 20px;
height: 50%;
display: block;
}
}
}
}
@media all and (max-width: 720px) {
.banner-container {
.left-banner {
padding-right: 0;
width: 100%;
}
.right-banner {
padding-left: 0;
width: 100%;
img {
&:first-child {
padding-bottom: 0;
padding-top: 25px;
}
&:last-child {
padding-top: 25px;
}
}
}
}
}

View File

@ -4,4 +4,4 @@
{{ Illuminate\Mail\Markdown::parse($slot) }}
</td>
</tr>
</table>
</table>