Rafaprest Posted June 16, 2019 Share Posted June 16, 2019 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 ?? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now