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


PHP SpecificPrice::getProductIdByDate方法代码示例

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


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

示例1: _getProductIdByDate

 protected static function _getProductIdByDate($beginning, $ending)
 {
     global $cookie, $cart;
     $id_group = $cookie->id_customer ? (int) Customer::getDefaultGroupId((int) $cookie->id_customer) : _PS_DEFAULT_CUSTOMER_GROUP_;
     $id_address = $cart->{Configuration::get('PS_TAX_ADDRESS_TYPE')};
     $ids = Address::getCountryAndState($id_address);
     $id_country = (int) ($ids['id_country'] ? $ids['id_country'] : Configuration::get('PS_COUNTRY_DEFAULT'));
     return SpecificPrice::getProductIdByDate((int) Shop::getCurrentShop(), (int) $cookie->id_currency, $id_country, $id_group, $beginning, $ending);
 }
开发者ID:srikanthash09,项目名称:codetestdatld,代码行数:9,代码来源:Product.php

示例2: _getProductIdByDate

 protected function _getProductIdByDate($beginning, $ending, Context $context = null, $with_combination = false)
 {
     if (!$context) {
         $context = Context::getContext();
     }
     $id_address = $context->cart->{Configuration::get('PS_TAX_ADDRESS_TYPE')};
     $ids = Address::getCountryAndState($id_address);
     $id_country = (int) ($ids['id_country'] ? $ids['id_country'] : Configuration::get('PS_COUNTRY_DEFAULT'));
     return SpecificPrice::getProductIdByDate($context->shop->id, $context->currency->id, $id_country, $context->customer->id_default_group, $beginning, $ending, 0, $with_combination);
 }
开发者ID:evgrishin,项目名称:se1614,代码行数:10,代码来源:advancetab.php

示例3: _getPricesDropProductsIds

    private function _getPricesDropProductsIds()
    {
        $sqlGroups = '';
        if (version_compare(_PS_VERSION_, '1.6.0.0', '>=') && Group::isFeatureActive() && version_compare(_PS_VERSION_, '1.6.0.0', '<')) {
            $currentGroups = FrontController::getCurrentCustomerGroups();
            $sqlGroups = 'AND cg.`id_group` ' . (is_array($currentGroups) && sizeof($currentGroups) ? 'IN (' . implode(',', $currentGroups) . ')' : '= 1');
        }
        $currentDate = date('Y-m-d H:i:s');
        if (version_compare(_PS_VERSION_, '1.5.0.0', '<')) {
            global $cookie, $cart;
            $id_group = $cookie->id_customer ? (int) Customer::getDefaultGroupId((int) $cookie->id_customer) : _PS_DEFAULT_CUSTOMER_GROUP_;
            $id_address = $cart->{Configuration::get('PS_TAX_ADDRESS_TYPE')};
            $ids = Address::getCountryAndState($id_address);
            $id_country = (int) ($ids['id_country'] ? $ids['id_country'] : Configuration::get('PS_COUNTRY_DEFAULT'));
            $ids_product = SpecificPrice::getProductIdByDate((int) Shop::getCurrentShop(), (int) $cookie->id_currency, $id_country, $id_group, $currentDate, $currentDate);
        } else {
            $id_address = $this->_context->cart->{Configuration::get('PS_TAX_ADDRESS_TYPE')};
            $ids = Address::getCountryAndState($id_address);
            $id_country = (int) ($ids['id_country'] ? $ids['id_country'] : Configuration::get('PS_COUNTRY_DEFAULT'));
            $ids_product = SpecificPrice::getProductIdByDate($this->_context->shop->id, $this->_context->currency->id, $id_country, $this->_context->customer->id_default_group, $currentDate, $currentDate, 0, false);
        }
        $tab_id_product = array();
        foreach ($ids_product as $product) {
            if (is_array($product)) {
                $tab_id_product[] = (int) $product['id_product'];
            } else {
                $tab_id_product[] = (int) $product;
            }
        }
        Db::getInstance()->Execute('SET group_concat_max_len := @@max_allowed_packet');
        $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow('
		SELECT GROUP_CONCAT(p.id_product) as pid_list
		FROM `' . _DB_PREFIX_ . 'product` p
		' . (version_compare(_PS_VERSION_, '1.5.0.0', '>=') ? Shop::addSqlAssociation('product', 'p') : '') . '
		WHERE ' . (version_compare(_PS_VERSION_, '1.5.0.0', '>=') ? 'product_shop' : 'p') . '.`active` = 1
		AND ' . (version_compare(_PS_VERSION_, '1.5.0.0', '>=') ? 'product_shop' : 'p') . '.`show_price` = 1
		' . (version_compare(_PS_VERSION_, '1.5.0.0', '>=') ? ' AND product_shop.`visibility` IN ("both", "catalog") ' : '') . '
		AND ' . (version_compare(_PS_VERSION_, '1.5.0.0', '>=') ? 'product_shop' : 'p') . '.`id_product` IN (' . (is_array($tab_id_product) && count($tab_id_product) ? implode(', ', $tab_id_product) : 0) . ')
		AND p.`id_product` IN (
			SELECT cp.`id_product`
			FROM `' . _DB_PREFIX_ . 'category_group` cg
			LEFT JOIN `' . _DB_PREFIX_ . 'category_product` cp ON (cp.`id_category` = cg.`id_category`)
			WHERE cg.`id_group` ' . $sqlGroups . '
		)');
        if ($result && isset($result['pid_list']) && !empty($result['pid_list'])) {
            return explode(',', $result['pid_list']);
        }
        return array(0);
    }
开发者ID:acreno,项目名称:pm-ps,代码行数:49,代码来源:pm_advancedsearch4.php


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