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

Need to know where the order page pulls it’s data from (Admin area)
 
WaseemSadiq
Jr. Member
 
Avatar
Total Posts:  9
Joined:  2007-10-31
Cumnock - Scotland
 

Hi Guys,

Before I start with the questions I just want to commend you all on a fantastic product! We’re really loving Magento, been playing with it for a week now and getting used to the way things are put together. We’re currently trying to implement a digital download module (it’s just a quick hack to let us use Magento on a live site, as is, whilst we wait on you guys releasing the full bhoona in Q1 2008 smile ).

We’ve managed to get close but are now stuck on something that I’m hoping Moshe, Roy or Yoav might be able to provide some clues or pointers to help us complete the final piece of the jigsaw:

We’ve managed to locate and update the Mage_Adminhtml_Block_Sales_Order_View_Items class to include a new column on the preparecolumns protected function and we’ve located the Mage_Sales_Model_Order_Item class, with the importQuoteItem and importQuoteAddressItem  public functions which seem to populate the data for insertion into the above mentioned function, but and here’s the but we cant seem to suss out exactly how its populating the data From where or how to add more data to it.

Any pointers you guys could give us would be most appreciated.

Thanks in advance,

Waseem

 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1770
Joined:  2007-08-07
Los Angeles
 

Hi, thank you for kind words smile

First of all I’d like to make sure that you are customizing Magento the way it was meant to be done, which allows future upgradability for core modules and being able to keep your customizations intact.

The customization concept was described in this thread: http://www.magentocommerce.com/boards/viewthread/1286/#t6327

So you would never change existing code, but create a new module with classes that overload existing ones and configuration for them.

Let me know how it goes so far.

 
Magento Community Magento Community
Magento Community
Magento Community
 
WaseemSadiq
Jr. Member
 
Avatar
Total Posts:  9
Joined:  2007-10-31
Cumnock - Scotland
 

Hi Moshe,

Thanks for the speedy response it’s much appreciated. We are indeed creating a custom local module so that we can easily upgrade when the time comes.

We’re aware of the structure required for overloading the classes but that still doesn’t help with my original query smile

Where does the Admin Order details page pull its data from?

Again I’d appreciate any pointers smile

Thanks in advance,

Waseem

 
Magento Community Magento Community
Magento Community
Magento Community
 
WaseemSadiq
Jr. Member
 
Avatar
Total Posts:  9
Joined:  2007-10-31
Cumnock - Scotland
 

Anyone?

If the Varien tean can’t answer this question can anyone else who’s had a chance to dig into the source code?

Any help would be most appreciated smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
WaseemSadiq
Jr. Member
 
Avatar
Total Posts:  9
Joined:  2007-10-31
Cumnock - Scotland
 

Hi Folks,

I figured that I’m not asking this question properly hence the lack of response, if one doesn’t ask for the information they need properly then it can be difficult for the responded to provide a detailed anser.

After an internal IM chat this afternoon, Charles (our head tech) helped me get my head around what the issue is (as you’ll have guessed I’m not a programmer lol, just a humble CSS guy) , I thought I’d share that chat with you - with Charles’ permission of course, actually it’s an edited version but I hope it gives you an idea of where we’re stuck at:

W:I been diggin lol, I’m probably talking ***** (replace for expletive of your choice) but I hope I been learning something....

tell me if this process of deduction sounds logical to you lol:

I found the name of the bit that spits out the order page, it’s looking for a function to do with sales_order, I went looking for that… am I heading in the right direction? ....

... I did read that post thoroughly tho, it seems to my untrained eye that one can just replace whatever their class or function is doing at the local directory level, it’s finding the class that’s doing the doing that’s the problem

C:magento\app\design\adminhtml\default\default\template\sales\order\view\form.phtml is the exact page that creates the order sales view

C:yea lol, even replacing the class doesnt help tell us to how to add data to a new object

C:i could replace the entire class easily, it’d still not be getting data though

W:so is it the bit that’s spitting out the data that’s the mystery?

C:yup

W:ahhh… I see - it’s clearer in my head now
:D

W:I’m gonna go post an edited copy of this in the forum (if that’s ok with you?) - it might help explain what the **** (sorry, you’ll need another expletive here wink ) we need in layman’s terms, I just think I’m not asking properly so.... answers aren’t easy to come by

C:hehe we might not be asking correctly ....

...... honestly i think they dont mind helping people extend it

W:So.... we just want to know where the core out puts the data so we can grab it in a friendly way from within our “custom” local module?

Hopefully, this helps explain a little better the information we need smile

Thanks again for any help,

Waseem

 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1770
Joined:  2007-08-07
Los Angeles
 

So if I understand correctly you need information how to get order data?

You get a data loaded object like this: $order = Mage::getModel(’sales/order’)->load($id);

After that you can do:
$order->getData() - all attributes,
$order->getData(’created_at’) - raw attribute data
$order->getCreatedAt() - preferred method, will allow customization by overloading

 
Magento Community Magento Community
Magento Community
Magento Community
 
WaseemSadiq
Jr. Member
 
Avatar
Total Posts:  9
Joined:  2007-10-31
Cumnock - Scotland
 

Hi Moshe,

Thanks for the assistance smile

We got digital download links working - now to try and work out how magento knows when a payment has been received to initiate sending of the download link to the user....

 
Magento Community Magento Community
Magento Community
Magento Community
 
HiThere
Jr. Member
 
Total Posts:  4
Joined:  2007-12-20
 

WaseemSadiq, did you ever get this figured out? I’d love to know myself, as I’m hoping to create and implement something very similar to what you’re doing.

Thanks!

 
Magento Community Magento Community
Magento Community
Magento Community
 
WaseemSadiq
Jr. Member
 
Avatar
Total Posts:  9
Joined:  2007-10-31
Cumnock - Scotland
 

We managed to create a download link but couldn’t get any further, the initiation of the email proved to be the stumbling block. We decided to wait until Roy and the team release the stable version with built in digital download. As a stop gap we’ve decided to go with Joomla 1.0.x with Virtuemart installed.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Mark_Kimsal
Sr. Member
 
Total Posts:  186
Joined:  2007-09-12
Michigan, USA
 

I try to cover this concept at an overview level in my wiki page.  Creating the separate, local modules is not covered, but it sounds like you’ve got that covered WaseemSadiq.

http://www.magentocommerce.com/wiki/groups/174/custom_sized_products

It details how to add more information to sales_orders.

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