문제

Using OpenCart how would I show a categories products as content loaded via AJAX from a MySQL database? This content would be then shown inside a <div>

도움이 되었습니까?

해결책

Fire up MooTools or jQuery and use their AJAX support. Put an onclick handler on each category link, which calls a function that fetches the category data from the server. It can be raw html, which you then replace the contents of that with.

The server-side script would generate JUST the html necessary to display the product info. Since you'll be inserting it into a div inside an existent page, there's no need for headers/footers, just the core product data.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top