I Use a simple popup. When I click Popup, then popup open and Ajax load product details page. But When product details page load by Ajax then I remove head,header,left,right and footer block.

Now the problem is my css work properly with popup but JavaScript not work so my add to cart button and other option which depends with JavaScript that's are not work.



                 <ajaxproduct_productload module="Ajaxproduct_Productload">


class Abdus_Ajaxproduct_Model_Observer{
    public function checkForQuickView($observer){
        $update = Mage::getSingleton('core/layout')->getUpdate();
        if ($product = Mage::registry('current_product')) {


<layout version="0.1.0">
    <ajaxproduct_loadproduct_getbysku translate="label">
        <remove name="head" />
        <remove name="header" />
        <remove name="left" />
        <remove name="right" />
        <remove name="footer" />

1 Answer 1


If you removed head for your popup, add to cart functionality will not work. You will need to keep your JS files in head of your popup if your popup is using iframe or if it's simple html.

Without JS files it will not work.

  • If not remove head then same things. But when i direct hit my Ajax URL then all functionality work properly. That means Ajax loading JavaScript not workable when it load by Ajax. Commented Oct 31, 2015 at 5:42
  • you will need to initialize java-script after ajax call. check this link for how to load javascript in ajax call. Commented Oct 31, 2015 at 5:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.