Пример #1
0
    /**
     * Creates the product manager that will use the given context object.
     *
     * @param MShop_Context_Item_Interface $context Context object with required objects
     */
    public function __construct(MShop_Context_Item_Interface $context)
    {
        parent::__construct($context);
        $this->_setResourceName('db-product');
        $date = date('Y-m-d H:i:00');
        $this->_searchConfig['product.contains']['internalcode'] = '( SELECT COUNT(mproli2."parentid") FROM "mshop_product_list" AS mproli2
				WHERE mpro."id" = mproli2."parentid" AND :site
					AND mproli2."domain" = $1 AND mproli2."refid" IN ( $3 ) AND mproli2."typeid" = $2
					AND ( mproli2."start" IS NULL OR mproli2."start" <= \'' . $date . '\' )
					AND ( mproli2."end" IS NULL OR mproli2."end" >= \'' . $date . '\' ) )';
        $sites = $context->getLocale()->getSitePath();
        $this->_replaceSiteMarker($this->_searchConfig['product.contains'], 'mproli2."siteid"', $sites, ':site');
    }
Пример #2
0
 /**
  * Initializes a new customer manager object using the given context object.
  *
  * @param MShop_Context_Item_Interface $context Context object with required objects
  */
 public function __construct(MShop_Context_Item_Interface $context)
 {
     parent::__construct($context);
     $this->_setResourceName('db-customer');
     /** mshop/customer/manager/salt
      * Password salt for all customer passwords of the installation
      *
      * The default password salt is used if no user-specific salt can be
      * stored in the database along with the user data. It's highly recommended
      * to set the salt to a random string of at least eight chars using
      * characters, digits and special characters
      *
      * @param string Installation wide password salt
      * @since 2014.03
      * @category Developer
      * @category User
      * @see mshop/customer/manager/password/name
      * @sse mshop/customer/manager/password/options
      */
     $this->_salt = $context->getConfig()->get('mshop/customer/manager/salt', 'mshop');
 }
Пример #3
0
 /**
  * Initializes the object.
  *
  * @param MShop_Context_Item_Interface $context Context object
  */
 public function __construct(MShop_Context_Item_Interface $context)
 {
     parent::__construct($context);
     $this->_setResourceName('db-attribute');
 }
Пример #4
0
 /**
  * Initializes a new customer manager object using the given context object.
  *
  * @param MShop_Context_Item_Interface $context Context object with required objects
  */
 public function __construct(MShop_Context_Item_Interface $context)
 {
     parent::__construct($context);
     $this->_setResourceName('db-customer');
     $this->_salt = $context->getConfig()->get('mshop/customer/manager/default/salt/', 'mshop');
 }