开发者

Loading product content via AJAX in OpenCart

开发者 https://www.devze.com 2022-12-25 19:10 出处:网络
Using OpenCart how would I show a categories products as content loaded via AJAX from a MySQL databa开发者_JAVA百科se? This content would be then shown inside a <div>Fire up MooTools or jQuery a

Using OpenCart how would I show a categories products as content loaded via AJAX from a MySQL databa开发者_JAVA百科se? 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消