OrderHistory Component E-Commerce | Community
Skip to main content
Level 5
October 16, 2015
Solved

OrderHistory Component E-Commerce

  • October 16, 2015
  • 6 replies
  • 2340 views

Hi, 

I have the requirement to implement the functionality similar like orderhistory component of Commerce component-group. Under Geomatrixx-outdoors, under My Account there are two options Open Orders & Order History. Order History is to show last 12 months orders. But its not in actual if i see as below :[img]orderhistory.png[/img]

When i looked into i found inside component script some code is written as : 

//Removed CodeQ1 : At line 4, the session.getPlacedOrders(predicate, 0, 0, null);  fetches the orders. Here predicate is the property with value openOrders in case of Open Orders page but not for Order History. I dropped the same component again in Open Order page, node gets create for component but predicate property not set even if i use the same values as other. So no idea from where its coming.

Q2 : Show Order History is shows more that 1 yrs old record. When i de-compiled the e-commerce library i found the below snippet :

//Removed Code

Where  getPredicate always return null. Any Idea how can we get the records of 12 months old using the same apis. From here it seems there is no use of predicate that we are passing.

Thanks

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by gopalKa

The actual impl class which extends from this will implement this. So dont mind the null returns in the abstract class

6 replies

Adobe Employee
October 16, 2015

You must have decompiled an abstract base class. The actual implementation will make use of the predicate. If you think otherwise, please raise a day care ticket.

vdhim23Author
Level 5
October 16, 2015

kalyanar wrote...

You must have decompiled an abstract base class. The actual implementation will make use of the predicate. If you think otherwise, please raise a day care ticket.

 

 

Yes, I de-compiled the class AbstractJcrCommerceSession. & the code written in Q2 is the decompiled code.

gopalKaAdobe EmployeeAccepted solution
Adobe Employee
October 16, 2015

The actual impl class which extends from this will implement this. So dont mind the null returns in the abstract class

vdhim23Author
Level 5
October 16, 2015

kalyanar wrote...

The actual impl class which extends from this will implement this. So dont mind the null returns in the abstract class

 

Using JAD-UI I searched & found this method only in AbstractJcrCommerceSession class.

vdhim23Author
Level 5
October 16, 2015

vdhim23 wrote...

kalyanar wrote...

The actual impl class which extends from this will implement this. So dont mind the null returns in the abstract class

 

Using JAD-UI I searched & found this method only in AbstractJcrCommerceSession class.

 

 Ok, I try to override the abstract class and put my implementations inside it.

October 16, 2015

have you try to go to this page to get magento tutorial for beginners ?