Skocz do zawartości

broall

Members
  • Zawartość

    8
  • Rejestracja

  • Ostatnia wizyta

  1. 1.4.8.2 polskie tłumaczenie

    Dlaczego jak wgrywam poprzez import to tłumaczenie: pl.gzip to nie tłumaczy mi się? Jak było na stronie głównej po angielsku tak wciąż jest. Proszę o info. Paweł
  2. Błąd: Fatal error: Call to undefined method Validate...

    Ok, chyba udało się. Usunąłem linijkę 39 i działa. sower, dziękuję za podpowiedź ! - - - Ale i tak zauważam, że rejestruje danego użytkownika... bo pokazuje się jako zalogowany
  3. Błąd: Fatal error: Call to undefined method Validate...

    Ale to mam zmieniać tylko w tym pliku authentication.php? Specjalistą php nie jestem, najwyżej będę zmieniał metodą prób i błędów.
  4. Błąd: Fatal error: Call to undefined method Validate...

    sower, a jak mogę usunąć ten NIP, aby go w ogóle nie było, by nie było tego problemu? Może coś usunąć? Czy istnieje możliwość, abyś mi wskazał? Zamieszczam cały kod pliku authentication.php <?php /* SSL Management */ $useSSL = true; include(dirname(__FILE__).'/../../config/config.inc.php'); include(dirname(__FILE__).'/../../init.php'); if ($cookie->isLogged()) Tools::redirect('my-account.php'); //CSS ans JS file calls $js_files = array( _THEME_JS_DIR_.'tools/statesManagement.js', __PS_BASE_URI__.'js/jquery/jquery-typewatch.pack.js' ); $errors = array(); $back = Tools::getValue('back'); /* $key = Tools::safeOutput(Tools::getValue('key')); if (!empty($key)) $back .= (strpos($back, '?') !== false ? '&' : '?').'key='.$key; */ if (!empty($back)) $smarty->assign('back', Tools::safeOutput($back)); if (Tools::isSubmit('SubmitPWR')) { $create_account = 1; $email= 1; $smarty->assign('email_create',$email); } if (Tools::isSubmit('submitAccount')) { $create_account = 1; $smarty->assign('email_create', 1); $validateDni = Validate::isDni(Tools::getValue('dni')); if (!Validate::isEmail($email = Tools::getValue('email'))) $errors[] = Tools::displayError('e-mail not valid'); elseif (Tools::getValue('dni') != NULL AND $validateDni != 1) { $error = array( 0 => Tools::displayError('DNI isn\'t valid'), -1 => Tools::displayError('this DNI has been already used'), -2 => Tools::displayError('NIF isn\'t valid'), -3 => Tools::displayError('CIF isn\'t valid'), -4 => Tools::displayError('NIE isn\'t valid') ); $errors[] = $error[$validateDni]; } elseif (!@checkdate(Tools::getValue('months'), Tools::getValue('days'), Tools::getValue('years')) AND !(Tools::getValue('months') == '' AND Tools::getValue('days') == '' AND Tools::getValue('years') == '')) $errors[] = Tools::displayError('invalid birthday'); else { /* Customer and address, same fields, caching data */ $addrLastname = isset($_POST['lastname']) ? $_POST['lastname'] : $_POST['customer_lastname']; $addrFirstname = isset( $_POST['firstname']) ? $_POST['firstname'] : $_POST['customer_firstname']; $md5Passwd = md5($addrFirstName.' '.$addrLastName, true); $passwd = ''; $chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+*'; for ($i = 0; $i < 8; $i++) $passwd .= $chars[ord($md5Passwd[$i]) & 0x3f]; $_POST['passwd'] = $passwd; $customer = new Customer(); $authentication = $customer->getByEmail($email, $passwd); $pwrReturning = 0; if (Customer::customerExists($email)) { if ($authentication) { $customer->getByEmail($email); $pwrReturning = 1; $addresses = $customer->getAddresses(intval(Configuration::get('PS_LANG_DEFAULT'))); foreach ($addresses as $address) { $obj = new Address($address['id_address']); $obj->delete(); } } else { $errors[] = Tools::displayError('someone has already registered with this e-mail address'); } } if (Tools::isSubmit('newsletter')) { $customer->ip_registration_newsletter = pSQL($_SERVER['REMOTE_ADDR']); $customer->newsletter_date_add = pSQL(date('Y-m-d H:i:s')); } $customer->birthday = (empty($_POST['years']) ? '' : intval($_POST['years']).'-'.intval($_POST['months']).'-'.intval($_POST['days'])); /* Customer and address, same fields, caching data */ $_POST['lastname'] = $_POST['customer_lastname']; $_POST['firstname'] = $_POST['customer_firstname']; $errors = array_unique(array_merge($errors, $customer->validateControler())); $_POST['lastname'] = $addrLastname; $_POST['firstname'] = $addrFirstname; $address = new Address(); $address->id_customer = 1; $errors = array_unique(array_merge($errors, $address->validateControler())); if (!sizeof($errors)) { /* if (!$country = new Country($address->id_country) OR !Validate::isLoadedObject($country)) die(Tools::displayError()); if (intval($country->contains_states) AND !intval($address->id_state)) $errors[] = Tools::displayError('this country require a state selection'); else */ if (true) { $customer->active = 1; if ($pwrReturning == 1 && !$customer->update()) $errors[] = Tools::displayError('an error occurred while updating your account'); elseif ($pwrReturning == 0 && !$customer->add()) $errors[] = Tools::displayError('an error occurred while creating your account'); else { $address->id_customer = intval($customer->id); if (!$address->add()) $errors[] = Tools::displayError('an error occurred while creating your address'); else { $cookie->id_customer = intval($customer->id); $cookie->customer_lastname = $customer->lastname; $cookie->customer_firstname = $customer->firstname; $cookie->passwd = $customer->passwd; $cookie->logged = 1; $cookie->email = $customer->email; $cookie->PWR = 1; Module::hookExec('createAccount', array( '_POST' => $_POST, 'newCustomer' => $customer )); if ($back) Tools::redirect($back); } } } } } } if (isset($create_account)) { /* Generate years, months and days */ if (isset($_POST['years']) AND is_numeric($_POST['years'])) $selectedYears = intval($_POST['years']); $years = Tools::dateYears(); if (isset($_POST['months']) AND is_numeric($_POST['months'])) $selectedMonths = intval($_POST['months']); $months = Tools::dateMonths(); if (isset($_POST['days']) AND is_numeric($_POST['days'])) $selectedDays = intval($_POST['days']); $days = Tools::dateDays(); /* Select the most appropriate country */ if (isset($_POST['id_country']) AND is_numeric($_POST['id_country'])) $selectedCountry = intval($_POST['id_country']); elseif (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { $array = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']); if (Validate::isLanguageIsoCode($array[0])) { $selectedCountry = Country::getByIso($array[0]); if (!$selectedCountry) $selectedCountry = intval(Configuration::get('PS_COUNTRY_DEFAULT')); } } if (!isset($selectedCountry)) $selectedCountry = intval(Configuration::get('PS_COUNTRY_DEFAULT')); $countries = Country::getCountries(intval($cookie->id_lang), true); $smarty->assign(array( 'years' => $years, 'sl_year' => (isset($selectedYears) ? $selectedYears : 0), 'months' => $months, 'sl_month' => (isset($selectedMonths) ? $selectedMonths : 0), 'days' => $days, 'sl_day' => (isset($selectedDays) ? $selectedDays : 0), 'countries' => $countries, 'sl_country' => (isset($selectedCountry) ? $selectedCountry : 0) )); /* Call a hook to display more information on form */ $smarty->assign(array('HOOK_CREATE_ACCOUNT_FORM' => Module::hookExec('createAccountForm'), 'HOOK_CREATE_ACCOUNT_TOP' => Module::hookExec('createAccountTop') )); } include(dirname(__FILE__).'/../../header.php'); $smarty->assign('errors', $errors); Tools::safePostVars(); $smarty->display(_PS_ROOT_DIR_.'/modules/pwr/authentication.tpl'); include(dirname(__FILE__).'/../../footer.php'); ?>
  5. Cześć, mam takie pytanie, a mianowicie: pobrałem plik purchase without registration wr_0.3.zip i go wrzuciłem na swoją preste w wersji: 1.2.2.0 to wyskakuje mi taki komunikat: Fatal error: Call to undefined method Validate::isDni() in /public_html/sklep-arte/modules/pwr/authentication.php on line 39 Co zrobić? Dodam, że pobrałem też plik pwr_0.2 i wystepuje ten sam komunikat. Proszę o pomoc. Dziękuję, Paweł
  6. Więc w takim razie pytanie, czy istnieje możliwość upgrade teraz mojej wersji na coś nowszego? Napracowałem się trochę, aby to wyglądało więc nie chciałbym wszystkiego utracić i robić raz jeszcze wszystko na nowo. PS. Instalowałem w wersji: PrestaShop 1.4.9.0 ale do niej nie mam języka polskiego - - - - Zainstalowałem wersję 1.4.4.1 i jest ten moduł, ale nigdzie nie ma możliwości upgrade z tej mojej wersji 1.2.2.0. Jeżeli miałbym znów zrobić tą theme i przenosić produkty od nowa jest tworzyć to dla mnie za dużo pracy znów i lepszym rozwiązaniem dla mnie byłoby jednak doinstalować ten moduł. Ja mam prosty sklep, nie potrzebuje nowości, będę miał dosłowanie 10-20 produktów także bardziej zaawansowane skrypty są po prostu mi zbędne.
  7. Cześć, mam takie pytanie, a mianowicie: pobrałem plik purchase without registration wr_0.3.zip i go wrzuciłem na swoją preste w wersji: 1.2.2.0 to wyskakuje mi taki komunikat: Fatal error: Call to undefined method Validate::isDni() in /public_html/sklep-arte/modules/pwr/authentication.php on line 39 Co zrobić? Dodam, że pobrałem też plik pwr_0.2 i wystepuje ten sam komunikat. Proszę o pomoc. Dziękuję, Paweł
  8. Witam, poszukuję modułu zakupów bez rejestracji/ logowania. Nie wszyscy użytkownicy mojego przyszłego sklepu będę chcieli się zarejestrować i potrzebny mi właśnie taki moduł. Widziałem, że na najnowszej Prescie jest już ten moduł, ale... ale nie znalazłem spolszczenia, a cały panel w wer. ang nie za bardzo mi odpowiada. Wykonałem sobie theme pod wersję: 1.2.2.0 i właśnie do tej wersji potrzebuje takiego modułu. Widziałem temat: http://prestadesign.pl/moduly-f13/nowy-darmowy-modul-zakupow-bez-rejestracji-pres-t598.html?hilit=bez%20rejestracji ale gdy pobiorę plik: purchase without registration wr_0.3.zip, w którym znajdują się inne pliki nie mam pojęcia do którego katalogu to wgrać, aby sprawdzić czy u mnie by to zadziałało. Bardzo proszę o pomoc. Dziękuję, Paweł
×