Giter VIP home page Giter VIP logo

dynamic-marketplace's Introduction

Dynamic Marketplace

Example of marketplace using MongoDB and HTML, CSS, Bootstrap, JavaScript, jQuery, AngularJS, PHP
In this marketplace you can explore and buy products from partner stores!

As admin you can add/edit products, stores
As user you can register, add products to cart from many stores, order, comment on products and see order history.

Note that the website is in greek language so many features will be difficult to use.




Database

In this DB we have 3 collections that the website uses a) loginreg b) stores c) orders

  1. loginreg: This collection has only one document named userdata and it stores the data of the users who register through the corresponding form. By default all users in the privileges field have the attribute "customer". Tochange "customer" to "administrator" the corresponding query must be executed. In our collection we have 2 users where one is administrator and the other customer. Note: Passwords pass through a hash function.

  2. stores: Here We also have a document called storeinfo where we keep the details of the store, the products it sells and the product reviews.

    • Note 1: _id, pID, as well as pTHUMBNAIL have been used as sku (stock-keeping unit) for the search and implementation of various procedures. For example, I can search for products based on their thumbnail since I believe that every same product will have this thumbnail. Logic is wrong I should have used a SKU code. No such procedure was implemented because every time the administrator adds a product he has to look for which code to enter, etc.
    • Note 2: Commends are added to the product with the push method, so if the product has no comments then it will not have the corresponding field "pCOMMENTS".
    • Note 3: nextProductCounter refers to the total products that the store has +1.
  3. orders: In this collection we have only the document orderinfo. For each order made, an entry is added. As mentioned before, the thumbnail is used as a SKU. Also for each product you order a different collection is created. For example, if in an order we have 3 products in the basket, 3 entries will be created in the document and not 1 single. This is done so that we can easily delete orders from different stores.




Description of page files

  • Assets

    • Css all the stylesheets used.

    • Img -> all the photos used, among them we have logo, favicon, banners, footer photos, product photos, homepage photos, some avatars for testimonials.

    • Js -> js files for voicesearch, smoothscrool, search and myscript. Myscript is used to open and close forms after reloading pages.

    • Incudes -> Here we have many key important feauters of the site. We have all forms as well the action forms that establise the communication/modification of the db. We will also find some files for viewing the header, menu on mobiles.

  • index.php -> homepage

  • marketplace.php -> in this page you can see all the available products

  • product-preview.php -> dynamic view of selected product

  • cart.php -> cart page

  • contact-us.php -> contact us page




How to run this project

  1. Coppy pricedoc folder to the httdocs folder of XAMPP.

  2. Install MongoDB and Database tools

  3. Download mongoDB folder, open cmd inside the folder and then import the collections with the following commnads:

    mongoimport --db loginreg --collection userdata --jsonArray --file pathToFolder/mongoDB/userdata.json
    mongoimport --db stores --collection userdata --jsonArray --file pathToFolder/mongoDB/storeinfo.json
    mongoimport --db orders --collection userdata --jsonArray --file pathToFolder/mongoDB/orderinfo.json
  4. Open XAMMP app and run apache server

  5. Open http://localhost/pricedoc/


Login credentials



dynamic-marketplace's People

Contributors

sonole avatar

Watchers

 avatar

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.