HEX
Server: Apache
System: Linux srv13.cpanelhost.cl 3.10.0-962.3.2.lve1.5.38.el7.x86_64 #1 SMP Thu Jun 18 05:28:41 EDT 2020 x86_64
User: cca63905 (4205)
PHP: 7.3.20
Disabled: NONE
Upload Files
File: /home4/cca63905/www/nueva/classes/Corewhatsapp.php
<?php
/**
* The module helps to add whats app chat support on online store and turn visitors into customers.This helps to build relationship with customers,provide personalized service and increase in sales.
*
* NOTICE OF LICENSE
* 
* Each copy of the software must be used for only one production website, it may be used on additional
* test servers. You are not permitted to make copies of the software without first purchasing the
* appropriate additional licenses. This license does not grant any reseller privileges.
* 
* @author    Corecreativo
* @copyright 2007-2023 Corecreativo
* @license   Prestashop Commercial Module License
*/

class CorewhatsappCore extends ObjectModel {

    public $core_corewhatsapp_message;
    public $core_corewhatsapp_number;
    public $core_dates;
    public $core_status;
    public $core_language;

    /**
     * @see ObjectModel::$definition
     */
    public static $definition = array('table' => 'corewhatsapp', 'primary' => 'id_corewhatsapp', 'multilang' => false, 'fields' =>
    array(
    'core_corewhatsapp_message' => array('type' => self::TYPE_HTML, 'lang' => false, 'required' => false, 'size' => 5000),
    'core_corewhatsapp_number' => array('type' => self::TYPE_STRING, 'lang' => false, 'validate' => 'isString', 'required' => true, 'size' => 500),
    'core_language' =>array('type' => self::TYPE_STRING, 'lang' => false, 'validate' => 'isString', 'required' => false, 'size' => 500),
    'core_status' =>array('type' => self::TYPE_INT, 'lang' => false, 'validate' => 'isInt', 'required' => false, 'size' => 500), 
    'core_dates' => array('type' => self::TYPE_DATE, 'lang' => false, 'validate' => 'isDateFormat', 'copy_post' => false)));

    public static function getCorewhatsapp($id_lang = null) {
        if (is_null($id_lang))
            $id_lang = Context::getContext()->language->id;
        $corewhatsapp = new Collection('Corewhatsapp', $id_lang);
        return $corewhatsapp;
    }

    public function __construct($id = null, $id_lang = null, $id_shop = null) {
        parent::__construct($id, $id_lang, $id_shop);
        $this->image_dir = _PS_GENDERS_DIR_;
    }

}