0

Hi there i am currently working around a php script that i need to get the current session cart subtotal value.

Here is the code:

class AG_Fee_Model_Fee extends Varien_Object{

    public static function getFee(){
        $subtotal = Mage::getSingleton('checkout/session')->getQuote()->getSubtotal();
        return $subtotal;
    }
    public static function canApply($address){
        $setFee = Mage::getStoreConfig('checkout/fee/active');
        if($setFee==1)
        {
            return true;
        }
    }
}

The problem is that this function always returns me a 0.00 result. So it's not giving me the current subtotal value.

How can I get the subtotal value inside this function, is it possible ?

Phantom
  • 1,704
  • 4
  • 17
  • 32
Tonny Struck
  • 247
  • 4
  • 9
  • 17

0 Answers0