Skip to content

Commit

Permalink
Merge pull request #296 from codersaiful/3.4.1.1
Browse files Browse the repository at this point in the history
3.4.1.1
  • Loading branch information
codersaiful authored Jul 16, 2023
2 parents 17ca4e8 + 2e272e8 commit 43dc3f1
Show file tree
Hide file tree
Showing 39 changed files with 359 additions and 24,200 deletions.
10 changes: 5 additions & 5 deletions assets/css/base-template.css
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ body.wpt_table_body .wpt-wrap table tbody tr.wpt_row>td a.wpt_product_title_in_t
opacity: 0.7;
}

.wpt-wrap .qib-button.qib-button-wrapper {
.wpt-wrap .qib-button-wrapper {
display: flex !important;
height: 37px;
float: unset;
Expand Down Expand Up @@ -573,19 +573,19 @@ body.wpt_table_body .wpt-wrap table tbody tr.wpt_row>td a.wpt_product_title_in_t
.wpt-wrap .qib-button-wrapper .quantity input.input-text.qty.text{
border-radius: 0;
}
body.wpt_table_body .wpt-wrap .qib-button.qib-button-wrapper .minus.qib-button,
body.wpt_table_body .wpt-wrap .qib-button.qib-button-wrapper .plus.qib-button {
body.wpt_table_body .wpt-wrap .qib-button-wrapper .minus.qib-button,
body.wpt_table_body .wpt-wrap .qib-button-wrapper .plus.qib-button {
font-size: 18px;
line-height:18px;
height: 37px;
font-weight: normal;
}
body.wpt_table_body .wpt-wrap .qib-button.qib-button-wrapper .minus.qib-button{
body.wpt_table_body .wpt-wrap .qib-button-wrapper .minus.qib-button{
border-top-left-radius: 2px;
border-bottom-left-radius: 2px;
border-right: 0 none;
}
body.wpt_table_body .wpt-wrap .qib-button.qib-button-wrapper .plus.qib-button{
body.wpt_table_body .wpt-wrap .qib-button-wrapper .plus.qib-button{
border-top-right-radius: 2px;
border-bottom-right-radius: 2px;
border-left: 0 none;
Expand Down
8 changes: 4 additions & 4 deletions assets/css/override-root.css
Original file line number Diff line number Diff line change
Expand Up @@ -299,14 +299,14 @@ body.wpt_table_body .wpt-wrap button:focus {
border-right: 0;
}

body.wpt_table_body .wpt-wrap .qib-button.qib-button-wrapper .minus.qib-button,
body.wpt_table_body .wpt-wrap .qib-button.qib-button-wrapper .plus.qib-button {
body.wpt_table_body .wpt-wrap .qib-button-wrapper .minus.qib-button,
body.wpt_table_body .wpt-wrap .qib-button-wrapper .plus.qib-button {
background: var(--wpt_white);
border: 1px solid var(--wpt_off_white);
color: var(--wpt_primary_deepest);
}
body.wpt_table_body .wpt-wrap .qib-button.qib-button-wrapper .minus.qib-button:hover,
body.wpt_table_body .wpt-wrap .qib-button.qib-button-wrapper .plus.qib-button:hover {
body.wpt_table_body .wpt-wrap .qib-button-wrapper .minus.qib-button:hover,
body.wpt_table_body .wpt-wrap .qib-button-wrapper .plus.qib-button:hover {
background: var(--wpt_off_white);
}
/*Mini Cart*/
Expand Down
4 changes: 2 additions & 2 deletions assets/css/templates/argentina.css
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ body.wpt_table_body .wpt-wrap table.wpt-tbl thead,
body.wpt_table_body .wpt-wrap .wpt_table_pagination span.page-numbers.current,
body.wpt_table_body .wpt-wrap .wpt_table_pagination a.page-numbers,
body.wpt_table_body .wpt-wrap div.tables_cart_message_box div.widget_shopping_cart_content .buttons>a,
body.wpt_table_body .wpt-wrap .qib-button.qib-button-wrapper .minus.qib-button,
body.wpt_table_body .wpt-wrap .qib-button.qib-button-wrapper .plus.qib-button,
body.wpt_table_body .wpt-wrap .qib-button-wrapper .minus.qib-button,
body.wpt_table_body .wpt-wrap .qib-button-wrapper .plus.qib-button,
body.wpt_table_body .wpt-wrap table tbody tr a.button.add_to_cart_button,
body.wpt_table_body .wpt-wrap table tbody tr .button.single_add_to_cart_button,
body.wpt_table_body .wpt-wrap a.ajax_active.button.wpt_woo_add_cart_button.add_to_cart_button{
Expand Down
8 changes: 4 additions & 4 deletions assets/css/templates/beautiful_blacky.css
Original file line number Diff line number Diff line change
Expand Up @@ -114,15 +114,15 @@ body.wpt_table_body .wpt-wrap table tbody tr.wpt_row > td .product_description {
color: #a7a7a7 !important;
}

body.wpt_table_body div.beautiful_blacky_wrapper.wpt-wrap tr>td .qib-button.qib-button-wrapper .minus.qib-button,
body.wpt_table_body div.beautiful_blacky_wrapper.wpt-wrap tr>td .qib-button.qib-button-wrapper .plus.qib-button {
body.wpt_table_body div.beautiful_blacky_wrapper.wpt-wrap tr>td .qib-button-wrapper .minus.qib-button,
body.wpt_table_body div.beautiful_blacky_wrapper.wpt-wrap tr>td .qib-button-wrapper .plus.qib-button {
background: #37aee9;
border: 1px solid #37aee9;
color: #ffffff;
}

body.wpt_table_body div.beautiful_blacky_wrapper.wpt-wrap tr>td .qib-button.qib-button-wrapper .minus.qib-button:hover,
body.wpt_table_body div.beautiful_blacky_wrapper.wpt-wrap tr>td .qib-button.qib-button-wrapper .plus.qib-button:hover {
body.wpt_table_body div.beautiful_blacky_wrapper.wpt-wrap tr>td .qib-button-wrapper .minus.qib-button:hover,
body.wpt_table_body div.beautiful_blacky_wrapper.wpt-wrap tr>td .qib-button-wrapper .plus.qib-button:hover {
background: var(--wpt_black);
border: 1px solid #37aee9;
color: #37aee9;
Expand Down
4 changes: 2 additions & 2 deletions assets/css/templates/brazil.css
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ body.wpt_table_body .wpt-wrap table.wpt-tbl thead,
body.wpt_table_body .wpt-wrap .wpt_table_pagination span.page-numbers.current,
body.wpt_table_body .wpt-wrap .wpt_table_pagination a.page-numbers,
body.wpt_table_body .wpt-wrap div.tables_cart_message_box div.widget_shopping_cart_content .buttons>a,
body.wpt_table_body .wpt-wrap .qib-button.qib-button-wrapper .minus.qib-button,
body.wpt_table_body .wpt-wrap .qib-button.qib-button-wrapper .plus.qib-button,
body.wpt_table_body .wpt-wrap .qib-button-wrapper .minus.qib-button,
body.wpt_table_body .wpt-wrap .qib-button-wrapper .plus.qib-button,
body.wpt_table_body .wpt-wrap table tbody tr a.button.add_to_cart_button,
body.wpt_table_body .wpt-wrap table tbody tr .button.single_add_to_cart_button,
body.wpt_table_body .wpt-wrap a.ajax_active.button.wpt_woo_add_cart_button.add_to_cart_button{
Expand Down
21 changes: 16 additions & 5 deletions assets/css/universal.css
Original file line number Diff line number Diff line change
Expand Up @@ -1683,7 +1683,7 @@ td.td_or_cell .item_inside_cell.wpt_description {
gap: 10px;
}
td.wpt-replace-td-in-tr div.td_or_cell.wpt_check {
position: absolute;
position: absolute !important;
top: 10px;
right: 10px;
background: transparent;
Expand Down Expand Up @@ -1800,12 +1800,23 @@ td.wpt-replace-td-in-tr.wpt-mobile-label-show>div:before {
td.wpt-replace-td-in-tr.wpt-mobile-label-show>div {
margin-left: 86px !important;
position: relative !important;
min-height: 19px;
}
.item_inside_cell.wpt_check.autoresponsive-label-show{
position: absolute;
top: -45px;
left: 220px;


td.wpt-replace-td-in-tr.wpt-mobile-label-show>.td_or_cell.no-inner.wpt_check.type_default.type_name_Default {
right: 10px;
height: 25px;
width: 25px;
z-index: 999;
text-align: right;
}


td.wpt-replace-td-in-tr.wpt-mobile-label-show a.wpt_product_title_in_td{
min-width: unset !important;
}

body[class^="wpt-"]:before, body[class*=" wpt-"]:before {
display: none;
}
Binary file added assets/images/wpt-logo-sk.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
56 changes: 36 additions & 20 deletions assets/js/custom.js
Original file line number Diff line number Diff line change
Expand Up @@ -752,6 +752,7 @@ jQuery(function($) {
var variations_data = $(this).closest(target_class).data('product_variations');
var messageSelector = $(this).children('div.wpt_message');
var addToCartSelector = $('#table_id_' + temp_number + ' #product_id_' + product_id + ' a.wpt_variation_product.single_add_to_cart_button');

var rowSelector = $('#table_id_' + temp_number + ' #product_id_' + product_id);
var addToQuoteSelector = $('.' + quoted_target);

Expand Down Expand Up @@ -858,6 +859,12 @@ jQuery(function($) {
//e.getMessage();
}

var price_markup_backup = targetTD('price').attr('data-price_markup');
if( ! price_markup_backup ){
var targetPriceHTML = targetTD('price').find('span').prop('innerHTML');
targetTD('price').attr('data-price_markup', targetPriceHTML);
}

var wptMessageText = false;
if (targetVariationIndex !== 'not_found') {
var targetAttributeObject = variations_data[targetVariationIndex];
Expand All @@ -878,6 +885,8 @@ jQuery(function($) {
//Set variation Array to addToCart Button
addToCartSelector.attr('data-variation', JSON.stringify(current)); //current_object //targetAttributeObject.attributes //It was before 2.8 now we will use 'current' object whic will come based on current_selection of variations
addToCartSelector.attr('data-variation_id', targetAttributeObject.variation_id);


rowSelector.attr('data-variation', JSON.stringify(current)); //current_object //targetAttributeObject.attributes //It was before 2.8 now we will use 'current' object whic will come based on current_selection of variations
rowSelector.attr('data-variation_id', targetAttributeObject.variation_id);

Expand All @@ -901,7 +910,7 @@ jQuery(function($) {
wptMessageText = targetAttributeObject.availability_html;
//Setup Price Live
setValueToTargetTD_IfAvailable('price', targetAttributeObject.price_html);

//Set Image Live for Thumbs
targetThumbs.attr('src', targetAttributeObject.image.gallery_thumbnail_src);
if(targetAttributeObject.image.srcset && 'false' !== targetAttributeObject.image.srcset) {
Expand All @@ -919,7 +928,7 @@ jQuery(function($) {
if(!targetQty){
targetQty = 1;
}
var targetQtyCurrency = targetTD('total_item').data('currency');
var targetCurrency = targetTD('total_item').data('currency');
var targetPriceDecimalSeparator = targetTD('total_item').data('price_decimal_separator');
var targetPriceThousandlSeparator = targetTD('total_item').data('thousand_separator');
var targetNumbersPoint = targetTD('total_item').data('number_of_decimal');
Expand All @@ -929,18 +938,23 @@ jQuery(function($) {
var priceFormat = WPT_DATA.priceFormat;

var newPrice;
switch(priceFormat){

switch (priceFormat) {
case 'left': // left
newPrice = targetQtyCurrency + totalPrice.replace(".",targetPriceDecimalSeparator);
//newPrice = targetCurrency + totalPrice.replace(".",targetPriceDecimalSeparator);
newPrice = targetCurrency+ (totalPrice + '').replace(/\B(?=(?:\d{3})+\b)/g, targetPriceThousandlSeparator);
break;
case 'right': // right
newPrice = totalPrice.replace(".",targetPriceDecimalSeparator) + targetQtyCurrency;
//newPrice = totalPrice.replace(".",targetPriceDecimalSeparator) + targetCurrency;
newPrice = (totalPrice + '').replace(/\B(?=(?:\d{3})+\b)/g, targetPriceThousandlSeparator) + targetCurrency;
break;
case 'left-space': // left with space
newPrice = targetQtyCurrency + ' ' + totalPrice.replace(".",targetPriceDecimalSeparator);
//newPrice = targetCurrency + ' ' + totalPrice.replace(".",targetPriceDecimalSeparator);
newPrice = targetCurrency + ' ' + (totalPrice + '').replace(/\B(?=(?:\d{3})+\b)/g, targetPriceThousandlSeparator);
break;
case 'right-space': // right with space
newPrice = totalPrice.replace(".",targetPriceDecimalSeparator) + ' ' + targetQtyCurrency;
//newPrice = totalPrice.replace(".",targetPriceDecimalSeparator) + ' ' + targetCurrency;
newPrice = (totalPrice + '').replace(/\B(?=(?:\d{3})+\b)/g, targetPriceThousandlSeparator) + ' ' + targetCurrency;
break;
}

Expand Down Expand Up @@ -994,6 +1008,8 @@ jQuery(function($) {

addToCartSelector.attr('data-variation', false);
addToCartSelector.attr('data-variation_id', false);

//New add variation data at row

rowSelector.attr('data-variation', false);
rowSelector.attr('data-variation_id', false);
Expand All @@ -1010,7 +1026,9 @@ jQuery(function($) {
enable_disable_class();

//Reset Price Data from old Price, what was First time
getValueFromOldTD('price', 'price_html');
targetPriceHTML = targetTD('price').attr('data-price_markup');
targetTD('price').html(targetPriceHTML);

getValueFromOldTD('sku', 'sku');
setValueToTargetTD('total_item', '');
targetTD('total_item').attr('data-price', '');
Expand Down Expand Up @@ -1123,6 +1141,7 @@ jQuery(function($) {
var itemAmount = 0;

$('#table_id_' + temp_number + ' input.enabled.wpt_tabel_checkbox.wpt_td_checkbox:checked').each(function() {
var thisRow = $(this).closest('tr.wpt-row');
var product_id = $(this).data('product_id');
var thisButton = $('tr.wpt_row_product_id_' + product_id + ' wpt_action a.button.wpt_woo_add_cart_button');
thisButton.removeClass('added');
Expand All @@ -1138,20 +1157,15 @@ jQuery(function($) {

var currentAddToCartSelector = $('#table_id_' + temp_number + ' #product_id_' + product_id + ' .wpt_action a.wpt_woo_add_cart_button');
var currentCustomMessage = $('#table_id_' + temp_number + ' #product_id_' + product_id + ' .wpt_message .message').val();
var currentVariaionId = currentAddToCartSelector.attr('data-variation_id');//currentAddToCartSelector.data('variation_id');
//var currentVariaion = currentAddToCartSelector.data('variation');
var currentVariaionId = thisRow.attr('data-variation_id');//currentAddToCartSelector.data('variation_id');

var currentVariaion;
try{
currentVariaion = $.parseJSON(currentAddToCartSelector.attr('data-variation'));
currentVariaion = $.parseJSON(thisRow.attr('data-variation'));
}catch(e){
//Get error message
}

/*
var currentVariaionId = currentAddToCartSelector.attr('data-variation_id');
var currentVariaion = JSON.parse(currentAddToCartSelector.attr('data-variation'));
*/

var currentQantity = $('#table_id_' + temp_number + ' table#wpt_table .product_id_' + product_id ).attr('data-quantity');
currentQantity = parseFloat(currentQantity);
Expand Down Expand Up @@ -1795,6 +1809,7 @@ jQuery(function($) {

$('body').on('change', '.wpt_row input.input-text.qty.text', inputBoxChangeHandle);
function inputBoxChangeHandle() {
// console.log(2222);
var temp_number = $(this).parents('tr.wpt_row').data('temp_number');
var Qty_Val = $(this).val();
var product_id = $(this).parents('tr').data('product_id');
Expand Down Expand Up @@ -1838,23 +1853,24 @@ jQuery(function($) {
totalPrice = totalPrice.toFixed(targetNumbersPoint);
var priceFormat = WPT_DATA.priceFormat;

totalPrice = totalPrice.replace('.', targetPriceDecimalSeparator);
var newPrice;
switch (priceFormat) {
case 'left': // left
//newPrice = targetCurrency + totalPrice.replace(".",targetPriceDecimalSeparator);
newPrice = targetCurrency+ (totalPrice + '').replace(/\B(?=(?:\d{3})+\b)/g, ',');
newPrice = targetCurrency+ (totalPrice + '').replace(/\B(?=(?:\d{3})+\b)/g, targetPriceThousandlSeparator);
break;
case 'right': // right
//newPrice = totalPrice.replace(".",targetPriceDecimalSeparator) + targetCurrency;
newPrice = (totalPrice + '').replace(/\B(?=(?:\d{3})+\b)/g, ',') + targetCurrency;
newPrice = (totalPrice + '').replace(/\B(?=(?:\d{3})+\b)/g, targetPriceThousandlSeparator) + targetCurrency;
break;
case 'left-space': // left with space
//newPrice = targetCurrency + ' ' + totalPrice.replace(".",targetPriceDecimalSeparator);
newPrice = targetCurrency + ' ' + (totalPrice + '').replace(/\B(?=(?:\d{3})+\b)/g, ',');
newPrice = targetCurrency + ' ' + (totalPrice + '').replace(/\B(?=(?:\d{3})+\b)/g, targetPriceThousandlSeparator);
break;
case 'right-space': // right with space
//newPrice = totalPrice.replace(".",targetPriceDecimalSeparator) + ' ' + targetCurrency;
newPrice = (totalPrice + '').replace(/\B(?=(?:\d{3})+\b)/g, ',') + ' ' + targetCurrency;
newPrice = (totalPrice + '').replace(/\B(?=(?:\d{3})+\b)/g, targetPriceThousandlSeparator) + ' ' + targetCurrency;
break;
}

Expand Down
15 changes: 13 additions & 2 deletions assets/js/wpt-control.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ jQuery(function($) {
var
own_fragment_load = 0,
paginated_val = 0,

/**
* we need track search box's reset_button click
* used it on shortcode-ajax.php file for ajax
* @since 3.4.1.0
* here we changed on reset button click otherewise reset again after complete ajax complete always
*/
reset_search_clicked = 'no',
wc_fragment_load = 0,
fragment_handle_load = 0,
isMob,isDesk,current_width = $(window).width(),
Expand All @@ -29,7 +37,7 @@ jQuery(function($) {
console.log("Error on: ajaxTableLoad. Table not found!");
return;
}

others.reset_search_clicked = reset_search_clicked;
var data = {
action: 'wpt_load_both',
table_id: table_id,
Expand Down Expand Up @@ -93,11 +101,13 @@ jQuery(function($) {
complete:function(){
TableTagWrap.removeClass('wpt-ajax-loading');
SearchWrap.removeClass('wpt-ajax-loading');
reset_search_clicked = 'no';
},
error:function(){
error:function(error){
TableTagWrap.removeClass('wpt-ajax-loading');
SearchWrap.removeClass('wpt-ajax-loading');
console.log("Error on: ajaxTableLoad. Error on Ajax load!");
console.log(error);
}
});
};
Expand Down Expand Up @@ -271,6 +281,7 @@ jQuery(function($) {
$(document.body).on('click','.wpt-query-reset-button',function(){
$(this).closest('.wpt-search-full-wrapper').find('.query_box_direct_value').val('');
$(this).closest('.wpt-search-full-wrapper').find('select').val('').change();
reset_search_clicked = 'yes';
$(this).closest('.wpt-search-full-wrapper').find('.wpt-search-products').trigger('click');
});

Expand Down
Loading

0 comments on commit 43dc3f1

Please sign in to comment.