View Single Post
  #7  
Old 10-02-2019, 05:35 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default Re: "Fake" orders (or how do a cart become an order ?)

That's tricky and related to Doctrine. While I am not 100% (almost 100% sure though) sure this is how XC determines which records are orders and which are not - is_order = 1 for placed orders


The Repo Order class when creating the query builder uses "placedOnly" parameter. Search the class fot it and you will see how it adds condition to select only records that are an instance of Order.


The Model Order class has these Doctrine annotations
@DiscriminatorColumn
@DiscriminatorMap


These 2 tell DQL what determines the "instance of" condition



https://www.doctrine-project.org/projects/doctrine-orm/en/2.6/reference/annotations-reference.html#discriminatorcolumn
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote