Main Features: - A great tool for training and improving your guitar skills- Compact size, portable and lightweight, available for you to practice anywhere- Made of high-quality materials, durable and sturdy- Comes with a carrying bag for convenient carry and storage- A guitar practice tool for beginners
Remote Control: No
0.1660
Package weight: 0.231 kg
Package Size(L x W x H): 6.60 x 23.10 x 4.20 cm / 2.6 x 9.09 x 1.65 inches
Package Contents: 1 x Pocket Guitar, 1 x Wrench, 1 x Storage Bag
Margot
Category
New ArrivalBy PriceBy SalesBy Click
SEARCH
Ranks
12V 60W High Pressure Cleaning Pump Car Washing Ma MULTI-A
KSh 3,908
TMH - 6LED - B 5 Colors DC 12V Waterproof Car Truck Warning Side Light RED
KSh 148
38pcs Multi-functional Ratchet Wrench Socket Bits RED
KSh 792
20W Hot Glue Gun for DIY Project BLUE
KSh 891
YWXLight 36W 3528SMD 5m 300-LED Light Strip for Ho BLUE
KSh 392
View All Product
// 商品分类收缩
function class_list(obj){
var stc_id = $(obj).attr('span_id');
var span_class = $(obj).attr('class');
if(span_class=='ico-block') {
$("#stc_"+stc_id).show();
$(obj).html('
-');
$(obj).attr('class','ico-none');
}else{
$("#stc_"+stc_id).hide();
$(obj).html('
+');
$(obj).attr('class','ico-block');
}
}
The reviews on this item
6-string 4 Frets Portable Pocket Acoustic Guitar Practice Tool BLACK5Rating:(0 reviews)
19%OFF
Multifunction Durable Hardware Mechanics Canvas To COLORMIX
KSh 2,741KSh 2,22719%OFF
Inlife K11 Bluetooth 4.2 Radio Alarm Clock Speaker BLACK AU PLUG
KSh 3,155KSh 2,56319%OFF
UKB-100-RF 2.4 Ghz Ultra Mini Keyboard with Touchp BLACK
KSh 2,241KSh 1,82119%OFF
Automatic Soldering Tin Gun Manual Welding Machine MEDIUM AQUAMARINE
KSh 2,151KSh 1,74819%OFF
RY23B Aromatherapy Essential Oil Diffuser with Col WOOD COLOR UK PLUG
KSh 3,482KSh 2,829
19%OFF
Dent Removal Hail Pit Car Body Repair Tool Puller YELLOW
KSh 3,675KSh 2,98619%OFF
RY25C 300ML Wood Grain Ultrasonic Essential Oil Di WOOD COLOR EU PLUG
KSh 3,494KSh 2,83919%OFF
Pet Dog Cat Outdoor Carrier Travel Tote Bag Breath ROSE RED S
KSh 4,269KSh 3,46919%OFF
Smartmi Smart Toilet Seat Water Heated Filter Elec WHITE THREE PIN CHINESE PLUG
KSh 51,201KSh 41,60119%OFF
Smartmi DC Inverter Air Conditioner Intelligent AP WHITE THREE PIN CHINESE PLUG
KSh 578,083KSh 469,693
19%OFF
Original Xiaomi Mi Water Purifier Watering Filters WHITE
KSh 73,871KSh 60,02019%OFF
GBlife fillo Room Air Purifier Household HEPA Filt WHITE EU PLUG
KSh 13,556KSh 11,014
- $recom_k
- $recom_k
- $recom_k
- 19%OFF
Acoustic Guitar Pickup Electric Transducer / Ampli BLACK
KSh 1,189KSh 966 - 23%OFF
10 Holes Swan Harmonica Diatonic Blues Harp C Keys Mouth Organ for Blues
KSh 687KSh 529 - 19%OFF
Classic Capodastre Guitar Spare Part High Quality RED
KSh 493KSh 401 - 19%OFF
Guitar Driver LC-5 5 Bands Acoustic Guitar Preamp BLACK
KSh 1,352KSh 1,099 - 19%OFF
Professional 3 / 4 Arbor Violin Bow Music Instrume AS THE PICTURE SIZE 3 / 4
KSh 764KSh 621 - 19%OFF
6-string 6 Frets Portable Pocket Acoustic Guitar Practice Tool BLACK
KSh 1,152KSh 936 - 19%OFF
AROMA AT - 355 Portable Guitar Electric Tuner Colo BLACK
KSh 612KSh 498 - 30%OFF
Blue Mini Jazz Drum ,Children's Kid's Musical Instrument Drum Play Set
KSh 999KSh 699 - 19%OFF
15Pcs Guitar Finger Pick MULTI-A
KSh 891KSh 724 - 19%OFF
Swan SW1020 - 7 10 Holes 20 Tones Harmonica for Bl SILVER KEY OF F
KSh 797KSh 648 - 19%OFF
Rocker Tremolo Arm Bar for Electric Guitar BLACK
KSh 868KSh 706 - 19%OFF
Wall Mount Guitar Hanger Adjustable Auto Lock Hook BLACK
KSh 710KSh 577 - 19%OFF
Professional Silver Plating 5C Trumpet Mouthpiece SILVER 5C
KSh 1,125KSh 914 - 19%OFF
Ceramic Base of Hand Holder for 6 Holes / 12 Holes WHITE
KSh 924KSh 751 - 19%OFF
FH - 01 Resin Ten-hole Harmonica for Children Adul BLACK
KSh 876KSh 711
Complete
Tips
Finish
Complete
Problem
×
// global详情
// $('.global-detail').on('click',function(){
// $('.overall').show();
// });
// $('.close_x').on('click',function(){
// $('.overall').hide();
// });
//DERRICK
// 运费优惠提示
function shippingDiscountNotice(){
}
//物流弹框
// $('.dazz-prompt').on('mouseover',function(){
// $('.prompt-content').css({'display':'block'});
// })
// $('.dazz-prompt').on('mouseout',function(){
// $('.prompt-content').css({'display':'none'});
// })
// 秒杀弹窗
/* TODO: 乌干达运费提示补丁 */
var siteDomain = window.location.href;
var shippingHighlight = $(".box-logistics-type-2 .l2");
if (siteDomain.indexOf('.co.ug') > 0) shippingHighlight.html("Delivery time : 20-30 days");
else if (siteDomain.indexOf('.ng') > 0) shippingHighlight.html("Delivery time : 15-30 days");
/* 辅助浏览 */
jQuery(function ($) {
// 放大镜效果 产品图片
CloudZoom.quickStart();
// 图片切换效果
$(".controller li").first().addClass('current');
$('.controller').find('li').mouseover(function () {
$(this).first().addClass("current").siblings().removeClass("current");
});
});
//收藏分享处下拉操作
jQuery.divselect = function (divselectid, inputselectid) {
var inputselect = $(inputselectid);
$(divselectid).mouseover(function () {
var ul = $(divselectid + " ul");
ul.slideDown("fast");
if (ul.css("display") == "none") {
ul.slideDown("fast");
}
});
$(divselectid).live('mouseleave', function () {
$(divselectid + " ul").hide();
});
};
$(function () {
//赠品处滚条
$('#ncsGoodsGift').perfectScrollbar({suppressScrollX: true});
// 加入购物车
$('a[nctype="addcart_submit"]').click(function () {
if (typeof(allow_buy) != 'undefined' && allow_buy === false) return;
var param = {'entrance': 'goods_detail'};
var num = checkQuantity('addCart');
if (false === num) {
return;
}
addcart(13306264, num, 'addcart_callback', param);
});
// 立即购买
$('a[nctype="buynow_submit"]').click(function () {
if (typeof(allow_buy) != 'undefined' && allow_buy === false) return;
var num = checkQuantity('buy');
if (false === num) {
return;
}
buynow(13306264, num);
});
// 秒杀购买
$('a[nctype="checkout_submit"]').on("click", function () {
if (typeof(allow_buy) != 'undefined' && allow_buy === false) return;
var url = '';
var goods_id =13306264;
var quantity = parseInt($("#quantity").val());
var data = 'submitbuynow-' + goods_id + '-' + quantity;
var num = checkQuantity('buy');
if (false === num) {
return;
}
buynow_new(13306264, num, url, data);
});
// 立即购买(加购物车弹窗)
$('a[nctype="checkcart_submit"]').on("click", function () {
if (typeof(allow_buy) != 'undefined' && allow_buy === false) return;
var url = 'https://www.kilimall.co.ke/index.php?act=cart';
buycart_new(url);
});
// 到货通知
// 预约购买
//浮动导航 waypoints.js
$('#main-nav').waypoint(function (event, direction) {
$(this).parent().parent().parent().toggleClass('sticky', direction === "down");
event.stopPropagation();
});
// 分享收藏下拉操作
$.divselect("#handle-l");
$.divselect("#handle-r");
// 规格选择
$('dl[nctype="nc-spec"]').find('a').each(function () {
$(this).click(function () {
if ($(this).hasClass('hovered')) { return false; }
$(this).parents('ul:first').find('a').removeClass('hovered');
$(this).addClass('hovered');
checkSpec();
});
});
// 无库存的商品规格置灰处理
show_storage();
});
function change_wholesale_price(num) {
var _old_price='798.00';
_true_num = _wholesale_id = _true_price = _price = 0;
$('.wholesale_num').each(function () {
if ($(this).text() <= num) {
_true_num = num;
_wholesale_id = $(this).attr('wholesale_id');
}
});
_price = $('[wholesale_id="'+_wholesale_id+'"][class="wholesale_price"]').text();
var _price_text = _price?'Wholesale Price:':'Kili Price:';
_price = App.price(_price?_price:_old_price);
$('.dl-price dt').text(_price_text);
$('.price h2 strong').text($.trim(_price));
}
function show_storage(){
var spec_param = [{"sign":"305746","url":"https:\/\/www.kilimall.co.ke\/item-13306264-6-string-4-frets-portable-pocket-acoustic-guitar-practice-tool-black.html","storage":"51"}];
$('dl[nctype="nc-spec"]').each(function () {
var obj = $(this);
obj.find('a').each(function(){
var last_spec=$(this);
var spec_id = '';
var spec = new Array();
obj.siblings().find('.hovered').each(function () {
var data_str = '';
eval('data_str =' + $(this).attr('data-param'));
spec.push(data_str.valid);
});
eval('spec_id =' + last_spec.attr('data-param'));
spec.push(spec_id.valid);
spec1 = spec.sort(function (a, b) { return a - b; });
var spec_sign = spec1.join('|');
$.each(spec_param,function(i, n){
if(n.sign == spec_sign && n.storage==0){
last_spec.addClass('no_storage');
last_spec.attr('title','No Stock');
$('.increase').css({"color":"#dddfe4"})
}
})
});
});
}
function checkSpec() {
var spec_param = [{"sign":"305746","url":"https:\/\/www.kilimall.co.ke\/item-13306264-6-string-4-frets-portable-pocket-acoustic-guitar-practice-tool-black.html","storage":"51"}];
var spec = new Array();
$('ul[nctyle="ul_sign"]').find('.hovered').each(function () {
var data_str = '';
eval('data_str =' + $(this).attr('data-param'));
spec.push(data_str.valid);
});
spec1 = spec.sort(function (a, b) { return a - b; });
var spec_sign = spec1.join('|');
$.each(spec_param, function (i, n) {
if (n.sign == spec_sign) {
window.location.href = n.url;
}
});
}
// 验证购买数量
function checkQuantity(type) {
var quantity = parseInt($("#quantity").val());
if (quantity < 1) {
alert("Please fill in the purchase quantity");
$("#quantity").val('1');
return false;
}
max = parseInt($('[nctype="goods_stock"]').text());
if (quantity > max) {
$('#max-num').html(max);
$('.ncs-cart-popup1').show();
$('#quantity').val(max);
return false;
}
return quantity;
}
// 立即购买js 新增秒杀 add time 2016-10-13
function buynow_new(goods_id, quantity, url, data) {
login_dialog_new(url, data);
}
//新增,秒杀时以原价购买,加入购物车直接跳转
function flash_add_cart() {
addcart(13306264, 1);
location.href = "index.php?act=cart";
}
//进入购物车的方法
function buycart_new(url) {
var cart_url = 'https://www.kilimall.co.ke/index.php?act=cart';
window.location.href = cart_url;
return true;
}
//登录后回调js
function submitbuynow(goods_id, quantity) {
if (!quantity) return;
$("#cart_id").val(goods_id + '|' + quantity);
$("#buynow_form").submit();
}
//单独拉出来的登录,增加了data,ref_url参数
function login_dialog_new(return_url, data) {
if(!data) { data=null; }
CUR_DIALOG = ajax_form("login", "Login", SITEURL + "/index.php?act=login&inajax=1&data=" + data + "&ref_url=" + encodeURI(return_url), 360, 1)
bind_close();
}
function bind_close(){
$('.dialog_close_button').unbind('click');
$('.dialog_close_button').click(function(){
$('#fwin_login,#dialog_manage_screen_locker').hide();
$('.dialog_content').remove();
})
}
// 立即购买js
function buynow(goods_id, quantity) {
var store_id = 3252;
$.ajax({
type:'GET',
url: baseURL + '/index.php?act=login&op=checkLogin',
dataType:'json',
async: false,
success:function(result){
if(result.is_login == '1') {
if (!quantity) {
return;
}
if (result.store_id == store_id) {
alert('Can not buy their own shop goods');
return;
}
$("#cart_id").val(goods_id + '|' + quantity);
$("#buynow_form").submit();
return true;
} else {
// 缓存 近1小时
setCookie('sa_signUpLoginSource', 'purchase', 0.042);
login_dialog();
return true;
}
}
});
}
$(function () {
//选择地区查看运费
$('#transport_pannel>a').click(function () {
var id = $(this).attr('nctype');
if (id == 'undefined') return false;
var _self = this, tpl_id = '108';
var url = 'index.php?act=goods&op=calc&rand=' + Math.random();
$('#transport_price').css('display', 'none');
$('#loading_price').css('display', '');
$.getJSON(url, {'id': id, 'tid': tpl_id}, function (data) {
if (data == null) return false;
if (data != 'undefined') {
$('#nc_kd').html('Shipping Fee:
' + data + 'KSh');
} else {
'Seller bear shipping amount';
}
$('#transport_price').css('display', '');
$('#loading_price').css('display', 'none');
$('#ncrecive').html($(_self).html());
});
});
$("#nc-bundling").load('index.php?act=goods&op=get_bundling&goods_id=13306264', function () {
if ($(this).html() != '') { $(this).show(); }
});
$("#consulting_demo").load('index.php?act=goods&op=consulting&goods_id=13306264&store_id=3252');
/** goods.php **/
// 商品内容部分折叠收起侧边栏控制
$('#fold').click(function () {
$('.ncs-goods-layout').toggleClass('expanded');
});
// 商品内容介绍Tab样式切换控制
$('#categorymenu').find("li").click(function () {
$('#categorymenu').find("li").removeClass('current');
$(this).addClass('current');
});
// 商品详情默认情况下显示全部
$('#tabGoodsIntro').click(function () {
$('.bd').css('display', '');
$('.hd').css('display', '');
$('#tabGoodsIntro').hide();
});
// 点击地图隐藏其他以及其标题栏
$('#tabStoreMap').click(function () {
$('.bd').css('display', 'none');
$('#ncStoreMap').css('display', '');
$('.hd').css('display', 'none');
});
// 点击评价隐藏其他以及其标题栏
$('#tabGoodsRate').click(function () {
$('.bd').css('display', 'none');
$('#ncGoodsRate').css('display', '');
$('.hd').css('display', 'none');
});
// 点击成交隐藏其他以及其标题
$('#tabGoodsTraded').click(function () {
$('.bd').css('display', 'none');
$('#ncGoodsTraded').css('display', '');
$('.hd').css('display', 'none');
});
// 点击咨询隐藏其他以及其标题
$('#tabGuestbook').click(function () {
$('.bd').css('display', 'none');
$('#ncGuestbook').css('display', '');
$('.hd').css('display', 'none');
});
// 商品排行Tab切换
$(".ncs-top-tab > li > a").mouseover(function (e) {
if (e.target == this) {
var tabs = $(this).parent().parent().children("li");
var panels = $(this).parent().parent().parent().children(".ncs-top-panel");
var index = $.inArray(this, $(this).parent().parent().find("a"));
if (panels.eq(index)[0]) {
tabs.removeClass("current ").eq(index).addClass("current ");
panels.addClass("hide").eq(index).removeClass("hide");
}
}
});
// 信用评价动态评分打分人次Tab切换
$(".ncs-rate-tab > li > a").mouseover(function (e) {
if (e.target == this) {
var tabs = $(this).parent().parent().children("li");
var panels = $(this).parent().parent().parent().children(".ncs-rate-panel");
var index = $.inArray(this, $(this).parent().parent().find("a"));
if (panels.eq(index)[0]) {
tabs.removeClass("current ").eq(index).addClass("current ");
panels.addClass("hide").eq(index).removeClass("hide");
}
}
});
// 触及显示缩略图
$('.goods-pic > .thumb').hover(
function () {
$(this).next().css('display', 'block');
},
function () {
$(this).next().css('display', 'none');
}
);
$("#quantity").blur(function(){
// a = e.value.replace(/[^0-9-]+/,'');
if (typeof(allow_buy) != 'undefined' && allow_buy === false) return;
var num = checkQuantity('buy');
if (false === num) {
return;
}
num = $('#quantity').val().replace(/\b(0+)/gi,"").replace(/[[1-9]^0-9-]+/,'');
$('#quantity').val(num);
if(num<1 || num==''){
num=1;
$('#quantity').val(num);
}
max = parseInt($('[nctype="goods_stock"]').text());
if (num < max) {
$('.decrease').css({'color':'#150000'});
}
});
/* 商品购买数量增减js */
// 增加
$('a[nctype="increase"]').click(function () {
num = parseInt($('#quantity').val());
max = parseInt($('[nctype="goods_stock"]').text());
if (num < max) {
$('#quantity').val(num + 1);
$('.decrease').css({'color':'#150000'});
}else{
$('#max-num').html(max);
$('.ncs-cart-popup1').show();
$('#quantity').val(max);
}
});
// 减少
$('a[nctype="decrease"]').click(function () {
num = parseInt($('#quantity').val());
if (num > 2) {
$('#quantity').val(num-1);
}else if(num==2){
$('#quantity').val(num-1);
$('.decrease').css({'color':'#dddfe4'});
}
$('.increase').css({'color':'#150000'});
});
// 评价列表
$('#comment_tab').on('click', 'li', function () {
$('#comment_tab li').removeClass('current');
$(this).addClass('current');
load_goodseval($(this).attr('data-type'));
});
load_goodseval('all');
function load_goodseval(type) {
var url = 'https://www.kilimall.co.ke/index.php?act=goods&op=comments&goods_id=13306264';
url += '&type=' + type;
$("#goodseval").load(url);
}
// 记录浏览历史(添加)
$.get("index.php?act=goods&op=addbrowse", {gid:13306264});
// 初始化对比按钮
initCompare();
// 满即送、加价购显示隐藏
$('[nctype="show-rule"]').click(function () {
$(this).parent().find('[nctype="rule-content"]').show();
});
$('[nctype="hide-rule"]').click(function () {
$(this).parents('[nctype="rule-content"]:first').hide()
});
});
/* 加入购物车后的效果函数 */
function addcart_callback(data) {
$('#bold_num').html(data.num);
$('#bold_mly').html(price_format(data.amount));
$('.ncs-cart-popup').fadeIn('fast');
}
var $cur_area_list, $cur_tab, next_tab_id = 0, cur_select_area = [], calc_area_id = '', calced_area = [], cur_select_area_ids = [];
$(document).ready(function () {
$("#ncs-freight-selector").hover(function () {
//如果店铺没有设置默认显示区域,马上异步请求
if (typeof nc_a === "undefined") {
$.getJSON(SITEURL + "/index.php?act=index&op=json_area&callback=?", function (data) {
nc_a = data;
$cur_tab = $('#ncs-stock').find('li[data-index="0"]');
_loadArea(0);
});
}
$(this).addClass("hover");
$(this).on('mouseleave', function () {
$(this).removeClass("hover");
});
});
$('ul[class="area-list"]').on('click', 'a', function () {
$('#ncs-freight-selector').unbind('mouseleave');
var tab_id = parseInt($(this).parents('div[data-widget="tab-content"]:first').attr('data-area'));
if (tab_id == 0) {
cur_select_area = [];
cur_select_area_ids = []
}
;
if (tab_id == 1 && cur_select_area.length > 1) {
cur_select_area.pop();
cur_select_area_ids.pop();
if (cur_select_area.length > 1) {
cur_select_area.pop();
cur_select_area_ids.pop();
}
}
next_tab_id = tab_id + 1;
var area_id = $(this).attr('data-value');
$cur_tab = $('#ncs-stock').find('li[data-index="' + tab_id + '"]');
$cur_tab.find('em').html($(this).html());
$cur_tab.find('i').html(' ∨');
if (tab_id < 2) {
calc_area_id = area_id;
cur_select_area.push($(this).html());
cur_select_area_ids.push(area_id);
$cur_tab.find('a').removeClass('hover');
$cur_tab.nextAll().remove();
if (typeof nc_a === "undefined") {
$.getJSON(SITEURL + "/index.php?act=index&op=json_area&callback=?", function (data) {
nc_a = data;
_loadArea(area_id);
});
} else {
_loadArea(area_id);
}
} else {
//点击第三级,不需要显示子分类
if (cur_select_area.length == 3) {
cur_select_area.pop();
cur_select_area_ids.pop();
}
cur_select_area.push($(this).html());
cur_select_area_ids.push(area_id);
$('#ncs-freight-selector > div[class="text"] > span').html(cur_select_area.join('-'));
$('#ncs-freight-selector').removeClass("hover");
_calc();
}
$('#ncs-stock').find('li[data-widget="tab-item"]').on('click', 'a', function () {
var tab_id = parseInt($(this).parent().attr('data-index'));
if (tab_id < 2) {
$(this).parent().nextAll().remove();
$(this).addClass('hover');
$('#ncs-stock').find('div[data-widget="tab-content"]').each(function () {
if ($(this).attr("data-area") == tab_id) {
$(this).show();
} else {
$(this).hide();
}
});
}
});
});
function _loadArea(area_id) {
if (nc_a[area_id] && nc_a[area_id].length > 0) {
$('#ncs-stock').find('div[data-widget="tab-content"]').each(function () {
if ($(this).attr("data-area") == next_tab_id) {
$(this).show();
$cur_area_list = $(this).find('ul');
$cur_area_list.html('');
} else {
$(this).hide();
}
});
var areas = [];
areas = nc_a[area_id];
for (i = 0; i < areas.length; i++) {
if (areas[i][1].length > 15) {
$cur_area_list.append("
" + areas[i][1] + "");
} else {
$cur_area_list.append("
" + areas[i][1] + "");
}
}
if (area_id > 0) {
$cur_tab.after('
Please Choose ∨');
}
} else {
//点击第一二级时,已经到了最后一级
$cur_tab.find('a').addClass('hover');
$('#ncs-freight-selector > div[class="text"] > span').html(cur_select_area.join('-'));
$('#ncs-freight-selector').removeClass("hover");
_calc();
}
}
//计算运费,是否配送
function _calc() {
$.cookie('dregion', cur_select_area_ids.join(' ') + '|' + cur_select_area.join(' '), {expires: 30});
var _args = '';
_args += "&tid=108";
_args += "&super=1";
if (_args != '') {
_args += '&area_id=' + calc_area_id;
if (typeof calced_area[calc_area_id] == 'undefined') {
//需要请求配送区域设置
$.getJSON(SITEURL + "/index.php?act=goods&op=calc&" + _args + "&myf=0.00&callback=?", {
'pre': 'Shipping Fee',
'goods_id': '13306264'
}, function (data) {
allow_buy = data.total ? true : false;
calced_area[calc_area_id] = data.total;
if (data.total === false || 51 == '0') {
$('#ncs-freight-prompt > strong').html('No Stock').next().remove();
$('a[nctype="buynow_submit"]').addClass('no-buynow');
$('a[nctype="addcart_submit"]').addClass('no-buynow');
$('#store-free-time').hide();
} else {
$('#ncs-freight-prompt > strong').html('In Stock ').next().remove();
$('#ncs-freight-prompt > strong').after('
' + data.total + '');
$('a[nctype="buynow_submit"]').removeClass('no-buynow');
$('a[nctype="addcart_submit"]').removeClass('no-buynow');
$('#store-free-time').show();
shippingDiscountNotice();
}
});
} else {
if (calced_area[calc_area_id] === false || 51 == '0') {
$('#ncs-freight-prompt > strong').html('No Stock').next().remove();
$('a[nctype="buynow_submit"]').addClass('no-buynow');
$('a[nctype="addcart_submit"]').addClass('no-buynow');
$('#store-free-time').hide();
} else {
$('#ncs-freight-prompt > strong').html('In Stock ').next().remove();
$('#ncs-freight-prompt > strong').after('
' + calced_area[calc_area_id] + '');
$('a[nctype="buynow_submit"]').removeClass('no-buynow');
$('a[nctype="addcart_submit"]').removeClass('no-buynow');
$('#store-free-time').show();
shippingDiscountNotice()
}
}
}
}
//如果店铺设置默认显示配送区域
});
//googleSEO
var priceSTR = $('.ncs-meta .dl-price strong').html();
var currency = priceSTR.split(' ')[0];
var price = priceSTR.split(' ')[1];
var oHead = document.getElementsByTagName('head').item(0);
var oScript= document.createElement("script");
oScript.type = "application/ld+json";
var BrandName= 'test';
for(var i=0;i<$('#ncGoodsIntro .nc-goods-sort>li').length;i++){
if($('#ncGoodsIntro .nc-goods-sort>li').eq(i).html().split(' ')[0]=='Brand:'){
BrandName = $('#ncGoodsIntro .nc-goods-sort>li').eq(i).html().split(' ')[1]
}
}
var meta = document.getElementsByTagName('meta');
var share_desc = '';
for(i in meta){
if(typeof meta[i].name!="undefined"&&meta[i].name.toLowerCase()=="description"){
share_desc = meta[i].content;
}
}
//google SEO JSON包
var seoJSON = {
"@context": "http://schema.org/", //写死
"@type": "ItemPage",
"mainEntity": {
"@type": "Product", //写死
"name": '6-string 4 Frets Portable Pocket Acoustic Guitar Practice Tool BLACK', //产品名
"image": [
$('#ncs-goods-picture .gallery img')[0].src
],
"description": share_desc, //获取网页产品描述
"mpn": 13306264, //sku号
"brand": {
"@type": "Thing", //写死
"name": BrandName //品牌名
},
"aggregateRating": {
"@type": "AggregateRating", //写死
"ratingValue": "100%", //评分
"reviewCount": "0" == 0 ? 1 : "0" //评价人数
},
"offers": {
"@type": "Offer",
"priceCurrency": currency, //当地国家货币
"price": "798.00", //商家价格
"priceValidUntil": new Date().getFullYear() + 2 + "-11-05", //每年变动一次,时间为距离当年2年
"itemCondition": "http://schema.org/UsedCondition", //写死
"availability": "http://schema.org/InStock", //InStock就是有库存,outstock就是没库存
"seller": {
"@type": "Organization", //写死
"name": "Margot" //商家名
}
}
}
};
seoJSON.breadcrumb = $.parseJSON('{\"@context\":\"http:\/\/schema.org\",\"@type\":\"BreadcrumbList\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"item\":{\"@id\":\"https:\/\/www.kilimall.co.ke\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"position\":2,\"item\":{\"@id\":\"https:\/\/www.kilimall.co.ke\/kids-baby-toys\/\",\"name\":\"Kids, Baby, Toys\"}},{\"@type\":\"ListItem\",\"position\":3,\"item\":{\"@id\":\"https:\/\/www.kilimall.co.ke\/toys\/\",\"name\":\"Toys\"}},{\"@type\":\"ListItem\",\"position\":4,\"item\":{\"@id\":\"https:\/\/www.kilimall.co.ke\/2034-musical-instruments-0-0-0-0-0-0-0-0-0-0-0.html\",\"name\":\"Musical Instruments\"}}]}');
if($('.g-body').find('embed').length>0){
seoJSON.video = {
"@type" :"VideoObject",
"name" :'6-string 4 Frets Portable Pocket Acoustic Guitar Practice Tool BLACK',
"description": share_desc, //获取网页产品描述
"thumbnailUrl":$('#ncs-goods-picture .gallery img')[0].src,
"uploadDate" :"2015-02-05T080000+0800",
"publisher": {
"@type":"Organization",
"name": "Kilimall",
"logo": {
"@type": "ImageObject",
"url":$('#ncs-goods-picture .gallery img')[0].src,
"width": $('.g-body').find('embed')[0].width,
"height":$('.g-body').find('embed')[0].height,
}
},
"embedUrl": $('.g-body').find('embed')[0].src
}
}
oScript.innerHTML = JSON.stringify(seoJSON);
oHead.appendChild( oScript);
// //预售
var EndTimeStamp = 0;
/* S 秒杀倒计时 */
/* E 秒杀倒计时 */
if (EndTimeStamp > 0) {
setCount();
var countdownIn = setInterval(setCount, 1000);
}
function setCount(){
EndTimeStamp--;
if(EndTimeStamp<=0) {
window.location.reload();
return;
}
var dateInfo = calCount(EndTimeStamp);
$('.countdown-day>span').html(dateInfo.mwDAYS);
$('.countdown-hour>span').html(dateInfo.mwHRS);
$('.countdown-min>span').html(dateInfo.mwMINS);
$('.countdown-sec>span').html(dateInfo.mwSECS);
}
function addzero(num){
if(0<=num &&num<10){
num = '0'+num
}
return num
}
function calCount(Stamp){
if(Math.floor(Stamp/(60*60*24))>0){
$('.countdown-day,.wordday').css('display','inline-block');
}
var mwDAYS = addzero(Math.floor(Stamp/(60*60*24)));
var mwHRS = addzero(Math.floor(Stamp/(60*60) % 24 ));
var mwMINS = addzero(Math.floor(Stamp/(60) % 60 ));
var mwSECS = addzero(Math.floor(Stamp % 60 ));
// console.log(mwDAYS,mwHRS,mwMINS,mwSECS)
return {
mwDAYS:mwDAYS,
mwHRS:mwHRS,
mwMINS:mwMINS,
mwSECS:mwSECS
}
}
$(function () {
$(document).on('click', 'a[data-share]', function () {
var share = $(this).attr('data-share');
var type = '';
var url = '';
switch (share) {
case 'fb':
url = 'http://www.facebook.com/sharer.php?u='+encodeURIComponent(location.href);
type = 'facebook';
break;
case 'tt':
url = 'http://twitter.com/home/?status='.concat(encodeURIComponent(document.title)) .concat(' ') .concat(encodeURIComponent(location.href));
type = 'twitter';
break;
}
if (url != '') {
var src = 'https://www.kilimall.co.ke/index.php?act=goods&op=share&goods_id=13306264';
$.getJSON(src, {shareMethod: type}, function (res) {});
window.open(url,'sharer','toolbar=0,status=0,width=626,height=436');
}
});
addAltToImgOfGoodsDetail();
});
function addAltToImgOfGoodsDetail() {
var $img = $('#ncGoodsIntro').find('img[src]');
var gname = '6-string 4 Frets Portable Pocket Acoustic Guitar Practice Tool BLACK';
$img.each(function (k, v) {
$(this).attr('alt', gname + ' ' + (k + 1));
});
}
//优惠券改版
var seller_voucher_list = [{"voucher_available":1,"voucher_t_id":"8705","voucher_is_seller":1,"voucher_t_available":"30\/09\/2019-30\/10\/2019","voucher_t_price":"399.00","voucher_t_limit":"3999.00","voucher_use_type":"0","voucher_settlement_type":"0","voucher_use_name":"All goods","voucher_store_name":"Margot","count":"100","receive_count":"63"},{"voucher_available":1,"voucher_t_id":"8706","voucher_is_seller":1,"voucher_t_available":"30\/09\/2019-30\/10\/2019","voucher_t_price":"299.00","voucher_t_limit":"3699.00","voucher_use_type":"0","voucher_settlement_type":"0","voucher_use_name":"All goods","voucher_store_name":"Margot","count":"100","receive_count":"28"},{"voucher_available":1,"voucher_t_id":"8707","voucher_is_seller":1,"voucher_t_available":"30\/09\/2019-30\/10\/2019","voucher_t_price":"199.00","voucher_t_limit":"2599.00","voucher_use_type":"0","voucher_settlement_type":"0","voucher_use_name":"All goods","voucher_store_name":"Margot","count":"100","receive_count":"28"},{"voucher_available":1,"voucher_t_id":"8708","voucher_is_seller":1,"voucher_t_available":"30\/09\/2019-30\/10\/2019","voucher_t_price":"99.00","voucher_t_limit":"1899.00","voucher_use_type":"0","voucher_settlement_type":"0","voucher_use_name":"All goods","voucher_store_name":"Margot","count":"100","receive_count":"17"},{"voucher_available":1,"voucher_t_id":"8709","voucher_is_seller":1,"voucher_t_available":"30\/09\/2019-30\/10\/2019","voucher_t_price":"59.00","voucher_t_limit":"1599.00","voucher_use_type":"0","voucher_settlement_type":"0","voucher_use_name":"All goods","voucher_store_name":"Margot","count":"100","receive_count":"26"},{"voucher_available":1,"voucher_t_id":"8710","voucher_is_seller":1,"voucher_t_available":"30\/09\/2019-30\/10\/2019","voucher_t_price":"29.00","voucher_t_limit":"999.00","voucher_use_type":"0","voucher_settlement_type":"0","voucher_use_name":"All goods","voucher_store_name":"Margot","count":"100","receive_count":"30"},{"voucher_available":1,"voucher_t_id":"8711","voucher_is_seller":1,"voucher_t_available":"30\/09\/2019-30\/10\/2019","voucher_t_price":"10.00","voucher_t_limit":"10.00","voucher_use_type":"0","voucher_settlement_type":"0","voucher_use_name":"All goods","voucher_store_name":"Margot","count":"100","receive_count":"72"}];//优惠券数组
if(seller_voucher_list.length>0){
$('.getVoucherInGood').css('display','block')
}
function login_dialog(){
CUR_DIALOG = ajax_form('login','Login',SITEURL+'/index.php?act=login&inajax=1',360,1);
}
/* 显示Ajax表单 */
function ajax_form(id, title, url, width, model)
{
if (!width) width = 480;
if (!model) model = 1;
var d = DialogManager.create(id);
d.setTitle(title);
d.setContents('ajax', url);
d.setWidth(width);
d.show('center',model);
return d;
}
var baseURL = 'https://www.kilimall.co.ke';
// var baseURL = 'http://www.kili.co'
var currency = whichcountry().currency;
var whetherloginBoo = false;
var goods_list_loading = false;
var hasmore = false;
var curpage =1;
var dataARR = [];
var onlyonce = true;
function Line1Joint(a,b,c,d){
//abcd对应voucher.voucher_t_price,voucher.voucher_t_limit,voucher.voucher_use_type,voucher.voucher_settlement_type;
// 1). Spend KSh xxx to get KSh xxx off. 满xx减xx;
// 1). Spend KSh xxx to get xx% off. 满xx享受xx折扣;
// 1). KSh xxx off for any purchase. 立减xx;
// 1). xx% off for any purchase. 立减xx%;
var words =''
if(c==0){
//满减
if(d==0){
//价格
words = '
'+currency+' '+priceFormat(a)+' Off
Spend '+currency+' '+priceFormat(b)+' to get.';
}else if(d==1){
//折扣
words = '
'+priceFormat(a)+'% Off'+'
Spend '+currency+' '+priceFormat(b)+' to get. ';
}
}else if(c==1){
//立减
if(d==0){
//价格
words = '
'+currency+' '+priceFormat(a)+' Off
For any purchase.
'
}else if(d==1){
//折扣
words = '
'+priceFormat(a)+'% Off
For any purchase.
'
}
}
return words;
}
function percentTrans(count,receive_count){
return parseInt((receive_count/count).toFixed(4)*10000)/100+'%';
}
buildVoucher(seller_voucher_list)
// 图片切换效果
$('.goods-thumb-scroll-show').find('a').mouseover(function(){
$(this).parents('li:first').addClass('selected').siblings().removeClass('selected');
var _src = $(this).find('img').attr('src');
_src = _src.replace('_60.', '_240.');
$(this).parents('dt').find('.goods-thumb').find('img').attr('src', _src);
});
function buildVoucher(ARR){
console.log(ARR)
var strlis = ''
for(var i in ARR){
var available = ARR[i].voucher_available==1?'active':'';
var goldOrBlue = ''
if(ARR[i].voucher_is_seller==0){
goldOrBlue = 'gold'
}else if(ARR[i].voucher_is_seller==1){
goldOrBlue = 'blue'
}
if(ARR[i].voucher_available==1){
goldOrBlue +=' active'
}
var voucherTitle = ARR[i].voucher_is_seller==0?'Can be used in
Kilimall.':'Can only be used in
'+ARR[i].voucher_store_name+' shop.';
strlis+= `
${Line1Joint(ARR[i].voucher_t_price,ARR[i].voucher_t_limit,ARR[i].voucher_use_type,ARR[i].voucher_settlement_type)}
${voucherTitle}
(Valid: ${ARR[i].voucher_t_available})
`
}
$('.scrollUL').html(strlis)
$('.spinner').hide();
}
$('.listWrapper').on('click','.rightpart',function(){
var id = $(this).attr('voucher_t_id');
var voucher_available = $(this).attr('voucher_available');
var voucher_is_seller = $(this).attr('voucher_is_seller');
if($(this).hasClass('active')){
}else{
return
}
if(!whetherloginBoo){
whetherlogin(id,voucher_is_seller)
return
}
getVoucher(id,voucher_is_seller)
})
function whetherlogin(voucheID,is_seller, fn){
var url = '/index.php?act=cash_rewards&op=check_login';
$.ajax({
type: "GET",
url: baseURL+url,
dataType: "json",
success: function(data) {
if(Number(data.datas.status)>0){
whetherloginBoo = true;
if(voucheID){
getVoucher(voucheID,is_seller)
}
if (typeof fn == 'function') {
fn();
}
}else{
setCookie('sa_signUpLoginSource', 'claim_voucher', 0.042);
login_dialog();
}
},
error: function(err){
alert(err);
}
});
}
function getVoucher(voucheID,is_seller){
$('.spinner').show()
var url = '/index.php?act=pointvoucher&op=exchangevoucher&vid='+voucheID+'&is_seller='+is_seller;
$.ajax({
type: "GET",
url: baseURL+url,
dataType: "json",
success: function(data) {
$('.spinner').hide()
if(data.code==200){
alert(data.datas.msg)
// data.datas.hasmore
if(!data.datas.hasmore){
$('[voucher_t_id='+voucheID+']').removeClass('active');
}
}else if(data.code==444){
alert(data.datas.error)
}
},
error: function(err){
alert(err);
}
});
}
$('.voucherTitle i').click(function(){
$('.blackWrapper').hide()
})
$('.getVoucherNowButton').click(function(){
if(!whetherloginBoo){
whetherlogin('', '', function () { $('.blackWrapper').show(); });
return;
} else {
$('.blackWrapper').show();
}
});
//轮换图
$(document).ready(function () {
$(".recomm-con ul:first").addClass("current");
$(".dots li:first").addClass("active");
});
$(function () {
$(".dots li").click(function () {
if($(this).hasClass("active")) return ;
$(".dots li.active").removeClass("active");
$(this).addClass("active");
var i = $(this).index();
$(".recomm-con ul.current").removeClass("current");
$('.recomm-con ul:eq('+i+')').addClass("current");
});
$(".good-recomm li.next a").click(function () {
var b = $(".recomm-con ul.current"), c = b.next(".recomm-ul");
if (c.length > 0) {
b.removeClass("current");
c.addClass("current");
var i = c.index();
$(".dots li.active").removeClass("active");
$('.dots li:eq('+i+')').addClass("active");
}
});
$(".good-recomm li.prev a").click(function () {
var b = $(".recomm-con ul.current"),c = b.prev(".recomm-ul");
if (c.length > 0) {
b.removeClass("current");
c.addClass("current");
var i = c.index();
$(".dots li.active").removeClass("active");
$('.dots li:eq('+i+')').addClass("active");
}
})
});
// 固定在顶部
function gdjz(div,offset){
var a,b,c,d;
d=$(div).offset().top;
a=eval(d + offset);
b=$(window).scrollTop();
c=$(window).height();
console.log(a,b,c,d);
if(b>=460){
$('#ncs-goods-picture').css({
'position':'fixed',
'top':c-d
});
} else if (b<100) {
$('#ncs-goods-picture').css({
'position':'absolute',
'top':'0'
});
}
}
// $(window).scroll(function(){
// gdjz('#ncs-goods-picture',360);})
//固定在框框里
var tops;//获取初次的位置高度,便于后期固定该值
var srollHeight;//获取最多能滚动的高度
$(function(){
//1.获取指定元素距离浏览器顶部的高度
tops = $('#ncs-goods-picture').offset().top;//实际最小滚动高度
var height = $('#wrapper-detail').height()-$('#ncs-goods-picture').height(); //获取区域内能滚动的高度
srollHeight = tops+height;//实际最大滚动高度
$('[data-rel="toComment"]').on('click', function () {
document.getElementById("comment").scrollIntoView();
});
});
/*滚动监听*/
// $(window).scroll(function() {
//
// var top = tops;
// //获取滚动高度
// var scrollTop = $(document).scrollTop();
// var heghts = srollHeight-scrollTop;
// console.log("heghts:"+heghts);
// if(scrollTop>top&&srollHeight>scrollTop){
// $('#ncs-goods-picture').css("position","fixed").css("top",0);
//
// }else if(srollHeightscrollTop){
// $('#ncs-goods-picture').removeAttr("style");
// }
// });
$(".second-text .detail_length").each(function(){
var str = $(this).html();
var subStr = str.substring(0,20);
//alert(subStr);
$(this).html(subStr + (str.length >20 ? '...': ''));
});
//限制字符个数
$(".detail_length").each(function(){
var maxwidth=20;
if($(this).text().length>maxwidth){
$(this).text($(this).text().substring(0,maxwidth));
$(this).html($(this).html()+'...');
}
});
//限制字符个数
$(".detail_length1").each(function(){
var maxwidth=60;
if($(this).text().length>maxwidth){
$(this).text($(this).text().substring(0,maxwidth));
$(this).html($(this).html()+'...');
}
});
$(".store-top-name").each(function(){
var maxwidth=15;
if($(this).text().length>maxwidth){
$(this).text($(this).text().substring(0,maxwidth));
$(this).html($(this).html()+'...');
}
});
$(function ($) {
var eleCollect = {
ids: [],
add: function (id) {
this.ids.push(parseInt(id));
}
};
$(window).scroll(function () {
var ids = [];
$('.also-in .goods-thumb').each(function () {
var id = $('.also-in li').index($(this).closest('li')) + 1;
if (isVisible($(this)) && false === in_array(id, eleCollect.ids)) {
eleCollect.add(id);
ids.push({id: id, url: $(this).find('a:first').attr('href')});
}
});
collect(ids);
});
$(window).trigger('scroll');
// You May Be Interested In
$(document).on('click', 'a[data-rel="goods_jump"]', function () {
var id = $('.also-in li').index($(this).closest('li')) + 1;
sa.track('clickBanner', {
bannerType: 'recommendation',
bannerCurrentUrl: window.location.href,
bannerCurrentPageType: 'goods_detail',
bannerBelongArea: 'you_may_also_like',
bannerRanking: '' + id,
bannerToUrl: $(this).attr('href'),
bannerToPageType: 'goods_detail'
});
});
// Featured Recommendations
$(document).on('click', '.recomm-con .recomm-ul a', function () {
var $this = $(this);
var id = $this.closest('li').index() + 1;
sa.track('clickBanner', {
bannerType: 'selection',
bannerCurrentUrl: window.location.href,
bannerCurrentPageType: 'goods_detail',
bannerBelongArea: 'featured_recommendation',
bannerRanking: '' + ($this.closest('.recomm-ul').index() * 5 + id),
bannerToUrl: $(this).attr('href'),
bannerToPageType: 'goods_detail'
});
});
function collect(ids) {
if (ids.length < 1) {
return false;
}
// for (var i in ids) {
// sa.track('showBanner', {
// bannerType: 'recommendation',
// bannerCurrentUrl: window.location.href,
// bannerCurrentPageType: 'goods_detail',
// bannerBelongArea: 'you_may_also_like',
// bannerRanking: '' + ids[i]['id'],
// bannerToUrl: ids[i]['url'],
// bannerToPageType: 'goods_detail'
// });
// }
}
}(jQuery));
/**
* check 每个 ID 限购数量
* @param num 购买的数量
* @param type 操作类型:addCart-加入购物车;buy-购买
* @returns {boolean}
*/
function checkBuyLimit(num, type) {
var result = true;
var max = parseInt('0');
// if (num > max) {
// $('.increase').css({'color':'#dddfe4'});
// alert(max + ' piece(s) maximum per buyer');
// return false;
// }
$.ajax({
url: 'https://www.kilimall.co.ke/index.php?act=goods&op=checkLimit',
type: 'GET',
data: {
num: num,
gid: '13306264',
opt: type
},
dataType: 'JSON',
async: false,
success: function (ret) {
if (false === ret.state) {
console.log(max);
$('#quantity').val(max);
alert(ret.msg);
result = false;
}
}
});
return result;
}
#footer{color:#000;}
#faq dl dt {
margin-bottom: 2.5rem;
}
.adtitle{
color:#150000;
margin-bottom: 4px;
font: 14px/1.5 Roboto,"Lucida Grande",tahoma,arial,\5b8b\4f53; margin-bottom: 4px; font-weight: bold;
}
.adtitle1{font-size: 12px;font-weight: normal;}
.appPromo{
width: 340px;
height: 190px;
padding:18px 28px 0;
background: #fff;
position: absolute;
left: 800px;
top: -250px;
}
.iconList{
height: 30px;
margin-top:9px;
margin-bottom: 13px;
}
.iconList li{
margin-right: 6px;
width: 28px;
height: 30px;
background-size: contain;
float: left;
margin-left:23px;
}
.iconList li a{
display:inline-block;
width:100%;
height:100%;
}
.iconList li:nth-of-type(1){
margin-left:-7px;
background-image: url(https://www.kilimall.co.ke/templates/en/images/footerappad/facebook.png?v=20180806001);
}
.iconList li:nth-of-type(2){
background-image: url(https://www.kilimall.co.ke/templates/en/images/footerappad/twitter.png?v=20180806001);
}
.iconList li:nth-of-type(3){
background-image: url(https://www.kilimall.co.ke/templates/en/images/footerappad/blog.png?v=20180806001);
}
.iconList li:nth-of-type(4){
background-image: url(https://www.kilimall.co.ke/templates/en/images/footerappad/Telegram-icon.png?v=20180806001);
}
.googleplay{
width: 114px;
height: 24px;
background: url(https://www.kilimall.co.ke/templates/en/images/footerappad/google_play.png?v=20180806001);
margin-bottom:8px;
}
.googleplay a{
display:inline-block;
width:100%;
height:100%;
}
.subemailbox{
width: 170px;
padding-left: 10px;
height: 30px;
outline: none;
left: 0;
top:0;
border:1px solid #000;
}
.subemailwrapper{
width: 260px;
position: relative;
}
.subemailbutton{
position: absolute;
right: 28px;
top:0;
width: 48px;
height: 30px;
background: #000;
border:1px solid #000;
font-size: 14px;
color: #fff;
cursor: pointer;
text-align: center;
line-height: 30px;
}
.emailWarning1{
color: #F87622;
font-size: 12px;
display: none;
}
.bigwrapper1{
width: 1200px;
height: 0;
margin:0 auto;
/*top:500px;*/
position: relative;
z-index: 666;
display: none;
}
.spwrapper1{
background: #f3f5f9;
padding-top: 1px;
border-top: 1px solid #f3f5f9;
border-bottom: 1px solid #f3f5f9;
}
.supportedPayment{
width: 1200px;
height: 100px;
margin:0 auto;
}
.spTitle1{
font-weight: bold;
color:#000;
font-size: 14px;
margin:16px 0 15px 0;
}
.paymentICONLIST li{
width: 87px;
height: 43px;
border:1px solid #eee;
float: left;
margin-right: 10px;
}
.paymentICONLIST>li>img{
width:100%;
height:100%;
}
.footerlipalpay{
height: 45px;
}
.footerlipalpay a{
display: inline-block;
height: 45px;
width: 100%;
}
.footerlipalpay li{
width: 90px;
height: 45px;
float: left;
margin:0 5px;
}
#footer a{
color:#000;
}
.footerlipalpay li:nth-of-type(1){
background: url(https://www.kilimall.co.ke/templates/en/images/footerlipalpay/M.png);
}
.footerlipalpay li:nth-of-type(2){
background: url(https://www.kilimall.co.ke/templates/en/images/footerlipalpay/T.png);
}
.footerlipalpay li:nth-of-type(3){
background: url(https://www.kilimall.co.ke/templates/en/images/footerlipalpay/S.png);
}
Stay Connected:
Get Shopping App and Earn Millions of Cash Rewards:
Subscribe for Special Offers, Promos & Deals:
Mall
| Travel
| SELLER
| MOBILE APP
| iOS App
Copyright 2019 Kilimall, All rights reserved.
$(".s1 dd:nth-of-type(2)").css("font-weight","bold");
//footer添加app推广及
$('.subemailbutton').click(function(){
function isEmail(str){
var reEmail=/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/;
return reEmail.test(str);
}
if(isEmail($('.subemailbox').val())){
$('.emailWarning1').hide()
$.ajax({
type:'POST',
url:'/index.php?act=black_friday&op=mail',
data:{mail:$('.subemailbox').val()},
// dataType: "json",
success:function(res){
res = JSON.parse(res)
$('.emailWarning1').html(res.msg).show()
},
error:function(res){
alert(res.msg)
}
})
}else{
$('.emailWarning1').html('Please enter a mailbox in the correct format').show()
}
})
var imgArr=[12,1,2,3,4,5,6,7,8,9,10,11];
switch(window.location.host){
case 'www.kilimall.co.ke':
$('.iconList li:nth-of-type(1) a').attr('href','https://www.facebook.com/kilimall/')
$('.iconList li:nth-of-type(2) a').attr('href','https://twitter.com/Kilimall')
$('.iconList li:nth-of-type(3) a').attr('href','https://kilimallkenya.blogspot.com/')
$('.iconList li:nth-of-type(4) a').attr('href','https://t.me/KilimallOfficial')
var str = '';
$.each(imgArr,function(index,value){
var liSTR = '
'
str+=liSTR
});
// for(var i in imgArr){
// var liSTR = '
'
// str+=liSTR
// }
$('.paymentICONLIST').html(str)
break
case 'www.kilimall.co.ug':
$('.iconList li:nth-of-type(1) a').attr('href','https://www.facebook.com/kilimalluganda/')
$('.iconList li:nth-of-type(2) a').attr('href','https://twitter.com/kilimalluganda')
$('.iconList li:nth-of-type(3) a').attr('href','https://kilimalluganda.blogspot.com/')
$('.iconList li:nth-of-type(4) a').attr('href','https://t.me/KilimallOfficial')
var str = ''
for(var i=1;i<6;i++){
var liSTR = '
'
str+=liSTR
}
$('.paymentICONLIST').html(str)
break
case 'www.kilimall.ng':
$('.iconList li:nth-of-type(1) a').attr('href','https://www.facebook.com/KilimallNigeria/')
$('.iconList li:nth-of-type(2) a').attr('href','https://twitter.com/kilimallNigeria')
$('.iconList li:nth-of-type(3) a').attr('href','https://kilimallnigeria.blogspot.com/')
$('.iconList li:nth-of-type(4) a').attr('href','https://t.me/KilimallOfficial')
var str = ''
$.each(imgArr,function(index,value){
var liSTR = '
'
str+=liSTR
});
$('.paymentICONLIST').html(str)
break
case 'www.kili.com':
$('.iconList li:nth-of-type(1) a').attr('href','https://www.facebook.com/KilimallNigeria/')
$('.iconList li:nth-of-type(2) a').attr('href','https://twitter.com/kilimallNigeria')
$('.iconList li:nth-of-type(3) a').attr('href','https://kilimallkenya.blogspot.com/')
$('.iconList li:nth-of-type(4) a').attr('href','https://t.me/KilimallOfficial')
var str = ''
$.each(imgArr,function(index,value){
var liSTR = '
'
str+=liSTR
});
$('.paymentICONLIST').html(str)
break
case 'www.kili.co':
var str = ''
$.each(imgArr,function(index,value){
var liSTR = '
'
str+=liSTR
});
$('.paymentICONLIST').html(str)
break
}
if(getCookie('homeArticle')){
$('#faq').show().find('.faq-wrapper ul').html(getCookie('homeArticle'));
}
if(!getCookie('homeArticle') || !getCookie('needHelp')){
App.getJSON('/articles/home','',function (data) {
var dl = '
{content}';
var dt = '{class_name}';
var dd = '
{title}';
var html = '';
var htmlHelp = ''; // 头部 Need Help 里的文章列表
var tplHelp = '
{title}
';
for(var i = 0; i < data.length; i++){
var class_name = data[i].title;
var tmpdl = dl.replace('{i}',i+1);
var tmp = '';
tmp += dt.replace('{class_name}',class_name);
if(data[i].articles){
for (var k = 0; k< data[i].articles.length; k++){
var tmp1 = '';
var _url = '';
tmp1 = dd.replace(/{title}/g,data[i].articles[k].title);
if(data[i].articles[k].article_url){
_url = data[i].articles[k].article_url;
}else{
_url = '/index.php?act=article&article_id='+data[i].articles[k].id;
}
tmp1 = tmp1.replace('{url}',_url);
tmp += tmp1;
if (data[i].id == 3) {
htmlHelp += tplHelp.replace('{url}', _url).replace(/\{title\}/g, data[i].articles[k].title);
}
}
}
tmpdl = tmpdl.replace('{content}',tmp);
html += tmpdl;
setCookie('homeArticle',html);
setCookie('needHelp', htmlHelp);
}
$('#faq').show().find('.faq-wrapper ul').html(html);
$('[data-rel="help"]').html(htmlHelp);
});
}
if(getCookie('homeArticle')){
$('.bigwrapper1').show();
}
if(getCookie('needHelp')){
$('[data-rel="help"]').html(getCookie('needHelp'));
}
var siteUrl = 'https://www.kilimall.co.ke';
var oHead = document.getElementsByTagName('head').item(0);
var oScript= document.createElement("script");
var oScript2= document.createElement("script");
oScript.type = "application/ld+json";
oScript2.type = "application/ld+json";
switch(window.location.host){
case 'www.kilimall.co.ke':
var seoJSON={"@context":"https://schema.org","@type":"Organization","name":"Kilimall","url":siteUrl,"sameAs":["https://www.facebook.com/kilimall","https://twitter.com/Kilimall","https://www.youtube.com/channel/UCiULdy56ABvBc8IAlFqiPSw"],"logo":"https://www.kilimall.co.ke/templates/en/images/kilimalli-logo-240.png","contactPoint":{"@type":"ContactPoint","telephone":"+2540799717001","contactType":"customer service"}};
break;
case 'www.kilimall.co.ug':
var seoJSON={"@context":"https://schema.org","@type":"Organization","name":"Kilimall","url":siteUrl,"sameAs":["https://www.facebook.com/kilimalluganda/","https://twitter.com/kilimalluganda"],"logo":"https://www.kilimall.co.ke/templates/en/images/kilimalli-logo-240.png","contactPoint":{"@type":"ContactPoint","telephone":"+256706717000","contactType":"customer service"}};
break;
case 'www.kilimall.ng':
var seoJSON={"@context":"https://schema.org","@type":"Organization","name":"Kilimall","url":siteUrl,"sameAs":["https://www.facebook.com/KilimallNigeria/","https://twitter.com/kilimallnigeria"],"logo":"https://www.kilimall.co.ke/templates/en/images/kilimalli-logo-240.png","contactPoint":{"@type":"ContactPoint","telephone":"+2349078060008","contactType":"customer service"}};
break;
case 'www.kili.co':
var seoJSON={"@context":"https://schema.org","@type":"Organization","name":"Kilimall","url":siteUrl,"sameAs":["https://www.facebook.com/KilimallNigeria/","https://twitter.com/kilimallnigeria"],"logo":"https://www.kilimall.co.ke/templates/en/images/kilimalli-logo-240.png","contactPoint":{"@type":"ContactPoint","telephone":"+2349078060008","contactType":"customer service"}};
break;
}
var seoJSON2 = {
"@context": "http://schema.org",
"@type": "WebSite",
"url": siteUrl,
"potentialAction": {
"@type": "SearchAction",
"target": siteUrl + "/?act=search&keyword={search_term_string}",
"query-input": "required name=search_term_string"
}
};
if (seoJSON != undefined) {
oScript.innerHTML = JSON.stringify(seoJSON);
oHead.appendChild(oScript);
oScript2.innerHTML = JSON.stringify(seoJSON2);
oHead.appendChild(oScript2);
}
function _addLoadEvent(func) {
var oldonload = window.onload;
if (typeof window.onload != 'function') {
window.onload = func;
} else {
window.onload = function () {
oldonload();
func();
};
}
}
function _saAndGaOnload() {
end_time = new Date();
load_time = end_time.getTime() - start_time.getTime();
if (typeof sa === 'function' && (undefined != pageAlias && '' != pageAlias)) {
sa.track('pageLoadTime', {
loadTime: load_time,
pageAlias: pageAlias,
$url: window.location.href
});
}
if (typeof ga === 'function' && 'Home' == pageAlias) {
ga('send', 'timing', 'pc home', 'load', load_time);
}
}
$(function() {
// // 跟踪页面加载时间
// if (typeof pageAlias != 'undefined' && typeof start_time != 'undefined' && ('Home' === pageAlias || 'goods_detail' === pageAlias)) {
// _addLoadEvent(_saAndGaOnload);
// }
var url = window.location.href;
if (url.match(/(utm_source|utm_medium|utm_campaign|utm_content|utm_term)=[^&]+/)) {
$.post('https://www.kilimall.co.ke/index.php?act=index&op=collectUtm', {u: url}, function () {});
}
});
$(function ($) {
// 顶部 banner
$(document).on('click', '#top-banner>a', function () {
var $this = $(this);
clickBanner({
type: 'banner',
area: 'top_banner',
rank: '1',
toUrl: '' + $this.attr('href'),
toPageType: '',
pageType: 'header'
});
});
// 头部频道导航
$(document).on('click', '.public-nav-layout .site-menu li>a', function () {
var $this = $(this);
var id = $this.closest('li').index() + 1;
clickBanner({
type: 'navigation',
area: $this.text().toLowerCase().replace(/(\s+)/g, '_').replace(/'/g, ''),
rank: id,
toUrl: '' + $this.attr('href'),
toPageType: '',
pageType: 'header'
});
});
// 搜索词自动补全的关键词点击
$(document).on('click', '.ui-menu-item', function () {
$('#button').attr('is_auto', 1);
$('.head-search-bar form.search-form .input-submit').trigger('click');
});
// 头部 search 按钮
$(document).on('click', '.head-search-bar form.search-form .input-submit', function (e) {
var $this = $(this);
clickBanner({
type: 'search',
area: $this.attr('is_auto') == 1 ? 'keywords_recommender' : 'query',
rank: $this.closest('.search-form').find('#keyword').val(),
toUrl: '',
toPageType: '',
pageType: 'search_page'
});
$this.removeAttr('is_auto');
});
// 头部 Top Searches
$(document).on('click', '.head-search-bar .keyword ul a', function () {
var $this = $(this);
clickBanner({
type: 'search',
area: 'top_search',
rank: $this.text(),
toUrl: $this.attr('href'),
toPageType: '',
pageType: 'search_page'
});
});
// 头部 商品类目导航 -> 一级类目
$(document).on('click', 'ul.menu li[cat_id] .class a', function () {
var $this = $(this);
clickBanner({
type: 'category',
area: $this.text(),
rank: $this.text(),
toUrl: $this.attr('href'),
toPageType: 'category_list',
pageType: 'category_page'
});
});
// 头部 商品类目导航 -> 一级类目之外的类目
$(document).on('click', 'ul.menu li[cat_id] .sub-class a', function () {
var $this = $(this);
clickBanner({
type: 'category',
area: $this.closest('li').find('.class a').text(),
rank: $this.text(),
toUrl: $this.attr('href'),
toPageType: 'category_list',
pageType: 'category_page'
});
});
function clickBanner(row) {
sa.track('clickBanner', {
bannerType: row.type,
bannerCurrentUrl: window.location.href,
bannerCurrentPageType: typeof row.pageType != 'undefined' ? row.pageType : 'home_page',
bannerBelongArea: row.area,
bannerRanking: '' + row.rank,
bannerToUrl: '' + row.toUrl,
bannerToPageType: typeof row.toPageType != 'undefined' ? row.toPageType : ''
});
}
}(jQuery));