Thursday, July 21, 2011
how to get best selling product in magento
http://harisur.net/how-to-get-best-selling-product-in-magento
Wednesday, July 20, 2011
Wednesday, July 13, 2011
How to show all product in a category page
In the magento 1.5 if you want to see all the product in a category in the same page then go to the
app\code\core\Mage\Catalog\Block\Product\List\Toolbar.php
find this line near line 228
// we need to set pagination only if passed value integer and more that 0
$limit = (int)$this->getLimit();
now chenge it
$limit = 0;
and it will work.
app\code\core\Mage\Catalog\Block\Product\List\Toolbar.php
find this line near line 228
// we need to set pagination only if passed value integer and more that 0
$limit = (int)$this->getLimit();
now chenge it
$limit = 0;
and it will work.
Saturday, July 9, 2011
Create New category via soap api
In magento 1.5 it's very easy to create a category via soap api
$proxy = new SoapClient('http://magentosite/api/soap/?wsdl');
$sessionId = $proxy->login('apiuser', 'apikey');
$newCategoryId = $proxy->call($sessionId,'category.create',array(3,array('name'=>'New openerp','is_active'=>1,'include_in_menu'=>2,'available_sort_by'=>'position','default_sort_by'=>'position')) );
//where 3 is the parent category
$proxy = new SoapClient('http://magentosite/api/soap/?wsdl');
$sessionId = $proxy->login('apiuser', 'apikey');
$newCategoryId = $proxy->call($sessionId,'category.create',array(3,array('name'=>'New openerp','is_active'=>1,'include_in_menu'=>2,'available_sort_by'=>'position','default_sort_by'=>'position')) );
//where 3 is the parent category
Friday, July 8, 2011
How to get newsletter block in the footer
I am using magento 1.5+. To get the newsletter block in footer open
app\design\frontend\base\default\layout\page.xml
and pest this code
after this line
the block will come
have fun...
Thursday, July 7, 2011
How to add group in register form
in magento 1.5+ go to the
app\design\frontend\base\default\template\customer\form\register.phtml
add following code in the page
<div class="input-box">
<label for="group_id" class="required"><?php echo $this->__('Group') ?><em>*</em></label><br/>
<select name="group_id" id="group_id" title="<?php echo $this->__('Group') ?>" class="validate-group required-entry input-text" />
<?php $groups = Mage::helper('customer')->getGroups()->toOptionArray(); ?>
<?php foreach($groups as $group){ ?>
<option value="<?php print $group['value'] ?>"><?php print $group['label'] ?></option>
<?php } ?>
</select>
<br /><p class="required" style="float:left;">Retailer group require admin authentication </p>
</div>
also change some code in app\code\core\Mage\Customer\controllers\AccountController.php
now replace $customer->getGroupId(); with
if($this->getRequest()->getPost('group_id'))
{
$customer->setGroupId($this->getRequest()->getPost('group_id'));
}
else
{
$customer->getGroupId();
}
app\design\frontend\base\default\template\customer\form\register.phtml
add following code in the page
<div class="input-box">
<label for="group_id" class="required"><?php echo $this->__('Group') ?><em>*</em></label><br/>
<select name="group_id" id="group_id" title="<?php echo $this->__('Group') ?>" class="validate-group required-entry input-text" />
<?php $groups = Mage::helper('customer')->getGroups()->toOptionArray(); ?>
<?php foreach($groups as $group){ ?>
<option value="<?php print $group['value'] ?>"><?php print $group['label'] ?></option>
<?php } ?>
</select>
<br /><p class="required" style="float:left;">Retailer group require admin authentication </p>
</div>
also change some code in app\code\core\Mage\Customer\controllers\AccountController.php
now replace $customer->getGroupId(); with
if($this->getRequest()->getPost('group_id'))
{
$customer->setGroupId($this->getRequest()->getPost('group_id'));
}
else
{
$customer->getGroupId();
}
How to Setup a Multiple Currency Magento
How to Setup a Dual Currency Magento Shop
Login as admin and select System->Configuration, then select ’Currency Setup’ from GENERAL section,
then select Base currency, Default display currency, allowed currencies (press Control Key and Click the needed currencies) and ’Save Config’
Now come to "System->Manage Currencies’ menu
Click in Import currencies to load the exchange rate(s).
You are done. Visit the frontend and reload (you may need to refresh your cache) to see the drop down added to your product pages.
Subscribe to:
Posts (Atom)