Magento Forum

How to get day,Month and Year from product special_to_date
 
hafsa_rani
Sr. Member
 
Avatar
Total Posts:  102
Joined:  2011-02-04
 

Hello everyone;

It have been tow weeks looking for a solution for my problrm, but no hope, I wish that you help, the problem is like this:

I need to add a countdown in product list when I spicify the special price, what I want is to get the day, month and year from special_to_date of product to get limit date; the script is :

<script language="javascript" type="text/javascript">
        
        
       
     
            
jQuery(document).ready(function() {
                
$('#countdown_dashboard').countDown({
                    targetDate
{
                        
'day'15//replace the number 15 by special_to_date  day
                        
'month':     12////replace the number 12 by special_to_date  month
                        
'year':     2012,  ////replace the number 2012 by special_to_date  year
                        
'hour':     0,
                        
'min':         0,
                        
'sec':         0
                    }
                }
);
                
                $(
'#email_field').focus(email_focus).blur(email_blur);
                $(
'#subscribe_form').bind('submit', function() return false});
            
});
        
</script>

thank you in advance smile

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top