Magento Show Specific product on cms page
I want to show two configurable products on a cms page. The two products are under a sub category (id = 343). I've used below code in my cms page:
{{block type="core/template" name="home.catalog.product.list"
alias="products_homepage" category_id="343" product_count="2"
template="catalog/product/list.phtml"}}
but it gives this error:
Fatal error: Call to a member function count() on a non-object in
/home2/hotelhome/public_html/app/design/frontend/default/sm_sport/template/catalog/product/list.phtml
on line 38
magento-1.9 cms-pages
bumped to the homepage by Community♦ 2 days ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
I want to show two configurable products on a cms page. The two products are under a sub category (id = 343). I've used below code in my cms page:
{{block type="core/template" name="home.catalog.product.list"
alias="products_homepage" category_id="343" product_count="2"
template="catalog/product/list.phtml"}}
but it gives this error:
Fatal error: Call to a member function count() on a non-object in
/home2/hotelhome/public_html/app/design/frontend/default/sm_sport/template/catalog/product/list.phtml
on line 38
magento-1.9 cms-pages
bumped to the homepage by Community♦ 2 days ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
I want to show two configurable products on a cms page. The two products are under a sub category (id = 343). I've used below code in my cms page:
{{block type="core/template" name="home.catalog.product.list"
alias="products_homepage" category_id="343" product_count="2"
template="catalog/product/list.phtml"}}
but it gives this error:
Fatal error: Call to a member function count() on a non-object in
/home2/hotelhome/public_html/app/design/frontend/default/sm_sport/template/catalog/product/list.phtml
on line 38
magento-1.9 cms-pages
I want to show two configurable products on a cms page. The two products are under a sub category (id = 343). I've used below code in my cms page:
{{block type="core/template" name="home.catalog.product.list"
alias="products_homepage" category_id="343" product_count="2"
template="catalog/product/list.phtml"}}
but it gives this error:
Fatal error: Call to a member function count() on a non-object in
/home2/hotelhome/public_html/app/design/frontend/default/sm_sport/template/catalog/product/list.phtml
on line 38
magento-1.9 cms-pages
magento-1.9 cms-pages
edited Oct 23 '18 at 18:24
Shashank Kumrawat
1,3701341
1,3701341
asked Apr 28 '16 at 6:11
srinath madusankasrinath madusanka
317619
317619
bumped to the homepage by Community♦ 2 days ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 2 days ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
Try to just use this
{{block type="catalog/product_list" category_id="343" template="catalog/product/list.phtml"}}
That should do the trick, you don´t need the product_count as it will just show all and if there are only 2 then that's it.
add a comment |
Try to use widget MagentoCatalogWidgetBlockProductProductsList
{{widget type="MagentoCatalogWidgetBlockProductProductsList" products_count="2" template="product/widget/content/grid.phtml" conditions_encoded="a:2:[i:1;a:4:[s:4:`type`;s:50:`Magento|CatalogWidget|Model|Rule|Condition|Combine`;s:10:`aggregator`;s:3:`all`;s:5:`value`;s:1:`1`;s:9:`new_child`;s:0:``;]s:4:`1--1`;a:4:[s:4:`type`;s:50:`Magento|CatalogWidget|Model|Rule|Condition|Product`;s:9:`attribute`;s:12:`category_ids`;s:8:`operator`;s:2:`==`;s:5:`value`;s:1:`343`;]]"}}
add a comment |
I think maybe your type is wrong, try catalog/product_list
?
Or do you want to show the products individually?
{{block type="catalog/product_list" name="home.catalog.product.list" alias="products_homepage" category_id="343" template="catalog/product/list.phtml"}}
Alternatively you could use XML on the CMS page?
<reference name="content">
<block type="catalog/product_list" name="home" template="catalog/product/list.phtml">
<!-- Product List View -->
<action method="setCategoryId"><category_id>343</category_id></action>
<block type="catalog/product_list_toolbar" name="product_list_toolbar" template="catalog/product/list/toolbar.phtml">
<block type="page/html_pager" name="product_list_toolbar_pager"/>
</block>
<action method="setToolbarBlockName"><name>product_list_toolbar</name></action>
</block>
...
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%2f113024%2fmagento-show-specific-product-on-cms-page%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
Try to just use this
{{block type="catalog/product_list" category_id="343" template="catalog/product/list.phtml"}}
That should do the trick, you don´t need the product_count as it will just show all and if there are only 2 then that's it.
add a comment |
Try to just use this
{{block type="catalog/product_list" category_id="343" template="catalog/product/list.phtml"}}
That should do the trick, you don´t need the product_count as it will just show all and if there are only 2 then that's it.
add a comment |
Try to just use this
{{block type="catalog/product_list" category_id="343" template="catalog/product/list.phtml"}}
That should do the trick, you don´t need the product_count as it will just show all and if there are only 2 then that's it.
Try to just use this
{{block type="catalog/product_list" category_id="343" template="catalog/product/list.phtml"}}
That should do the trick, you don´t need the product_count as it will just show all and if there are only 2 then that's it.
answered Apr 28 '16 at 7:30
KlettsebKlettseb
3,05031651
3,05031651
add a comment |
add a comment |
Try to use widget MagentoCatalogWidgetBlockProductProductsList
{{widget type="MagentoCatalogWidgetBlockProductProductsList" products_count="2" template="product/widget/content/grid.phtml" conditions_encoded="a:2:[i:1;a:4:[s:4:`type`;s:50:`Magento|CatalogWidget|Model|Rule|Condition|Combine`;s:10:`aggregator`;s:3:`all`;s:5:`value`;s:1:`1`;s:9:`new_child`;s:0:``;]s:4:`1--1`;a:4:[s:4:`type`;s:50:`Magento|CatalogWidget|Model|Rule|Condition|Product`;s:9:`attribute`;s:12:`category_ids`;s:8:`operator`;s:2:`==`;s:5:`value`;s:1:`343`;]]"}}
add a comment |
Try to use widget MagentoCatalogWidgetBlockProductProductsList
{{widget type="MagentoCatalogWidgetBlockProductProductsList" products_count="2" template="product/widget/content/grid.phtml" conditions_encoded="a:2:[i:1;a:4:[s:4:`type`;s:50:`Magento|CatalogWidget|Model|Rule|Condition|Combine`;s:10:`aggregator`;s:3:`all`;s:5:`value`;s:1:`1`;s:9:`new_child`;s:0:``;]s:4:`1--1`;a:4:[s:4:`type`;s:50:`Magento|CatalogWidget|Model|Rule|Condition|Product`;s:9:`attribute`;s:12:`category_ids`;s:8:`operator`;s:2:`==`;s:5:`value`;s:1:`343`;]]"}}
add a comment |
Try to use widget MagentoCatalogWidgetBlockProductProductsList
{{widget type="MagentoCatalogWidgetBlockProductProductsList" products_count="2" template="product/widget/content/grid.phtml" conditions_encoded="a:2:[i:1;a:4:[s:4:`type`;s:50:`Magento|CatalogWidget|Model|Rule|Condition|Combine`;s:10:`aggregator`;s:3:`all`;s:5:`value`;s:1:`1`;s:9:`new_child`;s:0:``;]s:4:`1--1`;a:4:[s:4:`type`;s:50:`Magento|CatalogWidget|Model|Rule|Condition|Product`;s:9:`attribute`;s:12:`category_ids`;s:8:`operator`;s:2:`==`;s:5:`value`;s:1:`343`;]]"}}
Try to use widget MagentoCatalogWidgetBlockProductProductsList
{{widget type="MagentoCatalogWidgetBlockProductProductsList" products_count="2" template="product/widget/content/grid.phtml" conditions_encoded="a:2:[i:1;a:4:[s:4:`type`;s:50:`Magento|CatalogWidget|Model|Rule|Condition|Combine`;s:10:`aggregator`;s:3:`all`;s:5:`value`;s:1:`1`;s:9:`new_child`;s:0:``;]s:4:`1--1`;a:4:[s:4:`type`;s:50:`Magento|CatalogWidget|Model|Rule|Condition|Product`;s:9:`attribute`;s:12:`category_ids`;s:8:`operator`;s:2:`==`;s:5:`value`;s:1:`343`;]]"}}
answered Apr 28 '16 at 7:57
goralgoral
394311
394311
add a comment |
add a comment |
I think maybe your type is wrong, try catalog/product_list
?
Or do you want to show the products individually?
{{block type="catalog/product_list" name="home.catalog.product.list" alias="products_homepage" category_id="343" template="catalog/product/list.phtml"}}
Alternatively you could use XML on the CMS page?
<reference name="content">
<block type="catalog/product_list" name="home" template="catalog/product/list.phtml">
<!-- Product List View -->
<action method="setCategoryId"><category_id>343</category_id></action>
<block type="catalog/product_list_toolbar" name="product_list_toolbar" template="catalog/product/list/toolbar.phtml">
<block type="page/html_pager" name="product_list_toolbar_pager"/>
</block>
<action method="setToolbarBlockName"><name>product_list_toolbar</name></action>
</block>
...
add a comment |
I think maybe your type is wrong, try catalog/product_list
?
Or do you want to show the products individually?
{{block type="catalog/product_list" name="home.catalog.product.list" alias="products_homepage" category_id="343" template="catalog/product/list.phtml"}}
Alternatively you could use XML on the CMS page?
<reference name="content">
<block type="catalog/product_list" name="home" template="catalog/product/list.phtml">
<!-- Product List View -->
<action method="setCategoryId"><category_id>343</category_id></action>
<block type="catalog/product_list_toolbar" name="product_list_toolbar" template="catalog/product/list/toolbar.phtml">
<block type="page/html_pager" name="product_list_toolbar_pager"/>
</block>
<action method="setToolbarBlockName"><name>product_list_toolbar</name></action>
</block>
...
add a comment |
I think maybe your type is wrong, try catalog/product_list
?
Or do you want to show the products individually?
{{block type="catalog/product_list" name="home.catalog.product.list" alias="products_homepage" category_id="343" template="catalog/product/list.phtml"}}
Alternatively you could use XML on the CMS page?
<reference name="content">
<block type="catalog/product_list" name="home" template="catalog/product/list.phtml">
<!-- Product List View -->
<action method="setCategoryId"><category_id>343</category_id></action>
<block type="catalog/product_list_toolbar" name="product_list_toolbar" template="catalog/product/list/toolbar.phtml">
<block type="page/html_pager" name="product_list_toolbar_pager"/>
</block>
<action method="setToolbarBlockName"><name>product_list_toolbar</name></action>
</block>
...
I think maybe your type is wrong, try catalog/product_list
?
Or do you want to show the products individually?
{{block type="catalog/product_list" name="home.catalog.product.list" alias="products_homepage" category_id="343" template="catalog/product/list.phtml"}}
Alternatively you could use XML on the CMS page?
<reference name="content">
<block type="catalog/product_list" name="home" template="catalog/product/list.phtml">
<!-- Product List View -->
<action method="setCategoryId"><category_id>343</category_id></action>
<block type="catalog/product_list_toolbar" name="product_list_toolbar" template="catalog/product/list/toolbar.phtml">
<block type="page/html_pager" name="product_list_toolbar_pager"/>
</block>
<action method="setToolbarBlockName"><name>product_list_toolbar</name></action>
</block>
...
edited Jul 21 '17 at 21:32
sv3n
9,70562352
9,70562352
answered Apr 28 '16 at 7:10
slingshotslingshot
1
1
add a comment |
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%2f113024%2fmagento-show-specific-product-on-cms-page%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