Tote bag Uni Jute-SHOPPER Max<\/span><\/h2>\r\nTotebag Sac Shopping Uni en 100% Jute, lamin\u00e9. Ce sac shopping poss\u00e8de une p<\/span>oign\u00e9e de transport en coton. Il peut contenir jusqu'\u00e0 29 litres. Le sac shopping uni mesure 45 x 39 x 21 cm.<\/p>\r\nDisponible en 1 couleur : Natural<\/span><\/p>"},"quantity":"0","minimal_quantity":"1","available_now":{"1":""},"available_later":{"1":""},"price":"54.662140","specificPrice":0,"additional_shipping_cost":"0.00","wholesale_price":"0.000000","on_sale":"0","online_only":"0","unity":"","unit_price":null,"unit_price_ratio":"0.000000","ecotax":"0.000000","reference":"60828","supplier_reference":"","location":"","width":"0.000000","height":"0.000000","depth":"0.000000","weight":"0.000000","ean13":"","upc":"","link_rewrite":{"1":"totebag-uni-jute-shopper-max"},"meta_description":{"1":"V\u00e9ritables Professionnels du Sac Shopping Totebag | Devis Imm\u00e9diat & Gratuit | Service client disponible et r\u00e9actif | Livraison Offerte \u00e0 partir de 200\u20ac d'achats HT"},"meta_keywords":{"1":""},"meta_title":{"1":"Sac Totebag Shopping Uni | Totebag en Toile de Jute | WIKOM"},"quantity_discount":"0","customizable":"0","new":null,"uploadable_files":"0","text_fields":"0","active":"1","redirect_type":"404","id_product_redirected":"0","available_for_order":"1","available_date":"0000-00-00","condition":"new","show_price":"1","indexed":"1","visibility":"both","date_add":"2021-06-15 16:08:49","date_upd":"2022-05-28 16:22:36","tags":null,"base_price":null,"id_tax_rules_group":"1","id_color_default":0,"advanced_stock_management":"0","out_of_stock":"2","depends_on_stock":null,"isFullyLoaded":false,"cache_is_pack":"0","cache_has_attachments":"0","is_virtual":"0","id_pack_product_attribute":null,"cache_default_attribute":"2873","category":false,"pack_stock_type":"3","id":59,"id_shop_list":null,"force_id":false,"id_product":59,"link":"https:\/\/boutique-totebag.com\/tote-bag-uni\/59-totebag-uni-jute-shopper-max.html","price_without_reduction":0,"cover_image":{"id":59,"id_image":"59","id_product":"59","position":"1","cover":"1","legend":{"1":"Totebag Uni Jute-SHOPPER Max"},"image_format":"jpg","source_index":"\/home\/boutiquewp\/www\/img\/p\/index.php","id_shop_list":null,"force_id":false,"link":"boutique-totebag.com\/59-home_default\/totebag-uni-jute-shopper-max.jpg"},"id_product_attribute":"2873","allow_oosp":true,"price_tax_exc":54.66214,"product_attribute_minimal_quantity":false,"images":{"59":{"id":59,"id_image":"59","id_product":"59","position":"1","cover":"1","legend":{"1":"Totebag Uni Jute-SHOPPER Max"},"image_format":"jpg","source_index":"\/home\/boutiquewp\/www\/img\/p\/index.php","id_shop_list":null,"force_id":false,"link":"boutique-totebag.com\/59-product_default\/totebag-uni-jute-shopper-max.jpg"}}},'carriers':{"id_carrier":"1","id_reference":"1","id_tax_rules_group":"0","name":"la Boutique du Totebag","url":"","active":"1","deleted":"0","shipping_handling":"0","range_behavior":"0","is_module":"0","is_free":"1","shipping_external":"0","need_range":"0","external_module_name":"","shipping_method":"0","position":"0","max_width":"0","max_height":"0","max_depth":"0","max_weight":"0.000000","grade":"0","delay":"Retrait en magasin","price":0,"price_tax_exc":0,"img":"","tax_rate":20,"range":[]},'imagesDatabase':{"59":{"id":59,"id_image":"59","id_product":"59","position":"1","cover":"1","legend":{"1":"Totebag Uni Jute-SHOPPER Max"},"image_format":"jpg","source_index":"\/home\/boutiquewp\/www\/img\/p\/index.php","id_shop_list":null,"force_id":false,"link":"boutique-totebag.com\/59-product_default\/totebag-uni-jute-shopper-max.jpg"}},'taxRate':20,'accessories':false,'attachments':[],'quantityDisplayLimit':21},computed:{allowPrices:function(){let logged=0;let needLogging=0;if(!logged&&needLogging){return false}
return true},specialAccessory:function(){return this.accessories.slice(-1)},freeDelivery:function(){return parseFloat(this.deliveryPrice)===0},deliveryPrice:function(){let delivery=0
if(this.selectedQuantity!==undefined){let quantity=this.selectedQuantity.id_attribute
let price=this.hasReduction(quantity)?parseFloat(this.getReducedPrice(quantity)):parseFloat(this.getPrice(quantity))
let priceWt=price*(1+this.carriers.tax_rate/100)
this.carriers.range.forEach(v=>{if(priceWt>=parseFloat(v.delimiter1)&&priceWt{return[...acc,parseInt(obj.id_attribute)]},[])},attributesGroupsIdentifierSet:function(){return new Set(this.attributesCombinations.reduce((acc,obj)=>{return parseInt(obj.id_attribute_group)!==this.quantityAttributeGroupId?[...acc,parseInt(obj.id_attribute_group)]:acc},[]))},attributesGroups:function(){Object.keys(this.availableAttributesGroups).forEach(el=>{this.availableAttributesGroups[el]['id']=parseInt(el)})
let attributes=Object.values(this.availableAttributesGroups).filter(el=>(parseInt(el.id)!==this.quantityAttributeGroupId)).sort((a,b)=>{return this.getAttributeGroupPosition(a.id)-this.getAttributeGroupPosition(b.id)})
attributes.forEach(attr=>{Object.keys(attr.attributes).forEach(idAttr=>{if(!this.attributeIsInAvailableCombinations(idAttr)){delete attr.attributes[idAttr]}})})
return attributes},quantitiesList:function(){return this.availableQuantities.filter(el=>{return this.attributesIdentifierList.includes(parseInt(el.id_attribute))}).sort((a,b)=>{return parseInt(a.position)-parseInt(b.position)});},combinationsCount:function(){return combinations.length},selectedCombination:function(){return this.getCombinationFromAttributes(this.selectedAttributes)},selectedAttributesWithoutQuantity:function(){return this.selectedAttributes.filter(x=>!this.attributeIsQuantity(x)).sort((a,b)=>{return this.getAttributeGroupPosition(this.getAttributeGroup(a).id)-this.getAttributeGroupPosition(this.getAttributeGroup(b).id)})},selectedQuantity:function(){let id=this.selectedAttributes.filter(x=>this.attributeIsQuantity(x))[0]
return this.quantitiesList.find(x=>parseInt(x.id_attribute)===id)},buttonRadioTypeCSS:function(){let classes={}
this.attributesGroups.filter(el=>el.group_type==='radio').forEach(grp=>{Object.keys(grp.attributes).forEach(id=>{classes[id]=[this.attributeIsInSelectedCombination(id)?'btn-success':'','PPR_AttributeSelector','btn',this.disabledAttributes.has(parseInt(id))?'PPR_AttributeRadioDisabled':'']})})
return{'classes':classes}},buttonSelectTypeCSS:function(){let style={};let classes={};let disabled={};this.attributesGroups.filter(el=>el.group_type==='select').forEach(grp=>{Object.keys(grp.attributes).forEach(id=>{style[id]={'width':'100%'}
disabled[id]=this.disabledAttributes.has(parseInt(id))
classes[id]=['PPR_AttributeSelector',this.disabledAttributes.has(parseInt(id))?'PPR_AttributeSelectDisabled':'']})})
return{'style':style,'classes':classes,'disabled':disabled}},buttonColorTypeCSS:function(){let style={}
let
classes={}
this.attributesGroups.filter(el=>(el.group_type==='color')).forEach(grp=>{Object.keys(grp.attributes).forEach(id=>{let color=this.getAttributeColorCode(id)
style[id]={'backgroundColor':color,'border':color==='#ffffff'?'1px solid #dddddd':''}
classes[id]=[this.attributeIsInSelectedCombination(id)?'btn-success':'','btn','PPR_AttributeSelector','PPR_ColorSelector',this.disabledAttributes.has(parseInt(id))?'PPR_AttributeColorDisabled':'']})})
return{'style':style,'classes':classes}},buttonQuantityTypeCSS:function(){let classes={}
this.quantitiesList.forEach(el=>{classes[el.id_attribute]=[this.attributeIsInSelectedCombination(el.id_attribute)?'PPR_QuantityCellSelected':'','PPR_QuantityCell',this.disabledQuantities.has(parseInt(el.id_attribute))?'PPR_QuantityCellUnavailable':'']})
return{'classes':classes}},buttonPriceTypeCSS:function(){let classes={}
this.quantitiesList.forEach(el=>{classes[el.id_attribute]=[this.attributeIsInSelectedCombination(el.id_attribute)?'PPR_PriceCellSelected':'','PPR_PriceCell',this.disabledQuantities.has(parseInt(el.id_attribute))?'PPR_PriceCellUnavailable':'']})
return{'classes':classes}},priceTable:function(){let table=[]
this.quantitiesList.forEach(el=>{if(!this.disabledQuantities.has(parseInt(el.id_attribute))){table.push({'id':parseInt(el.id_attribute),'price':0,'reduction':0,'quantity':parseInt(el.name)})}})
table.sort((a,b)=>{return a.name-b.name})
let selectedAttributes=this.selectedAttributesWithoutQuantity
if(this.allowPrices){table.forEach((el,i)=>{let quantity=el.id
let combinationToFind=selectedAttributes.concat(quantity)
if(combinationToFind.length>0){let combination=this.getCombinationFromAttributes(combinationToFind)
if(combination.specific_price.length===0){combination.specific_price=false}
if(combination.specific_price!==false){if(combination.specific_price.reduction_type==='percentage'){table[i].price=combination.price.toFixed(this.precision)
table[i].reduction=((1-parseFloat(combination.specific_price.reduction))*combination.price).toFixed(this.precision)
table[i].unit_price=(table[i].price/this.getQuantityValue(quantity)).toFixed(this.precision)
table[i].unit_price_reduction=(table[i].reduction/this.getQuantityValue(quantity)).toFixed(this.precision)}}else{table[i].price=combination.price.toFixed(this.precision)
table[i].unit_price=(table[i].price/this.getQuantityValue(quantity)).toFixed(this.precision)}}})}
return table.slice(0,this.quantityDisplayLimit)},disabledQuantities:function(){let disabled=new Set()
let attributes=this.selectedAttributesWithoutQuantity
this.quantitiesList.forEach(el=>{let quantity=parseInt(el.id_attribute)
let ctf=attributes.concat(quantity)
if(this.getCombinationFromAttributes(ctf)===undefined){disabled.add(quantity)}})
return disabled},disabledAttributes:function(){let disabled=new Set()
this.attributesGroups.forEach(el=>{let attributes=Object.keys(el.attributes).map(str=>Number(str))
if(attributes.length!==1){set=new Set(this.selectedAttributes)
let currentAttribute=new Set(attributes.filter(x=>set.has(x)))
attributes=attributes.filter(x=>!currentAttribute.has(x))
let selectedAttributesWithoutCurrent=this.selectedAttributes.filter(x=>!currentAttribute.has(x))
attributes.forEach(x=>{let ctf=selectedAttributesWithoutCurrent.concat([x])
if(this.getCombinationFromAttributes(ctf)===undefined){disabled.add(x)}})}})
return disabled},currentImage:function(){let coverSrc='https://boutique-totebag.com/59-product_default/59.jpg';let coverAlt='Totebag Uni Jute-SHOPPER Max';if(this.selectedCombination===undefined||this.selectedCombination.id==this.defaultCombination){return{'src':coverSrc,'alt':coverAlt}}else{if(this.imagesDatabase.length!==0){let protocol='https://';let imageId=this.selectedCombination.id_image;if(this.imagesDatabase[imageId]!==undefined){return{'src':protocol+this.imagesDatabase[imageId].link,'alt':this.imagesDatabase[imageId].legend[1]}}else{return{'src':coverSrc,'alt':coverAlt}}}else{return{'src':coverSrc,'alt':coverAlt}}}}},mounted(){$('#PPR_PRODUCT_TABS').tabs();$("a.fancybox").fancybox();this.selectedAttributes=this.getAttributesFromCombination(this.defaultCombination)
let combinationArray=Object.keys(this.combinations)
let newCombinationObject={};for(let i=0,len=combinationArray.length;i{return a-b}).reduce((acc,el)=>{return acc+el.toString()},'')
return this.combinations[id]},getCombinationIdentifier(combination){return combination.attributes.sort((a,b)=>{return a-b}).reduce((acc,el)=>{return acc+el.toString()},'')},getAttributeGroupPosition(id){let obj=this.groupsPositions.find(grp=>{return parseInt(grp.id_attribute_group)===id})
if(obj!==undefined){return parseInt(obj.position)}},getAttributeGroup(id){id=parseInt(id)
return this.attributesGroups.find(el=>{return Object.keys(el.attributes).map(str=>Number(str)).includes(id)})},getAttributeColorCode(id){let obj=this.colors[id]
if(obj===undefined){return'#ffffff'}
return this.colors[id].value},attributeIsQuantity(id){return this.quantitiesList.find(el=>(parseInt(el.id_attribute)===parseInt(id)))!==undefined},getQuantityValue(quantityId){return parseInt(this.quantitiesList.find(x=>parseInt(x.id_attribute)===parseInt(quantityId)).name)},getPrice(quantityId){return this.priceTable.find(el=>(parseInt(quantityId)===el.id)).price},getReducedPrice(quantityId){return this.priceTable.find(el=>(parseInt(quantityId)===el.id)).reduction},getTotalPrice(quantityId){return(parseFloat(this.getPrice(quantityId))+parseFloat(this.deliveryPrice)).toFixed(this.precision)},getReducedTotalPrice(quantityId){return(parseFloat(this.getReducedPrice(quantityId))+parseFloat(this.deliveryPrice)).toFixed(this.precision)},getUnitPrice(quantityId){return this.priceTable.find(el=>(parseInt(quantityId)===el.id)).unit_price},getReducedUnitPrice(quantityId){return this.priceTable.find(el=>(parseInt(quantityId)===el.id)).unit_price_reduction},hasReduction(quantityId){return this.priceTable.find(el=>(parseInt(quantityId)===el.id)).reduction!==0},selectQuantity(id){id=parseInt(id)
if(!this.disabledQuantities.has(id)){let currentQuantity=this.selectedAttributes.find(el=>this.attributeIsQuantity(el))
this.$set(this.selectedAttributes,this.selectedAttributes.indexOf(currentQuantity),id)}},selectAttribute(id){id=parseInt(id)
let group=this.getAttributeGroup(id)
if(!this.disabledAttributes.has(id)){let currentAttribute=this.selectedAttributes.find(el=>this.getAttributeGroup(el)===group)
this.$set(this.selectedAttributes,this.selectedAttributes.indexOf(currentAttribute),id)}},displayPrice(price,currency=false,without_taxes_label=false,sup_label=true,roundToTwo=false){if(roundToTwo){price=parseFloat(price).toFixed(2)}
price=price.split('.')
let priceHTML=''
priceHTML+=''+price[0]+''
priceHTML+=','
priceHTML+=''+price[1]+''
if(currency)priceHTML+='€'
if(without_taxes_label)priceHTML+=sup_label?'HT':'HT'
return priceHTML},displayPriceWithTaxes(price,currency=false,with_taxes_label=false,sup_label=true,roundToTwo=false){let priceHtml=this.displayPrice((price*(1+this.taxRate/100)).toFixed(this.precision),currency,false,false,roundToTwo)
if(with_taxes_label)priceHtml+=sup_label?'TTC':'TTC'
return priceHtml},getImageLink(link_rewrite,id_image){return"/"+id_image.split("-")[1]+'-home_default/'+link_rewrite+'.jpg'},getCartLink(){return"https://boutique-totebag.com/panier?token=b163231888da6e5574e5467348f56fab&"},getAttachmentLink(){return"https://boutique-totebag.com/index.php?controller=attachment?"}}});/* ]]> */