Skip to content

Commit

Permalink
fix miss sku id
Browse files Browse the repository at this point in the history
  • Loading branch information
dagongren committed Jul 15, 2024
1 parent 2d15c6c commit 51fe600
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2653,7 +2653,6 @@ function gtag() {
$('.buy-select').hide()
$('#p2-select').show()
$('#product2').addClass('background-green')
initProuctData(0, '2')
}
var nprice = currencySymbol + data.package_products[0].new_price.toFixed(2)
$('#summary-total1').text(nprice)
Expand Down Expand Up @@ -2753,6 +2752,12 @@ function gtag() {
params.products = []
params.products.push(productL1, productL2)
getSkuListInfo();
if (data.attr.attributes.length == 0) {
params.products.forEach(function(item) {
item.product_sku = data.sku
item.variant_id = ''
})
}
$('#pc-banner').attr('src', data.ads.pc.img);
$('#mobile-banner').attr('src', data.ads.mobile.img);
$('.prod-name').text('<?php echo addslashes($data['product']['name']); ?>')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1561,7 +1561,6 @@ function gtag() {
$('.buy-select').hide()
$('#p2-select').show()
$('#product2').addClass('background-green')
initProuctData(0, '2')
}
var nprice = currencySymbol + data.package_products[0].new_price.toFixed(2)
$('#summary-total1').text(nprice)
Expand Down Expand Up @@ -1656,6 +1655,12 @@ function gtag() {
params.products = []
params.products.push(productL1, productL2)
getSkuListInfo();
if (data.attr.attributes.length == 0) {
params.products.forEach(function(item) {
item.product_sku = data.sku
item.variant_id = ''
})
}
$('.prod-name').text('<?php echo addslashes($data['product']['name']); ?>')
console.log('<?php echo addslashes($data['product']['name']); ?>', '123');
$('title').html('<?php echo addslashes($data['product']['name']); ?>')
Expand Down

0 comments on commit 51fe600

Please sign in to comment.