Featured Product Completed
This commit is contained in:
parent
024799ad9f
commit
865ae6c741
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"/js/velocity.js": "/js/velocity.js?id=a90cfe84dba927c8521c",
|
||||
"/js/velocity.js": "/js/velocity.js?id=81467a483ecf844835d2",
|
||||
"/css/velocity-admin.css": "/css/velocity-admin.css?id=4322502d80a0e4a0affd",
|
||||
"/css/velocity.css": "/css/velocity.css?id=e454953a6e8dd17fecdb"
|
||||
"/css/velocity.css": "/css/velocity.css?id=39fb095cdcae9e0f6893"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,7 +35,8 @@
|
|||
export default {
|
||||
props: [
|
||||
'cardTitle',
|
||||
'localeDirection'
|
||||
'localeDirection',
|
||||
'count'
|
||||
],
|
||||
|
||||
data: function () {
|
||||
|
|
@ -58,6 +59,7 @@
|
|||
},
|
||||
|
||||
watch: {
|
||||
/* checking the window width */
|
||||
windowWidth(newWidth, oldWidth) {
|
||||
this.setSlidesPerPage(newWidth);
|
||||
}
|
||||
|
|
@ -65,9 +67,9 @@
|
|||
|
||||
methods: {
|
||||
getFeaturedProducts: function () {
|
||||
this.$http.get(`${this.baseUrl}/category-details?category-slug=featured-products&count={{ $count }}`)
|
||||
this.$http.get(`${this.baseUrl}/category-details?category-slug=featured-products&count=${this.count}`)
|
||||
.then(response => {
|
||||
var count = '{{$count}}';
|
||||
var count = this.count;
|
||||
if (response.data.status && count != 0 )
|
||||
{
|
||||
this.featuredProducts = response.data.products;
|
||||
|
|
@ -87,6 +89,7 @@
|
|||
this.windowWidth = window.innerWidth;
|
||||
},
|
||||
|
||||
/* setting slides on the basis of window width */
|
||||
setSlidesPerPage: function (width) {
|
||||
if (width >= 992) {
|
||||
this.slidesPerPage = 6;
|
||||
|
|
@ -99,6 +102,7 @@
|
|||
}
|
||||
},
|
||||
|
||||
/* removing event */
|
||||
beforeDestroy: function () {
|
||||
window.removeEventListener('resize', this.onResize);
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1074,10 +1074,6 @@
|
|||
position: unset;
|
||||
top: unset;
|
||||
}
|
||||
|
||||
.product-card-new {
|
||||
max-width: 16rem;
|
||||
}
|
||||
}
|
||||
|
||||
/* very small devices */
|
||||
|
|
|
|||
|
|
@ -6,5 +6,6 @@
|
|||
|
||||
<featured-products
|
||||
card-title="{{ __('shop::app.home.featured-products') }}"
|
||||
locale-direction="{{ $direction }}">
|
||||
locale-direction="{{ $direction }}"
|
||||
count="{{ $count }}">
|
||||
</featured-products>
|
||||
|
|
|
|||
Loading…
Reference in New Issue