« first day (37 days earlier)      last day (829 days later) » 

05:29
@ajameswolf Do you need to create a new block in magento?
 
1 hour later…
06:57
@DRAJI hi
@DRAJI how to write query for sale products listing. how do alter this code :
@sabari welcome
$collection = Mage::getResourceModel('catalog/product_collection');
$collection->setVisibility(Mage::getSingleton('catalog/product_visibility')->getVisibleInCatalogIds());


$collection = $this->_addProductAttributesAndPrices($collection)
->addStoreFilter()
->addAttributeToFilter('news_from_date', array('or'=> array(
0 => array('date' => true, 'to' => $todayEndOfDayDate),
1 => array('is' => new Zend_Db_Expr('null')))
), 'left')
->addAttributeToFilter('news_to_date', array('or'=> array(
0 => array('date' => true, 'from' => $todayStartOfDayDate),
@DRAJI the above code is new product list code.
@DRAJI did u got
Have you searched google?
yes but i am new in magento. i can't understand the code. @DRAJI
$collection = Mage::getResourceModel('catalog/product_collection');
$collection->setVisibility(Mage::getSingleton('catalog/product_visibility')->getVisibleInCatalogIds());


$collection = $this->_addProductAttributesAndPrices($collection)
->addStoreFilter()
->addAttributeToFilter('news_from_date', array('or'=> array(
0 => array('date' => true, 'to' => $todayEndOfDayDate),
1 => array('is' => new Zend_Db_Expr('null')))
), 'left')
->addAttributeToFilter('news_to_date', array('or'=> array(
0 => array('date' => true, 'from' => $todayStartOfDayDate),
@DRAJI sorry this correct code
in which page you want show the product listing? home page?
07:12
@DRAJI yes
isn't it working?
path: app\code\core\Mage\Catalog\Block\Product\Sale.php
<?php
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to [email protected] so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade Magento to newer
ok. the above code doesn't work?
app\code\core\Mage\Catalog\Block\Product\Widget\Sale.php
<?php
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to [email protected] so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade Magento to newer
save this about two files in above path
could you show me ur pblm?
07:19
after put this code in home page content area {{block type="catalog/product_sale" name="home.catalog.product.sale" alias="product_homepage" template="catalog/product/sale.phtml"}}
i am working in local. only change the query of first file.
sorry i forget
path : app\design\frontend\default\tshirt\template\catalog\product
file name: sale.phtml
<?php
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE_AFL.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to [email protected] so we can send you a copy immediately.
*
* DISCLAIMER
*
now check code is run
NOw its working?
not, i am told to check u. and replace the query @DRAJI
Actually i cant get what is your pblm?
i want list sale products in home page.
yes. when you try with above code, whether its show any error or anything else
07:28
there is no error. the about code list all new products.
change the query for sale products
read above tutorial
sale products means?
customer purchased products. i have read the tutorial
*i had read the turorial
recently purchased items?
all purchased items, not mention recently
how will you show all purchased items on home page?
07:40
one by one i am listing on home page.
$orderCollection = Mage::getModel(’sales/order’)->getProductId();
08:03
how do use this code and where

« first day (37 days earlier)      last day (829 days later) »