scheduleI nostri negozi e orari di apertura
Localizzazione
Il modulo viene inviato

Shimano GRX Di2 ST-RX825/D-RX820 Dual Control cambio/freno idraulico, sinistro, 2x12, Flat Mount, tubo 1 000 mm

-6%
358  -6%
RRP 457 
Hai trovato un prezzo migliore?
Ritiro nei negozi
Dal 11.02.2026 (mercoledì) Verifica disponibilità
chevron_forward
delivery_truck_speed
Con il corriere a casa tua Consegna tramite corriere DPD Consegna tramite corriere GLS
Consegna giovedì 12.02.2026
location_on
Nei punti di ritiro
Consegna giovedì 12.02.2026
replay
Possibilità di reso estesa fino a 100 giorni Maggiori informazioni sono disponibili sulla pagina
delivery_truck_speed
credit_score

Set di leva cambio e freno anteriore sinistro Di2 GRX RX825 con pinza idraulica RX820, attacco Flat Mount, 2 batterie CR1632 (durata 3,5-4 anni), lunghezza tubo 1 m, peso totale 342 g.

Set di leva cambio e freno anteriore sinistro Di2 GRX RX825 con pinza idraulica RX820, attacco Flat Mount. Il set è progettato per biciclette da ciclocross e gravel e per il sistema di cambio elettronico Shimano GRX Di2. L'attacco della pinza freno è standard Flat Mount, la pinza include pastiglie con raffreddamento. La leva del cambio elettronica controlla il deragliatore Di2 per 2 corone anteriori sulle pedivelle.

Lunghezza tubo: 1 000 mm
Sistema: Shimano Di2
Tipo di leva freno: idraulica
Destinazione leva cambio: sinistra per deragliatore
Tipo di cambio: elettronico
Versione (freni/cambio): kit completo inclusi cavi e pinza
Denominazione tecnica: ST-RX825 + BR-RX820
Destinazione: gravel, ciclocross
Peso: 208 g - ST-RX825 / 134 g - BR-RX820

Dettagli del prodotto
Set / Kit Shimano GRX
Numero di rapporti 2x12
Qualifica / Classifica Anteriore
Tipo di freno idraulici
Tipo di controllo elettronico
ID del prodotto 331947
Recensione del prodotto  (0 recensione)
0/5
(0 recensione)
(0 recensione)
(0 recensione)
(0 recensione)
(0 recensione)
(0 recensione)

Come valuti il prodotto?
Aggiungere una valutazione
Aiuta gli altri, guadagna punti e acquista con sconti fino al 15% grazie al sistema fedeltà.
comment Domande sul prodotto

Al momento non ci sono domande

Il modulo viene inviato

AVVISO
Per informazioni sull'installazione, la regolazione e la sostituzione dei prodotti non contenute nel manuale d'uso, rivolgersi al punto vendita o al distributore. Il manuale del rivenditore destinato ai meccanici ciclistici professionisti ed esperti è disponibile sul nostro sito Web (https://si.shimano.com).
Per sicurezza, leggere attentamente questo "manuale d'uso" prima dell'uso, seguirlo per un uso corretto e conservarlo per poterlo consultare in qualsiasi momento.
Le seguenti istruzioni devono essere sempre seguite per evitare lesioni personali e danni fisici alle apparecchiature e all'ambiente circostante. Le istruzioni sono classificate in base al grado di pericolo o danno che può verificarsi in caso di uso improprio del prodotto.
PERICOLO - La mancata osservanza delle istruzioni provocherà la morte o lesioni gravi.
AVVERTENZA - La mancata osservanza delle istruzioni potrebbe provocare la morte o lesioni gravi.
ATTENZIONE - La mancata osservanza delle istruzioni potrebbe provocare lesioni personali o danni fisici alle apparecchiature e all'ambiente circostante.

AVVERTENZA
- Poiché ogni bicicletta può essere controllata in modo leggermente diverso a seconda del modello, imparare la corretta tecnica di frenata (compresa la pressione sulla leva del freno e le caratteristiche di controllo della bicicletta) e il funzionamento della propria bicicletta. L'uso improprio del sistema frenante della bicicletta può causare la perdita di controllo, con conseguenti lesioni gravi dovute a cadute o collisioni.
- Non smontare o modificare il prodotto. Ciò potrebbe causare un malfunzionamento del prodotto, una caduta improvvisa e lesioni gravi.
- Non esporre il prodotto a forti urti o lanciarlo. La mancata osservanza di questa precauzione può causare rotture, surriscaldamento o problemi durante il funzionamento.
- Evitare che il grasso aderisca ai terminali metallici. Ciò potrebbe causare un guasto al cablaggio.
- Utilizzare solo le batterie a bottone specificate. Quando si sostituisce una batteria a bottone, sostituire contemporaneamente entrambe le batterie con delle nuove. L'uso di diversi tipi di batterie a bottone o di batterie a bottone nuove e vecchie insieme può causare la rottura, la perdita di liquido, il surriscaldamento o l'incendio delle batterie a bottone, con conseguenti incendi, lesioni o contaminazione dell'ambiente circostante.
- Le batterie a bottone sono pericolose e devono essere tenute fuori dalla portata dei bambini. Non mettere mai le batterie in bocca o in qualsiasi parte del corpo. In caso di ingestione o posizionamento nel corpo, possono verificarsi lesioni gravi o mortali entro 2 ore. In caso di ingestione o sospetto, consultare immediatamente un medico.
- Non utilizzare questa apparecchiatura in luoghi in cui potrebbero esserci bambini. In caso di ingestione accidentale delle batterie a bottone fornite, consultare immediatamente un medico.
- Smaltire le batterie a bottone in conformità alle normative locali e/o statali applicabili in materia di smaltimento. Lo smaltimento di questo prodotto nel fuoco o in un forno caldo, oppure la sua frantumazione o taglio meccanico, può causare l'esplosione delle batterie a bottone.
- Non utilizzare le batterie a bottone al di fuori degli intervalli di temperatura di esercizio specificati. L'uso o la conservazione della batteria a temperature al di fuori di questi intervalli può causare incendi, lesioni o problemi durante il funzionamento.
- Non utilizzare le batterie a bottone se presentano perdite di liquido, scolorimento, deformazioni o altri segni insoliti. La mancata osservanza di questa precauzione può causare rotture, surriscaldamento o problemi durante il funzionamento.
- Se il liquido fuoriuscito dalle batterie a bottone entra in contatto con la pelle o gli indumenti, pulirli immediatamente con acqua pulita. Il liquido fuoriuscito può danneggiare la pelle.
- Non lasciare questo prodotto in un ambiente con temperature estremamente elevate, ad esempio in un veicolo chiuso in una giornata calda o vicino a un riscaldatore. Ciò potrebbe causare l'esplosione delle batterie a bottone o la fuoriuscita di liquidi o gas infiammabili.
- Non esporre questo prodotto a una pressione dell'aria estremamente bassa. Ciò potrebbe causare l'esplosione delle batterie a bottone o la fuoriuscita di liquidi o gas infiammabili. Il trasporto aereo di questo prodotto non è un problema.
- Quando si aziona l'interruttore del cambio, fare attenzione a non impigliarsi le dita nel deragliatore. Il potente motore che aziona il deragliatore elettronico continuerà a funzionare senza fermarsi fino a quando non viene raggiunta la posizione del cambio.
- Questo sistema frenante idraulico ha caratteristiche di frenata diverse da quelle di un freno a cerchio, il che indica una forza frenante relativamente elevata all'inizio della frenata (superiore a quella di un freno a cerchio); prima dell'uso, familiarizzare a fondo con le caratteristiche di frenata. Se si guida la bicicletta senza aver acquisito familiarità con le caratteristiche di frenata, la frenata può causare la caduta dalla bicicletta con possibili lesioni gravi o incidenti mortali.
- La forza frenante del sistema frenante idraulico aumenta con le dimensioni del rotore del freno a disco (140 mm, 160 mm, 180 mm, 203 mm).
- Non utilizzare un rotore del freno a disco da 203 mm. Ciò aumenterà eccessivamente la forza frenante, causando la perdita di controllo della bicicletta, la caduta e lesioni gravi.
- Utilizzare un rotore del freno a disco da 180 mm solo se non si riesce a ottenere una forza frenante sufficiente con un rotore del freno a disco da 160 mm durante un giro di prova, ad esempio quando si guida una bicicletta da strada con assistenza elettronica o se il ciclista è pesante. In caso contrario, si potrebbe perdere il controllo della bicicletta, cadere e ferirsi gravemente.
- Se la forza frenante sembra troppo alta o troppo bassa, interrompere l'uso e consultare il punto vendita o il distributore. La perdita di controllo della bicicletta può causare incidenti o cadute con conseguenti lesioni gravi.
- Tenere le dita a una distanza sufficiente dai rotori dei freni a disco rotanti. Il rotore del freno a disco è sufficientemente affilato da causare lesioni gravi alle dita nel caso in cui le dita rimangano impigliate nei fori del rotore in movimento.
- Non toccare le pinze o il rotore del freno a disco durante la guida o immediatamente dopo essere scesi dalla bicicletta. Durante la frenata, le pinze e il rotore del freno a disco si riscaldano, quindi se li si tocca ci si può bruciare.
- Non lasciare che olio o grasso entrino in contatto con il rotore del freno a disco e le pastiglie dei freni. Guidare la bicicletta con olio o grasso sulle pastiglie dei freni può causare il malfunzionamento dei freni e provocare lesioni gravi dovute a cadute o collisioni.
- Controllare lo spessore delle pastiglie dei freni e non utilizzarle se hanno uno spessore di 0,5 mm o inferiore. Ciò può causare il malfunzionamento dei freni e provocare lesioni gravi.
- Non utilizzare il rotore del freno a disco se è incrinato o deformato. Il rotore del freno a disco può rompersi e provocare lesioni gravi dovute a una caduta.
- Non utilizzare il rotore del freno a disco se il suo spessore è di 1,5 mm o inferiore. Non utilizzarlo nemmeno se è visibile la superficie in alluminio. Il rotore del freno a disco può rompersi e provocare lesioni gravi dovute a una caduta.
- Non utilizzare i freni ininterrottamente. Ciò può causare un improvviso aumento dell'innesto della leva del freno, causare il malfunzionamento dei freni e provocare lesioni gravi.
- Non utilizzare i freni in caso di perdita di liquido. Ciò può causare il malfunzionamento dei freni e provocare lesioni gravi.
- Non utilizzare il freno anteriore troppo energicamente. In tal caso, la ruota anteriore potrebbe bloccarsi e la bicicletta potrebbe ribaltarsi in avanti, causando lesioni gravi.
- Poiché lo spazio di frenata richiesto sarà più lungo in caso di pioggia, ridurre la velocità. Tirare i freni in modo tempestivo e delicato. Si può cadere o urtare e ferirsi gravemente.
- Una superficie stradale bagnata può causare la perdita di trazione degli pneumatici. Per evitare che ciò accada, ridurre la velocità e tirare i freni in modo tempestivo e delicato. Se gli pneumatici perdono trazione, si può cadere e ferirsi gravemente.

Il produttore giapponese produce kit per bici da strada, mountain, gravel, trekking, BMX ed ebike, oltre a una gamma di componenti e abbigliamento, tra cui biciclette, scarpe da ciclismo, occhiali, maglie e zaini. È un produttore tradizionale noto per la sua qualità e lavorazione, ed è una scelta popolare per gli atleti amatoriali e professionisti.

Qui troverai le risposte alle tue domande su spedizione, pagamento, sicurezza e altro ancora.

Puoi provare anche queste ricerche
A questo prodotto potrebbero essere adatti
Perché acquistare da noi?
Scopri i vantaggi dell'acquisto
1 000 000+ ordini

Siamo il più grande e-shop di ciclismo in Slovacchia, verificato da decine di migliaia di clienti soddisfatti.

Servizio clienti unico

Siamo disponibili via e-mail, chat, telefono o di persona presso il centro MTBIKER.

Sosteniamo attivamente il ciclismo in Slovacchia

Anche grazie al tuo ordine, supportiamo lo sviluppo del ciclismo.

Acquisto sicuro e metodi di pagamento

Il processo di pagamento è sicuro e ti offriamo un'ampia gamma di opzioni.

Sistema fedeltà

Ti ricompenseremo per l'acquisto e anche per i tuoi contributi di qualità nel forum MTBIKER, nell'e-shop, nelle uscite e nella galleria fotografica.

MTBIKER centro e showroom

Vieni a trovarci nel negozio con pump track vicino ai trail oppure nell'edificio storico nel centro di Bratislava.

navigate_beforeprecedente navigate_nextďalší
keyboard_arrow_up var loadedComments_questionsWidget = false; function loadComments_questionsWidget(){ } var imageUploaderI18N = {"confirmDelete":"Sei sicuro di voler eliminare questa immagine?","labelDelete":"Eliminare l'immagine","textMaxSize":"Il file :file supera la dimensione massima di 12 MB.","textMaxFiles":"Il file :file non pu\u00f2 essere caricato perch\u00e9 puoi caricare al massimo :max foto.","textWrongMime":"Il tipo MIME del file :file non corrisponde ai tipi MIME consentiti:","textWrongExtension":"Il file :file ha un tipo non consentito. I tipi consentiti sono:","textEditTitlePrompt":"Inserisci la descrizione dell\u2019immagine","textEditTitleBtn":"Modificare la descrizione dell\u2019immagine"} // Comments $(function(){ $('.comment-form, .review-form', '#questionsWidget').on('submit', function(){ $(this).attr('autocomplete',"off"); // prevent prepopulating fields on backbtn click if (history.state && history.state.popupOpened === 'mobile-expander'){ $('.mobile-expander-content', '#questionsWidget').addClass('opened'); history.back(); } }); $('select[name=sort], select[name=filter]', '#questionsWidget').on('change', function() { let inputName = $(this).attr('name'); let sort = $('select[name=sort]', '#questionsWidget').val(); let filter = $('select[name=filter]', '#questionsWidget').length ? $('select[name=filter]', '#questionsWidget ').val() : ''; var url = "/ajax.php?m=komentare&f=loadCommentsWidget&a=bW9kdWw9c2hvcCZleHRlcm5hbElkPTMzMTk0NyZpdGVtTmFtZT1TaGltYW5vK0dSWCtEaTIrU1QtUlg4MjUlMkZELVJYODIwK0R1YWwrQ29udHJvbCtjYW1iaW8lMkZmcmVubytpZHJhdWxpY28lMkMrc2luaXN0cm8lMkMrMngxMiUyQytGbGF0K01vdW50JTJDK3R1Ym8rMSswMDArbW0mY29tbWVudFR5cGU9cXVlc3Rpb24mYXV0aG9yVXNlcklkPTAmd2lkZ2V0SWQ9cXVlc3Rpb25zV2lkZ2V0JmFsbG93SW5zZXJ0PTEmYWxsb3dSZXBseT0xJmFkZGl0aW9uYWxFeHRlcm5hbElkcyU1QjAlNUQ9MzMxOTQ4JnJldHVyblVybD1odHRwcyUzQSUyRiUyRnd3dy5tdGJpa2VyLml0JTJGc2hvcCUyRmNvbXBvbmVudGklMkZmcmVuaSUyRmZyZW5pLWEtZGlzY28lMkZmcmVuaS1hLWRpc2NvLWRhLXN0cmFkYS1lLWdyYXZlbCUyRnNoaW1hbm8tZ3J4LWRpMi1zdC1yeDgyNS1kLXJ4ODIwLWR1YWwtY29udHJvbC1jYW1iaW8tZnJlbm8taWRyYXVsaWNvLXNpbmlzdHJvLTJ4MTItZmxhdC1tb3VudC10dWJvLTEtMDAwLW1tLXAzMzE5NDcuaHRtbCUyM3F1ZXN0aW9ucyZwYXJzZWRVcmwlNUJzY2hlbWUlNUQ9aHR0cHMmcGFyc2VkVXJsJTVCaG9zdCU1RD13d3cubXRiaWtlci5pdCZwYXJzZWRVcmwlNUJwYXRoJTVEPSUyRnNob3AlMkZjb21wb25lbnRpJTJGZnJlbmklMkZmcmVuaS1hLWRpc2NvJTJGZnJlbmktYS1kaXNjby1kYS1zdHJhZGEtZS1ncmF2ZWwlMkZzaGltYW5vLWdyeC1kaTItc3Qtcng4MjUtZC1yeDgyMC1kdWFsLWNvbnRyb2wtY2FtYmlvLWZyZW5vLWlkcmF1bGljby1zaW5pc3Ryby0yeDEyLWZsYXQtbW91bnQtdHViby0xLTAwMC1tbS1wMzMxOTQ3Lmh0bWwmcGFyc2VkVXJsJTVCZnJhZ21lbnQlNUQ9cXVlc3Rpb25zJmluY2x1ZGVDb21tZW50SWQ9MA|" + sort + "|" + filter; if (inputName === 'filter') { if (parseInt(filter) === 3 && !customScoreDone) { loadScoreSettingsModal(); return false; } } $('#questionsWidget .comments-body-content').addClass('show-loading'); $.ajax({ url: url, success: function(data) { $('#questionsWidget .comments-body-content').html(data).removeClass('show-loading'); } }); }); }); var commentFileUploaderquestionsWidget = $('.comments-photo-uploader', '#questionsWidget').imageUploader({ hasMain: false, imagesInputName: 'fotokom', preloadedInputName: 'fotokom_preloaded', preloaded: [], maxSize: 12582912, resize: {width: 1280, height: 1920}, maxFiles: 10, }); var commentFormSubmitting = false; $('.comment-form', '#questionsWidget').unbind('submit'); $('.comment-form', '#questionsWidget').on('submit', function(e){ e.preventDefault(); if (commentFormSubmitting) return false; var commentFormSubmitting = true; var $form = $(this); var $commentParent; $form.addClass('show-loading'); $('input[name="fotokom[]"]', $form).prop('disabled', true); var formData = new FormData(this); $.each(commentFileUploaderquestionsWidget.getFiles(),function(i,file){ formData.append('fotokom['+i+']', file); }); $('.invalid-feedback', $form).remove(); $('.is-invalid', $form).removeClass('is-invalid'); var parentId = $form.find("[name=parent]").val(); parentId = parentId ? parseInt(parentId) : 0; var isReply = true && parentId; if (isReply) { $commentParent = $('#commentBox' + parentId); formData.append('level', $commentParent.parents('.comments-replies').length); } $.ajax({ type: "POST", url: "/ajax.php?m=komentare&f=ajaxSaveForm&a=", data: formData, processData: false, contentType: false, success: function(data) { if (isReply && data) { // return comment html (shop only) if ($commentParent.next('.comments-replies').length){ $commentParent.next('.comments-replies').replaceWith($(data)); } else { $commentParent.after($(data)); } // Remove reward container if ($commentParent.find('.reward-container').length) { $commentParent.find('.reward-container').remove(); } let $toHighlight = $('.to-highlight', '#questionsWidget'); if ($toHighlight.length) { $toHighlight.removeClass('to-highlight'); scrollAndHighlightComment('#' + $toHighlight.attr('id'), false); } // Remove 'loyalty-reward' from the url setTimeout(function() { if (window.location.hash.includes("?loyalty-reward=1")) { const newHash = window.location.hash.replace("?loyalty-reward=1", ""); history.replaceState(null, "", newHash); } }, 1000); // reset form resetCommentForm($form.closest('.comments')); $('input[name="fotokom[]"]', $form).prop('disabled', false); $('.comment-form-with-uploader-popup.collapse').collapse('hide'); commentFormSubmitting = false; $form.removeClass('show-loading'); } else { // returns js relocate window.onhashchange = function (e) { e.preventDefault(); window.location.reload(); return false; } $('.mainSite').append(data); // location.reload(); } }, error: function(data){ commentFormSubmitting = false; $form.removeClass('show-loading'); if (data && data.responseJSON && data.responseJSON.formErrors){ $.each(data.responseJSON.formErrors, function(name, error){ $("[name="+name+"]", $form).after('
'+error.join('
')+'
'); $("[name="+name+"]", $form).closest('.form-group').find('input, select, textarea, .dropdown').addClass('is-invalid'); }); } $firstInvalidEl = $(".is-invalid", $form).first(); $firstInvalidEl.focus(); $('input[name="fotokom[]"]', $form).prop('disabled', false); } }); return false; }); // Comments function toggleHiddenComment(comment_id) { $("#commentBox" + comment_id + " .comment-hidden").remove(); $("#commentBox" + comment_id + " .comment-content").show(); } function closeScoreFilterBanner() { $('#commentsScoreFilterBanner').fadeOut(150); $.post('/ajax.php?m=komentare&f=closeScoreFilterBanner'); } function commentsScroll(toElement, offset, noAnimation){ // edit/reply from feed link if ((typeof toElement === 'string' || toElement instanceof String) && toElement.indexOf('#commentBox') >= 0) { let commentId = parseInt(toElement.replace('#commentBox', '')); if (!isNaN(commentId) && commentId) { if (parseInt(localStorage.getItem('replyToCommentId')) === commentId) { localStorage.removeItem('replyToCommentId'); if ($('.comment-reply-btn', toElement).length) { history.replaceState(null, null, ' '); setTimeout(function(){ $('.comment-reply-btn', toElement).first().click(); }, 0); return; } } else if(parseInt(localStorage.getItem('editCommentId')) === commentId) { localStorage.removeItem('editCommentId'); if ( $('.comment-edit-btn', toElement).length) { history.replaceState(null, null, ' '); $('.comment-edit-btn', toElement).first().click(); return; } } } } if (!offset) offset = 0; if (!window.matchMedia("(min-width: 768px)").matches && false) { if ($(toElement).length) { $(toElement).closest('.comments-body-content').scrollTo( toElement, 800, {offset: -10 + offset} ); } } else { if ($(toElement).length){ var headerhHeight = 120 + ($('#shop-info-bar').length ? $('#shop-info-bar').outerHeight() : 0); if (!window.matchMedia("(min-width: 768px)").matches){ headerhHeight = $('#header').outerHeight() + $('#shop-detail-nav').outerHeight() + 20; } if (noAnimation){ setTimeout(function(){ $(window).scrollTop($(toElement).offset().top - headerhHeight + offset); }, 100); var dontScrollAgain = false; setTimeout(function(){ dontScrollAgain = true; }, 3000); $(window).on('load', function(){ if (!dontScrollAgain) $(window).scrollTop($(toElement).offset().top - headerhHeight + offset); }); } else { $.scrollTo( toElement, 800, {offset: -headerhHeight + offset} ); } } } } var customScoreDone = false; function loadMoreComments(btn) { let $btn = $(btn); if ($btn.find('.spinner-border:visible').length) { return false; } let nextPage = parseInt($btn.data('page')) + 1; let perPage = parseInt($btn.data('per-page')); $btn.find('.spinner-border').css("display", "inline-block"); $btnWrap = $btn.closest('.comment-load-more-wrap'); $.get("/ajax.php?m=komentare&f=loadMoreComments&a=" + $btn.data('params') + "|" + $btn.data('sort') + '|' + $btn.data('score') + '|' + nextPage, "", function (data) { $data = $('
' + data + '
'); $btnWrap.before($data.html()); $btn.find('.spinner-border').css("display", "none"); $btn.data('page', nextPage); if ($data.find('.comment:not(.comment-reply)').length < perPage) { $btnWrap.hide(); } }); } function showReviewFormForProduct(el, productId, editId){ let $btn = $(el); if ($btn.hasClass('loading-simple')) { return; } $btn.addClass('loading-simple'); $.get("/ajax.php?m=komentare&f=getReviewFormForProduct&a=" + productId + "|0|0" + (editId ? '|' + editId : ''), "", function (data) { if (data){ $('#reviewsFormPopup').remove(); $('body').append(data); $('#reviewsFormPopup').modal('show'); } $btn.removeClass('loading-simple'); }); } function translateComment(id){ var $text = $('#kom_' + id); var $textTranslated = $('#kom_translation_' + id); var $btn = $('#commentBox' + id + ' .comment-translate'); if ($textTranslated.hasClass('d-none')){ if ($textTranslated.text() == ''){ $.ajax('/ajax.php?u=translate&f=translateComment&a=' + id).done(function(e){ if (e){ $textTranslated.html(e); $text.addClass('d-none'); $textTranslated.removeClass('d-none'); $btn.find('span').first().addClass('d-none'); $btn.find('span').last().removeClass('d-none'); } else { showMessage('Non è stato possibile tradurre il testo.', 'error'); } }).fail(function(){ showMessage('Non è stato possibile tradurre il testo.', 'error'); }); } else { $text.addClass('d-none'); $textTranslated.removeClass('d-none'); $btn.find('span').first().addClass('d-none'); $btn.find('span').last().removeClass('d-none'); } } else { $textTranslated.addClass('d-none'); $text.removeClass('d-none'); $btn.find('span').last().addClass('d-none'); $btn.find('span').first().removeClass('d-none'); } } function scrollAndHighlightComment(commentBoxId, noAnimation){ if ($(commentBoxId).length){ let commentEl = $(commentBoxId); $('.comments .highlighted-animated').removeClass('highlighted-animated'); setTimeout(function(){ commentEl.addClass('highlighted-animated'); commentsScroll( commentBoxId, null, noAnimation); }, 10); } } function resetCommentForm($parent) { $('.comment-form-title-insert', $parent).show(); $('.comment-form-title-reply', $parent).hide(); $("[name=parent]", $parent).val(''); $("textarea", $parent).val(''); let widgetId = $parent.attr('id'); let $legend = $(".comment-form legend", $parent); if ($legend.data('text-original')) { $legend.html($legend.data('text-original')); } let $btn = $(".comment-form button.btn-comment-submit", $parent); if ($btn.data('text-original')) { $btn.html($btn.data('text-original')); } if (typeof window['commentFileUploader' + widgetId] !== 'undefined') { window['commentFileUploader' + widgetId].resetFiles(); } } $(function(){ var scrollToComment = false; if (location.hash.indexOf('#form-')>=0){ var hash = location.hash; commentsScroll( hash, null, true ); //remove hash history.replaceState(null, null, ' '); } if (location.hash == '#questions' || location.hash == '#reviews' || location.hash == '#comments'){ var widgetId = location.hash; if (!$(widgetId).length) widgetId = '#questions'; if ($(widgetId).length && !scrollToComment){ if (!window.matchMedia("(min-width: 768px)").matches){ $(widgetId + '-expander').prop('checked', 'checked').trigger('change'); } if ($('.comment-unread', widgetId).length){ } else { commentsScroll(widgetId, null, true); } } } $('.comments').on('click', '.btn-comment-show-insert-popup', function(){ var $parent = $(this).closest('.comments'); resetCommentForm($parent); }); }); $(function(){ $('textarea', '.comments').on('input', function(){ if ($(this).val().length){ $('.comment-form .btn').addClass('mobile-active'); }else{ $('.comment-form .btn').removeClass('mobile-active'); } $(this).removeClass('is-invalid'); }); function setCommentTextareaPlaceholder(){ if (window.matchMedia("(min-width: 768px)").matches){ $('textarea', '.comments').attr('placeholder', $('textarea', '.comments').data('placeholder-desktop')); }else{ $('textarea', '.comments').attr('placeholder', $('textarea', '.comments').data('placeholder-mobile')); } } setCommentTextareaPlaceholder(); $(window).resize(function(){ setCommentTextareaPlaceholder(); }); }); $(function(){ $('.comment-form button[type=submit]').attr('disabled', 'disabled'); $('.comment-form textarea').click(function(){ $('#loginModal').modal('show'); }); }); var loadedComments_questionsWidget = false; function loadComments_questionsWidget(){ } // #TODO function hideForumPosts() { $('.forum_post_hidden').each(function(){ target = $(this).data('target'); forum_post = $(this).parent('.post_tools').siblings('.post_message'); $(this).show().insertAfter(forum_post); forum_post.hide(); forum_post.parent('.post_right').parent('.post_container').addClass('hiddenForumPost'); }); } $(function(){ hideForumPosts(); }); // #TODO function hideForumPost(postId) { el = $('#' + postId); message = el.siblings('.post_message'); el.remove(); message.show(); message.parent('.post_right').parent('.post_container').removeClass('hiddenForumPost'); } function close_what_we_can_do(id) { $('#we_can_do_better_' + id).hide(); return false; } function send_what_we_can_do(id, id_user) { var $el = $('#we_can_do_better_' + id); $el.addClass('show-loading'); var selectedOption = $('input:radio[name=input_we_can_do_input_' + id + ']:checked').val() var text = $('#input_we_can_do_textarea_' + id).val(); $.get('/ajax.php?u=misc&f=userVoteDownComment&a=' + selectedOption + '|' + id_user + '|' + text + '|' + id , function(data){ close_what_we_can_do(id); $el.removeClass('show-loading'); showMessage('Il tuo feedback è stato inviato con successo.'); } ); } $(function() { $('body').on('click', '.user_votes a.user_votes_link', function(e){ if ($(this).hasClass('inactive')) return false; var fn = $(this).data('rel'); var hash = $(this).attr('hash'); var contentId = $(this).parent().attr('contentid'); var contentType = $(this).parent().attr('contenttype'); var contentUserId = $(this).parent().attr('contentuserid'); var parent = $(this).parent().parent(); var voteTop = 0; if($(this).closest(".metadata-line").length>0) { voteTop = 1; } $(this).tooltip('hide'); $.get('/ajax.php?u=misc&f=userContentVotesAjax&a=' + contentId + '|' + contentType + '|' + contentUserId + '|' + fn + '|' + hash + '|0|1', function(data){ if (data.startsWith('ok')) { data = data.substr(2); } $('.user_votes' + contentType + contentId).replaceWith(data); if (contentType === 'article') { if (fn === 'voteDown') { var position = parent.offset(); var topclick = position.top + 15 - parent.closest('.container.position-relative').offset().top; var leftclick = position.left + 20 - parent.closest('.container.position-relative').offset().left; $('#we_can_do_better_' + contentId).css({top: topclick, left: leftclick}); $('#we_can_do_better_' + contentId).show(); } else { $('#we_can_do_better_' + contentId).hide(); } } } ); return false; }); }); var loadedComments_reviewsWidget = false; function loadComments_reviewsWidget(){ } // Comments $(function(){ $('.comment-form, .review-form', '#reviewsWidget').on('submit', function(){ $(this).attr('autocomplete',"off"); // prevent prepopulating fields on backbtn click if (history.state && history.state.popupOpened === 'mobile-expander'){ $('.mobile-expander-content', '#reviewsWidget').addClass('opened'); history.back(); } }); $('select[name=sort], select[name=filter]', '#reviewsWidget').on('change', function() { let inputName = $(this).attr('name'); let sort = $('select[name=sort]', '#reviewsWidget').val(); let filter = $('select[name=filter]', '#reviewsWidget').length ? $('select[name=filter]', '#reviewsWidget ').val() : ''; var url = "/ajax.php?m=komentare&f=loadCommentsWidget&a=bW9kdWw9c2hvcCZleHRlcm5hbElkPTMzMTk0NyZpdGVtTmFtZT1TaGltYW5vK0dSWCtEaTIrU1QtUlg4MjUlMkZELVJYODIwK0R1YWwrQ29udHJvbCtjYW1iaW8lMkZmcmVubytpZHJhdWxpY28lMkMrc2luaXN0cm8lMkMrMngxMiUyQytGbGF0K01vdW50JTJDK3R1Ym8rMSswMDArbW0mY29tbWVudFR5cGU9cmV2aWV3JmF1dGhvclVzZXJJZD0wJndpZGdldElkPXJldmlld3NXaWRnZXQmYWxsb3dJbnNlcnQ9MSZhbGxvd1JlcGx5PTEmYWRkaXRpb25hbEV4dGVybmFsSWRzJTVCMCU1RD0zMzE5NDgmcmV0dXJuVXJsPWh0dHBzJTNBJTJGJTJGd3d3Lm10YmlrZXIuaXQlMkZzaG9wJTJGY29tcG9uZW50aSUyRmZyZW5pJTJGZnJlbmktYS1kaXNjbyUyRmZyZW5pLWEtZGlzY28tZGEtc3RyYWRhLWUtZ3JhdmVsJTJGc2hpbWFuby1ncngtZGkyLXN0LXJ4ODI1LWQtcng4MjAtZHVhbC1jb250cm9sLWNhbWJpby1mcmVuby1pZHJhdWxpY28tc2luaXN0cm8tMngxMi1mbGF0LW1vdW50LXR1Ym8tMS0wMDAtbW0tcDMzMTk0Ny5odG1sJTIzcmV2aWV3cyZwYXJzZWRVcmwlNUJzY2hlbWUlNUQ9aHR0cHMmcGFyc2VkVXJsJTVCaG9zdCU1RD13d3cubXRiaWtlci5pdCZwYXJzZWRVcmwlNUJwYXRoJTVEPSUyRnNob3AlMkZjb21wb25lbnRpJTJGZnJlbmklMkZmcmVuaS1hLWRpc2NvJTJGZnJlbmktYS1kaXNjby1kYS1zdHJhZGEtZS1ncmF2ZWwlMkZzaGltYW5vLWdyeC1kaTItc3Qtcng4MjUtZC1yeDgyMC1kdWFsLWNvbnRyb2wtY2FtYmlvLWZyZW5vLWlkcmF1bGljby1zaW5pc3Ryby0yeDEyLWZsYXQtbW91bnQtdHViby0xLTAwMC1tbS1wMzMxOTQ3Lmh0bWwmcGFyc2VkVXJsJTVCZnJhZ21lbnQlNUQ9cmV2aWV3cyZpbmNsdWRlQ29tbWVudElkPTA|" + sort + "|" + filter; if (inputName === 'filter') { if (parseInt(filter) === 3 && !customScoreDone) { loadScoreSettingsModal(); return false; } } $('#reviewsWidget .comments-body-content').addClass('show-loading'); $.ajax({ url: url, success: function(data) { $('#reviewsWidget .comments-body-content').html(data).removeClass('show-loading'); } }); }); }); var commentFormSubmitting = false; $('.comment-form', '#reviewsWidget').unbind('submit'); $('.comment-form', '#reviewsWidget').on('submit', function(e){ e.preventDefault(); if (commentFormSubmitting) return false; var commentFormSubmitting = true; var $form = $(this); var $commentParent; $form.addClass('show-loading'); $('input[name="fotokom[]"]', $form).prop('disabled', true); var formData = new FormData(this); $('.invalid-feedback', $form).remove(); $('.is-invalid', $form).removeClass('is-invalid'); var parentId = $form.find("[name=parent]").val(); parentId = parentId ? parseInt(parentId) : 0; var isReply = true && parentId; if (isReply) { $commentParent = $('#commentBox' + parentId); formData.append('level', $commentParent.parents('.comments-replies').length); } $.ajax({ type: "POST", url: "/ajax.php?m=komentare&f=ajaxSaveForm&a=", data: formData, processData: false, contentType: false, success: function(data) { if (isReply && data) { // return comment html (shop only) if ($commentParent.next('.comments-replies').length){ $commentParent.next('.comments-replies').replaceWith($(data)); } else { $commentParent.after($(data)); } // Remove reward container if ($commentParent.find('.reward-container').length) { $commentParent.find('.reward-container').remove(); } let $toHighlight = $('.to-highlight', '#reviewsWidget'); if ($toHighlight.length) { $toHighlight.removeClass('to-highlight'); scrollAndHighlightComment('#' + $toHighlight.attr('id'), false); } // Remove 'loyalty-reward' from the url setTimeout(function() { if (window.location.hash.includes("?loyalty-reward=1")) { const newHash = window.location.hash.replace("?loyalty-reward=1", ""); history.replaceState(null, "", newHash); } }, 1000); // reset form resetCommentForm($form.closest('.comments')); $('input[name="fotokom[]"]', $form).prop('disabled', false); $form.hide(); $('.comment-form-with-uploader-popup.collapse').collapse('hide'); commentFormSubmitting = false; $form.removeClass('show-loading'); } else { // returns js relocate window.onhashchange = function (e) { e.preventDefault(); window.location.reload(); return false; } $('.mainSite').append(data); // location.reload(); } }, error: function(data){ commentFormSubmitting = false; $form.removeClass('show-loading'); if (data && data.responseJSON && data.responseJSON.formErrors){ $.each(data.responseJSON.formErrors, function(name, error){ $("[name="+name+"]", $form).after('
'+error.join('
')+'
'); $("[name="+name+"]", $form).closest('.form-group').find('input, select, textarea, .dropdown').addClass('is-invalid'); }); } $firstInvalidEl = $(".is-invalid", $form).first(); $firstInvalidEl.focus(); $('input[name="fotokom[]"]', $form).prop('disabled', false); } }); return false; }); function showRating(rating){ if (!rating) { $('.reviews-form-stars i').removeClass('fa-star').addClass('fa-star-empty'); } else { var $currentRating = $('.reviews-form-stars i').eq(rating-1); $currentRating.removeClass('fa-star-empty').addClass('fa-star'); $currentRating.prevAll().removeClass('fa-star-empty').addClass('fa-star'); $currentRating.nextAll().removeClass('fa-star').addClass('fa-star-empty'); } } var reviewSubmitting = false; $(function(){ if (!isMobile){ $('.reviews-form-stars i').on('mouseenter', function(){ var rating = parseInt($('#reviewsForm input[name=rating]').val()); if (rating) return false; showRating($(this).index()+1); }); $('.reviews-form-stars').on('mouseleave', function(){ var rating = parseInt($('#reviewsForm input[name=rating]').val()); showRating(rating); }); } }); function submitReviewForm(fotoFileUploader) { $('#reviewsForm').addClass('show-loading'); reviewSubmitting = true; $('#reviewsForm input[name="fotokom[]"]').prop('disabled', true); var formData = new FormData(document.getElementById("reviewsForm")); $.each(fotoFileUploader.getFiles(),function(i,file){ formData.append('fotokom['+i+']', file); }); $('#reviewsForm .invalid-feedback').remove(); $('#reviewsForm .is-invalid').removeClass('is-invalid'); let showNext = $('#reviewsForm input[name="show_next_review"]').length > 0; $.ajax({ type: "POST", url: "/ajax.php?m=komentare&f=ajaxSaveForm&a=", data: formData, processData: false, contentType: false, success: function(data){ if (showNext && typeof showNextReviewForm !== 'undefined') { reviewSubmitting = false; let prevId = $('#reviewsForm input[name="foreign_id"]').val(); showNextReviewForm(prevId, data); } else { // returns js relocate $('.mainSite').append(data); // location.reload(); } }, error: function(data){ reviewSubmitting = false; $('#reviewsForm').removeClass('show-loading'); if (data && data.responseJSON && data.responseJSON.formErrors){ $.each(data.responseJSON.formErrors, function(name, error){ $("#reviewsForm [name="+name+"]").after('
'+error.join('
')+'
'); $("#reviewsForm [name="+name+"]").closest('.form-group').find('input, select, textarea, .dropdown').addClass('is-invalid'); }); } $firstInvalidEl = $("#reviewsForm .is-invalid").first(); $firstInvalidEl.focus(); } }); } // function check and modal if review is too short function isReviewShort(textareaCheckLength, limit = 20) { var modalOpened = false; var reviewtextLength = $('#reviewsForm textarea[name=text]').val().length; if (reviewtextLength < limit && textareaCheckLength === false) { $('#modalReviewShort').modal('show'); textareaCheckLength = true; modalOpened = true; } return [textareaCheckLength, modalOpened]; } var loadedComments_reviewsWidget = false; function loadComments_reviewsWidget(){ } //gallery carousel multiple items - hack $(function(){ // init arrows $('.gallery-carousel').each(function(){ var itemsPerSlide = 4; if ($(this).data('items-per-slide')) itemsPerSlide = $(this).data('items-per-slide'); if ($('.carousel-item', this).length <= itemsPerSlide){ $('.carousel-control-next', this).addClass('disabled'); } }); $('.gallery-carousel').on('slide.bs.carousel', function (e) { if (!window.matchMedia("(min-width: 768px)").matches) return; // default behaviour on mobile /* CC 2.0 License Iatek LLC 2018 - Attribution required */ var $e = $(e.relatedTarget); var idx = $e.index(); var itemsPerSlide = 4; if ($(this).data('items-per-slide')) itemsPerSlide = $(this).data('items-per-slide'); var totalItems = $('.carousel-item', this).length; if ($(this).data('ended')==true && e.direction=='left'){ return false; } if (e.to===0){ $('.carousel-control-prev', this).addClass('disabled'); }else{ $('.carousel-control-prev', this).removeClass('disabled'); } if (e.to>=totalItems - itemsPerSlide){ $('.carousel-control-next', this).addClass('disabled'); $(this).data('ended', true); }else{ $('.carousel-control-next', this).removeClass('disabled'); $(this).data('ended', false); } }); }); var carouselItemsPerSlide = 4; if (window.matchMedia("(min-width: 768px)").matches){ if ($('#pc-432-carousel .col-sm-6').length) carouselItemsPerSlide = 2; if ($('#pc-432-carousel .col-sm-4').length) carouselItemsPerSlide = 3; } if (window.matchMedia("(min-width: 1024px)").matches){ if ($('#pc-432-carousel .col-md-4').length) carouselItemsPerSlide = 3; if ($('#pc-432-carousel .col-md-3').length) carouselItemsPerSlide = 4; } if (window.matchMedia("(min-width: 1200px)").matches){ if ($('#pc-432-carousel .col-lg-3').length) carouselItemsPerSlide = 4; } $('#pc-432-carousel').data('items-per-slide', carouselItemsPerSlide); function resizeCarouselpc432(){ if (window.matchMedia("(min-width: 768px)").matches){ var maxHeight = 0; var width = 0; $('#pc-432-carousel .carousel-inner').height('auto'); $('#pc-432-carousel .carousel-item').each(function(){ width = Math.max(width, $(this).outerWidth()); if (width === 0) return; var $this = $(this); var prevStyle = $this.attr('style'); if (!$this.is(':visible')){ $this.attr('style','position:absolute; left:-500px; display:block; height: auto; width:' + width + 'px'); } maxHeight = Math.max(maxHeight, $(this).outerHeight()); $this.attr('style', prevStyle ? prevStyle : ''); }); $('#pc-432-carousel .carousel-inner').height(maxHeight); } else { $('#pc-432-carousel .carousel-inner').height('100%'); } } $(function(){ resizeCarouselpc432(); $(window).on('resize', function(){ resizeCarouselpc432(); }); }); var carouselItemsPerSlide = 4; if (window.matchMedia("(min-width: 768px)").matches){ if ($('#recommended-90-carousel .col-sm-6').length) carouselItemsPerSlide = 2; if ($('#recommended-90-carousel .col-sm-4').length) carouselItemsPerSlide = 3; } if (window.matchMedia("(min-width: 1024px)").matches){ if ($('#recommended-90-carousel .col-md-4').length) carouselItemsPerSlide = 3; if ($('#recommended-90-carousel .col-md-3').length) carouselItemsPerSlide = 4; } if (window.matchMedia("(min-width: 1200px)").matches){ if ($('#recommended-90-carousel .col-lg-3').length) carouselItemsPerSlide = 4; } $('#recommended-90-carousel').data('items-per-slide', carouselItemsPerSlide); function resizeCarouselrecommended90(){ if (window.matchMedia("(min-width: 768px)").matches){ var maxHeight = 0; var width = 0; $('#recommended-90-carousel .carousel-inner').height('auto'); $('#recommended-90-carousel .carousel-item').each(function(){ width = Math.max(width, $(this).outerWidth()); if (width === 0) return; var $this = $(this); var prevStyle = $this.attr('style'); if (!$this.is(':visible')){ $this.attr('style','position:absolute; left:-500px; display:block; height: auto; width:' + width + 'px'); } maxHeight = Math.max(maxHeight, $(this).outerHeight()); $this.attr('style', prevStyle ? prevStyle : ''); }); $('#recommended-90-carousel .carousel-inner').height(maxHeight); } else { $('#recommended-90-carousel .carousel-inner').height('100%'); } } $(function(){ resizeCarouselrecommended90(); $(window).on('resize', function(){ resizeCarouselrecommended90(); }); }); var carouselItemsPerSlide = 4; if (window.matchMedia("(min-width: 768px)").matches){ if ($('#recommended-100-carousel .col-sm-6').length) carouselItemsPerSlide = 2; if ($('#recommended-100-carousel .col-sm-4').length) carouselItemsPerSlide = 3; } if (window.matchMedia("(min-width: 1024px)").matches){ if ($('#recommended-100-carousel .col-md-4').length) carouselItemsPerSlide = 3; if ($('#recommended-100-carousel .col-md-3').length) carouselItemsPerSlide = 4; } if (window.matchMedia("(min-width: 1200px)").matches){ if ($('#recommended-100-carousel .col-lg-3').length) carouselItemsPerSlide = 4; } $('#recommended-100-carousel').data('items-per-slide', carouselItemsPerSlide); function resizeCarouselrecommended100(){ if (window.matchMedia("(min-width: 768px)").matches){ var maxHeight = 0; var width = 0; $('#recommended-100-carousel .carousel-inner').height('auto'); $('#recommended-100-carousel .carousel-item').each(function(){ width = Math.max(width, $(this).outerWidth()); if (width === 0) return; var $this = $(this); var prevStyle = $this.attr('style'); if (!$this.is(':visible')){ $this.attr('style','position:absolute; left:-500px; display:block; height: auto; width:' + width + 'px'); } maxHeight = Math.max(maxHeight, $(this).outerHeight()); $this.attr('style', prevStyle ? prevStyle : ''); }); $('#recommended-100-carousel .carousel-inner').height(maxHeight); } else { $('#recommended-100-carousel .carousel-inner').height('100%'); } } $(function(){ resizeCarouselrecommended100(); $(window).on('resize', function(){ resizeCarouselrecommended100(); }); }); var carouselItemsPerSlide = 4; if (window.matchMedia("(min-width: 768px)").matches){ if ($('#recommended-243-carousel .col-sm-6').length) carouselItemsPerSlide = 2; if ($('#recommended-243-carousel .col-sm-4').length) carouselItemsPerSlide = 3; } if (window.matchMedia("(min-width: 1024px)").matches){ if ($('#recommended-243-carousel .col-md-4').length) carouselItemsPerSlide = 3; if ($('#recommended-243-carousel .col-md-3').length) carouselItemsPerSlide = 4; } if (window.matchMedia("(min-width: 1200px)").matches){ if ($('#recommended-243-carousel .col-lg-3').length) carouselItemsPerSlide = 4; } $('#recommended-243-carousel').data('items-per-slide', carouselItemsPerSlide); function resizeCarouselrecommended243(){ if (window.matchMedia("(min-width: 768px)").matches){ var maxHeight = 0; var width = 0; $('#recommended-243-carousel .carousel-inner').height('auto'); $('#recommended-243-carousel .carousel-item').each(function(){ width = Math.max(width, $(this).outerWidth()); if (width === 0) return; var $this = $(this); var prevStyle = $this.attr('style'); if (!$this.is(':visible')){ $this.attr('style','position:absolute; left:-500px; display:block; height: auto; width:' + width + 'px'); } maxHeight = Math.max(maxHeight, $(this).outerHeight()); $this.attr('style', prevStyle ? prevStyle : ''); }); $('#recommended-243-carousel .carousel-inner').height(maxHeight); } else { $('#recommended-243-carousel .carousel-inner').height('100%'); } } $(function(){ resizeCarouselrecommended243(); $(window).on('resize', function(){ resizeCarouselrecommended243(); }); }); var carouselItemsPerSlide = 4; if (window.matchMedia("(min-width: 768px)").matches){ if ($('#recommended-118-carousel .col-sm-6').length) carouselItemsPerSlide = 2; if ($('#recommended-118-carousel .col-sm-4').length) carouselItemsPerSlide = 3; } if (window.matchMedia("(min-width: 1024px)").matches){ if ($('#recommended-118-carousel .col-md-4').length) carouselItemsPerSlide = 3; if ($('#recommended-118-carousel .col-md-3').length) carouselItemsPerSlide = 4; } if (window.matchMedia("(min-width: 1200px)").matches){ if ($('#recommended-118-carousel .col-lg-3').length) carouselItemsPerSlide = 4; } $('#recommended-118-carousel').data('items-per-slide', carouselItemsPerSlide); function resizeCarouselrecommended118(){ if (window.matchMedia("(min-width: 768px)").matches){ var maxHeight = 0; var width = 0; $('#recommended-118-carousel .carousel-inner').height('auto'); $('#recommended-118-carousel .carousel-item').each(function(){ width = Math.max(width, $(this).outerWidth()); if (width === 0) return; var $this = $(this); var prevStyle = $this.attr('style'); if (!$this.is(':visible')){ $this.attr('style','position:absolute; left:-500px; display:block; height: auto; width:' + width + 'px'); } maxHeight = Math.max(maxHeight, $(this).outerHeight()); $this.attr('style', prevStyle ? prevStyle : ''); }); $('#recommended-118-carousel .carousel-inner').height(maxHeight); } else { $('#recommended-118-carousel .carousel-inner').height('100%'); } } $(function(){ resizeCarouselrecommended118(); $(window).on('resize', function(){ resizeCarouselrecommended118(); }); }); function updateRelevantCategoryLink(){ $(".link-relevant-product").attr('href', $(".product-relevant-categories .tab-pane.active .link-relevant-product-mobile").attr('href')); } $(document).ready(function(){ $('.product-relevant-categories a[data-toggle="tab"]').on("shown.bs.tab", function (e) { updateRelevantCategoryLink(); }); updateRelevantCategoryLink(); }); $(document).ready(function () { let similarCategoriesEl = $("#productSimilarCategories"); let similarCategoriesExpandBtn = $(".btn-product-similar-categories-expand"); similarCategoriesEl.on("hide.bs.collapse", function () { similarCategoriesExpandBtn.find('.material-icons').html('add'); similarCategoriesExpandBtn.find('span').html('Mostrare più categorie'); }); similarCategoriesEl.on("show.bs.collapse", function () { similarCategoriesExpandBtn.find('.material-icons').html('remove'); similarCategoriesExpandBtn.find('span').html('Mostrare meno categorie '); }); }); var productGalleryCarousel; $(document).ready(function(){ productGalleryCarousel = new Swiper('#gallery-carousel', { loop: false, slidesPerView: 1, spaceBetween: 0, pagination: { el: '.shop-detail-images .swiper-pagination', clickable: true, }, navigation: { nextEl: '.shop-detail-images .carousel-control-next', prevEl: '.shop-detail-images .carousel-control-prev', }, breakpoints: { 768: { slidesPerView: 3, spaceBetween: 10, }, 1024: { slidesPerView: 4, spaceBetween: 10, }, }, }); }) $(function(){ let $bpModal = $('#bestPriceNewModal'); $bpModal.on('show.bs.modal', function () { $('.bp-declined-show').hide(); $('.bp-declined-hide').show(); var $selectedOption = $('input[name="option[1]"]:checked'); $bpModal.find('.is-invalid').removeClass('is-invalid'); $bpModal.find('.invalid-feedback').remove(); $bpModal.find('input[name=price]').val(''); $bpModal.find('input[name=url]').val(''); // product with options but no option selected if ($selectedOption.length) { $('#bp-new-options').val($selectedOption.val()); $('#bp-new-options').selectpicker('refresh'); } /*if ($('input[name="option[1]"]').length && !$selectedOption.length) { $('#bp-new-options-wrap').show(); } else { $('#bp-new-options-wrap').hide(); }*/ }); let $bpNewPrice = $('#bp-new-price'); $bpNewPrice[0].addEventListener("paste", function(event) { event.preventDefault(); let paste = (event.clipboardData || window.clipboardData).getData("text"); paste = paste.replace(/[^\d.,]/g, ''); this.value = paste; }); $bpNewPrice.on('keypress', function (e) { var chr = String.fromCharCode(e.which); if ("0123456789.,".indexOf(chr) < 0) { return false; } }); $('#bp-new-form').on('submit', function(e) { e.preventDefault(); var $this = $(this); if ($this.hasClass('show-loading')) { return false; } $this.addClass('show-loading'); $.post('/shop-utils/pricingRequest', $this.serialize(), function(returnData) { showMessage('Grazie per l'interesse nell'eguagliare il prezzo, ti risponderemo presto', 'success'); $bpModal.modal('hide'); $this.removeClass('show-loading'); $bpModal.find('.is-invalid').removeClass('is-invalid'); $bpModal.find('.invalid-feedback').remove(); }).fail(function(data) { if (data && data.responseJSON && data.responseJSON.formErrors) { $bpModal.find('.is-invalid').removeClass('is-invalid'); $bpModal.find('.invalid-feedback').remove(); $.each(data.responseJSON.formErrors, function(name, error) { if (name === 'not_in_whitelist' || name === 'higher_price' || name === 'wrong_country') { $('.js-price-match-info-exc', $bpModal).hide(); $('#bp-declined .bp-icon-sad').toggle(name !== 'higher_price'); $('#bp-declined .bp-icon-info').toggle(name === 'higher_price'); $('#bp-declined .bp-alert-text').html(error); $('.bp-declined-show').show(); $('.bp-declined-hide').hide(); } else if (name === 'exists'){ showMessage(error, 'error'); $bpModal.modal('hide'); $this.removeClass('show-loading'); $bpModal.find('.is-invalid').removeClass('is-invalid'); $bpModal.find('.invalid-feedback').remove(); } else { $("[name=" + name + "]", $bpModal).addClass('is-invalid').after('
' + error + '
'); } }); } else { statusErrorMsg(data.status); } $this.removeClass('show-loading'); }); return false; }); }) $(function(){ const swiperInfoBoxes = new Swiper('.shop-info-boxes-slider .swiper', { loop: false, slidesPerView: 'auto', spaceBetween: 0, navigation: { nextEl: '.shop-info-boxes-slider .carousel-control-next', prevEl: '.shop-info-boxes-slider .carousel-control-prev', }, breakpoints: { 768: { slidesPerView: 3, spaceBetween: 20, }, 1200: { slidesPerView: 4, spaceBetween: 20, }, }, }); }); var totalPriceForInstallments = 358; function showCalc() { var downPayment = 0; var productPrice = totalPriceForInstallments * 100; // default kalkulacka rata len su sumou max 4000 eur pre product (HC to ma tam nastavene), inak klakulacka vyhodi chybu pri vyssej sume // avsak dostal som tip od HC, ze ak je cena vyssia, tak hodit rozdiel do akontacie, aby klient spustil kalkulacku a videl predbeznu vysku splatok atd. // s MP sme stanovili max sumu 7000 za produkt, moze sa zmenit, ak bude potrebne if (productPrice > 400000) { downPayment = productPrice - 400000; } let app = document.createElement('hc-calc'); app.callback = processCalcResult; app.apiKey = 'CIjXENKFksYuZby9jRTL'; app.dataCalculatorBaseUrl = 'https://api.homecredit.sk/public/v1/calculator/'; app.productSetCode = 'COCHCONO'; app.price = productPrice; // number in minor units app.downPayment = downPayment; // number in minor units app.fixDownPayment = false; // parameter to decide if enable od disable downpayment app.language = 'sk-SK'; // Language can be "cs-CZ" or "sk-SK" app.isModal = true; // parametr to decide if launch in model or not app.hideHeader = false; // parametr to decide if hide header of hc-calc document.body.appendChild(app); // Where to mount calculator } function processCalcResult(calcResult) { } function showQuatroCalc(){ console.log('https://quatro.vub.sk/kalkulacka/I992?cenaTovaru=' + totalPriceForInstallments); window.open('https://quatro.vub.sk/kalkulacka/I992?cenaTovaru=' + totalPriceForInstallments, '', 'width=685,height=560,scrollbars=1,resizable=1,location=no,menubar=no,toolbar=no, status=1') } $(function() { $('#extendedReturnModal').on('show.bs.modal', function() { if ($('.cart-success-panel').length) { setTimeout(function(){ $('#extendedReturnModal').css('z-index', 9100); $('.modal-backdrop').css('z-index', 9098); }, 5); } }); }) var emailConsentModalActiveEl; var emailConsentModalActiveSection = false; var emailConsentModalAgreed = false; function emailConsentModal(el, section){ var $el = $(el); if ($el.is(':checked') || !$el.is("input")){ // checked checkbox, or button/link emailConsentModalActiveEl = $(el); var $modal = $('#modalEmailConsent'); emailConsentModalActiveSection = section; if (section){ $('[data-section="general"]', $modal).hide(); $('[data-section="newsletter"]', $modal).hide(); $('[data-section="shop"]', $modal).hide(); $('[data-section="sale"]', $modal).hide(); $('[data-section="' + section + '"]', $modal).show(); $('.label-non-univeral').hide(); $('.label-universal').show(); } else { $('.mec-title', $modal).hide(); $('[data-section="general"]', $modal).show(); } emailConsentModalSubOptions(); emailConsentModalRegistrationToggleBtn(); emailConsentModalAgreed = false; $('#modalEmailConsent').modal('show'); } } function emailConsentModalSubOptions(){ $('.sub-options-emails').each(function() { var $subOptions = $(this); if ($subOptions.parent().find('.custom-switch input:checked, .custom-checkbox input:checked').length){ $subOptions.show(); if (!$subOptions.find('input:checked').length){ $subOptions.find('input').first().prop('checked', true); } } else { $subOptions.hide(); $subOptions.find('input').prop('checked', false); } }); } function emailConsentModalOnAgreed(){ var $modal = $('#modalEmailConsent'); emailConsentModalAgreed = true; var sectionWrap = emailConsentModalActiveSection ? '[data-section="' + emailConsentModalActiveSection + '"] ' : ''; var inputs = ''; $(sectionWrap + 'input[type=hidden], input:checked', $modal).each(function(){ var $this = $(this); inputs = inputs + ''; }); emailConsentModalActiveEl.prev('.mec-inputs').remove(); $('' + inputs + '').insertBefore(emailConsentModalActiveEl); $('#modalEmailConsent').modal('hide'); } function emailConsentModalRegistrationToggleBtn() { $modal = $('#modalEmailConsent'); setTimeout(function(){ $('.modal-footer .btn', $modal).prop('disabled', !$('input:checked:visible', $modal).length); }, 200); } $(function() { $('input[name="agreed_emails"]').on('change', function(){ emailConsentModal(this); }); emailConsentModalSubOptions(); $('#mec_user_newsletter_agreed, #user_newsletter_agreed').on('change', emailConsentModalSubOptions ); $('input:radio, input:checkbox','#modalEmailConsent').on('change', function(){ emailConsentModalRegistrationToggleBtn(); }); $('#modalEmailConsent').on('hidden.bs.modal', function (e) { $modal = $(this); if (!emailConsentModalAgreed){ if (emailConsentModalActiveEl.val() === 'weekly'){ $('input[value=monthly]', $modal).prop('checked', false); } else if (emailConsentModalActiveEl.val() === 'monthly'){ $('input[value=weekly]', $modal).prop('checked', false); } else { emailConsentModalActiveEl.prop('checked', false); } emailConsentModalActiveEl.prev('.mec-inputs').remove(); } emailConsentModalActiveSection = false; emailConsentModalSubOptions(); if ($('#registrationModal.modal').hasClass('show')) { setTimeout(function(){ $('body').addClass('modal-open'); // registration modal is still opened }, 20); } }); }); $(function() { $(".js-reject-cookies").attr("role", "button"); $(".js-reject-cookies").click(function(e){ e.preventDefault(); $.ajax({type: "POST",url: "/account/cookie-consent",data: {functional:0,analytical:0,commercial:0} }); $("#biscuitModal").fadeOut(250); return false; }); $(".biscuit-close").click(function(){ $.ajax({type: "POST",url: "/account/cookie-consent",data: {necessary:1,functional:1,analytical:1,commercial:1} }); $("#biscuitModal").fadeOut(250); $(".biscuit-checkboxes .custom-control-input").attr("checked", true); updateGoogleAnalyticsConsent(); updateBingConsent(); sendGoogleAnalyticsPageview(); return false; }); $(".biscuit-settings").click(function(){ $(this).addClass("loading-simple"); $.ajax({type: "POST",url: "/account/cookie-consent",data: {functional:0,analytical:0,commercial:0} }).always(function(){ window.location = "https://www.mtbiker.it/cookies"; }); }); });