Magento Forum

   
How recover total cart amount ? 
 
lorenzo01
Sr. Member
 
Avatar
Total Posts:  221
Joined:  2007-09-06
France
 

Hello,
i’m trying to develop a payment module, i’ve created a review page like paypal express review page, i need to recover the value of the total cart price in a form :

<form action="/cgi-bin/hmac_demo.exe" name="TheForm" method="get" onsubmit="[removed]payment()">
<
input type="hidden" name="Amount" value="<?=$this->getAmount()?>">
<
class="a-right">
            <
input type="image" src="<?=$this->getSkinUrl('images/btn_place_order.gif')?>" value="<?=$this->__('Place an Order')?>" onclick="submit"/>
        </
p>
    </
form>

when submitting the value does not appear, does this function <?=$this->getAmount()?> is the right one to recover the total cart amount ??
thanks for your help

 
Magento Community Magento Community
Magento Community
Magento Community
 
Dmitry A Nikolaev
Jr. Member
 
Avatar
Total Posts:  22
Joined:  2007-10-29
Saint-Petersburg
 

Are you trying view source of review page ?

 
Magento Community Magento Community
Magento Community
Magento Community
 
lorenzo01
Sr. Member
 
Avatar
Total Posts:  221
Joined:  2007-09-06
France
 

yes but in the form it’s appear value=” “ , is it the right function <?=$this->getAmount()?> ?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Dmitry A Nikolaev
Jr. Member
 
Avatar
Total Posts:  22
Joined:  2007-10-29
Saint-Petersburg
 

Seems like you found getAmount() function in some controller, but in current controller there is no such function (but if so, where exception warnings ...)
Maybe You need search this function in some module helper ?

 
Magento Community Magento Community
Magento Community
Magento Community
 
lorenzo01
Sr. Member
 
Avatar
Total Posts:  221
Joined:  2007-09-06
France
 

In wich file directory (block, Model or Helper ?) does this function had to be ?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Dmitry A Nikolaev
Jr. Member
 
Avatar
Total Posts:  22
Joined:  2007-10-29
Saint-Petersburg
 

One occurence found of function declaration:
/app/code/core/Mage/Paypal/Model/Api/Abstract.php (273) public function getAmount()

Seems like this function is unusable now for Your task

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