本文整理汇总了PHP中Shop::get_main_url_id方法的典型用法代码示例。如果您正苦于以下问题:PHP Shop::get_main_url_id方法的具体用法?PHP Shop::get_main_url_id怎么用?PHP Shop::get_main_url_id使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Shop
的用法示例。
在下文中一共展示了Shop::get_main_url_id方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getAgileSellerLink
public function getAgileSellerLink($id_seller, $alias = NULL, $id_lang = NULL)
{
if (!$id_seller) {
return '';
}
include_once _PS_ROOT_DIR_ . "/modules/agilemultipleseller/SellerInfo.php";
$sellerinfo = new SellerInfo(SellerInfo::getIdBSellerId($id_seller));
$id_shopurl = Shop::get_main_url_id($sellerinfo->id_shop);
$shopurl = new ShopUrl($id_shopurl);
$url = $shopurl->getURL() . $this->getLangLink();
if (Module::IsInstalled('agilemultipleshop')) {
include_once _PS_ROOT_DIR_ . "/modules/agilemultipleshop/agilemultipleshop.php";
if ((int) Configuration::get('ASP_SHOP_URL_MODE') == AgileMultipleShop::SHOP_URL_MODE_DOMAIN) {
return $url;
}
}
if ($this->allow) {
return $url;
} else {
return _PS_BASE_URL_SSL_ . __PS_BASE_URI__ . 'index.php?controller=agileseller&id_seller=' . (int) $id_seller;
}
}
示例2: processSubmitSellerinfo
//.........这里部分代码省略.........
}
if (empty($_POST["phone"])) {
$this->errors[] = Tools::displayError("Phone is required field.");
}
$this->errors = array_merge($this->errors, $this->sellerinfo->validateController());
$this->sellerinfo->id_customer = self::$cookie->id_customer;
if (Module::isInstalled("agilemultipleshop")) {
$mcovgfrp = "shop_name";
${"GLOBALS"}["xdpblji"] = "seller_shopurl";
if (empty(${$mcovgfrp})) {
$this->errors[] = Tools::displayError("The shop name can not be empty.");
}
if (empty($_POST["virtual_uri"]) and (int) Configuration::get("ASP_SHOP_URL_MODE") == agilemultipleshop::SHOP_URL_MODE_VIRTUAL) {
$this->errors[] = Tools::displayError("The shop Virtual Uri can not be empty.");
}
${"GLOBALS"}["edessnqo"] = "id_found";
${"GLOBALS"}["kkzhciyk"] = "seller_shop";
if ($this->sellerinfo->id_shop <= 1) {
$this->sellerinfo->id_shop = 0;
}
${${"GLOBALS"}["kkzhciyk"]} = new Shop($this->sellerinfo->id_shop);
if (Shop::shop_name_duplicated(${${"GLOBALS"}["oxjolt"]}, $seller_shop->id)) {
$this->errors[] = Tools::displayError("The shop name you select has been used by other seller. Please choose a new one.");
}
${"GLOBALS"}["asepnxuok"] = "seller_shop";
if ($this->errors) {
return;
}
if (!Validate::isLoadedObject(${${"GLOBALS"}["asepnxuok"]})) {
$this->sellerinfo->id_shop = AgileMultipleShop::create_new_shop($this->sellerinfo->id_seller, ${${"GLOBALS"}["oxjolt"]});
$this->sellerinfo->update();
${${"GLOBALS"}["esrnnrtkg"]} = new Shop($this->sellerinfo->id_shop);
}
${${"GLOBALS"}["xdpblji"]} = new ShopUrl(Shop::get_main_url_id($seller_shop->id));
${${"GLOBALS"}["edessnqo"]} = $seller_shopurl->canAddThisUrl($seller_shopurl->domain, $seller_shopurl->domain_ssl, $seller_shopurl->physical_uri, ${${"GLOBALS"}["uovivsqns"]});
if (intval(${${"GLOBALS"}["vphoqso"]}) > 0) {
$this->errors[] = Tools::displayError("The uri you select has been used by other seller. Please choose a new one.");
}
}
${"GLOBALS"}["uehqptpfhppm"] = "seller_shop";
if (!(${${"GLOBALS"}["flggvi"]} = new Country($this->sellerinfo->id_country)) || !Validate::isLoadedObject(${$famsbcd})) {
throw new PrestaShopException("Country cannot be loaded with address->id_country");
}
if ((int) $country->contains_states && !(int) $this->sellerinfo->id_state) {
$this->errors[] = Tools::displayError("This country requires a state selection.");
}
${$uskhfeodhv} = $country->zip_code_format;
if ($country->need_zip_code) {
$guefxsgyxvp = "zip_code_format";
${"GLOBALS"}["ayucbbdhdhcq"] = "zip_code_format";
$krvjmkmqh = "postcode";
${"GLOBALS"}["smbwfoxbj"] = "zip_code_format";
if ((${${"GLOBALS"}["wnwubvg"]} = Tools::getValue("postcode")) && ${${"GLOBALS"}["ayucbbdhdhcq"]}) {
${"GLOBALS"}["gusjike"] = "zip_regexp";
${"GLOBALS"}["bgahkjn"] = "zip_regexp";
$edhlvb = "zip_regexp";
${"GLOBALS"}["yvbcolkxptn"] = "zip_regexp";
$pslxhegowq = "zip_regexp";
${${"GLOBALS"}["ctdciodhb"]} = "/^" . ${${"GLOBALS"}["ebwpvmqblmd"]} . "\$/ui";
${"GLOBALS"}["mivinoyltqoh"] = "zip_regexp";
${$pslxhegowq} = str_replace(" ", "( |)", ${${"GLOBALS"}["ctdciodhb"]});
${${"GLOBALS"}["mivinoyltqoh"]} = str_replace("-", "(-|)", ${${"GLOBALS"}["bgahkjn"]});
${${"GLOBALS"}["ctdciodhb"]} = str_replace("N", "[0-9]", ${${"GLOBALS"}["gusjike"]});
${${"GLOBALS"}["ctdciodhb"]} = str_replace("L", "[a-zA-Z]", ${${"GLOBALS"}["ctdciodhb"]});
${${"GLOBALS"}["ctdciodhb"]} = str_replace("C", $country->iso_code, ${${"GLOBALS"}["yvbcolkxptn"]});
// if (!preg_match(${$edhlvb}, ${${"GLOBALS"}["wnwubvg"]}))