Coder Social home page Coder Social logo

panigrc / simplecishop Goto Github PK

View Code? Open in Web Editor NEW
14.0 9.0 14.0 5.27 MB

A simple ecommerce system based on codeigniter [Moved to Codeberg]

Home Page: https://codeberg.org/nik.lol/SimpleCiShop

License: MIT License

PHP 96.14% CSS 2.14% HTML 0.95% Hack 0.77%

simplecishop's Introduction

⚠️ ⚠️ ⚠️ This project is work in progress and should not be used in production ! ⚠️ ⚠️ ⚠️

SimpleCiShop

The SimpleCiShop is an ecommerce web application based on the famous CodeIgniter framework.

It's being currently refactored to run with PHP >=7.2 and CodeIgniter ^3.1.

The shop was fully functional since I have used it to sell myself products; actually the products you see in the demo site are real, and I used to sell them.

I was not satisfied with the other open source ecommerce systems that were in the market that time - neither am I now - so I decided to build my own simple shopping cart.

There is a lot of stuff to be done.

Features

  • Nested Categories translatable with html description
  • Products with image upload (unlimited) and translatable html description
  • New price option - like a discount which strikes through the old price
  • Product variables - you can set as any variables as you like at any product which are also reusable but not yet very much implemented
  • Discount Coupons - The system can generate discount coupons with a certain discount which can be used by the customers at an order to get a discount

Directory Structure

The directory structure is mainly the CodeIgniter structure. There are a few things that are outside of that.

public/assets - Contains js / fonts

public/images - Contains the images of the products

public/theme - Contains the css and the images of the frontend website (notice that the website is not themeable yet)

public/uploads - Uploaded images that are used in the Product details/description

application/controllers/admin - The admin (backend) application controllers

application/controllers/shop - The shop (frontend) application controllers

Installation

  • Clone the project git clone https://github.com/panigrc/SimpleCiShop.git
  • Import the simplecishop.sql to your MySQL/MariaDB server
  • Change the 'database connectivity settings' in the application/config/database.php file according to your needs
  • Change into the project directory and run composer install
  • Your Docroot directory should be the public directory. If you have another Docroot configuration i.e. public_html you could create a symlink like this: ln -s public public_html.
  • Copy the config.example.php to config.php and edit it according to your setup.
  • Browse to http://localhost/your/webserver/path/SimpleCiShop/index.php/shop/home.
  • To access the administration visit http://localhost/your/webserver/path/SimpleCiShop/index.php/admin/catalog.

Database structure

See simplecishop.sql

TODOs

See Project

simplecishop's People

Contributors

alinmigea avatar panigrc avatar vzuburlis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

simplecishop's Issues

Exact same methods in Category_model

The Methods Category_model::get_all_category_ids_recursive() and Category_model::get_category_children() are exactly the same.
The later should be changed in order to deliver only the children directly under the specified category and not recursively as the first method.

Empty input data should be NULL

Data which is processed with the CodeIgniter Input class if they are empty '' they are being returned as empty.

We should process these values and set empty to NULL for clearer handling if a value can be or not NULL (i.e. validation, database)

[Checkout] Allow checkout with login or as guest

Before showing the shipping information form ask if the customer wants to login (if the customer has an account) or to continue as guest (automatically we will create an account for the customer).

Configuration should be extendable

The configuration of the following components is set inside the application code (application/config) which is makes it inflexible.

The configuration should be extendable so it can be overridden according to an environment file.

[Core] Remove hardcoded info

In the following files, hard coded info is being used. It should be possible to configure these values in a configuration file or in a language file.

  • application/controllers/shop/Contact.php
  • application/views/shop/blocks/checkout/paypal_form_tpl.php

[Checkout] Create step based checkout process

By using steps while checking out allows us to not use JavaScript for calculating the billing or shipping costs, plus the ui is more clear for the user.

There will be the following steps:

  1. Checkout with user login or as guest.
  2. Shipping form, filled with user data if user is logged in.
  3. Shipping and billing method choice
  4. Checkout Review
  5. Checkout

[Shipping] Remove hard coded shipping costs from the language files

This will be a greater refactoring as anticipated.

In order to provide the option to the user to choose among the shipping and billing methods, the options must be defined either in the Database or in the configuration.

Additionally in the Order table the fields

  • shipment_express
  • shipment_to_door
  • shipment_cash_on_delivery

must be removed

And replaced by the following

  • shipping_method
  • payment_method

Another proposal would be to add 2 additional tables payments and shipments linked with the order table by using an one to one association i.e. with fields shipment_id and payment_id.

In this way we could expand the payments and shipments later for example with shipment status and payment status.

Database inconsistency

Some database tables defined in the sql file simplecishop.sql were renamed in the application, which means the shop will not work properly.

The tables must be renamed in the sql file simplecishop.sql too.

[Templating] Make partial templates for form fields

The form fields especially the ones in the Administration should be partial templates in order to be reused.
Each form type i.e. input/textarea/checkbox/select should have it's own template with parameters.

[Core] Remove Old Javascript Libraries

Remove old JavaScript libraries and replace the used ones with newer versions

  • DHTML Calendar (PHP library Calendar_library.php & JavaScript Files assets/jscalendar/)
  • Scriptaculous (assets/scriptaculous) bb17283
  • Validation (assets/validation) b3e4aeb
  • FCKEditor (PHP libraries Fckeditor.php, Myfckeditor.php & JavaScript Files assets/FCKEditor)

Object Not Found

I'm getting

Object not found!

The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.

If you think this is a server error, please contact the webmaster.

also do add the web url where its hosted for our reference / demo.

The project should only contain the application

The CodeIgniter system directory should not be included in the project. This creates extra bloat and also CodeIgniter isn't at the latest version.

This means we have to have to have the CodeIgniter as a package and install it with composer.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.