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


PHP Varien_Object::getStoreId方法代码示例

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


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

示例1: _prepareForm

 protected function _prepareForm()
 {
     $form = new Varien_Data_Form();
     $dataObj = new Varien_Object(array('store_id' => '', 'store_name_in_store' => '', 'status_in_store' => '', 'description_in_store' => '', 'address_in_store' => '', 'city_in_store' => ''));
     if (Mage::getSingleton('adminhtml/session')->getStoreData()) {
         $data = Mage::getSingleton('adminhtml/session')->getStoreData();
         Mage::getSingleton('adminhtml/session')->setStoreData(null);
     } elseif (Mage::registry('store_data')) {
         $data = Mage::registry('store_data')->getData();
     }
     if (isset($data)) {
         $dataObj->addData($data);
     }
     if ($dataObj->getStoreId()) {
         $warehouse = Mage::getResourceModel('inventoryplus/warehouse_collection')->addFieldToFilter('storepickup_id', $dataObj->getStoreId())->getFirstItem();
         $dataObj->setData('warehouse_id', $warehouse->getId());
         $dataObj->setData('curr_warehouse_id', $warehouse->getId());
     }
     $this->setForm($form);
     $fieldset = $form->addFieldset('store_form', array('legend' => Mage::helper('storepickup')->__('Warehouse Information')));
     $fieldset->addField('warehouse_id', 'select', array('label' => Mage::helper('storepickup')->__('Linked Warehouse'), 'name' => 'warehouse_id', 'values' => $this->getWarehouseOptions(), 'onchange' => 'imStorePickup.changeWarehouse(this);', 'note' => $this->__('If you choose a warehouse, this Store information will be imported from the warehouse after saved.')));
     $fieldset->addField('curr_warehouse_id', 'hidden', array('name' => 'curr_warehouse_id'));
     if (Mage::getSingleton('adminhtml/session')->getStoreData()) {
         $form->setValues(Mage::getSingleton('adminhtml/session')->getStoreData());
         Mage::getSingleton('adminhtml/session')->setStoreData(null);
     } elseif (Mage::registry('store_data')) {
         $form->setValues($dataObj->getData());
     }
     parent::_prepareForm();
 }
开发者ID:javik223,项目名称:Evron-Magento,代码行数:30,代码来源:Selectwarehouse.php

示例2: load

 public function load($printQuery = false, $logQuery = false)
 {
     $this->_select = $this->_read->select();
     $entityTable = $this->getEntity()->getEntityTable();
     $paidTable = $this->getAttribute('grand_total')->getBackend()->getTable();
     $idField = $this->getEntity()->getIdFieldName();
     $this->getSelect()->from(array('sales' => $entityTable), array('store_id', 'lifetime' => 'sum(sales.base_grand_total)', 'avgsale' => 'avg(sales.base_grand_total)', 'num_orders' => 'count(sales.base_grand_total)'))->where('sales.entity_type_id=?', $this->getEntity()->getTypeId())->group('sales.store_id');
     if ($this->_customer instanceof Mage_Customer_Model_Customer) {
         $this->getSelect()->where('sales.customer_id=?', $this->_customer->getId());
     }
     $this->printLogQuery($printQuery, $logQuery);
     try {
         $values = $this->_read->fetchAll($this->getSelect()->__toString());
     } catch (Exception $e) {
         $this->printLogQuery(true, true, $this->getSelect()->__toString());
         throw $e;
     }
     $stores = Mage::getResourceModel('core/store_collection')->setWithoutDefaultFilter()->load()->toOptionHash();
     if (!empty($values)) {
         foreach ($values as $v) {
             $obj = new Varien_Object($v);
             $storeName = isset($stores[$obj->getStoreId()]) ? $stores[$obj->getStoreId()] : null;
             $this->_items[$v['store_id']] = $obj;
             $this->_items[$v['store_id']]->setStoreName($storeName);
             $this->_items[$v['store_id']]->setAvgNormalized($obj->getAvgsale() * $obj->getNumOrders());
             foreach ($this->_totals as $key => $value) {
                 $this->_totals[$key] += $obj->getData($key);
             }
         }
         if ($this->_totals['num_orders']) {
             $this->_totals['avgsale'] = $this->_totals['lifetime'] / $this->_totals['num_orders'];
         }
     }
     return $this;
 }
开发者ID:hunnybohara,项目名称:magento-chinese-localization,代码行数:35,代码来源:Collection.php

示例3: render

 public function render(Varien_Object $row)
 {
     $fileName = preg_replace('/^\\//', '', $row->getSitemapPath() . $row->getSitemapFilename());
     $url = $this->htmlEscape(Mage::app()->getStore($row->getStoreId())->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK) . $fileName);
     $code = Mage::app()->getStore($row->getStoreId())->getCode() == 'default' ? '' : Mage::app()->getStore($row->getStoreId())->getCode() . DS;
     if (file_exists(BP . DS . $code . $fileName)) {
         return sprintf('<a href="%1$s">%1$s</a>', $url);
     }
     return $url;
 }
开发者ID:naz-ahmed,项目名称:ndap-magento-mirror,代码行数:10,代码来源:Link.php

示例4: render

 public function render(Varien_Object $row)
 {
     $index = $this->getColumn()->getIndex();
     $urlKey = $row->getData($index);
     $url = Mage::app()->getStore($row->getStoreId())->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK) . $urlKey;
     return '<a href="' . $url . '" title="' . $url . '" target="_blank">/' . $urlKey . '</a>';
 }
开发者ID:protechhelp,项目名称:gamamba,代码行数:7,代码来源:Url.php

示例5: render

 public function render(Varien_Object $row)
 {
     $storeViewIds = explode(',', $row->getStoreId());
     $websites = Mage::app()->getWebsites();
     if ($storeViewIds[0] == 0 || count($storeViewIds) < 1) {
         echo Mage::helper('pointofsale')->__("No Store View");
         return;
     }
     foreach ($websites as $website) {
         if ($this->in_array($storeViewIds, $website->getStoreIds())) {
             echo "<div style='float:left;  padding:0 5px'><b><u>" . $website->getName() . "</u></b><br>";
             $storegroups = $website->getGroupCollection();
             foreach ($storegroups as $storegroup) {
                 if ($this->in_array($storeViewIds, $storegroup->getStoreIds())) {
                     echo "<b style='padding-left:5px;'>" . $storegroup->getName() . "</b><br>";
                     $storeviews = $storegroup->getStoreCollection();
                     foreach ($storeviews as $storeview) {
                         if (in_array($storeview->getId(), $storeViewIds)) {
                             echo "<span style='padding-left:10px;'>" . $storeview->getName() . "</span><br>";
                         }
                     }
                 }
             }
             echo "</div>";
         }
     }
 }
开发者ID:rcclaudrey,项目名称:dev,代码行数:27,代码来源:Storeview.php

示例6: render

 public function render(Varien_Object $row)
 {
     // Create url to Flipmedia_Clickreward_IndexController
     $url = Mage::getUrl('click/index/reward', array('token' => $row->getRuleToken(), '_nosid' => true, '_secure' => true, '_store' => $row->getStoreId(), '_store_to_url' => false));
     // Return Link
     return sprintf("<a href=\"#\" onclick=\"window.prompt('Copy to clipboard: Ctrl+C, Enter','%s'); return false;\">%s</a>", $url, Mage::helper('checkout')->__('Copy Link')) . "<br/>" . sprintf("<a href=\"%s\" target=\"_blank\">%s</a>", $url, Mage::helper('checkout')->__('Test Link'));
 }
开发者ID:Flipmediaco,项目名称:Flipmedia_Clickreward,代码行数:7,代码来源:Link.php

示例7: getCategoryRequestPath

 /**
  * Get unique category request path
  *
  * @param Varien_Object $category
  * @param string $parentPath
  * @return string
  */
 public function getCategoryRequestPath($category, $parentPath)
 {
     $storeId = $category->getStoreId();
     $idPath = $this->generatePath('id', null, $category);
     $suffix = $this->getCategoryUrlSuffix($storeId);
     if (isset($this->_rewrites[$idPath])) {
         $this->_rewrite = $this->_rewrites[$idPath];
         $existingRequestPath = $this->_rewrites[$idPath]->getRequestPath();
     }
     if ($category->getUrlKey() == '') {
         $urlKey = $this->getCategoryModel()->formatUrlKey($category->getName());
     } else {
         $urlKey = $this->getCategoryModel()->formatUrlKey($category->getUrlKey());
     }
     $categoryUrlSuffix = $this->getCategoryUrlSuffix($category->getStoreId());
     if (null === $parentPath) {
         $parentPath = $this->getResource()->getCategoryParentPath($category);
     } elseif ($parentPath == '/') {
         $parentPath = '';
     }
     $parentPath = Mage::helper('catalog/category')->getCategoryUrlPath($parentPath, true, $category->getStoreId());
     // Only filter category URL paths when not in B2B store.
     if (Mage::helper("mey_b2b")->getStoreId() != $storeId) {
         $parentPath = $this->_filterCategoriesFromRequestPath($parentPath);
     }
     $requestPath = $parentPath . $urlKey . $categoryUrlSuffix;
     if (isset($existingRequestPath) && $existingRequestPath == $requestPath . $suffix) {
         return $existingRequestPath;
     }
     if ($this->_deleteOldTargetPath($requestPath, $idPath, $storeId)) {
         return $requestPath;
     }
     return $this->getUnusedPath($category->getStoreId(), $requestPath, $this->generatePath('id', null, $category));
 }
开发者ID:jronatay,项目名称:ultimo-magento-jron,代码行数:41,代码来源:Url.php

示例8: render

 public function render(Varien_Object $row)
 {
     $field_id = $row->getFieldId();
     $field = Mage::getModel('webforms/fields')->load($field_id);
     $value = $row->getData($this->getColumn()->getIndex());
     $options = array();
     $webform = Mage::getModel('webforms/webforms')->setStoreId($row->getStoreId())->load($field->getWebformId());
     $fields_to_fieldsets = $webform->getFieldsToFieldsets(true);
     foreach ($fields_to_fieldsets as $fieldset_id => $fieldset) {
         $field_options = array();
         foreach ($fieldset['fields'] as $field) {
             if (in_array('field_' . $field->getId(), $value)) {
                 $field_options[] = $field->getName();
             }
         }
         if ($fieldset_id) {
             if (in_array('fieldset_' . $fieldset_id, $value)) {
                 $options[] = $fieldset['name'] . ' [' . Mage::helper('webforms')->__('Field Set') . ']';
             }
             if (count($field_options)) {
                 $options[] = '<b>' . $fieldset['name'] . '</b><br>&nbsp;&nbsp;&nbsp;&nbsp;' . implode('<br>&nbsp;&nbsp;&nbsp;&nbsp;', $field_options);
             }
         } else {
             foreach ($field_options as $opt) {
                 $options[] = $opt;
             }
         }
     }
     return implode('<br>', $options);
 }
开发者ID:monarcmoso,项目名称:beta2,代码行数:30,代码来源:Target.php

示例9: _prepareData

 /**
  * @param null|Varien_Object $dataObject
  * @return Xcom_Xfabric_Model_Message_Request
  */
 public function _prepareData(Varien_Object $dataObject = null)
 {
     $avroDataObject = Mage::getModel('xcom_chronicle/message_webstore_offer', array('product' => $dataObject->getProduct(), 'store_id' => $dataObject->getStoreId()));
     $data = array('offer' => $avroDataObject->toArray());
     $this->setMessageData($data);
     return parent::_prepareData($dataObject);
 }
开发者ID:ridhoq,项目名称:mxpi-twitter,代码行数:11,代码来源:Outbound.php

示例10: render

 public function render(Varien_Object $row)
 {
     if (!$row->getData($this->getColumn()->getIndex())) {
         return null;
     }
     return '<a title="' . Mage::helper('core')->__('Edit Store View') . '" href="' . $this->getUrl('*/*/editStore', array('store_id' => $row->getStoreId())) . '">' . $row->getData($this->getColumn()->getIndex()) . '</a>';
 }
开发者ID:codercv,项目名称:urbansurprisedev,代码行数:7,代码来源:Store.php

示例11: validate

 public function validate(Varien_Object $object)
 {
     $product = Mage::getModel('catalog/product')->setStoreId($object->getStoreId())->load($object->getProductId());
     $this->_entityAttributeValues[$product->getId()][$product->getStoreId()] = $product->getData($this->getAttribute());
     // Required since 1.8.0.0 // Old: $this->getValue() //
     #var_dump($this->getAttribute(), $product->getData($this->getAttribute()), parent::validateAttribute($product));
     return parent::validate($product);
 }
开发者ID:xiaoguizhidao,项目名称:devfashion,代码行数:8,代码来源:Product.php

示例12: render

 public function render(Varien_Object $row)
 {
     $fileName = preg_replace('/^\\//', '', $row->getSimplegoogleshoppingPath() . $row->getSimplegoogleshoppingFilename());
     $url = $this->htmlEscape(Mage::app()->getStore($row->getStoreId())->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB) . $fileName);
     if (file_exists(BP . DS . $fileName)) {
         return sprintf('<a href="%1$s?r=' . time() . '" target="_blank">%1$s</a>', $url);
     }
     return $url;
 }
开发者ID:buttasg,项目名称:cowgirlk,代码行数:9,代码来源:Link.php

示例13: render

 /**
  * @param Varien_Object $row
  *
  * @return string
  */
 public function render(Varien_Object $row)
 {
     $store = Mage::getModel('core/store')->load($row->getStoreId());
     $storeName = $store->getName();
     if (!Mage::helper('bronto_email')->isEnabled('store', $store->getId())) {
         $storeName .= ' (Disabled)';
     }
     return $storeName;
 }
开发者ID:bevello,项目名称:bevello,代码行数:14,代码来源:Storename.php

示例14: render

 public function render(Varien_Object $row)
 {
     $helper = Mage::helper('thememanager');
     $storeId = $row->getStoreId();
     if (!isset(self::$stores[$storeId])) {
         self::$stores[$storeId] = $helper->getStoreTitleNameById($storeId);
     }
     return self::$stores[$storeId] ? self::$stores[$storeId] : '<div class="removed-store">' . $helper->__('This store was removed and theme settings for this store are not available to edit. Please export or clone this subtheme to use it for another available store') . '</div>';
 }
开发者ID:kiutisuperking,项目名称:eatsmartboxdev,代码行数:9,代码来源:Meigee_Thememanager_Block_Adminhtml_ConfigList_Renderer_Store.php

示例15: afterSave

 /**
  * @param Varien_Object $object
  * @return $this
  */
 public function afterSave($object)
 {
     $generalStoreId = $object->getStoreId();
     $periods = $object->getData($this->getAttribute()->getName());
     Mage::getResourceSingleton('payperrentals/excludeddates')->deleteByProductId($object->getId(), $generalStoreId);
     if (is_null($periods)) {
         return $this;
     }
     if (is_array($periods)) {
         foreach ($periods as $k => $period) {
             if (!is_numeric($k)) {
                 continue;
             }
             $storeId = @$period['use_default_value'] ? 0 : $object->getStoreId();
             $ex = Mage::getModel('payperrentals/excludeddates')->setProductId($object->getId())->setStoreId($storeId)->setDisabledFrom(ITwebexperts_Payperrentals_Helper_Date::toMysqlDate($period['excludefrom']))->setDisabledType($period['repeatperiod'])->setExcludeDatesFrom($period['excludedaysfrom'])->setDisabledTo(ITwebexperts_Payperrentals_Helper_Date::toMysqlDate($period['excludeto']))->save();
         }
     }
     return $this;
 }
开发者ID:hueyl77,项目名称:fourwindsgear,代码行数:23,代码来源:Excludeddates.php


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