当前位置: 首页>>代码示例>>PHP>>正文


PHP Mage_Core_Model_Abstract::getWebsiteId方法代码示例

本文整理汇总了PHP中Mage_Core_Model_Abstract::getWebsiteId方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Core_Model_Abstract::getWebsiteId方法的具体用法?PHP Mage_Core_Model_Abstract::getWebsiteId怎么用?PHP Mage_Core_Model_Abstract::getWebsiteId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Mage_Core_Model_Abstract的用法示例。


在下文中一共展示了Mage_Core_Model_Abstract::getWebsiteId方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _getAlertRow

 protected function _getAlertRow(Mage_Core_Model_Abstract $object)
 {
     if ($object->getCustomerId() && $object->getProductId() && $object->getWebsiteId()) {
         $sql = $this->_getWriteAdapter()->select()->from($this->getMainTable())->where('customer_id=?', $object->getCustomerId())->where('product_id=?', $object->getProductId())->where('website_id=?', $object->getWebsiteId());
         return $this->_getWriteAdapter()->fetchRow($sql);
     }
     return false;
 }
开发者ID:HelioFreitas,项目名称:magento-pt_br,代码行数:8,代码来源:Stock.php

示例2: _getAlertRow

 /**
  * Retrieve alert row by object parameters
  *
  * @param Mage_Core_Model_Abstract $object
  * @return array|bool
  */
 protected function _getAlertRow(Mage_Core_Model_Abstract $object)
 {
     $adapter = $this->_getReadAdapter();
     if ($object->getCustomerId() && $object->getProductId() && $object->getWebsiteId()) {
         $select = $adapter->select()->from($this->getMainTable())->where('customer_id = :customer_id')->where('product_id  = :product_id')->where('website_id  = :website_id');
         $bind = array(':customer_id' => $object->getCustomerId(), ':product_id' => $object->getProductId(), ':website_id' => $object->getWebsiteId());
         return $adapter->fetchRow($select, $bind);
     }
     return false;
 }
开发者ID:chucky515,项目名称:Magento-CE-Mirror,代码行数:16,代码来源:Abstract.php

示例3: _changeWebsite

 protected function _changeWebsite(Mage_Core_Model_Abstract $model)
 {
     if ($model->getOriginalWebsiteId() && $model->getWebsiteId() != $model->getOriginalWebsiteId()) {
         $write = $this->_getWriteAdapter();
         $groupId = $write->fetchOne($write->select()->from($this->getTable('core/website'), 'default_group_id')->where($write->quoteInto('website_id=?', $model->getOriginalWebsiteId())), 'default_group_id');
         if ($groupId == $model->getId()) {
             $write->update($this->getTable('core/website'), array('default_group_id' => 0), $write->quoteInto('website_id=?', $model->getOriginalWebsiteId()));
         }
     }
     return $this;
 }
开发者ID:hunnybohara,项目名称:magento-chinese-localization,代码行数:11,代码来源:Group.php

示例4: _changeWebsite

 /**
  * Change store group website
  *
  * @param Mage_Core_Model_Abstract $model
  * @return Mage_Core_Model_Resource_Store_Group
  */
 protected function _changeWebsite(Mage_Core_Model_Abstract $model)
 {
     if ($model->getOriginalWebsiteId() && $model->getWebsiteId() != $model->getOriginalWebsiteId()) {
         $select = $this->_getWriteAdapter()->select()->from($this->getTable('core_website'), 'default_group_id')->where('website_id = :website_id');
         $groupId = $this->_getWriteAdapter()->fetchOne($select, array('website_id' => $model->getOriginalWebsiteId()));
         if ($groupId == $model->getId()) {
             $bind = array('default_group_id' => 0);
             $where = array('website_id = ?' => $model->getOriginalWebsiteId());
             $this->_getWriteAdapter()->update($this->getTable('core_website'), $bind, $where);
         }
     }
     return $this;
 }
开发者ID:natxetee,项目名称:magento2,代码行数:19,代码来源:Group.php

示例5: _beforeSave

 /**
  * Before save action
  *
  * @param Mage_Core_Model_Abstract $object
  * @return Mage_Core_Model_Resource_Db_Abstract
  */
 protected function _beforeSave(Mage_Core_Model_Abstract $object)
 {
     if (is_null($object->getId()) && $object->getCustomerId() && $object->getProductId() && $object->getWebsiteId()) {
         if ($row = $this->_getAlertRow($object)) {
             $object->addData($row);
             $object->setStatus(0);
         }
     }
     if (is_null($object->getAddDate())) {
         $object->setAddDate(Mage::getModel('core/date')->gmtDate());
         $object->setStatus(0);
     }
     return parent::_beforeSave($object);
 }
开发者ID:okite11,项目名称:frames21,代码行数:20,代码来源:Stock.php

示例6: _afterDelete

 /**
  * Remove core configuration data after delete website
  *
  * @param Mage_Core_Model_Abstract $model
  * @return Mage_Core_Model_Resource_Website
  */
 protected function _afterDelete(Mage_Core_Model_Abstract $model)
 {
     $where = array('scope = ?' => 'websites', 'scope_id = ?' => $model->getWebsiteId());
     $this->_getWriteAdapter()->delete($this->getTable('core/config_data'), $where);
     return $this;
 }
开发者ID:monkviper,项目名称:magento-lite,代码行数:12,代码来源:Website.php

示例7: _afterDelete

 protected function _afterDelete(Mage_Core_Model_Abstract $model)
 {
     $this->_getWriteAdapter()->delete($this->getTable('core/config_data'), $this->_getWriteAdapter()->quoteInto("scope = 'websites' AND scope_id = ?", $model->getWebsiteId()));
     return $this;
 }
开发者ID:ronseigel,项目名称:agent-ohm,代码行数:5,代码来源:Mysql4_Website.php


注:本文中的Mage_Core_Model_Abstract::getWebsiteId方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。