Coder Social home page Coder Social logo

databases's People

Contributors

anniechen92 avatar gminaker avatar mikegfink avatar

Watchers

 avatar  avatar  avatar  avatar

databases's Issues

Database connection failures

I've been going around with this for a while now and can't get it to work... The prepare statements in my version of the code keep returning false...
eg
Fatal error: Call to a member function bind_param() on a non-object in /Users/mikefink/Documents/CS304/amsstore/views/customer/customer_reg.php on line 96

Besides that, the examples I've seen use as a guard on the prepare statements to prevent errors on the bind_param calls.
if ($stmt = $mysqli->prepare("SELECT District FROM City WHERE Name=?")) {
}

function insertIntoDB($name, $addr, $tel, $id, $pass){
//Since $connection was declared in another page
// within the site, we call global on it
global $connection;
$stmt = $connection->prepare("INSERT INTO customer (cid, c_password, c_name, address, phone) VALUES (?,?,?,?,?)");

var_dump($stmt);      
// Bind the title and pub_id parameters, 'sss' indicates 3 strings
$stmt->bind_param("sssss", $id, $pass, $name, $addr, $tel);

// Execute the insert statement
$stmt->execute();

// Print any errors if they occured
if($stmt->error) {       
  printf("<b>Error: %s.</b>\n", $stmt->error);
} else {
  echo "<b>Successfully added ".$id."</b>";
  unset($_POST);
}      

}

Login Problems

Attempted to: Login with the wrong password/username
Entered: Didn't enter anything. Just pressed login button.
Expected: Something about wrong username/password
Returned: Page loaded to a 'logged in' user's page

Cannot Purchase items

After adding to cart, can't purchase
Also should check vals, credentials, or whatever
Display receipt and credit card authentication stuff

Shopping Cart has undefined offset when adding an item

Notice: Undefined offset: 123658216924 in /Users/mikefink/Documents/CS304/amsstore/views/customer/view_cart.php on line 50
Shopping Cart

I added memoirs of a madmen to the cart with qty 0. It failed to add. I added with qty 1 and it seemed to add it to the visual display but gave me this error.

Add Items Errors

Attempted to: Add an item
Input:
UPC: 123456789345, CD, Title: Happy&Puppy, Category: Country, Company: Partyville, Year: 2005, Price 58, Stock 32
Expected: Something about item being added
Result: Warning: array_push() expects parameter 1 to be array, null given in C:\Users\Annie\databases\views\manager\add_items.php on line 138

Attempted to: Add a (really old) item
Input: UPC 456789123456, CD, Beauty and the Beast, Classical, Disney, Year: 1235, 10, 3
Expected: Item successfully added
Result:
Error: Error: %s.
Error: Out of range value for column 'year' at row 1

Improve UI & Site Layout

Currently in progress. Post below if there are any suggestions / errors with the current implementation.

Checkout Bill

When the customer is ready to check-out, the system will produce a bill with the items and the total amount. Add tax?

Registration

Attempted to: Register a random account without all the required information
Entered: "dumpling" into username only
Expected: Something to ask for the rest of the information
Returned: "Successfully added dumpling:

Attempted to: Create an account while already logged in
Entered "dumpling" for username only
Expected: Something to say you're already logged in
Returned "Successfully added dumpling"

Process Refund

As a clerk, I should be able to enter in the receipt number for a sale that occurred within the past 15 days, see the list of items on that invoice, select which items are being returned, and generate a new return receipt.

Return item

We shouldn't be able to return stuff with no delivery date, right? I feel like we currently can, and should check this!

Should have a back button that returns them to receipt

Check values

On receipt 3001 I Returned 3 of 213469245706, 1 of 616402673105 then returned one 976135610258 and got this message:
1 of UPC, 616402673105, have/has already been returned on this receipt.

Return processed successfully for: 1 of UPC: 976135610258 on Credit Card No. 5163794851243658

Don't want to see the first part of message

Search bugs

FIXED: The customer will describe the item by providing the category, or the title, or the \b leading singer \b (or all of them), and the quantity.

Quick Search

NO CHANGE REQUIRED Seems to only match the start of strings for some categories (title/upc/category)

NO CHANGE REQUIRED, BUT WE CAN IF EVERYONE WANTS Enter "12"
Returns Beyonce and Memoirs
Enter "45" - should return at least beyonce
Returns nothing

NO CHANGE REQUIRED, SEE ABOVE Similarly enter "yon"
Returns no results
Strangely:
Enter "10"
Returns a dvd from 2010
Enter "bros"
Returns Warner Bros. items.

NULL STRING -> NEED BETTER MESSAGE Enter " "
Error: Please attempt again

NO CHANGE REQUIRED, SEE ABOVE Enter "ap"
No results (should be rap)

CAN'T EXPLAIN WILL WORK ON Enter "cd"
No results (should be cds)
Enter "dvd"
Get dvd results
Enter "vd"
Get no results

Advanced Search

FIXED Cannot search by leading singer

FIXED Enter "0" in the year
No results "Please enter something" appears

NO CHANGE REQUIRED, DESIRED BEHAVIOUR Enter "1" in year
Any entry with a 1 in it appears. - Do you want this or only exact matches for years?

FIXED Enter "asdf" in year
No results appear - do you want to check for numbers?

FIXED Enter "asdf" in the UPC
No results - maybe signal an error if you have time

FIXED Enter " " in title
Searches for a space - not sure if desired functionality

User feedback

Should display messages when users do things like process delivery

Create Short User Manual

In the instructions we have to do some stuff like this. Please read the assignment description and complete miscellaneous tasks like readmes and the user manual.

Clearing the Shopping Cart

I set the shopping cart session variable to null after a purchase is processed and the receipt displayed.

@gminaker Please check and confirm that htis is ok or change it to the right way. Use ctrl-f $_SESSION['cart'] to find the line that does it.

Login Implementation

As a user, I should be able to register if I don't already have an account, or enter my username and password to gain full access to the site.

Customer Registration

Input: derp into userID (nothing else)
Expected output: Some error about not being able to complete the task because none of the other information was given.
Output: Successfully added derp.

Final Testing

Check that for each action (we'll create a list here) errors are handled appropriately and functionality is as expected:
-generating daily sales report
-generating sales reports for top items
-processing delivery dates works
-can purchase items
-clerks can return items
-managers can add items.

Ensure that constraints are being checked, and that we test entering null values into areas of the website that shouldn't accept them.

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.