Public Member Functions | |
getConfigData ($key, $storeId=null) | |
getAccountLogin ($storeId=null) | |
getAccountPassword ($storeId=null) | |
getTargetCountryInfo ($storeId=null) | |
getTargetCountry ($storeId=null) | |
getTargetCurrency ($storeId=null) | |
isValidBaseCurrencyCode ($storeId=null) | |
getDefaultItemType ($storeId=null) | |
getAllowedCountries ($storeId=null) | |
getCountryInfo ($iso, $field=null, $storeId=null) |
Definition at line 34 of file Config.php.
getAccountLogin | ( | $ | storeId = null |
) |
Google Account login
int | $storeId |
Definition at line 58 of file Config.php.
00059 { 00060 return $this->getConfigData('login', $storeId); 00061 }
getAccountPassword | ( | $ | storeId = null |
) |
Google Account password
int | $storeId |
Definition at line 69 of file Config.php.
00070 { 00071 return $this->getConfigData('password', $storeId); 00072 }
getAllowedCountries | ( | $ | storeId = null |
) |
Google Base supported countries
int | $storeId |
Definition at line 137 of file Config.php.
00138 { 00139 return $this->getConfigData('allowed_countries', $storeId); 00140 }
getConfigData | ( | $ | key, | |
$ | storeId = null | |||
) |
Return config var
string | $key Var path key | |
int | $storeId Store View Id |
Definition at line 43 of file Config.php.
00044 { 00045 if (!$this->hasData($key)) { 00046 $value = Mage::getStoreConfig('google/googlebase/' . $key, $storeId); 00047 $this->setData($key, $value); 00048 } 00049 return $this->getData($key); 00050 }
getCountryInfo | ( | $ | iso, | |
$ | field = null , |
|||
$ | storeId = null | |||
) |
Country info such as name, locale, language etc.
string | $iso two-letters country ISO code | |
string | $field If specified, return value for field | |
int | $storeId |
Definition at line 150 of file Config.php.
00151 { 00152 $countries = $this->getAllowedCountries($storeId); 00153 $country = isset($countries[$iso]) ? $countries[$iso] : null; 00154 return is_null($field) ? $country : ( isset($country[$field]) ? $country[$field] : null ); 00155 }
getDefaultItemType | ( | $ | storeId = null |
) |
Default Item Type for country
int | $storeId |
Definition at line 125 of file Config.php.
00126 { 00127 $country = $this->getTargetCountry($storeId); 00128 return $this->getCountryInfo($country, 'default_item_type'); 00129 }
getTargetCountry | ( | $ | storeId = null |
) |
Google Account target country
int | $storeId |
Definition at line 91 of file Config.php.
00092 { 00093 return $this->getConfigData('target_country', $storeId); 00094 }
getTargetCountryInfo | ( | $ | storeId = null |
) |
Google Account target country info
int | $storeId |
Definition at line 80 of file Config.php.
00081 { 00082 return $this->getCountryInfo($this->getTargetCountry($storeId), null, $storeId); 00083 }
getTargetCurrency | ( | $ | storeId = null |
) |
Google Account target currency (for target country)
int | $storeId |
Definition at line 102 of file Config.php.
00103 { 00104 $country = $this->getTargetCountry($storeId); 00105 return $this->getCountryInfo($country, 'currency'); 00106 }
isValidBaseCurrencyCode | ( | $ | storeId = null |
) |
Check whether System Base currency equals Google Base target currency or not
int | $storeId |
Definition at line 114 of file Config.php.
00115 { 00116 return Mage::app()->getStore($storeId)->getBaseCurrencyCode() == $this->getTargetCurrency($storeId); 00117 }