Ticket #2430 (closed task: fixed)

Opened 6 months ago

Last modified 3 months ago

e-commerce concept

Reported by: nicolaas Assigned to: sharvey
Type: task Priority: blocker
Milestone: E-commerce 0.7.0 Component: Modules - ecommerce
Version: 2.2.2-rc2 Severity: medium effort / impact
Keywords: Cc:
Due date: Hours:

Description

I recommend that the e-commerce development is stripped down to the bare minimum with addable extensions. The basic e-commerce setup will have just enough to select products, remove them, etc...: the basic shopping cart system. No ajax, no shipping calculators, no frills.

From there, additional features can be added by the developer as required.

I am recommending this because in my applications of the shopping cart I spend more time removing things than adding them. The code is really hard to understand and the classes are far too interwoven. They need to be more stand-alone with the ability to add things.

I think in the original e-commerce, too many assumptions were made and not enough time was spent trying to keep the code clean and easily adjustable.

Right now, it is even really hard to contribute to the e-commerce platform, because of the situation described above.

I am not sure if this is feasible, but I think it would take someone a couple of days to go through all the code and: 1. remove superfluous stuff 2. increase quality of remaining code 3. cut and paste code into better organised groups

Attachments

temp.jpg (26.2 kB) - added by nicolaas 6 months ago.
here is how I have organised the e-commerce files

Change History

Changed 6 months ago by nicolaas

here is how I have organised the e-commerce files

Changed 6 months ago by nicolaas

Just a little note on the attachment above:

I broke up the code into several folders. This really made it a lot easier for me to find things rather than having to wade through the long list to of files to find everything.

Changed 6 months ago by nicolaas

Here is the breakdown into folders as I did it - I found this immensely useful as it groups related files:

\ecommerce\code\Cart

  • order
  • order_email
  • order_item
  • order_item_attribute

\ecommerce\code\Checkout

\ecommerce\code\Members

\ecommerce\code\Payment

etc....

\ecommerce\code\Product

ecommerce\code\Reports

\ecommerce\code\ShippingAndCharges?

Changed 3 months ago by smagnusson

  • milestone changed from E-Commerce 0.6.0 to E-commerce 0.7.0

Nicolaas, completely agree with what you say, but we want to do an interim release without this first.

Changed 3 months ago by rlouis

Hi Nicolaas,

You are right about what you said, I am currently working on the ecommerce trunk and if you have had a look at it already, you may have seen that I was having the same priorities as you !

The shipping and taxes have been moved out of the order to a separate class : OrderModifier?. Thanks to this, IF WE WANT, we can add them to our system using the static functions present in Order.php !

The same way, I have separated Product from OrderItem? which is the solution of the problem "How to add complex relation in an Order like a shirit with the attributes color, size, etc..." ! Now the only part that the user has to do by his self his the add form ! The add one, remove one, remove all and set quantity functions are all managed by the OrderItem? class !

I have also done the php file reorganisation with folders !

Generally speaking, the possibilities of the ecommerce are huge but every website using ecommerce will want some specific customisations. Consequently, the next version of the Ecommerce has to be as easily customisable as possible and of course stay stable.

Changed 3 months ago by rlouis

  • status changed from new to closed
  • resolution set to fixed

The code cleaning and file reorganisation have been done and are present in ecommerce trunk.

This ticket can be closed

Note: See TracTickets for help on using tickets.