// Improve multishop API

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@13566 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rMalie
2012-02-23 15:39:44 +00:00
parent ec8f05c3ca
commit b24dcffc9c
71 changed files with 377 additions and 425 deletions

View File

@@ -72,9 +72,9 @@ class ConnectionCore extends ObjectModel
public function getFields()
{
if (!$this->id_shop)
$this->id_shop = Context::getContext()->shop->getId(true);
$this->id_shop = Context::getContext()->shop->id;
if (!$this->id_group_shop)
$this->id_group_shop = Context::getContext()->shop->getGroupID();
$this->id_group_shop = Context::getContext()->shop->id_group_shop;
$fields = parent::getFields();
return $fields;
@@ -147,8 +147,8 @@ class ConnectionCore extends ObjectModel
$connection->id_guest = (int)$cookie->id_guest;
$connection->id_page = Page::getCurrentId();
$connection->ip_address = Tools::getRemoteAddr() ? ip2long(Tools::getRemoteAddr()) : '';
$connection->id_shop = Context::getContext()->shop->getID();
$connection->id_group_shop = Context::getContext()->shop->getGroupID();
$connection->id_shop = Context::getContext()->shop->id;
$connection->id_group_shop = Context::getContext()->shop->id_group_shop;
$connection->date_add = $cookie->date_add;
if (Validate::isAbsoluteUrl($referer))
$connection->http_referer = $referer;