Magento: Insert CMS Page inside the product description - magento

By using this code in the product description WYSIWYG editor, you can display a CMS block
{{widget type="cms/widget_block" template="cms/widget/static_block/default.phtml" block_id="01"}}
I am wondering, is there any way i can do the same with a CMS Page ?
Can i display a CMS page inside the product description from the WYSIWYG editor?

This will not work, since the product description is not passing the magento template filter system!

You could create your own widget, see Creating a Magento Widget
Then implement your logic to get cms content
protected function _toHtml()
{
//get cms content from db
}

there is a work around for it..you can try to pull the content of the cms page in your product view template file... ie in catalog/product/view.phtml file
refer here (How to call a cms page in a phtml file in magento?)

Related

Product Slide show in Magento

Hi i have tried to add a product in slide show on magento home page but it not working can you please give suggestion for How to add a product on slide show in magento?
What you need to do is :
Create a static block (something/filename.phtml).
Load product collection in the static block and filter the products which you would want to see on the slider.
Create appropriate HTML markup for the section of the page.
Use a suitable jQuery / JavaScript plugin to render the slider.
Call the static block that was created in step 1, from the CMS Page meant for homepage. This can be done using Layout Updates Section.

use list.phtml from auction extension on catalog page instead of custom template list.phtml

We have magento community webshop with a template that we bought. all things works fine. Now we bought an auction extension from magestore and are testing it. Problem we have right now is that it shows fine on the product page, but not on de catalog product page. one way or another it comes up with the list.phtml of the bought template and not with the options of the plugin list.phtml? how can we change this, so the plugin 'template' shows the right list.phtml file?
Extension location:
/public_html/app/design/frontend/default/default/template/auction
Template location:
/public_html/app/design/frontend/default/ma_megashop/template/catalog/product
* EDIT *
Thx for your reply. But when i make a template update in de admin control panel, My products
are disapeared. I just wanna have the timer in de catalog product view instead of the price-box and discription rules beneath the product photo. So it picks up the other list.phtml i think only my products on that page are gone after the update of that category template in the backend.
I also got an error:
Fatal error: Call to a member function getLastBid() on a non-object in .../app/design/frontend/default/default/template/auction/list.phtml on line 22
You can probably tighten up which .phtml to use by specifying it explicitly in your theme's local.xml file. If you know how to do this, great, go ahead. If you don't know how to do this can you tell us the URL of both the 'product page' and the 'catalog product page' - we don't need to see your full URL, just everything after the top level domain because I can't work out what page (ie route) 'catalog product page' means so I can't tell you the XML .
You may also want to check your search results page because it uses list.phtml too.
**EDIT
For a category page, I think you should put a 'Layout update' into the Magento admin area for the category : Catalog->Manage Categories->(select the category)->Custom Design->Layout Update. Add the following code:
<reference name='product_list'>
<action method="setTemplate">
<template>auctionmodulecompany/auctionmodulename/catalog/product/list.phtml</template>
</action>
</reference>
For changing the font colours, first the bottom price, it is controlled by the CSS selector #gridauction .current_price in file auction.css.
The red price at the top is trickier. It is set by CSS that is actually placed at the end of your <head> section. Do you have a control panel somewhere from which you control the Google fonts or the theme font and font colour? Failing that try looking in your theme's 'head.phtml' file or, as a bit of a hack, add in to auction.css the following CSS to overrule the CSS in the head.
.products-grid .item .price-box .regular-price .price{color: #000!important;}

Magento query language in a cms page

I want to display a text only for a specific language in a cms page which contains a placeholder. So I cannot use the way with the translate.csv. (see http://jagdeepbanga.com/blog/magento_how_add_translation_ability_into_cms_page_or_static_block.html) It would just display the placeholder in plane text. And since it's a CMS-Page from an plugin I can't change to a specific store view.
Is it possible to do an if query in the cms page like displayed below? (Or sort of) It should work in the cms page without the need to use or editing a phtml template.
if (store view = norsk)
{
<p>bla...</p>
{{some placeholder}}
};
I made an extension with this topic, feel free to use it or modify it!
https://github.com/miguelbalparda/MB_Translate
You can use a CMS block with a different version for each store view, and include it in your CMS page with {{block type="cms/block" block_id="your_block_id"}}

how to create a right sidebar in magento which will be visible only on product view page

I am new to magento .
I want to create a right sidebar on product view page such that this is visible only on product view page not on other pages.
How can I do this.Please Help.
Thanks.
To have a right sidebar only on the product page you need to to a few things:
in the admin panel set the product pages to have 2 columns with right sidebar
create a block and template file (or just edit one that is available)
in catalog.xml (this is in your themes's layout folder) find the handle called and within that section find in there you can add your block / template file.
For more info on how you can create blocks and templates see here.
In magento almost every postion is handled by catalog.xml, (if you go the proper way) You can place any static block , in catalog.xml you will find the postioning of blocks for every page (be it category, product or home page) just you need to place the block in the right reference.

Use if else in magento homepage content

I am trying to display a grid view with sale items shown on the homepage filtered by category.
I tried to put php if/else block in the homepage content in CMS section of admin, but it doesn't work. Any PHP code in the CMS is being commented automatically!
Is there any other way to filter homepage sale/featured products by category? I am using Magento 1.7.x
I have added the following code into the homepage which works:
{{block type="catalog/product_special" template="catalog/product/list1.phtml"}}
I just want to filter result of above code using categories when the user clicks on a category link on the homepage itself (not on the main menu)
Thanks
Anyone please?
Try this if/else syntax from the cms (using the customer group reference strictly as an example)...
{{if customer.group_id==4}} Print true {{else}} Print false {{/if}}

Resources