Try the Demo

Magento

eCommerce Software for Online Growth

Magento Forum

Our new hosted solution for small & emerging businesses
   
How to list all special price products
 
mipecera
Jr. Member
 
Total Posts:  5
Joined:  2008-10-15
 

I want to list all products with special price on a page.

Just like a catgory page, but for special products.

I could do that with a new category for offers, but there must be an automated process to find products with special price…

thanks a lot

 
Magento Community Magento Community
Magento Community
Magento Community
 
UrKo
Jr. Member
 
Total Posts:  22
Joined:  2008-04-04
 

im interested too....

 
Magento Community Magento Community
Magento Community
Magento Community
 
rsingh
Jr. Member
 
Total Posts:  10
Joined:  2008-10-06
 

Mates,

Have you got solution? I am also looking for this.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Benek
Jr. Member
 
Total Posts:  11
Joined:  2008-10-08
 

Anyone know? I need the same thing!

 
Magento Community Magento Community
Magento Community
Magento Community
 
gopika
Jr. Member
 
Total Posts:  11
Joined:  2008-06-18
 

I am too interested.  But here I don’t need a category. I need a page with special products listed in it. Can anyone help :(.

 
Magento Community Magento Community
Magento Community
Magento Community
 
retif
Sr. Member
 
Total Posts:  171
Joined:  2008-08-16
Odessa, Ukraine
 

i am trying to do that, but with no success for now

$storeId    Mage::app()->getStore()->getId();

        
$product    Mage::getModel('catalog/product');
        
$todayDate  $product->getResource()->formatDate(time());
        
$products   $product->setStoreId($storeId)->getCollection()
            ->
addAttributeToSelect(array('name''price''small_image','manufacturer'), 'left')
            ->
addAttributeToSelect(array('special_price''special_from_date''special_to_date'), 'left')
            ->
addAttributeToSelect('status')
            ->
addAttributeToSort('special_to_date','desc')
            ->
addAttributeToFilter('special_to_date', array('date'=>true'from'=> $todayDate))
        ;

help if you can

 
Magento Community Magento Community
Magento Community
Magento Community
 
befree22
Jr. Member
 
Total Posts:  26
Joined:  2008-09-22
 

Count me in too. This is a useful feature request for the Magento Community.

Any ideas anyone? For instance, how can I create a static page with Specials? The Magento demo contains static pages for Apparel and Cellphones.

Update: Check out this post: http://www.magentocommerce.com/boards/viewthread/16098/

Good luck,

 Signature 

Leslie })i({
Save on Your Hosting Bill Today!

 
Magento Community Magento Community
Magento Community
Magento Community
 
djmweb
Jr. Member
 
Total Posts:  6
Joined:  2009-01-08
 

Does anyone know if this is possible yet in Magento or a plugin? I would like to show all my products that are one sale.

 
Magento Community Magento Community
Magento Community
Magento Community
 
jakilcz
Jr. Member
 
Total Posts:  14
Joined:  2008-09-01
 

generally it should be something like:

$todayDate  Mage::app()->getLocale()->date()->toString(Varien_Date::DATETIME_INTERNAL_FORMAT);
 
            
$this->_productCollection Mage::getResourceModel('catalogsearch/advanced_collection')
                ->
addAttributeToSelect(Mage::getSingleton('catalog/config')->getProductAttributes())

            if(isset(
$_GET['promo_only'])) {
                $this
->_productCollection->addAttributeToFilter('special_from_date', array('date' => true'to' => $todayDate))
                ->
addAttributeToFilter('special_to_date', array('or'=> array(
                    
=> array('date' => true'from' => $todayDate),
                    
=> array('is' => new Zend_Db_Expr('null')))
                ), 
'left');
            
}

But it doesn’t work perfectly :(
In some specific situations it causes problems (like on last day of promotions product is listed but it has only 1 price shown and it’s regular one)

 
Magento Community Magento Community
Magento Community
Magento Community
 
DirectLowVoltage
Jr. Member
 
Total Posts:  30
Joined:  2009-02-19
 
jakilcz - 12 February 2009 06:00 AM

generally it should be something like:

$todayDate  Mage::app()->getLocale()->date()->toString(Varien_Date::DATETIME_INTERNAL_FORMAT);
 
            
$this->_productCollection Mage::getResourceModel('catalogsearch/advanced_collection')
                ->
addAttributeToSelect(Mage::getSingleton('catalog/config')->getProductAttributes())

            if(isset(
$_GET['promo_only'])) {
                $this
->_productCollection->addAttributeToFilter('special_from_date', array('date' => true'to' => $todayDate))
                ->
addAttributeToFilter('special_to_date', array('or'=> array(
                    
=> array('date' => true'from' => $todayDate),
                    
=> array('is' => new Zend_Db_Expr('null')))
                ), 
'left');
            
}

But it doesn’t work perfectly :(
In some specific situations it causes problems (like on last day of promotions product is listed but it has only 1 price shown and it’s regular one)

I’m not a programming expert or really know much about php stuff.. but it looks like your comparing the date to = or “>"be greater than.. could you just tell it to look for dates greater then todays date and then your items that are showing up on the last day that don’t have special prices shouldn’t fit and won’t show up… or make it do today’s date -1 and compare the special_to_date to that.. but the first idea seems like you would just need to remove a few “=” signs..

 
Magento Community Magento Community
Magento Community
Magento Community
 
HO__NL
Sr. Member
 
Avatar
Total Posts:  98
Joined:  2008-06-25
 

http://www.magentocommerce.com/extension/642/promoted-products

 Signature 

Follow H&O on Twitter for more free Magento extensions, Tips & Tricks

 
Magento Community Magento Community
Magento Community
Magento Community
 
Jeremy54
Jr. Member
 
Total Posts:  1
Joined:  2009-05-15
 

This post was extremely helpful after hours of headaches trying to get the special price to work correctly in advanced search. I fixed the problem with using today’s date as the from and to values (which on day of the sale’s expiration would still return the item with an expired sale). You need to use tomorrow’s date. Here is the entire getProductCollection function from /store/app/code/core/Mage/CatalogSearch/Model/Advanced.php which will return only products currently on sale:

public function getProductCollection(){
        
if (is_null($this->_productCollection)) {
            $this
->_productCollection Mage::getResourceModel('catalogsearch/advanced_collection')
                ->
addAttributeToSelect(Mage::getSingleton('catalog/config')->getProductAttributes())
                ->
addMinimalPrice()
                ->
addStoreFilter();
                
Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($this->_productCollection);
                
Mage::getSingleton('catalog/product_visibility')->addVisibleInSearchFilterToCollection($this->_productCollection);
            
            
/* include special price from and to date filtering */
            
if(isset($_GET['special_price'])) {
                $todayDate 
date('m/d/y');
                
$tomorrow mktime(000date('m'), date('d')+1date('y'));
                
$tomorrowDate date('m/d/y'$tomorrow);
                
                
$this->_productCollection->addAttributeToFilter('special_from_date', array('date' => true'to' => $todayDate))
                    ->
addAttributeToFilter('special_to_date', array('or'=> array(
                    
=> array('date' => true'from' => $tomorrowDate),
                    
=> array('is' => new Zend_Db_Expr('null')))
                    ), 
'left');
            
}
        }        
        
return $this->_productCollection;
}

 
Magento Community Magento Community
Magento Community
Magento Community
 
olgri
Jr. Member
 
Total Posts:  19
Joined:  2008-12-22
 

Could anyone please explain step-by-step how I can use the code above in order to display products with a special price on a “Specials” page?
I’ve tried few things but it seems I’m still missing something.

here is a couple of threads which might be useful:
http://www.magentocommerce.com/boards/viewthread/16098/
http://www.magentocommerce.com/boards/viewthread/43809/#t142273

Please help..

 
Magento Community Magento Community
Magento Community
Magento Community
 
generalbongo
Member
 
Total Posts:  75
Joined:  2009-01-25
 

I guess that you could create a category ‘promo items’ and add all promo items to this category.

Than it is simple, you put this code:

{{block type="catalog/product_list" category_id="43" template="catalog/product/list.phtml"}}

You change the id in your category id and that is that.

Off course this is not the best way to do this because everytime you have another promotion you should also add them to the category.

There must be an easy way to do this also.

 
Magento Community Magento Community
Magento Community
Magento Community
 
J.S. Coolen
Sr. Member
 
Total Posts:  86
Joined:  2009-08-20
Den Haag, Nederland
 
Paul Hachmang - 21 March 2009 08:12 AM

http://www.magentocommerce.com/extension/642/promoted-products

to bad this one isn’t working anymore

 
Magento Community Magento Community
Magento Community
Magento Community
 
alienn95
Member
 
Total Posts:  33
Joined:  2009-02-05
Latvia
 

To J.S. Coolen

http://www.magentocommerce.com/extension/642/promoted-products

It works fine for me on version 1.3.2.4… It started to show promoted products (with new-from and new-to dates set) after some manipulations and testing with rules settings…

 Signature 

http://www.jewelfrog.eu (v 1.2.1.2, ready); http://katalogs.coraldao.eu (v 1.3.2.1, ready);
http://www.interzoo.lv (v 1.3.2.4, ready, Fooman Speedster, Compiler); http://www.interfood.lv (v 1.3.2.4, started, Fooman Speedster); http://www.ecogeckoshop.com (1.4.0.1, started)

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top
 
© Copyright 2012 Magento Inc.
Privacy Policy|Terms of Service
Magento Community Count
701238 users|888 users currently online|497294 forum posts