Wednesday, July 20, 2011
Wednesday, July 13, 2011
How to show all product in a category page
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
$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
Thursday, July 7, 2011
How to add group in register form
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.
Wednesday, February 2, 2011
How to bring ihe new product in the home page in magento
i am using
{{block type="catalog/product_new" name="home.catalog.product.new" alias="product_homepage" template="catalog/product/new.phtml"}}
in my home cms
At last I found the solution
{{block type="catalog/product_new" name="home.catalog.product.new" alias="product_homepage" template="catalog/product/new.phtml"}}
this code is work fine but I had some misunderstanding. I have solve it to go
Catalog > Manage Products edit or add a product go to the general -> Set Product as New from Date and set a updated date then you can see the new product in your home page.