How to add Magento CMS static blocks inside CMS Page?

1. You simply add below code in your cms template :

{{block type="cms/block" block_id="IDENTIFIER"}}

2. You want add static Block in xml file inside :
  <block type="cms/block" name="BLOCK_NAME" after="cart_sidebar">
    <action method="setBlockId"><block_id>IDENTIFIER</block_id></action>
  </block>

3. You want add static Block in page inside :

<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId(IDENTIFIER)->toHtml() ?>

its is the method of static block in your cms page...

How to view in weight back value in kg?

Hi you go to app folder.
1. Then go to design–> frontend –> yourtheme –> yourtheme –> template –> catalog –>product –>view –> attributes.phtml

there you can find this code : <?php echo $_helper->productAttribute($_product, $_data[‘value’], $_data[‘code’]) ?>

to change

Then add below code :

<?php
$_weightValue = $_data[‘value’];
if($_data[‘code’]==’weight’){ //this attribute code checkup condition
if (is_numeric($_weightValue)) //this attribute value numberic or not checkup condition
{
$_weightValue = round($_weightValue, 2).’ kg’;  //round to 0.00
}
}
?>
<?php echo $_helper->productAttribute($_product, strip_tags($_weightValue), $_data[‘code’]) ?>

That’s all.

How to Remove System (Default) Attributes in Magento?

1. Go to Phpmyadmin And Select Your Database.

2. Find table Name : “eav_attribute”

3. Then Find : “is_user_defined” field

4. There is_user_defined value each row containing to “0” –> This value is System Attribute value. You will change this value “0” to  “1” now this is convert to normal attribute. Now this is not maintain “system_attribute_value” option.

5. once you change the value save and exit phpmyadmin.

6. Now you go to change your attribute in frontend, What you like.

And one more additional information. The magento not allowed to remove the “SKU“.  Magento need to ask Compulsery in SKU.
So, you once you need to edit the Your own attributes set. You don’t need to Remove “SKU“. If you remove the “SKU“. The Magento Attributes not Save.

How to Add contact form inside CMS Page in Magento?

You Add Below code in your cms page :

<p>{{block type=”core/template” name=”contactForm” form_action=”/contacts/index/post” template=”contacts/form.phtml”}}</p>

Then when you click the Submit that is going contact page. So, there you can view the contact form again. So, this time we can do this below css, put in your style.css

.contacts-index-index .col-main .page-title, .contacts-index-index .col-main #contactForm{
display:none;
}
.contacts-index-index .col-main #messages_product_view{
margin:70px auto 0 auto;
width:450px;
}

this is one of my method. If any prober way kindly inform me.

How to call all categories in Magento Home page?

{{block type=”catalog/navigation” name=”catalog.categories” alias=”all_categories_homepage” template=”catalog/navigation/all_category_view.phtml”}}

How to call Navigation in Magento CMS Page inside?

Just write inside magento cms page below code :

{{block type=”catalog/navigation” name=”catalog.vertnav” alias=”navigation_homepage” template=”catalog/navigation/vert_nav.phtml”}}

How to call Tag’s inside Magento CMS Page?

Just write below type :

{{block type=”tag/popular” template=”tag/popular.phtml”}}

How to call Magento images and Scripts in inside CMS Page?

This is the path of  “{{skin url=” for magento root directory.
1. Example for Images Load :
{{skin url=’images/welcome.jpg’}}

2. Example for Scripts Load :
{{skin url=’js/onLoad.js’}}

3. Example for Direct Scripts Load :
<script type=”text/javascript”>// <![CDATA[
document.write(‘<center><iframe width=”190″ height=”172″ src=”http://www.youtube.com” frameborder=”0″ allowfullscreen></iframe></center>’);
// ]]></script>

How to solve Warning: mail() has been disabled for security reasons?

You go and run phpinfo(), in your server.

There check  “disable_functions“. That place the server side disabled the “mail“.
You have permission to write php.ini, You enable the “mail“.
If you have no permission, inform to server guys for this.

Then check. Basically this is the problem. Other things we check later.

Welcome to all peaceful life.

How to view All Categories only in Home from Magento?

<?php $_maincategorylisting=$this->getCurrentCategory()?>
<?php $_categories=$this->getCurrentChildCategories()?>
<!– h2><?php //echo $this->__(‘Browse Products’) ?> </h2 –>
<div>
<ul>
<? foreach ($_categories as $_category):?>
<? if($_category->getIsActive()): ?>
<?php $cur_category=Mage::getModel(‘catalog/category’)->load($_category->getId()); ?>
<?php $layer = Mage::getSingleton(‘catalog/layer’); ?>
<?php $layer->setCurrentCategory($cur_category);
//$this->getCurrentCategory()->getImageUrl()
?>
<? if($_imageUrl=$this->getCurrentCategory()->getThumbnailUrl()):?>
<li> <a href=”<?php echo $this->getCategoryUrl($_category) ?>” title=”<?php echo $this->htmlEscape($_category->getName()) ?>”>
<img src=”<?php echo $_imageUrl ?>” width=”auto” alt=”<?php echo $this->htmlEscape($_category->getName()) ?>” />
</a>
<a href=”<?php echo $this->getCategoryUrl($_category) ?>” title=”<?php echo $this->htmlEscape($_category->getName()) ?>”>
<?php echo $this->htmlEscape($_category->getName()) ?>
</a>
<? if($_description=$this->getCurrentCategory()->getDescription()):?>
<p>
<?php echo $_description ?></p></li>
<?php endif; ?>
<? endif; ?>
<? endif; ?>
<?php endforeach; ?>
<div></div>
</ul>
<div></div>
</div>
<?php $layer->setCurrentCategory($_maincategorylisting); ?>

Just Put your home page or Any Static Page this below Line only :

{{block type=”catalog/navigation” name=”catalog.categories” alias=”all_categories_homepage” template=”catalog/navigation/all_category_view.phtml”}}

Welcome to our other site : www.srinesiga.com

© 2020 Spirituality