-
- andreladocruz

-
Total Posts: 322
Joined: 2008-05-07
Brazil
|
Friends,
I´m trying to get some values from the order object in success.phtml.
I´m configuring a form to post the order information on our payment gateway.
By Know I need the Customer Full Name, Billing Address, Order ID, Payment Type, Order Total and Customer TaxVat.
The bellow code is incomplete.
Can you help me with this?
<form name="formbraspag" method="post" target="_blank" action="https://pagador."> <input type="hidden" name="id_loja" value="6755D9BB-EE8D-48F1-B282-A08A98E8D442"> <input type="hidden" name="venda_id" value="<?php echo $this->getOrderId() ?>"> <input type="hidden" name="codpagamento" value="06"> <input type="hidden" name="parcelas" value="1"> <input type="hidden" name="TIPOPARCELADO" value="0"> <input type="hidden" name="nome" value="<?php echo $this->getCustomerName() ?>"> <input type="hidden" name="valor" value="<?php echo $this->getTotalDue() ?>"> <input type="hidden" name="CPF" value="<?php $this->getCustomer()->getTaxvat() ?>"> <input type="submit" name="btn_confirmar" value = "Clique aqui para efetuar o pagamento"> </form>
regards,
André Cruz
http://novafarmadelivery.com -> The First Brazilian Magento´s Store
|
| |
-
- Posted: July 15 2008
-
| top
-
|
 |
 |
 |
|
|
-
- Agent Mo

-
Total Posts: 51
Joined: 2008-07-14
|
You could do a:
<?php print_r($this); print_r(get_class_methods($this));?>
to figure out, what the object provides. I’m new to magneto, so that’s the way I would try it. Hope that helps you a little bit.
|
| |
-
- Posted: July 15 2008
-
| top
| # 1
-
|
 |
 |
 |
|
|
-
- andreladocruz

-
Total Posts: 322
Joined: 2008-05-07
Brazil
|
My problem is to know each object that is enabled to use in the success.phtml and how to use then to catch the information that I Need!
thanks for your help, but it´s not what I need by now!
Anybody else?
|
| |
-
- Posted: July 15 2008
-
| top
| # 2
-
|
 |
 |
 |
|
|
|
|
-
- Agent Mo

-
Total Posts: 51
Joined: 2008-07-14
|
Did you do that in the template?
What info does the server error log provide?
|
| |
-
- Posted: July 15 2008
-
| top
| # 4
-
|
 |
 |
 |
|
|
|
|
-
- Agent Mo

-
Total Posts: 51
Joined: 2008-07-14
|
At the moment, sadly no…
|
| |
-
- Posted: July 15 2008
-
| top
| # 6
-
|
 |
 |
 |
|
|
-
- andreladocruz

-
Total Posts: 322
Joined: 2008-05-07
Brazil
|
anybody else?
remembering…
I need to catch the following fields in success.phtml:
* Customer Full Name
* Customer TaxVat
* Customer Billing Address
* Order Grand Total
* Order Currency
* Order Payment Type
Thanks for te replies!
|
| |
-
- Posted: July 15 2008
-
| top
| # 7
-
|
 |
 |
 |
|
|
|
|
-
- andreladocruz

-
Total Posts: 322
Joined: 2008-05-07
Brazil
|
at http://www.magentocommerce.com/boards/viewthread/4150/
I Got this code:
<?php $_customerId = Mage::getSingleton('customer/session')->getCustomerId(); $lastOrderId = Mage::getSingleton('checkout/session')->getLastOrderId(); $order = Mage::getSingleton('sales/order'); $order->load($lastOrderId); $_totalData =$order->getData(); $_grand = $_totalData['grand_total']; ?>
than I got the grand total for the order.
Based on it, how do Get the others values?
* Customer Full Name
* Customer TaxVat
* Customer Billing Address
* Order Currency
* Order Payment Type
Still Keeping Walking
|
| |
-
- Posted: July 15 2008
-
| top
| # 9
-
|
 |
 |
 |
|
|
-
- andreladocruz

-
Total Posts: 322
Joined: 2008-05-07
Brazil
|
Friends,
A New step concluded…
by now I have the following code:
<?php $_customerId = Mage::getSingleton('customer/session')->getCustomerId(); $customer = Mage::getSingleton('customer/session')->getCustomer(); $lastOrderId = Mage::getSingleton('checkout/session')->getLastOrderId(); $order = Mage::getSingleton('sales/order'); $order->load($lastOrderId); $_totalData = $order->getData(); $_attributes = $customer->getAttributes(); $_grand = $_totalData['grand_total']; $_name = $customer->getName(); $_taxvat = $customer->getTaxvat(); ?>
I got some Customer attributes.
I’m almost there!
Keep Walking!
Regards,
|
| |
|
 |
 |
 |
|
|
-
- andreladocruz

-
Total Posts: 322
Joined: 2008-05-07
Brazil
|
Got the Email Address!
<?php $_customerId = Mage::getSingleton('customer/session')->getCustomerId(); $customer = Mage::getSingleton('customer/session')->getCustomer(); $lastOrderId = Mage::getSingleton('checkout/session')->getLastOrderId(); $order = Mage::getSingleton('sales/order'); $order->load($lastOrderId); $_totalData = $order->getData(); $_grand = $_totalData['grand_total']; $_name = $customer->getName(); $_taxvat = $customer->getTaxvat(); $_email = $customer->getEmail(); ?>
Getting Better Each Time!
Let’s Keep Walking
|
| |
|
 |
 |
 |
|
|
-
- andreladocruz

-
Total Posts: 322
Joined: 2008-05-07
Brazil
|
I would ask some one from the team to update de phpdocs information.
The last version were generated on May!
You don’t mean the hard work I’m doing here withou a up to date documentation!
Please! Help the community!
Regards,
|
| |
|
 |
 |
 |
|
|
|
|
-
- Michael

-
Total Posts: 826
Joined: 2007-08-31
|
Hi André ,
Actually the last major version was released on May 8.
The updates (.1, .2, .4) released later didn’t modify anything in the API.
For sure we will have a new phpdoc for 1.1 release.
Thank you,
Michael.
|
| |
|
 |
 |
 |
|
|
|
|