Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Page 2 of 2
Discount (Shopping Cart Price Rules) is not showing in magento 1.4.0.1
 
Yoakim
Sr. Member
 
Total Posts:  126
Joined:  2008-11-24
 

Well here’s another “me too” and also confirming this seem to be an issue even on the latest devel version available from svn. Looking around qute a few seem to be suffer from this but it also appear we have one other thing in common, upgrading from 1.3.x - or is there anyone here who can confirm this to happen on a fresh installation of Magento 1.4.x as well?

I am testing the suggested solution right now and have also found code items like

<?php if ($_order->getDiscountAmount()): ?>
and there are also lots of other tests on various amounts like ‘getDiscountAmount()’ etc. which also should behave incorrectly then(?), and what about same calls of if tests used in .php files?

I’m far from a guru on php so not even sure why the original test would fail while the one suggested here wouldn’t, although I suspect it’s more due to the parenteses (or lack of) then the cast to float - but maybe anyone can enlighten me?

Another thing to really think of here as well. For the instances in adminhtml there’s no much choice as it doen’t have proper fall back (yet?), but for .phtml files in sub folders of base, you shouldn’t edit these file but rather copy the file to your custom theme folder and edit it there.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Yoakim
Sr. Member
 
Total Posts:  126
Joined:  2008-11-24
 

Turned out my problem was a bit different (as 1.4.1 is a bit different) and the solution can be found here.

Credit to ‘gtmall’ for pointing me there.

 
Magento Community Magento Community
Magento Community
Magento Community
 
DitesVERT
Sr. Member
 
Avatar
Total Posts:  100
Joined:  2009-03-03
 
kinetic - 13 May 2010 06:46 PM

Thanks Willbe, your solution worked GREAT and the Discount is now showing in my transactional emails, customer order details etc…

I couldn\’t find the sales/order/print/items.phtml but l think you meant sales/order/print/invoice.phtml.

Also l noticed that the discount amount would display as a negative number for the invoice but would display as a positive number for the order.

So what l did to make the order also show the discount amount as a negative number was to find the line:

<?php echo $_order->formatPrice(0.00 $_order->getDiscountAmount()) ?>

and change it to:

<?php echo $_order->formatPrice($_order->getDiscountAmount()) ?>

The list of files under /templates/ that l did it for was:

rss/order/details.phtml
sales/order/items.phtml
sales/order/print.phtml
email/order/items.phtml

I have to opposite problem! Discount is showing as a negative number on orders, but is positive on invoices?! Can anyone show me the way?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Sunburst WebConsult
Jr. Member
 
Total Posts:  19
Joined:  2009-05-13
 

Hi all

Does anyone know if this issue with the missing discount cupon has been fixed in the current Magento release?

Kind regards,
Jens

 
Magento Community Magento Community
Magento Community
Magento Community
 
Salustore
Member
 
Avatar
Total Posts:  73
Joined:  2008-09-02
 

Discount (Shopping Cart Price Rules) is not showing in magento 1.4.0.1 ?

Any help !!

Me too, it also calculated on the grand total, but it’s not showing.

 
Magento Community Magento Community
Magento Community
Magento Community
 
medlington2
Member
 
Total Posts:  63
Joined:  2011-02-04
 
suricate - 27 May 2010 06:37 PM

Hello All!

Sorry posting hear but my problem is when i try to make an shopping cart rules with a condition payment method, when i select payment method, the page is redirected to dashboard, anyone has this problem too?

Tks

I’ve got the same problem as you, I try to add a price rule:

shopping cart price rule > Conditions > Product attribute combination > Then I try to select category and it just redirects back to dashboard

Has anyone found a fix for this yet this is really urgent

 
Magento Community Magento Community
Magento Community
Magento Community
 
Casie
Jr. Member
 
Avatar
Total Posts:  1
Joined:  2011-03-03
 

Having the same issue. thanks for help

 
Magento Community Magento Community
Magento Community
Magento Community
 
medlington2
Member
 
Total Posts:  63
Joined:  2011-02-04
 

My host thinks this could be something to do with mod_security on the server but he hasnt got back to me with any solution yet

 
Magento Community Magento Community
Magento Community
Magento Community
 
brianb421
Sr. Member
 
Total Posts:  196
Joined:  2009-04-23
 
Willbe - 05 May 2010 12:10 PM
Hello everyone!

I hope I can help You with displaying discount in email, order view and print page.

You should look into *.phtml files under .....[/qoute]

Thanks Willbe and DitesVERT! Both solutions worked great.

 
Magento Community Magento Community
Magento Community
Magento Community
 
daruhshie
Jr. Member
 
Total Posts:  11
Joined:  2010-03-18
 

I hope someone here can help me out, magento installation 1.7.0.2 : Discounts (price rules) are calculated as they should, no problem there but I cant seem to get the pricerule labels to show up in the invoice totals, creditmemo totals. They show up in the order view itself but not on the invoices and creditmemos.

This information just doesn’t seem to be passed from the order to the invoice or credit memo, i presume the info gets lost in the following class: class Mage_Sales_Block_Order_Invoice_Totals extends Mage_Sales_Block_Order_Totals

*/
class 
Mage_Sales_Block_Order_Invoice_Totals extends Mage_Sales_Block_Order_Totals
{
    
protected $_invoice null;

    public function 
getInvoice()
    
{
        
if ($this->_invoice === null{
            
if ($this->hasData('invoice')) {
                $this
->_invoice $this->_getData('invoice');
            
elseif (Mage::registry('current_invoice')) {
                $this
->_invoice Mage::registry('current_invoice');
            
elseif ($this->getParentBlock()->getInvoice()) {
                $this
->_invoice $this->getParentBlock()->getInvoice();
            
}
        }
        
return $this->_invoice;
    
}

    
public function setInvoice($invoice)
    
{
        $this
->_invoice $invoice;
        return 
$this;
    
}

    
/**
     * Get totals source object
     *
     * @return Mage_Sales_Model_Order
     */
    
public function getSource()
    
{
        
return $this->getInvoice();
    
}

    
/**
     * Initialize order totals array
     *
     * @return Mage_Sales_Block_Order_Totals
     */
    
protected function _initTotals()
    
{
        parent
::_initTotals();
        
$this->removeTotal('base_grandtotal');
        return 
$this;
    
}


}

/** This is what the pricerule section of my Mage_Sales_Block_Order_Totals looks like (no problem here)* */

/**
         * Add discount
         */
  if (((float)$this->getSource()->getDiscountAmount()) != 0{
            
if ($this->getSource()->getDiscountDescription()) {
                $discountLabel 
$this->__('Discount (%s)'$source->getDiscountDescription());
            
else {
                $discountLabel 
$this->__('Discount');
            
}
            $this
->_totals['discount'= new Varien_Object(array(
                
'code'  => 'discount',
                
'field' => 'discount_amount',
                
'value' => $source->getDiscountAmount(),
                
'label' => $discountLabel
            
));
        
}

Any suggestion, pointers or solutions are more then welcome. Thank You

 
Magento Community Magento Community
Magento Community
Magento Community
 
arosenhagen
Jr. Member
 
Avatar
Total Posts:  11
Joined:  2010-02-27
Darmstadt
 

*bump* this seems to be a bug!

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 2 of 2