Welcome Guest, Not a member yet? Register   Sign In
eCommerce Project
#1

[eluser]Unknown[/eluser]
Hi,
This is Michael from bangalore.
im very greatful to the codeigniter members bcoz i got lot of help from the community.
now im starting a new eCommerce project.the project is about buying bags and belts online.can some one plzz suggest me how to start this project.bcoz i developed 3-4 social websites using codeigniter but this is the first time im working on eCommerce project using this frame work.

Thanks & regards,
Michael
#2

[eluser]bigtony[/eluser]
This might make me a heretic but rather than use CI I would suggest seeing if something like osCommerce might fit the bill. It's free, functional and fairly easy to setup, especially if you know a little bit about PHP and MySQL.
#3

[eluser]usmc[/eluser]
I recommend Magento
#4

[eluser]GSV Sleeper Service[/eluser]
osCommerce is the biggest pile of crap I've ever had the displeasure to work with. do yourself a favour and avoid it.
#5

[eluser]bigtony[/eluser]
[quote author="GSV Sleeper Service" date="1208985717"]osCommerce is the biggest pile of crap I've ever had the displeasure to work with. do yourself a favour and avoid it.[/quote]
Perhaps you'd like to tell us that have no problems with it, why?
#6

[eluser]GSV Sleeper Service[/eluser]
I've got plenty of problems with it.
no templates/views,
nearly impossible to customise,
html from the dark ages (broken doctype, table based layout, font tags, minimal css),
whole html tag and head section not in an include, needed on every page!
inconsistent coding,
irritating use of CONSTANTS spread over too many files,
OO in just a few places, the rest is like a text book of bad PHP practices.
I could go on, I've just spent the last month modifying an osCommerce site, and it's an unmaintainable mess.
#7

[eluser]esra[/eluser]
[quote author="GSV Sleeper Service" date="1208993485"]I've got plenty of problems with it.
no templates/views,
nearly impossible to customise,
html from the dark ages (broken doctype, table based layout, font tags, minimal css),
whole html tag and head section not in an include, needed on every page!
inconsistent coding,
irritating use of CONSTANTS spread over too many files,
OO in just a few places, the rest is like a text book of bad PHP practices.
I could go on, I've just spent the last month modifying an osCommerce site, and it's an unmaintainable mess.[/quote]

Still, there are a lot of web stores based on e-commerce simply because it has been around for about a decade and most hosts offer it as a free install using Fantastico. osCommerce is based on TEP (The Exchange Project) which was developed for PHP3. The name change occurred after Harold Ponce De Leon took over the project and converted the code base to PHP4. It has been forked numerous times over the years (e.g., Zencart, pnCommerce, Loaded CRE, etc.). Several CMS projects have osCommerce forks. I believe there have been at least 5 forks of osCommerce for Joomla/Mambo over the years.

However the code for the PHP4 version uses spagetti coding approaches typical of older PHP3 and PHP4 projects. The controller, model and view code are incorporated into the same files. The PHP5 version under development is a different matter when one considers that the development team (mainly Harold) is also climbing an OOP learning curve and refactoring code as time passes. The PHP5 version does have a templating solution. The Zencart fork does have a templating solution. A CI-based fork could use any number of templating solutions.

One could probably take the existing database schema, convert the database and tables to INNODB, increase character columm lengths to handle longer UTF-8 strings, and add some support for nested sets and the adjacency list model to modernize ideas and eliminate some tables. The existing schema and sessions management solution does a relatively good job of handling i18n. The existing Payments, Shipping, and Order Totals classes could probably be refactored and used as the basis for an OOP implementation. In it's current state, osCommerce is basically two applications in CI terms--the Catalog which the public sees and the Admin application. Each of the pages in the Admin and Catalog directory structures could be converted to Matchbox or Modular Extensions modules. Much of the spagetti code could be eliminated or converted because CI offers core framework features that would eliminate the need to use that code. That is, you could probably dissect the existing files to split the controller, model and view code into separate files, then replace the spagetti code using OOP approaches.

However, if I was using osCommerce as the basis for creating a new application, I would probably look for a PHP5 framework for project longetivity reasons and better OOP support or create my own internal PHP5 fork of CI. For example, the existing payment, order totals and shipping libraries could be reimplemented as PHP5 interfaces and abstract parent classes. Then a plugin approach could be used to create discrete payment, order totals, and shipping plugins.

Regarding the use of constants, most of those would disappear when converting to CI. Most of these would be replaced with CI language strings and config variables. However, most frameworks, including CI, use constants in there core code and libraries at one point or another (e.g., BASEPATH, APPPATH, EXT, etc.). For PHP5, constant strings do no necessarily have to be uppercase, but are usually made uppercase to distinguish them from variables. The majority of the constants could be eliminated from controllers, models and views by creating helpers.

Most of the existing osCommerce function classes as they are called could be converted to CI helpers.

The osCommerce infoboxes could be converted to view fragments (partials) using any number of approaches mentioned elsewhere on the forums.

Most of the nastiness of converting osCommerce to CI would probably involve developing an equivalent solution to handling session data and possibly replacing the existing Configuration table solution with CI config files. osCommerce used a relatively simple authentication solution which could be replaced by any CI solution. Adding authorization (ACL or RBAC) would be an asset.

Another conversion problem is the use of uppercase names for the configuration keys stored in the configuration table. It's easy to confuse these with language constants and normal condfiguration constants from the osCommerce configuration files. Most of these start off with the namespace MODULE_, however many language strings associated with osCommerce modules also use that same namespace in context with the same files. That is, you would probably want to convert the language strings and configuration file constants first and handle the configuration keys constants last (these are mostly found in the payments, order totals and shipping module files).

To sum it up, it's possible to fork osCommerce to CI or create and entirely new application based around their existing database schema or a refactored version of that schema. The spagetti code looks nastly, but once you started to split the code into MVC concerns, preferably in the form of modules, the job might not take as long as it might seem initially.
#8

[eluser]GSV Sleeper Service[/eluser]
I completely agree with you esra, osCommerce works, which is good enough for most people. I just had such a bad time modifying it I'm sick to death of it!

I was tempted to start converting it to CI, but just didn't have the time.
#9

[eluser]esra[/eluser]
[quote author="GSV Sleeper Service" date="1209042061"]I was tempted to start converting it to CI, but just didn't have the time.[/quote]

Actually, I did start at one point in time and then decided to start from scratch using my own ideas. When I was working on the earlier project, the number of code lines was reduced by a magnitude of four times using CodeIgniter and the database schema required less tables based on the use of nested sets and the adjacency list model. Creating the models and eliminating business logic from the HTML (views) was taking the most time in this effort. Some of the spagetti coding approaches in that code make you feel like banging your head on the wall at times.
#10

[eluser]arume[/eluser]
[quote author="GSV Sleeper Service" date="1208985717"]osCommerce is the biggest pile of crap I've ever had the displeasure to work with. do yourself a favour and avoid it.[/quote]

Yes, it is (and Zencart too).




Theme © iAndrew 2016 - Forum software by © MyBB