-
Posts
18 -
Joined
-
Last visited
Contact Methods
- Website
Profile Information
-
Location
Turkey / Istanbul
-
Activity
Project Owner
Recent Profile Visitors
597 profile views
sonkaya's Achievements
Newbie (1/14)
1
Reputation
-
Varsayılan Para Birimi USD, Gösterilen TL
sonkaya replied to sonkaya's topic in Topluluk desteği ve yardım
Teşekkürler eticsoft tools.php içerisinde bahsettiğiniz switchLanguage fonksiyonu ve alakalı olabilecek 5 adet daha var aşağıdaki gibi. setCurrency fonksiyonu ile ilgili bir şey yapılması gerekiyor mu? "Şöyle bir şey yapmak mümkün müdür. Eğer dil seçimi Türkçe ise fiyatlar TL cinsinden gözüksün." derken sayfa Türkçe açılıyorsa demek istedim. Yani varsayılan dil Türkçe olduğundan ve yurt dışından bile olsa Türk bir vatandaş Türkçe tarayıcısı ile sayfayı açtığında otomatik olarak Türkçe seçili geldiğinden yapacağımız değişiklik sayfa dili Türkçe ise USD yerine TL göstersin şeklinde olmalı. Ziyaretçi herhangi bir şey yapmasına gerek kalmamalı. (Yanlış anlaşılmamak için açıklama yapmak istedim) 100% çözüm için kodlarla oynamayı tercih ederim ama çok zor ise 1. yolu deneyeyim. 1. yol yüzde kaç sonuç verir acaba? public static function setCookieLanguage($cookie = null) { if (!$cookie) { $cookie = Context::getContext()->cookie; } /* If language does not exist or is disabled, erase it */ if ($cookie->id_lang) { $lang = new Language((int)$cookie->id_lang); if (!Validate::isLoadedObject($lang) || !$lang->active || !$lang->isAssociatedToShop()) { $cookie->id_lang = null; } } if (!Configuration::get('PS_DETECT_LANG')) { unset($cookie->detect_language); } /* Automatically detect language if not already defined, detect_language is set in Cookie::update */ if (!Tools::getValue('isolang') && !Tools::getValue('id_lang') && (!$cookie->id_lang || isset($cookie->detect_language)) && isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { $array = explode(',', Tools::strtolower($_SERVER['HTTP_ACCEPT_LANGUAGE'])); $string = $array[0]; if (Validate::isLanguageCode($string)) { $lang = Language::getLanguageByIETFCode($string); if (Validate::isLoadedObject($lang) && $lang->active && $lang->isAssociatedToShop()) { Context::getContext()->language = $lang; $cookie->id_lang = (int)$lang->id; } } } if (isset($cookie->detect_language)) { unset($cookie->detect_language); } /* If language file not present, you must use default language file */ if (!$cookie->id_lang || !Validate::isUnsignedId($cookie->id_lang)) { $cookie->id_lang = (int)Configuration::get('PS_LANG_DEFAULT'); } $iso = Language::getIsoById((int)$cookie->id_lang); @include_once(_PS_THEME_DIR_.'lang/'.$iso.'.php'); return $iso; } /** * Set cookie id_lang */ public static function switchLanguage(Context $context = null) { if (!$context) { $context = Context::getContext(); } // Install call the dispatcher and so the switchLanguage // Stop this method by checking the cookie if (!isset($context->cookie)) { return; } if (($iso = Tools::getValue('isolang')) && Validate::isLanguageIsoCode($iso) && ($id_lang = (int)Language::getIdByIso($iso))) { $_GET['id_lang'] = $id_lang; } // update language only if new id is different from old id // or if default language changed $cookie_id_lang = $context->cookie->id_lang; $configuration_id_lang = Configuration::get('PS_LANG_DEFAULT'); if ((($id_lang = (int)Tools::getValue('id_lang')) && Validate::isUnsignedId($id_lang) && $cookie_id_lang != (int)$id_lang) || (($id_lang == $configuration_id_lang) && Validate::isUnsignedId($id_lang) && $id_lang != $cookie_id_lang)) { $context->cookie->id_lang = $id_lang; $language = new Language($id_lang); if (Validate::isLoadedObject($language) && $language->active) { $context->language = $language; } $params = $_GET; if (Configuration::get('PS_REWRITING_SETTINGS') || !Language::isMultiLanguageActivated()) { unset($params['id_lang']); } } } public static function getCountry($address = null) { $id_country = (int)Tools::getValue('id_country'); if (!$id_country && isset($address) && isset($address->id_country) && $address->id_country) { $id_country = (int)$address->id_country; } elseif (Configuration::get('PS_DETECT_COUNTRY') && isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { preg_match('#(?<=-)\w\w|\w\w(?!-)#', $_SERVER['HTTP_ACCEPT_LANGUAGE'], $array); if (is_array($array) && isset($array[0]) && Validate::isLanguageIsoCode($array[0])) { $id_country = (int)Country::getByIso($array[0], true); } } if (!isset($id_country) || !$id_country) { $id_country = (int)Configuration::get('PS_COUNTRY_DEFAULT'); } return (int)$id_country; } /** * Set cookie currency from POST or default currency * * @return Currency object */ public static function setCurrency($cookie) { if (Tools::isSubmit('SubmitCurrency') && ($id_currency = Tools::getValue('id_currency'))) { /** @var Currency $currency */ $currency = Currency::getCurrencyInstance((int)$id_currency); if (is_object($currency) && $currency->id && !$currency->deleted && $currency->isAssociatedToShop()) { $cookie->id_currency = (int)$currency->id; } } $currency = null; if ((int)$cookie->id_currency) { $currency = Currency::getCurrencyInstance((int)$cookie->id_currency); } if (!Validate::isLoadedObject($currency) || (bool)$currency->deleted || !(bool)$currency->active) { $currency = Currency::getCurrencyInstance(Configuration::get('PS_CURRENCY_DEFAULT')); } $cookie->id_currency = (int)$currency->id; if ($currency->isAssociatedToShop()) { return $currency; } else { // get currency from context $currency = Shop::getEntityIds('currency', Context::getContext()->shop->id, true, true); if (isset($currency[0]) && $currency[0]['id_currency']) { $cookie->id_currency = $currency[0]['id_currency']; return Currency::getCurrencyInstance((int)$cookie->id_currency); } } return $currency; } /** * Return the CLDR associated with the context or given language_code * * @param Context|null $context * @param null $language_code * @return \PrestaShop\PrestaShop\Core\Cldr\Repository * @throws PrestaShopException */ public static function getCldr(Context $context = null, $language_code = null) { static $cldr_cache; if ($context) { $language_code = $context->language->locale; } if (!empty($cldr_cache[$language_code])) { $cldr = $cldr_cache[$language_code]; } else { $cldr = new PrestaShop\PrestaShop\Core\Cldr\Repository($language_code); $cldr_cache[$language_code] = $cldr; } return $cldr; } /** * Return price with currency sign for a given product * * @param float $price Product price * @param object|array $currency Current currency (object, id_currency, NULL => context currency) * @return string Price correctly formated (sign, decimal separator...) * if you modify this function, don't forget to modify the Javascript function formatCurrency (in tools.js) */ public static function displayPrice($price, $currency = null, $no_utf8 = false, Context $context = null) { if (!is_numeric($price)) { return $price; } if (!$context) { $context = Context::getContext(); } if ($currency === null) { $currency = $context->currency; } elseif (is_int($currency)) { $currency = Currency::getCurrencyInstance((int)$currency); } $cldr = self::getCldr($context); return $cldr->getPrice($price, is_array($currency) ? $currency['iso_code'] : $currency->iso_code); } -
Merhaba, Satıştaki ürünlerim dolar bazında olduğundan dolayı varsayılan para birimini USD yaptım. TL ikinci para birimi. Prestashop'ta gösterilen para birimi diye birşey olmadığından direk olarak varsayılan kur neyse onu gösteriyor yani USD gösteriyor.Birçok yerli ziyaretçi USD fiyatı görünce TL ye çevirme işlemini kendi yapmak istemiyor. Para birimi bölümünden USD yerine TL yi seçmeye de üşeniyorlar ve siteden ayrılıyorlar :((( Şöyle bir şey yapmak mümkün müdür. Eğer dil seçimi Türkçe ise fiyatlar TL cinsinden gözüksün. Yardımlarınız için şimdiden teşekkür ediyorum. Not: Sitede iki dil var. TR ve ENG. TR varsayılan. Tarayıcı dili otomatik olarak belirle etkin. Ver: 1.7.3.3
-
Entry Process and Virtual Memory Hits The Limit
sonkaya replied to sonkaya's topic in General topics
They say u must fix the script codes. -
Entry Process and Virtual Memory Hits The Limit
sonkaya replied to sonkaya's topic in General topics
Hi Bellini13, This is shared server. I didnt define any value. I just chekced php info and it says memroy_limit=128M( you can see the attached image files at the first topic) Thanks. -
Hello, My page address is sonkaya.com.tr (using Presta v1.6.09) Novadays the apache server blocks the page and I researched and find some information about it. Can you check the attached image files and tell me how can I solve the cpu and vmem and entry process limit problem. The table shows vmem faults and entry process fautls as you see. Many thanks. ------ Error_log [27-Jul-2016 12:11:03 UTC] PHP Fatal error: Out of memory (allocated 3145728) (tried to allocate 237 bytes) in /public_html/classes/db/DbPDO.php on line 91 [27-Jul-2016 12:11:27 UTC] PHP Fatal error: Out of memory (allocated 5767168) (tried to allocate 17920 bytes) in /public_html/tools/htmlpurifier/HTMLPurifier.standalone.php on line 17902 [27-Jul-2016 15:13:29 Europe/Istanbul] PHP Fatal error: Out of memory (allocated 19660800) (tried to allocate 80 bytes) in /public_html/classes/cache/CacheFs.php on line 70 [27-Jul-2016 12:15:14 UTC] PHP Fatal error: Out of memory (allocated 2883584) (tried to allocate 3072 bytes) in /public_html/classes/Theme.php on line 220
-
Hi, I have solved the problem: 1) I disabled Minify HTML at the advanced setting -->preferences, because it deletes all comments in the javascripts so /* <![CDATA[ */" tags dissappears like this /* */ 2) I added the codes below to the header.tpl (in the themes folder) just before the {$HOOK_HEADER}) and disabled move the javascript to the end option at the advanced setting -->preferences {if isset($js_defer) && !$js_defer && isset($js_files) && isset($js_def)} {$js_def} {foreach from=$js_files item=js_uri} <script type="text/javascript" src="{$js_uri|escape:'html':'UTF-8'}"></script> {/foreach} {/if} thanks so much.
-
Hi, I am using 1.6.0.9 I tried to add Google remarketing code into footer.tpl but still couldnt succeed. Google still says can not find the tag in my web page www.sonkaya.com.tr Please help me. The codes in footer.tpl is below. Thanks. {literal} <!-- remarketing codes --> <script type="text/javascript"> /* <![CDATA[ */ var google_conversion_id = 11111111111; var google_custom_params = window.google_tag_params; var google_remarketing_only = true; /* ]]> */ </script> <script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js"> </script> <noscript> <div style="display:inline;"> <img height="1" width="1" style="border-style:none;" alt="" src="//googleads.g.doubleclick.net/pagead/viewthroughconversion/967369179/?value=0&guid=ON&script=0"/> </div> </noscript> {/literal} </body> </html>
-
Hello, I have a big problem, Most of the visitors enter the contact form page and then they think there is only one way to contact to me via filling the form. Most of them can not see the contact information at the footer, and they dont want ot fill the forum so I miss many potential customers (( So I decided to add the contact infromation to the form page. (If possible I want to add 875x200 of the presta shops map page too) My shop has 2 languages, Turkish and English so it would be nice if the contact information labels(address, phone) can change according to the language. How can I do it. Please show me the way. Thanks so much Form page http://www.sonkaya.com.tr/en/contact-us Turkish( http://www.sonkaya.com.tr/tr/BizeUlasin ) Map page http://www.sonkaya.com.tr/en/stores
-
Thanks for help Defuzed, But there must be an option box for users like me who dont want store names at the end of the titles for home and category pages. How can I ask the developers for my update request. Many thanks.
-
Hello, using 1.6.x I changed homepage meta title but see that it adds the shop name my edited title How can I disable it. I also dont know why it puts shop name at the end if it lets to edit meta title by me. I set the title like this(also i want the title like this): "Sonkaya Makina | Ambalaj ve Paketleme Makinaları" my shop name is "Sonkaya Makina ve Otomasyon Teknolojileri" presta makes(combines) the title : "Sonkaya Makina | Ambalaj ve Paketleme Makinaları - Sonkaya Makina ve Otomasyon Teknolojileri" and you can check the title from the link also http://www.sonkaya.com.tr Thanks.