Set Block Template In Nested ReferenceCatalog view template to handle product with custom optionOverride SCP (Simple Configurable Products) BlockAdding price-alert link to category list viewsRecently product view not workingHow to Bring Products in homepage?Block Template not LoadingHow To Display Label In Product?Update block arguemnts in xml file (Recommended way not working)Conditionally load js based on cms static block typeMagento2 Override Block - Invalid template file problem
Boundaries and Buddhism
Are there any individual aliens that have gained superpowers in the Marvel universe?
What does "vrit' mean with reference to documentaries?
Why can't I craft scaffolding in Minecraft 1.14?
Automatically open a terminal window and run a command, robustly
how to find which software is doing ssh connection?
In a Fish that is not a Fish
Derivation of CDF of a function that results in an exponential distribution
If the mass of the Earth is decreasing by sending debris in space, does its angular momentum also decrease?
How can the US president give an order to a civilian?
What does this Swiss black on yellow rectangular traffic sign with a symbol looking like a dart mean?
What is the context for Napoleon's quote "[the Austrians] did not know the value of five minutes"?
You may find me... puzzling
How to prevent cables getting intertwined
Leaving job close to major deadlines
Digital signature that is only verifiable by one specific person
How do credit card companies know what type of business I'm paying for?
How can I ping multiple IP addresses at the same time?
Explicit song lyrics checker
writing a function between sets vertically
I just entered the USA without passport control at Atlanta airport
Is it a bad idea to have a pen name with only an initial for a surname?
Is this broken pipe the reason my freezer is not working? Can it be fixed?
How to make a villain when your PCs are villains?
Set Block Template In Nested Reference
Catalog view template to handle product with custom optionOverride SCP (Simple Configurable Products) BlockAdding price-alert link to category list viewsRecently product view not workingHow to Bring Products in homepage?Block Template not LoadingHow To Display Label In Product?Update block arguemnts in xml file (Recommended way not working)Conditionally load js based on cms static block typeMagento2 Override Block - Invalid template file problem
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
So after spending 3 hours on this I am out of ideas. How can I set the template for the block commented below (:32) from my custom layout file. This is the original layout (I'm running Magento 1.9):
<layout>
<review_product_list translate="label">
<label>Catalog Product Reviews List</label>
<reference name="root">
<action method="setTemplate"><template>page/2columns-right.phtml</template></action>
</reference>
<reference name="head">
<action method="addJs"><script>varien/product.js</script></action>
<action method="addJs"><script>varien/configurable.js</script></action>
</reference>
<reference name="content">
<block type="review/product_view" name="product.info" template="catalog/product/view.phtml">
<block type="catalog/product_view_media" name="product.info.media" as="media" template="catalog/product/view/media.phtml">
<action method="disableGallery"/>
</block>
<block type="catalog/product_view" name="product.info.addto" as="addto" template="catalog/product/view/addto.phtml"/>
<block type="catalog/product_view" name="product.info.addtocart" as="addtocart" template="catalog/product/view/addtocart.phtml">
<!-- workaround: a better place for this code is in paypal.xml -->
<block type="page/html_wrapper" name="review.product.info.addtocart.paypal.wrapper" translate="label" module="paypal">
<label>PayPal Express Checkout Shortcut Wrapper</label>
<block type="paypal/express_shortcut" name="review.product.info.addtocart.paypal" template="paypal/express/shortcut.phtml">
<action method="setIsInCatalogProduct"><value>1</value></action>
</block>
</block>
</block>
<block type="catalog/product_view" name="product.tierprices" as="tierprices" template="catalog/product/view/tierprices.phtml"/>
<block type="core/template" name="product.info.other" as="other" template="review/product/view/other.phtml"/>
<block type="page/html_pager" name="product_review_list.toolbar" />
<block type="core/template" name="product_review_list.count" template="review/product/view/count.phtml" />
<block type="review/product_view_list" name="product.info.product_additional_data" as="product_additional_data" template="review/product/view/list.phtml">
<!-- THIS BLOCK HERE --><block type="review/form" name="product.review.form" as="review_form">
<block type="page/html_wrapper" name="product.review.form.fields.before" as="form_fields_before" translate="label">
<label>Review Form Fields Before</label>
<action method="setMayBeInvisible"><value>1</value></action>
</block>
</block>
</block>
</block>
</reference>
</review_product_list>
And this is what I have reached so far but doesnt seem to work:
<layout version="0.1.0">
<review_product_list translate="label">
<reference name="review_form">
<action method="setTemplate">
<template>appfactory/review/form.phtml</template>
</action>
</reference>
Update 1
Okay so I made some progress and discovered that the problem is not initially in picking up the layout updates, I can't actually change the template of the block. So If i changed it to the following:
<block type="review/product_view_list" name="product.info.product_additional_data" as="product_additional_data" template="review/product/view/list.phtml">
<block type="review/form" name="product.review.form" as="review_form" template="appfactory/review/form.phtml">
<action method="setTemplate">
<template>appfactory/review/form.phtml</template>
</action>
<block type="page/html_wrapper" name="product.review.form.fields.before" as="form_fields_before" translate="label">
<label>Review Form Fields Before</label>
<action method="setMayBeInvisible"><value>1</value></action>
</block>
</block>
</block>
the block template is still not updated to appfactory/review/form.phtml
and still picks up the old template review/form.phtml
magento-1.9 layout layout-update
add a comment |
So after spending 3 hours on this I am out of ideas. How can I set the template for the block commented below (:32) from my custom layout file. This is the original layout (I'm running Magento 1.9):
<layout>
<review_product_list translate="label">
<label>Catalog Product Reviews List</label>
<reference name="root">
<action method="setTemplate"><template>page/2columns-right.phtml</template></action>
</reference>
<reference name="head">
<action method="addJs"><script>varien/product.js</script></action>
<action method="addJs"><script>varien/configurable.js</script></action>
</reference>
<reference name="content">
<block type="review/product_view" name="product.info" template="catalog/product/view.phtml">
<block type="catalog/product_view_media" name="product.info.media" as="media" template="catalog/product/view/media.phtml">
<action method="disableGallery"/>
</block>
<block type="catalog/product_view" name="product.info.addto" as="addto" template="catalog/product/view/addto.phtml"/>
<block type="catalog/product_view" name="product.info.addtocart" as="addtocart" template="catalog/product/view/addtocart.phtml">
<!-- workaround: a better place for this code is in paypal.xml -->
<block type="page/html_wrapper" name="review.product.info.addtocart.paypal.wrapper" translate="label" module="paypal">
<label>PayPal Express Checkout Shortcut Wrapper</label>
<block type="paypal/express_shortcut" name="review.product.info.addtocart.paypal" template="paypal/express/shortcut.phtml">
<action method="setIsInCatalogProduct"><value>1</value></action>
</block>
</block>
</block>
<block type="catalog/product_view" name="product.tierprices" as="tierprices" template="catalog/product/view/tierprices.phtml"/>
<block type="core/template" name="product.info.other" as="other" template="review/product/view/other.phtml"/>
<block type="page/html_pager" name="product_review_list.toolbar" />
<block type="core/template" name="product_review_list.count" template="review/product/view/count.phtml" />
<block type="review/product_view_list" name="product.info.product_additional_data" as="product_additional_data" template="review/product/view/list.phtml">
<!-- THIS BLOCK HERE --><block type="review/form" name="product.review.form" as="review_form">
<block type="page/html_wrapper" name="product.review.form.fields.before" as="form_fields_before" translate="label">
<label>Review Form Fields Before</label>
<action method="setMayBeInvisible"><value>1</value></action>
</block>
</block>
</block>
</block>
</reference>
</review_product_list>
And this is what I have reached so far but doesnt seem to work:
<layout version="0.1.0">
<review_product_list translate="label">
<reference name="review_form">
<action method="setTemplate">
<template>appfactory/review/form.phtml</template>
</action>
</reference>
Update 1
Okay so I made some progress and discovered that the problem is not initially in picking up the layout updates, I can't actually change the template of the block. So If i changed it to the following:
<block type="review/product_view_list" name="product.info.product_additional_data" as="product_additional_data" template="review/product/view/list.phtml">
<block type="review/form" name="product.review.form" as="review_form" template="appfactory/review/form.phtml">
<action method="setTemplate">
<template>appfactory/review/form.phtml</template>
</action>
<block type="page/html_wrapper" name="product.review.form.fields.before" as="form_fields_before" translate="label">
<label>Review Form Fields Before</label>
<action method="setMayBeInvisible"><value>1</value></action>
</block>
</block>
</block>
the block template is still not updated to appfactory/review/form.phtml
and still picks up the old template review/form.phtml
magento-1.9 layout layout-update
add a comment |
So after spending 3 hours on this I am out of ideas. How can I set the template for the block commented below (:32) from my custom layout file. This is the original layout (I'm running Magento 1.9):
<layout>
<review_product_list translate="label">
<label>Catalog Product Reviews List</label>
<reference name="root">
<action method="setTemplate"><template>page/2columns-right.phtml</template></action>
</reference>
<reference name="head">
<action method="addJs"><script>varien/product.js</script></action>
<action method="addJs"><script>varien/configurable.js</script></action>
</reference>
<reference name="content">
<block type="review/product_view" name="product.info" template="catalog/product/view.phtml">
<block type="catalog/product_view_media" name="product.info.media" as="media" template="catalog/product/view/media.phtml">
<action method="disableGallery"/>
</block>
<block type="catalog/product_view" name="product.info.addto" as="addto" template="catalog/product/view/addto.phtml"/>
<block type="catalog/product_view" name="product.info.addtocart" as="addtocart" template="catalog/product/view/addtocart.phtml">
<!-- workaround: a better place for this code is in paypal.xml -->
<block type="page/html_wrapper" name="review.product.info.addtocart.paypal.wrapper" translate="label" module="paypal">
<label>PayPal Express Checkout Shortcut Wrapper</label>
<block type="paypal/express_shortcut" name="review.product.info.addtocart.paypal" template="paypal/express/shortcut.phtml">
<action method="setIsInCatalogProduct"><value>1</value></action>
</block>
</block>
</block>
<block type="catalog/product_view" name="product.tierprices" as="tierprices" template="catalog/product/view/tierprices.phtml"/>
<block type="core/template" name="product.info.other" as="other" template="review/product/view/other.phtml"/>
<block type="page/html_pager" name="product_review_list.toolbar" />
<block type="core/template" name="product_review_list.count" template="review/product/view/count.phtml" />
<block type="review/product_view_list" name="product.info.product_additional_data" as="product_additional_data" template="review/product/view/list.phtml">
<!-- THIS BLOCK HERE --><block type="review/form" name="product.review.form" as="review_form">
<block type="page/html_wrapper" name="product.review.form.fields.before" as="form_fields_before" translate="label">
<label>Review Form Fields Before</label>
<action method="setMayBeInvisible"><value>1</value></action>
</block>
</block>
</block>
</block>
</reference>
</review_product_list>
And this is what I have reached so far but doesnt seem to work:
<layout version="0.1.0">
<review_product_list translate="label">
<reference name="review_form">
<action method="setTemplate">
<template>appfactory/review/form.phtml</template>
</action>
</reference>
Update 1
Okay so I made some progress and discovered that the problem is not initially in picking up the layout updates, I can't actually change the template of the block. So If i changed it to the following:
<block type="review/product_view_list" name="product.info.product_additional_data" as="product_additional_data" template="review/product/view/list.phtml">
<block type="review/form" name="product.review.form" as="review_form" template="appfactory/review/form.phtml">
<action method="setTemplate">
<template>appfactory/review/form.phtml</template>
</action>
<block type="page/html_wrapper" name="product.review.form.fields.before" as="form_fields_before" translate="label">
<label>Review Form Fields Before</label>
<action method="setMayBeInvisible"><value>1</value></action>
</block>
</block>
</block>
the block template is still not updated to appfactory/review/form.phtml
and still picks up the old template review/form.phtml
magento-1.9 layout layout-update
So after spending 3 hours on this I am out of ideas. How can I set the template for the block commented below (:32) from my custom layout file. This is the original layout (I'm running Magento 1.9):
<layout>
<review_product_list translate="label">
<label>Catalog Product Reviews List</label>
<reference name="root">
<action method="setTemplate"><template>page/2columns-right.phtml</template></action>
</reference>
<reference name="head">
<action method="addJs"><script>varien/product.js</script></action>
<action method="addJs"><script>varien/configurable.js</script></action>
</reference>
<reference name="content">
<block type="review/product_view" name="product.info" template="catalog/product/view.phtml">
<block type="catalog/product_view_media" name="product.info.media" as="media" template="catalog/product/view/media.phtml">
<action method="disableGallery"/>
</block>
<block type="catalog/product_view" name="product.info.addto" as="addto" template="catalog/product/view/addto.phtml"/>
<block type="catalog/product_view" name="product.info.addtocart" as="addtocart" template="catalog/product/view/addtocart.phtml">
<!-- workaround: a better place for this code is in paypal.xml -->
<block type="page/html_wrapper" name="review.product.info.addtocart.paypal.wrapper" translate="label" module="paypal">
<label>PayPal Express Checkout Shortcut Wrapper</label>
<block type="paypal/express_shortcut" name="review.product.info.addtocart.paypal" template="paypal/express/shortcut.phtml">
<action method="setIsInCatalogProduct"><value>1</value></action>
</block>
</block>
</block>
<block type="catalog/product_view" name="product.tierprices" as="tierprices" template="catalog/product/view/tierprices.phtml"/>
<block type="core/template" name="product.info.other" as="other" template="review/product/view/other.phtml"/>
<block type="page/html_pager" name="product_review_list.toolbar" />
<block type="core/template" name="product_review_list.count" template="review/product/view/count.phtml" />
<block type="review/product_view_list" name="product.info.product_additional_data" as="product_additional_data" template="review/product/view/list.phtml">
<!-- THIS BLOCK HERE --><block type="review/form" name="product.review.form" as="review_form">
<block type="page/html_wrapper" name="product.review.form.fields.before" as="form_fields_before" translate="label">
<label>Review Form Fields Before</label>
<action method="setMayBeInvisible"><value>1</value></action>
</block>
</block>
</block>
</block>
</reference>
</review_product_list>
And this is what I have reached so far but doesnt seem to work:
<layout version="0.1.0">
<review_product_list translate="label">
<reference name="review_form">
<action method="setTemplate">
<template>appfactory/review/form.phtml</template>
</action>
</reference>
Update 1
Okay so I made some progress and discovered that the problem is not initially in picking up the layout updates, I can't actually change the template of the block. So If i changed it to the following:
<block type="review/product_view_list" name="product.info.product_additional_data" as="product_additional_data" template="review/product/view/list.phtml">
<block type="review/form" name="product.review.form" as="review_form" template="appfactory/review/form.phtml">
<action method="setTemplate">
<template>appfactory/review/form.phtml</template>
</action>
<block type="page/html_wrapper" name="product.review.form.fields.before" as="form_fields_before" translate="label">
<label>Review Form Fields Before</label>
<action method="setMayBeInvisible"><value>1</value></action>
</block>
</block>
</block>
the block template is still not updated to appfactory/review/form.phtml
and still picks up the old template review/form.phtml
magento-1.9 layout layout-update
magento-1.9 layout layout-update
edited Nov 28 '16 at 21:36
Yehia A.Salam
asked Nov 27 '16 at 21:02
Yehia A.SalamYehia A.Salam
100521
100521
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Change your code with below code:
<reference name="review_form">
<action method="setTemplate">
<template>appfactory/review/form.phtml</template>
</action>
</reference>
Replace with:
<layout version="0.1.0">
<review_product_list translate="label">
<reference name="product.review.form">
<action method="setTemplate">
<template>appfactory/review/form.phtml</template>
</action>
</reference>
</review_product_list>
</layout>
This is actually Magento 1.9, don't think I have referenceBlock yet
– Yehia A.Salam
Nov 28 '16 at 6:21
Updated answer please check it
– Prashant Valanda
Nov 28 '16 at 6:40
I actually updated the question, the template is not getting picked up even if I set both setTemplate and the template attribute
– Yehia A.Salam
Nov 28 '16 at 21:37
add my given code in local.xml of your theme it is working fine for me
– Prashant Valanda
Nov 29 '16 at 5:11
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f147701%2fset-block-template-in-nested-reference%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Change your code with below code:
<reference name="review_form">
<action method="setTemplate">
<template>appfactory/review/form.phtml</template>
</action>
</reference>
Replace with:
<layout version="0.1.0">
<review_product_list translate="label">
<reference name="product.review.form">
<action method="setTemplate">
<template>appfactory/review/form.phtml</template>
</action>
</reference>
</review_product_list>
</layout>
This is actually Magento 1.9, don't think I have referenceBlock yet
– Yehia A.Salam
Nov 28 '16 at 6:21
Updated answer please check it
– Prashant Valanda
Nov 28 '16 at 6:40
I actually updated the question, the template is not getting picked up even if I set both setTemplate and the template attribute
– Yehia A.Salam
Nov 28 '16 at 21:37
add my given code in local.xml of your theme it is working fine for me
– Prashant Valanda
Nov 29 '16 at 5:11
add a comment |
Change your code with below code:
<reference name="review_form">
<action method="setTemplate">
<template>appfactory/review/form.phtml</template>
</action>
</reference>
Replace with:
<layout version="0.1.0">
<review_product_list translate="label">
<reference name="product.review.form">
<action method="setTemplate">
<template>appfactory/review/form.phtml</template>
</action>
</reference>
</review_product_list>
</layout>
This is actually Magento 1.9, don't think I have referenceBlock yet
– Yehia A.Salam
Nov 28 '16 at 6:21
Updated answer please check it
– Prashant Valanda
Nov 28 '16 at 6:40
I actually updated the question, the template is not getting picked up even if I set both setTemplate and the template attribute
– Yehia A.Salam
Nov 28 '16 at 21:37
add my given code in local.xml of your theme it is working fine for me
– Prashant Valanda
Nov 29 '16 at 5:11
add a comment |
Change your code with below code:
<reference name="review_form">
<action method="setTemplate">
<template>appfactory/review/form.phtml</template>
</action>
</reference>
Replace with:
<layout version="0.1.0">
<review_product_list translate="label">
<reference name="product.review.form">
<action method="setTemplate">
<template>appfactory/review/form.phtml</template>
</action>
</reference>
</review_product_list>
</layout>
Change your code with below code:
<reference name="review_form">
<action method="setTemplate">
<template>appfactory/review/form.phtml</template>
</action>
</reference>
Replace with:
<layout version="0.1.0">
<review_product_list translate="label">
<reference name="product.review.form">
<action method="setTemplate">
<template>appfactory/review/form.phtml</template>
</action>
</reference>
</review_product_list>
</layout>
edited Nov 28 '16 at 6:40
answered Nov 28 '16 at 5:13
Prashant ValandaPrashant Valanda
10.1k12657
10.1k12657
This is actually Magento 1.9, don't think I have referenceBlock yet
– Yehia A.Salam
Nov 28 '16 at 6:21
Updated answer please check it
– Prashant Valanda
Nov 28 '16 at 6:40
I actually updated the question, the template is not getting picked up even if I set both setTemplate and the template attribute
– Yehia A.Salam
Nov 28 '16 at 21:37
add my given code in local.xml of your theme it is working fine for me
– Prashant Valanda
Nov 29 '16 at 5:11
add a comment |
This is actually Magento 1.9, don't think I have referenceBlock yet
– Yehia A.Salam
Nov 28 '16 at 6:21
Updated answer please check it
– Prashant Valanda
Nov 28 '16 at 6:40
I actually updated the question, the template is not getting picked up even if I set both setTemplate and the template attribute
– Yehia A.Salam
Nov 28 '16 at 21:37
add my given code in local.xml of your theme it is working fine for me
– Prashant Valanda
Nov 29 '16 at 5:11
This is actually Magento 1.9, don't think I have referenceBlock yet
– Yehia A.Salam
Nov 28 '16 at 6:21
This is actually Magento 1.9, don't think I have referenceBlock yet
– Yehia A.Salam
Nov 28 '16 at 6:21
Updated answer please check it
– Prashant Valanda
Nov 28 '16 at 6:40
Updated answer please check it
– Prashant Valanda
Nov 28 '16 at 6:40
I actually updated the question, the template is not getting picked up even if I set both setTemplate and the template attribute
– Yehia A.Salam
Nov 28 '16 at 21:37
I actually updated the question, the template is not getting picked up even if I set both setTemplate and the template attribute
– Yehia A.Salam
Nov 28 '16 at 21:37
add my given code in local.xml of your theme it is working fine for me
– Prashant Valanda
Nov 29 '16 at 5:11
add my given code in local.xml of your theme it is working fine for me
– Prashant Valanda
Nov 29 '16 at 5:11
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f147701%2fset-block-template-in-nested-reference%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown