Commerce électronique, e-commerce, opencart – Monter une boutique en ligne avec opencart 1.4.7
On avait abordé dans un article précèdent la question de créer une boutique en ligne adossée à des CMS connus type Drupal
ou WordPress
, c’était probant mais pas vraiment concluant ! Pourquoi alors ne pas tout simplement installer un système de boutique en ligne à part entière qui autorise la création complète d’une boutique en ligne plutot de coller une “verrue” à votre CMS existant sopuvent pas dimensionné pour accueillir ce type d’extension fonctionnelle qu’ets une boutique en ligne. On a fini par trouver un OpenCart v1.4.7
grâce aux conseils avisés de Tom.
La baseline du site pour présenter le OpenCart v1.4.7
OpenCart is an open source PHP-based online shopping cart system. A robust e-commerce solution for Internet merchants with the ability to create their own online business and participate in e-commerce at a minimal cost.
- WordPress, e-commerce, boutique en ligne – Créer une boutique en ligne avec WordPress
- Drupal, Ubercart – Installer une solution e-commerce sous Drupal 6
Un développement de boutique doté d’un approche MVC
C’est une boutique en ligne construite, en PHP-MySQL
, sur un modèle en MVC (Model-View-Controller) donc sur les principes bien connus des développeurs de frameworks PHP (Kohana, CodeIgniter, CakePHP, Zend, Symphony…etc). Nous nous sommes abondamment étendus sur la question des frameworks dans de nombreux articles précédents :
- Kohana, CodeIgniter, Framework PHP – Un comparatif entre Kohana et CodeIgniter
- Framework PHP – Quel framework choisir entre CodeIgniter, CakePHP, Symphony, Zend…
Assez bavasser, passons à l’installation et à l’utilisation de OpenCart v1.4.7
. Une dernière chose cependant, l’ensemble du test d’installation et d’utilisation va être fait en, local, sur MAMP et avec le dernière version de OpenCart, la OpenCart v1.4.7
.
Ci-dessous, les pré-requis techniques pour faire fonctionner le système OpenCart v1.4.7
.
Latest Version
v1.4.7 Released 11th April, 2010License
GNU GPL LicenseRequirements
* Apache
* PHP (at least 5)
* MySQL
Merci @ Tom pour nous avoir fait découvrir cet excellent système de boutique en ligne… et les découvertes risquent de ne pas s’arrêter là !
Installer OpenCart v1.4.7
La première chose à faire est de préparer la BDD (Base De Données) MySQL
qui va réceptionner votre boutique faite sous OpenCart v1.4.7
. Un bref rappel des commandes MySQL
pour créer en deux coups de cuillère à pot la base et l’utilisateur et les droits.
Se connecter via la console Mac au client MySQL
de MAMP
/Applications/MAMP/Library/bin/mysql -u root -p |
Créer la BDD
# Création simultanée de la base oc_install # et de l'utilisateur oc_install CREATE USER 'oc_install'@'localhost' IDENTIFIED BY 'oc_install'; GRANT USAGE ON *.* TO 'oc_install'@'localhost' IDENTIFIED BY 'oc_install'WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0; CREATE DATABASE IF NOT EXISTS oc_install;GRANT ALL PRIVILEGES ON oc_install.* TO 'oc_install'@'localhost'; |
Détruire la BDD si vous souhaitez recommencer
# Destruction de 'oc_install'@'localhost' ... DROP USER 'oc_install'@'localhost'; DROP DATABASE IF EXISTS `oc_install` ; |
Les informations indispensables à l’installation de OpenCart v1.4.7
Database Name = oc_install
Database User name = oc_install
Database Password = oc_install
Database Host = localhost
Le moins que l’on puisse dire est que l’installation est d’une grande simplicité, une fois que vous avez en main les accès à votre BDD.
Etape 1
Etape 2
Etape 3 – les paramètres de connexion
Etape 4 – C’est fait de connexion – Vous obtenez les accès à votre compte administrateur de la future boutique en ligne
*Username: admin
*Password: opencart
Il faut supprimer le dossier install
comme souvent dans ce genre de système, dans notre exemple, ce répertoire se trouve à l’emplacement suivant /Applications/MAMP/htdocs/opencart/store/install/
. Il faut aussi conserver le couple user/password de l’administrateur de votre futur boutique en ligne, c’est préférable !
- Frontend
http://127.0.0.1/opencart/store/
- Backend
http://127.0.0.1/opencart/store/admin/
Le fichier install.txt
découenné de toutes fioritures.
///////////////////////////////// /// OpenCart V1.4 /// /// Install Instruction /// /// http://www.opencart.com /// ///////////////////////////////// ------- INSTALL ------- 1. Upload all the files and folders to your server from the "Upload" folder. This can be to anywhere of your choice. e.g. /public_html/store or /public_html 2. If you have a Linux/Unix make sure the following folders and files are writable. chmod 0755 or 0777 image/ chmod 0755 or 0777 image/cache/ chmod 0755 or 0777 image/data/ chmod 0755 or 0777 system/cache/ chmod 0755 or 0777 system/logs/ chmod 0755 or 0777 download/ chmod 0755 or 0777 config.php chmod 0755 or 0777 admin/config.php 3. Make sure you have installed a MySQL Database which has a user assigned to it DO NOT USE YOUR ROOT USERNAME AND ROOT PASSWORD 4. Visit the store homepage e.g. http://www.example.com or http://www.example.com/store/ 5. Follow the onscreen instructions. 6. Delete the install directory. For any support issues please visit: http://www.opencart.com EOF |
Le fichier changes.txt
qui répertorie les avantages OpenCart v1.4.7
.
-- OpenCart v1.4.7 -- FIXED: - Coupon discount taking more than the product total. Now matches max product total - "Total" order total module allowed negative totals if discounts exceeded total. Now stops at 0 - Several language duplicates removed - Some city names updated in sql - Fixed potential filemanager while loop error with readdir (Based on php.net's recommendation) - Fixed sagepay array for FailureURL - Fixed weight based shipping not supporting 0 cost - Fixed document $styles and $scripts on header.tpl to properly support the correct options - Shifted the shipping POST check to avoid reloading rate request when going to the payment page and not using quote session check - Cleaned up field size inconsistencies with email length between the validation checks and the db - Fixed login link to correct "&" vs "&"; - Account approve not allowing logins for existing customers - Fixed Google Sitemap xml error to correct "&" vs "&amp"; - Sort by price converting to string issue - store_url duplication in customer approval email - Fixed typo in customers "awating" approval function names - Fixed typo in order model for "notifiy" in the update function - Fixed incorrect Customers Awaiting Approval count on admin dashboard ADDED: - Universal Upgrade Script (supports upgrades as far back as v1.3.0) - Category Status in admin (per-category) - Information Status in admin (per-item) - Country Status in admin - Zone status in admin - Shipping Quote Session option in admin - Added version constant at the top of the startup.php file to allow programmatic usage - Added page warning on pages with multi-tabs to show error at top instead of just the field errors so it is clear - Items per page for admin rows configurable via admin - Items per page for catalog items configurable via admin (per store) - Show Weight on Cart page option in admin (per store) - Latest Module - Specials Module - Featured Module - Disable coupon order total will also disable coupon entry box on front end - Persist original route if login required - Disabling language removes requirement from need for entry in admin - Thickbox agree terms on checkout and create - Added Model Search checkbox on Advanced Search - Added Popular Products model function (Order by Viewed) for future use. - Added $product_info array to the product to make echoing additional fields easier - Improved order data return without double processing/subset - Added support for common base product discount pricing - Added Improved language support. Fallback to English for missing entries to avoid fatal errors over missing language file - Added setting language from url ...route=common/home&language=de - Added setting currency from url ...route=common/home&currency=USD - Added Product Tag table and added search support in tags. |
En savoir plus
- La demo de OpenCart
http://demo.opencart.com/ - Le site officiel de OpenCart
http://www.opencart.com/