Jump to content
Rafaprest

Zdjęcie w wynikach wyszukiwania

Recommended Posts

W jaki sposób odczytać zdjęcie produktu w wynikach wyszukiwania ??

Zmieniłem kod na :

$(document).ready(function () {
    var $searchWidget = $('#search_widget');
    var $searchBox    = $searchWidget.find('input[type=text]');
    var searchURL     = $searchWidget.attr('data-search-controller-url');

    $.widget('prestashop.psBlockSearchAutocomplete', $.ui.autocomplete, {
        _renderItem: function (ul, product) {
            return $("<li>")
                .append($("<a>")
                  
                    .append($("<span>").html(product.category_name).addClass("category"))
                    .append($("<span>").html(product.name).addClass("product"))
                    .append($("<span>").html(' - '))
                    .append($("<span>").html(' ('))
                    .append($("<span>").html(product.price))
                    .append($("<span>").html(')'))
					
                ).appendTo(ul)
            ;
        }
    });

Wyświetla nazwę oraz cenę. Nie mogę pobrać product.image ??

Share this post


Link to post
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

×

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More