Magento - AJAX Call Product Page Elements to Category Page. Select Box Not Populated

血红的双手。 提交于 2019-12-20 05:58:16

问题


I'm trying to create an ajax 'quick view' or 'quick cart' type feature on my Magento store. The kind of one where you hover over a product and have the option to 'quick view' it in a lightbox instead of going to the product page.

I'm using a very simple jQuery Ajax call like this:

$j('#ajaxquickviewcontent').load("http://websiteaddress/category/productname.html .product-view").ajaxComplete(function(){alert ('Done');});

With this method I get all of the content I'm after (i.e. product image, description, the configurable attribute options (size) dropdown, qty selector and add to cart buttons) - but the attribute option (size) dropdown isn't populated with any content. I just get the dropdown but with no options in it and obviously can't add any products to the cart.

If I change the call to load the whole product page, eg

$j('#ajaxquickviewcontent').load("http://websiteaddress/category/productname.html").ajaxComplete(function(){alert ('Done');});

Then the drop down does have the sizes. I'm assuming there is possibly some javascript on the page somewhere that I'm supposed to load as well but I can't find it.

Can anyone point me in the right direction for what script I would be missing that would be outside of the product-essential div?


回答1:


Take a look @

Magento Quick View Ajax Loader

http://ecommercedeveloper.com/articles/1875-create-a-quick-view-for-product-images/



来源:https://stackoverflow.com/questions/13713231/magento-ajax-call-product-page-elements-to-category-page-select-box-not-popul

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!