Search the Community
Showing results for tags 'OpenCart'.
-
Hi there! This is my first contribution to the community. I hope it helps someone. I would like to share my approach on how to integrate Zen-Cart / OSCommerce passwords with Prestashop. I have a Zen-Cart shop with 50k registered customers which I am migrating to Prestashop. The "Back Office -> Tools -> CSV Import" tool works like a charm to import your customers but they will not be able to login on Prestashop because passwords are encrypted in different ways on both store managers. This solution requires no database modification (aside from creating a support table) and only one php code modification (/classes/Customer.php). It will let your legacy customers login and change passwords through admin panel or "forgot my password" if they'd like. Actually they would not notice anything different at all. If you want to understand some of the inner workings of both systems, I would recommend you to learn a little about password hashing and hash salting. You can skip this part if you want to get your hands dirty fast. How Zen-Cart / OSCommerce passwords work: Format: 32 alphanumeric characters + colon + 2 alphanumeric characters salt E.g: e56d64755f66a86996b54114bb4102bf:08 35 characters total It has a salting function which generates a random salt for every password. The password is hashed with MD5 and salted with 2 aditional characters. These two aditional characters are then appended to the password with a colon. How Prestashop passwords work: Format: 32 alphanumeric characters (a standard MD5 salted hash) E.g: e56d64755f66a86996b54114bb4102bf 32 characters total It uses a per-installation random constant called _COOKIE_KEY_ as salt. As you can see, they simply don't match. After some tries, I ended up with the following solution: ================================== IMPORTANT NOTES: - It works for Prestashop V1.4.7X (needs to be tested for other versions); - DO A BACKUP BEFORE ANY CHANGES IN YOUR DATABASE/CODE; - Try it in a development environment; - I'm obviously not responsible if you screw your shop; - Have I already mentioned to do backups? - English is my second language. Sorry you grammar nazis. DATABASE: 1) Export the prefix_customers table from Zen-Cart / OSCommerce / OpenCart into a CSV file; 2) Import your users through Prestashop's CSV Import tool; 3) Create this table in your Prestashop database: CREATE TABLE zc_legacy_passwords ( id INT NOT NULL, PRIMARY KEY(id), email VARCHAR(100), password VARCHAR(35), updated BOOLEAN NOT NULL ); 4) Populate this table using the previously created .CSV file or create a .SQL file from the following query and import into the zc_legacy_passwords table: SELECT customers_id, LOWER(customers_email_address), customers_password FROM PREFIX_customers ORDER BY customers_id Now we have all the data needed to allow our customers log into Prestashop, but we still need to change how the login process work. CODING STEPS: Modify the /classes/Customer.php file with the following: 1) Look for the public function getByEmail($email, $passwd = NULL) <- line 203 2) Replace lines 217 and 218, turning it from... if (!$result) return false; ...to... // == BEGIN ZEN-CART / OSCOMMERCE TO PRESTASHOP PASSWORD INTEGRATION == // == BY João Cunha - [email protected] // == @ 31/03/2012 // == USE AND MODIFY AT WILL // == TESTED ON PRESTASHOP V1.4.7X if (!$result) { //<- INVALID PRESTASHOP LOGIN, IT MAY BE A ZEN-CART / OSCOMMERCE PASSWORD //CHECK IF THE GIVEN EMAIL MATCHES A ROW IN OUR LEGACY TABLE AND RETRIEVES THE LEGACY PASSWORD $resultZC = Db::getInstance()->getRow(' SELECT `password` FROM `zc_legacy_passwords` WHERE `email` = \''.pSQL($email).'\' AND `updated` = 0'); if (!$resultZC) return false; //<- EMAIL NOT FOUND IN NONE OF THE TABLES, SO IT IS AN INVALID LOGIN //ENCRYPTS THE GIVEN PASSWORD IN ZEN-CART / OSCOMMERCE FORMAT $salt = substr($resultZC['password'], strrpos($resultZC['password'],':')+1, 2); $ZCpassword = md5($salt . $passwd) . ':' . $salt; if ($ZCpassword != $resultZC['password']) return false; //<- WRONG ZEN-CART/OSCOMMERCE PASSWORD GIVEN //WE'LL UPDATE THE CUSTOMER TABLE WITH ITS PRESTASHOP ENCRYPTED PASSWORD... Db::getInstance()->Execute(' UPDATE `'._DB_PREFIX_ .'customer` SET `passwd` = \''.md5(pSQL(_COOKIE_KEY_.$passwd)).'\' WHERE `email` = \''.pSQL($email).'\''); //...AND FLAG IT AS UPDATED, SO THE NEXT TIME HE LOGS IN, HE WON'T ENTER THIS ROUTINE. Db::getInstance()->Execute(' UPDATE `zc_legacy_passwords` SET `updated` = 1 WHERE `email` = \''.pSQL($email).'\''); //USER IS AUTHENTICATED, OVERWRITE THE EMPTY $result VARIABLE $result = Db::getInstance()->getRow(' SELECT * FROM `'._DB_PREFIX_ .'customer` WHERE `active` = 1 AND `email` = \''.pSQL($email).'\' AND `deleted` = 0 AND `is_guest` = 0'); } // == END ZEN-CART / OSCOMMERCE TO PRESTASHOP PASSWORD INTEGRATION ================================== And you're done! I don't know if there is another way of achieving the same results without modifying the Customer.php core file, but that would be great. Since I'm a Prestashop noob, I would like to hear any thoughts from you guys. Cheers, João Cunha Brazil
- 33 replies
-
- 5
-
-
-
Hej. Nogen der ved noget om, om der findes moduler eller vejledninger i at flytte TIL Prestashop? Jeg skal jo have konverteret kunder og tidligere ordre. - Varer tager jeg manuelt.
-
I have been a web store owner for several years and have used zen-cart, opencart, magento, prestashop trying to build up a web shop. I only know some basic html and php programming skill. Now I would like to share my limited experience with some beginners who want to build up an onlne shop. Hope it is helpful to someone. The very first shop I tried to set up is this Sex Toy Wholesaler Store, with zen-cart 1.38a in 2009 on a shared hosting plan from BlueHost. At that time, zen-cart was a highly recommended platform. I was generally satisfied with it as it worked fine and received orders for us, eventhough the site did not look very nice. There was one serious problem with zen-cart when I used it: my site was hacked many times (now I think this was mainly due to the unsecured enough shared hosting)! I encountered opencart by coincidence after two years and a half or so and surprisingly found that this software was just way better looking than zen-cart. So I searched through internet for the comparison of major open source e-commerce software online and read a lot about this. I then switched the Sex Toy Wholesaler Store to opencart and was happier. Meanwhile, I still looked for other better alternatives and see if I could do better (Opencart did not offer rich SEO settings by default). I have tried prestashop and magento. Prestashop was really impressive as well. It provided a nice clean default theme and the SEO settings seemed to be sufficient. It also offered rich ajax feature, streamline one page checkout, abandoned cart reminder etc. And I really like it. However, as I spent more time testing prestashop (maybe not enough time as I feel that I am still not very familiar with it), I found its shopping cost setting really disappointed. Because I had to input more than 1,000 values to complete our shipping cost settings for different countries worldwide. I think prestashop is the best for those merchants who shipping cost calculation method is simple. And I might use it to build up another shop in the future. As for magento, it is really a masterpiece of e-commerce and I love it IF I HAD ENOUGH BUDGET! This boy just requires high end server hardware and better programming skill to run it well.
-
Hi I am looking for a person who can convert a webshop from OpenCart to PrestaShop with the exact same design and features. It's regarding www.kiirdal.dk. Please write your price and references of earlier work, if you have some. Thanks.
-
Si tienes tu tienda en cualquier carrito, y quieres dar el salto a Prestashop, nos encargamos de crear tu nueva tienda y recuperar todos los datos de tu antigua tienda a tu nueva tienda Prestashop. Trabajamos con mas de 40 carritos diferentes: Oscommerce, Opencart, Magento, Shopify, Virtuemart, Woocommerce, etc... Infórmate sin compromiso: http://www.serviciostconline.es/es/content/14-migraciones Y recuerda que te damos soporte las 24 horas del dia, los 365 dias del año. Saludos. Ana
-
Hi, I just want to know whether it is possible to migrate a opencart module to be supported by prestashop. I have a payment gateway in india which has support for opencart and magento only. so can some one help me on this. PayZippy-Vs1-11-Package.zip
- 6 replies
-
- opencart
- prestashop
-
(and 3 more)
Tagged with:
-
Hi, Anyone of you coming from Magento & OpenCart ? The more I played around with Prestashop, the more I got frustrated with it. I'm wondering how those people who previously used Magento & OpenCart can adapt to the Primitive front-end design & layout of Prestashop. I come to Prestashop because of its 1.) Flexible Voucher Rule (Coupon in Magento & OpenCart) per Individual Customer. Voucher will appear on the My Voucher session. 2.) Reward & Loyalty (Magento doesn't have, OpenCart included this but quite bare). I thought Prestashop could get a postion between Magento & OpenCart. However, after playing around with Prestashop, I'm totally frustrated with its front-end design & layout and some lacks of basic e-commerce elements as below. 1.) No My Account Sidebar Listing block (Customer Settings Navigation), just only the My Account Page, very unorganized and primitive. Also, the My Account block on the header is not intuitvie, should be broken down into My Account, My WishList, My Cart and Checkout. Not many users know clicking their names to access the My Account page. 2.) No Grid Display, unbelievable. 3.) No Product Counter within each Category, absolutely unacceptable. 4.) Add To Cart, Add To Compare and Add To Wishlist are NOT intuitively designed and put together, very unorganized. 5.) Right after installation, I was totally devastated by its primitive default presentation and layout. At 1st, I thought it could be further enhanced by changing its configurations. In fact, not really the case. I'd decided to leave Prestashop as it might take more time to make it presentable as Magento & OpenCart. I hardly force myself to fall in love with Prestashop at this point of time. Maybe I'll come back to have a look after the availability of Prestashop 1.6. These are the intuitive design and layout of Magento & OpenCart, Prestashop should make its front-end more user-friendly and intuitive. Grid Display My Account Sidebar Listing Block My Account Header Block
-
Hola gente tengas muy buenas tardes me presento hace poco empece con esto del e-commerce y con prestashop me parace bastante elegante en su codigo y diseño bueno vamos por la consulta Resulta que tengo un modulo de opencart que gustaria pasarlo a prestashop alguna ayuda idea o comentario? desde ya muchas gracias DanielTSX
-
Bonsoir, Tout est un peu dans le sujet... Je cherche à récupérer une base de donnée opencart qui contient pas mal d'informations et j'aimerai l'importer sur la futur version de la boutique en prestashop. Y a t'il une solution simple et rapide ou faut-il trifouiller du code? J'ai regarder pour exporter une base dans un fichier csv mais ça reste flou .
-
- opencart
- prestashop
-
(and 1 more)
Tagged with:
-
¿Cual es son las ventajas de Prestashop, respecto a OpenCart? He visto que opencart es más rápido, necesita menos recursos y las plantillas son más económicas. ¿Cual es son sus desventajas?
-
Hello everybody, Could anyone help me to migrate from opencart 1.4.9.1 to the latest version of prestashop? Thank you
-
Hola de nuevo, Alguien ha hecho alguna migración de datos de OpenCart hacia PrestaShop? Sería una valiosa información para mí si pudierais explicarme como lo habéis hecho y como os ha ido. Gracias, (En mi caso sería de OpenCart V1.5.1 a PrestaShop 1.4.6.2)