Jump to content

Eroare afisare poze multiple la un produs


johnel

Recommended Posts

Buna ziua,

Dupa cum am mentionat, problema pare a fi de la tema pe care o folositi (AngarTheme), deoarece nu adauga un event de click pe imagini, cum e in tema default.

Cel mai simplu ar fi sa contactati direct echipa de development a temei, pentru rezolvarea problemei.

Daca totusi vreti sa rezolvati problema singur, o alternativa ar fi urmatoarea:

In fisierul custom.js din themes/AngarTheme/assets/js/, adaugati urmatorul cod

let productImages = document.querySelectorAll('#thumb_box .thumb-container img.thumb');

if (productImages.length) {
    Array.from(productImages).forEach((image) => image.addEventListener('click', selectThumbImage));
}

function selectThumbImage(e) {
    Array.from(productImages).forEach((image) => image.classList.remove('selected'));

    e.target.classList.add('selected');

    document.querySelector('.js-qv-product-cover').setAttribute('src', e.target.getAttribute('src'));
}

Salvati modificarile, si faceti refresh la pagina fara cache (CTRL + Shift + R in Chrome). Daca tema functioneaza cum trebuie si incarca acest fisier, problema ar trebui sa fie rezolvata ^_^

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...