var Catalogo= TAFFY([]); var Lines= TAFFY([{"language_code":"it","path":"\/it\/{:store}\/listing\/il-meglio-del-mare","line_label":"IL MEGLIO DEL MARE","line_name":"Il meglio del mare","description":"Il meglio del mare","banner":"https:\/\/negozi.saporedimare.it\/img-scheda\/store_proposal\/il_meglio_del_mare.jpg","long_description":null,"banner_big":"https:\/\/negozi.saporedimare.it\/img-scheda\/store_proposal\/il_meglio_del_mare_big.jpg"},{"language_code":"it","path":"\/it\/{:store}\/listing\/non-solo-pesce","line_label":"NON SOLO PESCE","line_name":"Non solo pesce","description":"Non solo pesce","banner":"https:\/\/negozi.saporedimare.it\/img-scheda\/store_proposal\/non_solo_pesce.jpg","long_description":null,"banner_big":"https:\/\/negozi.saporedimare.it\/img-scheda\/store_proposal\/non_solo_pesce_big.jpg"},{"language_code":"it","path":"\/it\/{:store}\/listing\/sempre-pronti-in-cucina","line_label":"SEMPRE PRONTI IN CUCINA ","line_name":"Sempre pronti in cucina ","description":"Sempre pronti in cucina ","banner":"https:\/\/negozi.saporedimare.it\/img-scheda\/store_proposal\/sempre_pronti_in_cucina.jpg","long_description":null,"banner_big":"https:\/\/negozi.saporedimare.it\/img-scheda\/store_proposal\/sempre_pronti_in_cucina_big.jpg"}]); var Prod=[]; var eStore=[]; function siderProposeDyn(line,macro,category) { try{sendGa4DL( 'eStore', 'Click', 'Catalog '+line+' '+macro+' '+category+'', );}catch(e){} var reserve=$("#reserve").val(); var Products=eStore({"line_label":line},{"macro_category_label":macro},{"category_label":category}).get(); var Linea=Products[0].line_name; var Macro=Products[0].macro_category_name; var Category=Products[0].category_name; $("#titolo_collezioni").html(Linea+" / "+Macro+""); $("#titolo_categoria").html(Category); var catalogo=""; for (var i=0;i \"\"\n"; catalogo+="

"+Products[i].product_name+"

\n"; //catalogo+="

EUR 109,90

\n"; catalogo+="\n"; catalogo+="\n"; } $(".catalogo").html(catalogo); $("#collezioni").addClass("hidden"); $(".collezioneHidden").toggleClass("hidden"); } function createProductShowcase(sku,reserve,etichetta, linkUrl) { try{sendGa4DL( 'eStore', 'View', 'Showcase '+sku+etichetta , );}catch(e){} var et='Showcase '+sku+etichetta; var x=""; var product=Catalogo({"sku_model":sku}).get(); console.log("product", product); if (product.length>0) { x+="\"\"\n"; x+="

"+product[0].product_name+"

\n"; x+=""; } return x; } $( document ).ready(function() { eStore=TAFFY(); var lines=eStore().distinct("line_label"); var text=""; for (var i=0;i\n"; if (lines.length>1) text+="
\n"; else text+="
\n"; text+="
\n"; text+="

"+name+"

\n"; text+="
    \n"; for (var j=0;j"+macro+"\n"; text+="
      \n"; var Category=eStore({"line_label":lines[i]},{"macro_category_label":Macro[j]}).order("category_label").distinct("category_label"); for (var k=0;k"+category+"\n"; } text+="
    \n"; //text+="\n"; } text+="
\n"; text+="
\n"; if (lines.length>1) text+="\"\"
\n"; else text+="\"\"
\n"; if ((i%2)==1) text+="\n"; } if ((lines.length%2)==1) text+="\n"; $("#collezioni").html(text); $( ".Category" ).click(function() { var attivo=$(this).next(".stCategory").hasClass("hidden"); $( ".stCategory" ).addClass("hidden"); if (attivo) $(this).next(".stCategory").removeClass("hidden"); }); });