View Single Post
  #7  
Old 09-23-2019, 10:31 AM
 
Ed B. Ed B. is offline
 

X-Adept
  
Join Date: Apr 2016
Posts: 446
 

Default Re: Adding order meta data and displaying it places!

Well, the class annotations for \XLite\Model\Order looks like (for X cart 5.4.0.4)

Code:
namespace XLite\Model; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\DBAL\LockMode; use Doctrine\ORM\EntityManager; use XLite\Core\Database; use XLite\Model\Payment\Transaction; /** * Class represents an order * * @Entity * @Table (name="orders", * indexes={ * @Index (name="date", columns={"date"}), * @Index (name="total", columns={"total"}), * @Index (name="subtotal", columns={"subtotal"}), * @Index (name="tracking", columns={"tracking"}), * @Index (name="payment_status", columns={"payment_status_id"}), ... * } * ) * * @ClearDiscriminatorCondition * @HasLifecycleCallbacks * @InheritanceType ("SINGLE_TABLE") * @DiscriminatorColumn (name="is_order", type="integer", length=1) * @DiscriminatorMap ({1 = "XLite\Model\Order", 0 = "XLite\Model\Cart"}) */ class Order extends \XLite\Model\Base\SurchargeOwner
What should I put in my Order class?


By the way, the Model\Product class that I seem to be able to decorate, has annotations like
Code:
namespace XLite\Model; use XLite\Core\Cache\ExecuteCachedTrait; use XLite\Core\Model\EntityVersion\EntityVersionInterface; use XLite\Core\Model\EntityVersion\EntityVersionTrait; use XLite\Model\Product\ProductStockAvailabilityPolicy; use Doctrine\Common\Persistence\Event\LifecycleEventArgs; /** * The "product" model class * * @Entity * @Table (name="products", * indexes={ * @Index (name="sku", columns={"sku"}), * @Index (name="price", columns={"price"}), * @Index (name="weight", columns={"weight"}), * @Index (name="free_shipping", columns={"free_shipping"}), * @Index (name="customerArea", columns={"enabled","arrivalDate"}) * } * ) * @HasLifecycleCallbacks */ class Product extends \XLite\Model\Base\Catalog implements \XLite\Model\Base\IOr derItem, EntityVersionInterface


Where are the differences?
__________________
X-cart 5.2.12, php 5.6
Ed from Grenoble, France
Reply With Quote