How do i call .phtml block at specfic page in magento?

below code for simple cms page

{{block type='core/template' name='Test' template='goodtest/test.phtml'}} 
 
and this below code is for php file
 
<?php 
  echo $this->getLayout()->createBlock('core/template')->setTemplate('goodtest/test.phtml')->toHtml();
?> 

banner slider

magento insert and update and delet and all querys

It is very easy to select, insert, delete and update the record in magento site. following functions are helpful in magento site for database queries. You can also use this function outside magento environment with the help pf include “Mage.php” file form “app” folder like.
This is very simple to get data from database of magento site to frontend of magento site or another sites

  1. require_once '../../app/Mage.php';
  2. Mage::app('default');
Select query to get the value form table
  1. $connection = Mage::getSingleton('core/resource')
  2. ->getConnection('core_read');
  3. $select = $connection->select()
  4. ->from('tablename', array('*')) // select * from tablename or use array('id','name') selected values
  5. ->where('id=?',1)               // where id =1
  6. ->group('name');         // group by name
  7. $rowsArray = $connection->fetchAll($select); // return all rows
  8. $rowArray =$connection->fetchRow($select);   //return row
insert query
  1. $connection = Mage::getSingleton('core/resource')
  2. ->getConnection('core_write');
  3. $connection->beginTransaction();
  4. $fields = array();
  5. $fields['name']= 'test';
  6. $fields['age']='25';
  7. $connection->insert('tablename', $fields);
  8. $connection->commit();
update query
  1. $connection = Mage::getSingleton('core/resource')
  2. ->getConnection('core_write');
  3. $connection->beginTransaction();
  4. $fields = array();
  5. $fields['name'] = 'jony';
  6. $where = $connection->quoteInto('id =?', '1');
  7. $connection->update('tablename', $fields, $where);
  8. $connection->commit();
delete query
  1. $condition = array($connection->quoteInto('id=?', '1'));
  2. $connection->delete('tablename', $condition);

magento file uploading error http error

i analyses that media folder should me right-able i mean permission should be 7777

and other think is .htaccess permission


############################################
## adjust memory limit

#    php_value memory_limit 64M
    php_value memory_limit 256M
    php_value max_execution_time 18000


###############R A V I ###################
#php_value upload_max_filesize 712M
php_value post_max_size 712M

php_value upload_max_filesize 712M
php_value max_execution_time 2000
php_value max_input_time 2000
php_value memory_limit 512M
###############P U N I T ###################

How to check if Magento is running in production mode or developer mode

If you want to know. your Magento 2 website is running on which environment you can run below command on terminal and very easily you can kn...

Popular Posts

Posts