Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Created by PhpStorm.
- * User: giwrgos
- * Date: 19/04/2018
- * Time: 11:06 PM
- */
- if (!defined('_PS_VERSION_')) {
- exit;
- }
- include_once _PS_MODULE_DIR_ . 'test/library/model/PreorderFlagModel.php';
- class Product extends ProductCore
- {
- /** @var boolean isPreorder */
- public $isPreorder;
- public function __construct($id_product = null, $full = false, $id_lang = null, $id_shop = null, Context $context = null)
- {
- $preOrder = (new PreorderFlagModel())->getPreorderFlag($id_product);
- self::$definition['fields']['isPreorder'] = $preOrder->date === null ? false : $preOrder->date;
- parent::__construct($id_product, $full, $id_lang, $id_shop, $context);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement