0

enter image description here

We called function setproductlogin in app/design/frontend/rwd/Theme/template/catalog/product list.phtml :

 <div onclick="setproductlogin('<?php echo $_product->getEntityId()?>');setrequestlogin();">
   like</div>

and function setproductlogin script code is present in

app/design/frontend/rwd/Theme/template/productlike - index.phtml

<script type="text/javascript">
function setproductlogin(pid)
{
    document.getElementById("likeproduct_id").value=pid;
   jQuery("#productlistlogin").trigger("click");
}
</script>

app/design/frontend/rwd/Theme/layout/productlike.xml :

<reference name="before_body_end">
            <block type="core/template" name="ajaxlogin">
                <action method="setTemplate"><template>productlike/index.phtml</template></action>                
            </block>
</reference>

We used same function in another theme [ Theme6] file app/design/frontend/rwd/Theme6/template/aitcg - js_styles1.phtml

<button onclick="return setproductlogin(\'<?php echo Mage::registry("current_product")->getId()?>\', event);setrequestlogin();"  id="submit-editorApply-{{rand}}" >
SAVE DESIGN
</button>

we included same function code in same theme file as

app/design/frontend/rwd/Theme6/template/example/index.phtml ,

but still when we click "save design" button, its calling javascript function present in main theme [Theme] instead of related theme Theme6

layout file :

<reference name="content">     
<block type="example/list" name="examplelist" template="example/index.phtml" />
</reference>
4
  • Dont you think you should change in admin panel?..Like in the image you shared it says default is "Theme". It should be "Theme6". No? Commented Apr 10, 2017 at 14:14
  • 1
    in theme6 create same folder structure and file means app/design/frontend/rwd/Theme6/template/productlike - index.phtml Commented Apr 10, 2017 at 14:26
  • @KingshukDeb Thanks a lot for your comment, please support me like this in upcimg days also.... Gopal patel's suggestion worked for me..... Commented Apr 10, 2017 at 16:34
  • @GopalPatel Thanks a lot for your support, please post ur comment as an answer, i really really need your support like this in upcoming days also..... Commented Apr 10, 2017 at 16:34

1 Answer 1

1

Create same folder structure in Theme6

app/design/frontend/rwd/Theme6/template/productlike/index.phtml

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.