Jump to content

waldemar [pl]

Members
  • Posts

    31
  • Joined

  • Last visited

Everything posted by waldemar [pl]

  1. Darmowy moduł powiadomień o nowym zamówieniu przez komunikator Kadu/gadu-gadu. Dziś się trochę nudziłem i jest oto. Sposób użycia: Zarejestruj bota na https://boty.gg.pl/rejestracja/ W mailu który otrzymasz kliknij link weryfikacyjny. Wgraj plik weryfikacyjny na serwer, dokonaj weryfikacji i potwierdź utworzenie bota. W kolejnym mailu otrzymasz numer, login i hasło do bota. Wpisz je do odpowiednich pól modułu. Wpisz również numer GG odbiorcy na który będą przychodzić powiadomienia. Wyślij tekst ZAPISZ z numeru GG odbiorcy na numer swojego bota, dzięki temu bot będzie mógł wysyłać powiadomienia na numer GG odbiorcy. To wszystko. Życzę jak najwięcej powiadomień! notificationGG.zip licencja: thanksware.
  2. Fix for PS 1.4.x.x First make in /productcomments folder /mails. In /mails make folder with Your_iso_language like (en, fr, pl) and here mail templates named new_comment.(txt, html). Now you must in file productcomments on line 542 after $comment->save(); paste $template = 'new_comment'; $subject = $this->l('New comment'); $mail_ma = 'HERE_YOU_EMAIL_ADDRESS'; $id_lang = (is_object($cookie) AND isset($cookie->id_lang)) ? (int)$cookie->id_lang : (int)Configuration::get('PS_LANG_DEFAULT'); $iso = Language::getIsoById((int)$id_lang); if (file_exists(dirname(__FILE__).'/mails/'.$iso.'/'.$template.'.txt') AND file_exists(dirname(__FILE__).'/mails/'.$iso.'/'.$template.'.html')) Mail::Send($id_lang, $template, $subject, NULL, $mail_ma, NULL, strval(Configuration::get('PS_SHOP_EMAIL')), strval(Configuration::get('PS_SHOP_NAME')), NULL, NULL, dirname(__FILE__).'/mails/');
  3. I found the fix for no flag problem (server error 500). In file geoip.inc on line 348 replace: function geoip_country_code_by_name($gi, $name) { $country_id = geoip_country_id_by_name($gi,$name); if ($country_id !== false) { return $gi->GEOIP_COUNTRY_CODES[$country_id]; } return false; } function geoip_country_name_by_name($gi, $name) { $country_id = geoip_country_id_by_name($gi,$name); if ($country_id !== false) { return $gi->GEOIP_COUNTRY_NAMES[$country_id]; } return false; } with if (!function_exists('geoip_country_code_by_name')){ function geoip_country_code_by_name($gi, $name) { $country_id = geoip_country_id_by_name($gi,$name); if ($country_id !== false) { return $gi->GEOIP_COUNTRY_CODES[$country_id]; } return false; } } if (!function_exists('geoip_country_name_by_name')){ function geoip_country_name_by_name($gi, $name) { $country_id = geoip_country_id_by_name($gi,$name); if ($country_id !== false) { return $gi->GEOIP_COUNTRY_NAMES[$country_id]; } return false; } }
  4. To edit the short description: In file product_edit.php abaut line 409 is: else if((field=="description") || (field=="meta_description")) it should be: else if((field=="description") || (field=="meta_description") || (field=="description_short"))
  5. evolution.x: Thank You. I had the same problem as you. You helped me to solve it.
  6. Hello! The problem is in: open_basedir restriction in effect -> in this case, instead of trying to open the file index.php (like folder) and looking /mails. It is known that it will return an error and you have warning. Make a test and delete the moment index.php from /modules. Warning not be displayed. edit: sorry for my woodish english
  7. Hi Raph59! Thanks for a great module! First, I used it on PS1.2.4, and later on PS1.4.4.1 on OVH hosting and everything was fine. Now a have PS1.4.4.1 on linux.pl hosting and I have little problem with iplocator. http://www.mat-hurtownia.com.pl/modules/statstrackvisits/iplocator.php?visitorip=91.240.109.108 give error 500. The problem is with this: my cofig: Please help me. Sorry for my woodish english.
  8. shacker: Great module - thanks! But I got an error after click [delete all fields].: Additionally, the module has not performed to optimize the tables. OVH hosting. edit: PS 1.4.4.1
  9. On OVH servers must change the line of mysql_close($order_res); on mysql_close();
  10. Hi, PS I have 1.2.4 and PWA module. I want to write a login module for facebook for PS version 1.2.4 Unfortunately, after logging into Facebook I get redirected to the shop: http://MY_SITE/authe...on.php?code=AQB[...]W#_=_ and I have: Hack attempt. What is wrong? How to correct file authentication.php for PS 1.2.4? this part: /* FB Connect */ //-------------------------------- if (Tools::getValue('fb')) { $create_account = 1; $smarty->assign('email_create', 1); $smarty->assign('fb_connect',1); $smarty->assign('appid', Configuration::get('FB_APPID')); } if (Tools::getValue('registered')) { //echo '<p>signed_request contents:</p>'; $response = FBTools::parse_signed_request($_REQUEST['signed_request'],Configuration::get('FB_SECRET')); $reg_metadata_fields = '[ {"name":"name"}, {"name":"first_name"}, {"name":"last_name"}, {"name":"email"}, {"name":"password"}, {"name":"birthday"}, {"name":"gender"}, {"name":"captcha"}]'; //echo '<pre>'; //print_r($response); //echo '</pre>'; if (strcmp($reg_metadata_fields,$response['registration_metadata']['fields']) != 0) $errors[] = Tools::displayError('registration metadata fields not valid'); if (Customer::customerExists($response['registration']['email'])){ //$errors[] = Tools::displayError('someone has already registered with this e-mail address (this module need further development)'); //$smarty->assign('email_create', 1); //$smarty->assign('existing_user', 1); //$smarty->assign('appid', Configuration::get('FB_APPID')); $customer = new Customer(); $authentication = $customer->getByEmail($response['registration']['email']); $customer->fb_uid = $response['user_id']; $customer->active = 1; $customer->deleted = 0; //$_POST['lastname'] = $response['registration']['last_name']; //$_POST['firstname'] = $response['registration']['first_name']; //$_POST['passwd'] = $response['registration']['password']; //$_POST['email'] = $response['registration']['email']; //$errors = $customer->validateControler(); $cookie->id_customer = intval($customer->id); $cookie->customer_lastname = $customer->lastname; $cookie->customer_firstname = $customer->firstname; $cookie->logged = 1; $cookie->passwd = $customer->passwd; $cookie->email = $customer->email; if (Configuration::get('PS_CART_FOLLOWING') AND (empty($cookie->id_cart) OR Cart::getNbProducts($cookie->id_cart) == 0)) $cookie->id_cart = intval(Cart::lastNoneOrderedCart(intval($customer->id))); Module::hookExec('authentication'); if ($back = Tools::getValue('back')) Tools::redirect($back); Tools::redirect('my-account.php'); $existing_user = 1; } if (!sizeof($errors)) { $customer = new Customer(); $customer_birthday = explode('/',$response['registration']['birthday']); $customer->birthday = intval($customer_birthday[2]).'-'.intval($customer_birthday[0]).'-'.intval($customer_birthday[1]); if ($response['registration']['last_name'] == "male") $_POST['id_gender'] = 1; else if ($response['registration']['last_name'] == "female") $_POST['id_gender'] = 2; else $_POST['id_gender'] = 9; $_POST['lastname'] = $response['registration']['last_name']; $_POST['firstname'] = $response['registration']['first_name']; $_POST['passwd'] = $response['registration']['password']; $_POST['email'] = $response['registration']['email']; $errors = $customer->validateControler(); $customer->fb_uid = $response['user_id']; if (!sizeof($errors)) { $customer->active = 1; if (!$customer->add()) $errors[] = Tools::displayError('an error occurred while creating your account'); else { if (!Mail::Send(intval($cookie->id_lang), 'account', 'Welcome!', array('{firstname}' => $customer->firstname, '{lastname}' => $customer->lastname, '{email}' => $customer->email, '{passwd}' => $response['registration']['password']), $customer->email, $customer->firstname.' '.$customer->lastname)) $errors[] = Tools::displayError('cannot send email'); $smarty->assign('confirmation', 1); $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; Module::hookExec('createAccount', array( '_POST' => $_POST, 'newCustomer' => $customer )); //$fbcookie = FBTools::get_facebook_cookie((Configuration::get('FB_APPID')), (Configuration::get('FB_SECRET'))); if ($back) Tools::redirect($back); Tools::redirect('my-account.php'); } } } } if (Tools::getValue('fblogin') OR Tools::getValue('code')) { $app_id = (Configuration::get('FB_APPID')); $app_secret = (Configuration::get('FB_SECRET')); $my_url = "http://".$_SERVER['HTTP_HOST']."/authentication.php"; $code = $_REQUEST["code"]; if(empty($code)) { $dialog_url = "http://www.facebook.com/dialog/oauth?client_id=" . $app_id . "&redirect_uri=" . urlencode($my_url); echo("<script> top.location.href='" . $dialog_url . "'</script>"); } $token_url = "https://graph.facebook.com/oauth/access_token?client_id=" . $app_id . "&redirect_uri=" . urlencode($my_url) . "&client_secret=" . $app_secret . "&code=" . $code; $access_token = file_get_contents($token_url); $graph_url = "https://graph.facebook.com/me?" . $access_token; $user = json_decode(file_get_contents($graph_url)); $customer = new Customer(); $authentication = $customer->getByEmail($user->email); //print_r($user); /* Handle brute force attacks */ sleep(1); if ($user->id != $customer->fb_uid) $errors[] = Tools::displayError('fb login authentication failed'); else { $cookie->id_customer = intval($customer->id); $cookie->customer_lastname = $customer->lastname; $cookie->customer_firstname = $customer->firstname; $cookie->logged = 1; $cookie->passwd = $customer->passwd; $cookie->email = $customer->email; if (Configuration::get('PS_CART_FOLLOWING') AND (empty($cookie->id_cart) OR Cart::getNbProducts($cookie->id_cart) == 0)) $cookie->id_cart = intval(Cart::lastNoneOrderedCart(intval($customer->id))); Module::hookExec('authentication'); if ($back = Tools::getValue('back')) Tools::redirect($back); Tools::redirect('my-account.php'); } } //-------------------------------- for_PS1.2.4_with_PWA.zip
  11. In this case, the script generates a lot of 404 errors because of the presence of cloud-zoom.1.0.2.min.js file references to "." If someone does not want 404 errors should be changed file cloud-zoom.1.0.2.min.js: <div class='mousetrap' style='background-image:url(\".\") to: <div class='mousetrap' style='background-image:url(\"/img/empty.png\") and upload a file empty.png to a folder /img.
  12. razro: How to make modifications to the cloud of zoom - when click on the picture then is opened in a standard lightbox window with a big image.
  13. Yes, I have very old PS 1.2.5. HookNewOrder not working correctly in PS 1.2.4 and 1.2.5. (module code is executed after the approval of the order and first of the day have wrong number). Dirty hack can be placed after line ~15 order.php file(PS 1.2.5) $errors = array(); /* here */ - it will work.
  14. Problem is with hook. Solution is uninstall the module and move dirty hack in order.php under function: if (!$cart->checkQuantities()) { $step = 0; $errors[] = Tools::displayError('An item in your cart is no longer available, you cannot proceed with your order'); } should look like this: if (!$cart->checkQuantities()) { $step = 0; $errors[] = Tools::displayError('An item in your cart is no longer available, you cannot proceed with your order'); } /* Number of order */ $order_res = Db::getInstance()->Execute("SHOW TABLE STATUS LIKE '"._DB_PREFIX_."orders'"); $order_row = mysql_fetch_assoc($order_res); $order_nextautoid = $order_row['Auto_increment']; mysql_close($order_res); if (substr($order_nextautoid, 0, 6) != date("ymd")) { Db::getInstance()->Execute('ALTER TABLE `'._DB_PREFIX_ .'orders` AUTO_INCREMENT = '.intval(date("ymd").'001')); } ...and voila.
  15. I give up. I have no idea why for me it will not work correctly. I do not know why the hook newOrder is executed after confirmation of order. I move a “dirty” hack to order.php - now is ok!. tnx DenisDT and angora!
  16. I have (in this moment) in auto_increment in ps_orders table value: 110404006 If You do order (in this moment), it will have the number 110404006 - should get 110406001. Next order (second today) will have a number 110406001. Why? sorry for my woodish english.
  17. No problem , but I have one question (problem). For example: Today date is: 110406 auto_increment in ps_orders is: 110404006 If someone makes an order. The order number is 110404006, although the today date is different, and auto_increment value should be overridden. Whether this means that retrieves the value id_order Presta earlier than execute the command ALTER TABLE in the module?
  18. Version for PS 1.2.4 (in attachment). In loyalty module must change in file loyalty.tpl: 'id_order' => 8, to 'id_order' => 10, and voila. ymdnumorderids_for_PS_1.2.4.zip
  19. Maybe someone could adapt this module for older versions of PS 1.2.4 - 1.3? Please.
  20. So it must work. My PS is to 1.2.5 and work perfectly. How is the type of table you ps_mailalert_customer_oos? MyISAM?
  21. You must have two files if folder modules/mailalerts/mails/(lang_folders)/ - customer_qty.txt - customer_qty.html Have you such files?
×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More