Jump to content

xiverisx

Members
  • Posts

    29
  • Joined

  • Last visited

Contact Methods

Profile Information

  • Activity
    Developer

xiverisx's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Quite sad that i hadn't recieved any replies, but the reason for mysql executing so long one SQL was a line where selected products where beeing ordered by orderprice or name. So made some small hack and now everything works in category with a lot of products quite fast, but i didn't know if it's a bug and why that SQL was so slow.
  2. Hi, my company is often using Prestashop for our clients eshops websites and now we really need some help from others developers to deal with this problem. The website now we are building is using prestashop version 1.5.0.17. Server data: PHP 5.3.6 / MySQL 5.0.67 The problem is sql performance issue when you are going to a category page which has now ~1700 products and SQL query which is generated in a Category.php class function getProducts() is performed from 5s and more. First we would want to know the reasons why it is so slow and what actions we could make to make it a lot faster?
  3. Sveiki tikriausiai pastebėjote, kad prestashop blogai generuoja lietuvių kalbos SEO draugiškus URL ir pašalina (ų, ū, ė, į) raides. Po kiek bandymų pavyko ištaisyti šią problemą taip: 1) Atsidarykite /js/admin.js javascript failą. 2) Susiraskite funkciją str2url ~30 eilutė. 3) Po eilutėmis: str = str.toUpperCase(); str = str.toLowerCase(); Darašykite šias eilutes: str = str.replace("ų", "u"); str = str.replace("ū", "u"); str = str.replace("ė", "e"); str = str.replace("į", "i"); Prestashop versija: 1.4.7
  4. Esant labai dideliam poreikiui, turetum nueiti i savo moduli, atsidaryti jo pagrindini php faila, ir dasirasyti tris eilutes kur ta moduli nori perkelti.
  5. Hi all developers, i need help from someone with one specific reason. SHORT INFO: 1) My client has prestashop site which is still working with default prestashop theme and features and about 500 customers. 2) I created new site using Prestashop 1.4.3. PROBLEM: I need to move customers data to the new site, which is on different hosting. 1) I Analyzed differenceses beetween TABLE STRUCTURES. And successfully copied tables: customer, customer_groups and address. 2) Yeah i know that different prestashop installation has unique _COOKIE_KEY_ which is used for user password generations, but i don't have the old site _COOKIE_KEY_. So i was thinking to inform users with a message on pressing remind password link. But then i am getting email, and press the link to send new password. i get error: An error occurred with your account and your new password cannot be sent to your e-mail. Please report your problem using the contact form. So any ideas? How to fix it? I discovered that errors occurs on file PasswordController.php elseif (($token = Tools::getValue('token')) && ($id_customer = (int)(Tools::getValue('id_customer')))) { $email = Db::getInstance()->getValue('SELECT `email` FROM '._DB_PREFIX_.'customer c WHERE c.`secure_key` = "'.pSQL($token).'" AND c.id_customer='.(int)($id_customer)); if ($email) { $customer = new Customer(); $customer->getByemail($email); if ((strtotime($customer->last_passwd_gen.'+'.(int)($min_time = Configuration::get('PS_PASSWD_TIME_FRONT')).' minutes') - time()) > 0) Tools::redirect('authentication.php?error_regen_pwd'); else { $customer->passwd = Tools::encrypt($password = Tools::passwdGen((int)(MIN_PASSWD_LENGTH))); $customer->last_passwd_gen = date('Y-m-d H:i:s', time()); print_r($customer); if ($customer->update()) { if (Mail::Send((int)(self::$cookie->id_lang), 'password', Mail::l('Your password'), array('{email}' => $customer->email, '{lastname}' => $customer->lastname, '{firstname}' => $customer->firstname, '{passwd}' => $password), $customer->email, $customer->firstname.' '.$customer->lastname)) self::$smarty->assign(array('confirmation' => 1, 'email' => $customer->email)); else $this->errors[] = Tools::displayError('Error occurred when sending the e-mail.'); } else $this->errors[] = Tools::displayError('An error occurred with your account and your new password cannot be sent to your e-mail. Please report your problem using the contact form.'); } } else $this->errors[] = Tools::displayError('We cannot regenerate your password with the data you submitted'); } Where method $customer->update() returns false. So anyone can help me maybe on fixing this issue?
  6. Yes, by default prestashop generates PDF only when page admin changes order status to: payment accepted when in the customer orders list appears link to generated PDF. (By the way i was using prestashop 1.4.3.) So steps which i made that shop customer will see PDF invoice in his order list page was: 1) open history.tpl and find: {if (isset($order.invoice) && $order.invoice && isset($order.invoice_number) && $order.invoice_number) && isset($invoiceAllowed) && $invoiceAllowed == true} getPageLink('pdf-invoice.php', true)}?id_order={$order.id_order|intval}" title="{l s='Invoice'}"> getPageLink('pdf-invoice.php', true)}?id_order={$order.id_order|intval}" title="{l s='Invoice'}">{l s='PDF'} {else}-{/if} when change it to: getPageLink('pdf-invoice.php', true)}?id_order={$order.id_order|intval}" title="{l s='Invoice'}"> getPageLink('pdf-invoice.php', true)}?id_order={$order.id_order|intval}" title="{l s='Invoice'}">{l s='PDF'} 2) open class file OrderState.php static public function invoiceAvailable($id_order_state) { $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow(' SELECT `invoice` AS ok FROM `'._DB_PREFIX_.'order_state` WHERE `id_order_state` = '.(int)($id_order_state)); return $result['ok']; } and change to: static public function invoiceAvailable($id_order_state) { $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow(' SELECT `invoice` AS ok FROM `'._DB_PREFIX_.'order_state` WHERE `id_order_state` = '.(int)($id_order_state)); return true; }
  7. Hi i need the same feature, but after user is logged in going to: pdf-invoice.php?id_order=100015 (example) I am getting error: Invoice not found Its from pdf-invoice.php code: $cookie = new Cookie('ps'); if (!$cookie->isLogged() AND !Tools::getValue('secure_key')) Tools::redirect('authentication.php?back=pdf-invoice.php'); if (!(int)(Configuration::get('PS_INVOICE'))) die(Tools::displayError('Invoices are disabled in this shop.')); if (isset($_GET['id_order']) AND Validate::isUnsignedId($_GET['id_order'])) $order = new Order((int)($_GET['id_order'])); if (!isset($order) OR !Validate::isLoadedObject($order)) die(Tools::displayError('Invoice not found')); elseif ((isset($cookie->id_customer) AND $order->id_customer != $cookie->id_customer) OR (Tools::isSubmit('secure_key') AND $order->secure_key != Tools::getValue('secure_key'))) die(Tools::displayError('Invoice not found')); elseif (!OrderState::invoiceAvailable($order->getCurrentState()) AND !$order->invoice_number) die(Tools::displayError('No invoice available')); else PDF::invoice($order); So prestashop allows only to view invoices when page admin in the orders admin tab changes order status to payment accepted. How i can edit this and others files, that user could see and get PDF invoice without changing order status?
  8. Hi everyone, all day i searched everywhere but couldn't to solve my problem. I am using Prestashop 1.4.3 with bank wire payment. Problem: In Default prestashop PDF invoices are generated only then page admin, changes order status to: payment accepted. When customer or admin can download that PDF file with such link: http://example.com/pdf-invoice.php?id_order=7 I need to configure Prestashop so: When the order is confirmed generate PDF invoice and attach it to email sent to customer automaticaly. So the question is what files and how i should edit and change, that customer could see his PDF invoice without page admin changing status to: Payment Accepted. At default prestashop visiting page: http://example.com/pdf-invoice.php?id_order=7 Gives you error: Invoice not found
  9. Hi all, i have the problem with browsers compatibility. Everything on most browsers works fine. But the ie6 and ie7 has bugs which i dont know how to fix. Problem: drop down menu is hidden, because of element. I tried to set z-index to this element. But that's not working on ie6. when i set z-index to -1 value. Drop down menu when shown correctly, but when you can't press anything on that element. sorry for bad english, hoping someone can help me
  10. Hi all, i was searching for a while, and couldn't find solution. Prestashop automatically generates SEO Friendly URLs, but i want to edit them manually and add more keawords in them. But for several categories i got an error, that URL cannot be longer then 64 symbols. So maybe there are somewhere defined value nor allowing it or what reason can cause all that, and what the best solution to change to longer URL?
  11. Thanks for your replies. we decided not to implement categories name in sub domain feature.
  12. Hi i' am quite new at prestashop, and was testing import on new shop. So i created .CSV file, this was no problem. And tried to import 4 PRODUCTS for beginning, first i got error because, left products number empty. But after correction and change to 1. Prestashop written that products where succesfully installed. So i have two questions why that imported products isn't shown at admin panel? (P.S. ID was also empty, because i think it is generated automatically and categories left too empty because didn't know what to insert there -categories id's or names-) And the second one, i looked in MYSQL tables and theses imported products exist there, so how to remove them completely without leaving any trace of them from all tables where they might be added? Hoping someone will help me soon.
  13. i am using this module: http://www.prestashop.com/forums/viewthread/16918/third_party_modules/module_2packcolumneditor To create text-image info block in the column This module using TinyMCE and when i am inserting img, but TineMCE adds that atribute.
×
×
  • Create New...