Giter Club home page Giter Club logo

eshop's Introduction

Projekt Sklepu Internetowego

Założenia projektu

Głównym celem projektu jest stworzenie prostego sklepu internetowego.

Nazwa projektu

Sklep nazywać się będzie: eShop.

Dostępne opcje

  • Dodanie produktu do koszyka
  • Usuwanie produktów z koszyka
  • Zliczanie wszystkich cen w koszyku

Efekt końcowy

clipboard.png clipboard.png

Użyte narzędzia

IDE

  • Visual Studio Code
  • PhpStorm 2022

Inne

  • XAMP

Języki

  • HTML
  • CSS
  • JavaScript
  • PHP
  • MySQL

Framework

  • Bootstrap
  • Font Awesome

Dokumentacja kodu

Kafelki

clipboard.png

Każdy kafelek to komponent który pochodzi z php. Dane kafelka uzupełniamy z bazy danych. W index.php pozostawiamy funkcje któa pobiera wiersze z bazy danych i wysyła je argumentami do funkcji component w pliku component.php.

<?php
    $result = $database->getData();
    while ($row = mysqli_fetch_assoc($result)){
        component($row['product_name'], $row['product_price'], $row['product_before_price'], $row['product_image'], $row['id'], $row['product_evaluation']);
    }
?>

Baza danych

clipboard.png

Zdjęcie

Aby wyświetlić zdjęcie w kafelku należy umieścić je w folderze image. Następnie w kolumnie product_image podać nazwę zdjęcia.

Przecena

Podanie wartości w kolumnie product_before_price spowoduje wyświetlenie ceny jako przecena (przekreślonej). Jeżeli nie podano ceny to zostanie wyświetlona tylko cena właściwa z kolumny product_price.

Automatyczne tworzenie bazy danych

W pliku CreateDb.php odbywa się automatyczne tworzenie bazy danych. Ułatwia to tworzenie strony na serwerze.

eshop's People

Contributors

petitoff 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.