01 2022 Microsite Promotion
This commit is contained in:
parent
3f1fb9377d
commit
38e7fd504a
39 changed files with 761 additions and 336 deletions
|
|
@ -11,6 +11,7 @@ html {
|
|||
body.custom-background {
|
||||
background-color: #f4f1ef;
|
||||
color: rgb(119, 119, 119);
|
||||
font-size: 17px;
|
||||
}
|
||||
|
||||
.text-body {
|
||||
|
|
@ -100,7 +101,7 @@ h1, h2, h3, h4, .typo-heading {
|
|||
color: rgb(64, 65, 66);
|
||||
}
|
||||
p {
|
||||
font-size: 16px;
|
||||
font-size: 17px;
|
||||
}
|
||||
|
||||
h4.product-title {
|
||||
|
|
@ -110,7 +111,8 @@ h4.product-title {
|
|||
}
|
||||
|
||||
.product-description {
|
||||
height: 4rem;
|
||||
font-size: 16px;
|
||||
height: 4.3rem;
|
||||
overflow: hidden;
|
||||
margin-bottom: .5rem;
|
||||
}
|
||||
|
|
@ -229,12 +231,14 @@ h4.product-title {
|
|||
|
||||
.dropdown-item:hover,
|
||||
.dropdown-item:focus {
|
||||
background-color: #d6d6d6;
|
||||
color: #46564d;
|
||||
}
|
||||
|
||||
.dropdown-item.active,
|
||||
.dropdown-item:active {
|
||||
background-color: #46564d;
|
||||
color:#fff !important;
|
||||
}
|
||||
|
||||
label {
|
||||
|
|
@ -269,6 +273,11 @@ label .required {
|
|||
}
|
||||
.switcher-label {
|
||||
cursor: pointer;
|
||||
font-size: 16px;
|
||||
|
||||
}
|
||||
.switcher .switcher-indicator {
|
||||
top: 0.1rem;
|
||||
}
|
||||
|
||||
table.table-payment td {
|
||||
|
|
@ -277,8 +286,6 @@ table.table-payment td {
|
|||
border-bottom: 1px solid #c6c2bf;
|
||||
|
||||
}
|
||||
|
||||
|
||||
.yard-items-head {
|
||||
border-bottom: 1px solid #c6c2bf;
|
||||
padding-bottom: 8px;
|
||||
|
|
@ -390,4 +397,64 @@ table.table-payment td {
|
|||
|
||||
.spinner {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.tab-content p {
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
.btn-add-product-shop {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
@media (max-width: 991px) {
|
||||
|
||||
.intro-media .media {
|
||||
display: block;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.intro-media .media img.d-block {
|
||||
display: inline-block !important;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
}
|
||||
.media-body ul {
|
||||
padding-left: 1.8rem;
|
||||
}
|
||||
|
||||
.media-body .table {
|
||||
font-size:16px;
|
||||
color: rgb(119, 119, 119);
|
||||
}
|
||||
.modal-body .table {
|
||||
font-size:16px;
|
||||
color: rgb(119, 119, 119);
|
||||
}
|
||||
.media-body table th, .media-body .table td {
|
||||
padding: 0.4rem;
|
||||
}
|
||||
.no-border {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.card-header a .fa-caret-collapse {
|
||||
width: 0.8em;
|
||||
}
|
||||
.card-header a.collapsed .fa-caret-collapse:before {
|
||||
content: "\f0da";
|
||||
}
|
||||
|
||||
.card-header a .fa-caret-collapse:before{
|
||||
content: "\f0d7";
|
||||
}
|
||||
|
||||
.not-show {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
.ui-w-150 {
|
||||
width: 150px !important;
|
||||
height: auto;
|
||||
}
|
||||
|
|
@ -19,11 +19,13 @@ var IqPromotionShopCart = {
|
|||
cart_holder: '#promotion_cart_holder',
|
||||
invoice_holder: '#invoice_details_holder',
|
||||
checkout_holder: '#promotion_checkout_holder',
|
||||
show_products_holder: '#show_products_holder',
|
||||
|
||||
|
||||
free_product_id: null,
|
||||
shipping_option: null,
|
||||
show_products_option: null,
|
||||
|
||||
|
||||
init: function () {
|
||||
var _self = this;
|
||||
_self.url = $('input[name=load_url]').val();
|
||||
|
|
@ -47,8 +49,12 @@ var IqPromotionShopCart = {
|
|||
event.preventDefault();
|
||||
_self.switchShipping($(this));
|
||||
});
|
||||
_self.showInit();
|
||||
|
||||
$('select[name=show_products_filter]').on('change', function(event){
|
||||
event.preventDefault();
|
||||
_self.switchShowProducts($(this));
|
||||
});
|
||||
_self.showInit();
|
||||
|
||||
/*$_self.update_poduct_price();*/
|
||||
|
||||
|
|
@ -69,12 +75,22 @@ var IqPromotionShopCart = {
|
|||
_self.performRequest({product_id: $(this).data('product-id'), qty: 0, action: 'remove-shop-product'})
|
||||
.done(_self.refreshItemsAndView);
|
||||
});
|
||||
$('#shipping_state').on('change', function(){
|
||||
if ($('#shipping_address_switch').is(':checked')) {
|
||||
_self.changeStateShipping($(this).val());
|
||||
}
|
||||
});
|
||||
$('#billing_state').on('change', function(){
|
||||
if (!$('#shipping_address_switch').is(':checked')) {
|
||||
_self.changeStateShipping($(this).val());
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
switchShipping: function(_ele){
|
||||
changeStateShipping: function(_state_id){
|
||||
var _self = this;
|
||||
_self.shipping_option = _ele.val();
|
||||
_self.performRequest({shipping_option: _self.shipping_option, action: 'switch-shipping'})
|
||||
.done(_self.refreshItemsAndView);
|
||||
_self.performRequest({shipping_country_id: _state_id, action: 'change-state-shipping'})
|
||||
.done(_self.refreshItemsAndView);
|
||||
},
|
||||
switchFreeProduct: function(_ele){
|
||||
var _self = this;
|
||||
|
|
@ -93,7 +109,28 @@ var IqPromotionShopCart = {
|
|||
.done(_self.refreshItemsAndView);
|
||||
}
|
||||
},
|
||||
|
||||
switchShipping: function(_ele){
|
||||
var _self = this;
|
||||
_self.shipping_option = _ele.val();
|
||||
_self.performRequest({shipping_option: _self.shipping_option, action: 'switch-shipping'})
|
||||
.done(_self.refreshItemsAndView);
|
||||
},
|
||||
switchShowProducts: function(_ele){
|
||||
var _self = this;
|
||||
_self.show_products_option = _ele.val();
|
||||
_self.performRequest({show_products_option: _self.show_products_option, action: 'switch-show_products'})
|
||||
.done(_self.refreshShowProducts);
|
||||
},
|
||||
refreshShowProducts: function (data){
|
||||
var _self = IqPromotionShopCart;
|
||||
if(data.shop_products_view){
|
||||
$(_self.show_products_holder).html(data.shop_products_view);
|
||||
}
|
||||
$(_self.btn_shop_add).on('click', function(event){
|
||||
event.preventDefault();
|
||||
_self.addShopProduct($(this));
|
||||
});
|
||||
},
|
||||
updateInputCart: function (_ele){
|
||||
var _self = this;
|
||||
var qty = parseInt(_ele.val());
|
||||
|
|
@ -130,6 +167,11 @@ var IqPromotionShopCart = {
|
|||
if(data.checkout){
|
||||
$(_self.checkout_holder).html(data.checkout);
|
||||
}
|
||||
if(data.response.shipping_price_formated){
|
||||
$('#shipping_price_holder').html(data.response.shipping_price_formated);
|
||||
}
|
||||
|
||||
|
||||
_self.showInit();
|
||||
},
|
||||
performRequest : function(data) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue