Closed

Website PHP and SQL shopping cart tweaks

This project received 16 bids from talented freelancers with an average bid price of $263 USD.

Get free quotes for a project like this
Employer working
Project Budget
$30 - $250 USD
Total Bids
16
Project Description

Worked required is to make some tweaks to an existing website and shopping cart.

The existing code simply allows items with stock > 0 to be added to cart and ordered regardless of any potential stock shortage.

Tasks:
1) At time of adding to cart or cart qty update, If customer order qty is > than stock avilable then cart page needs to be refreshed, with order qty = stock avilable and clearly labeled to user in the cart.
i.e. in Red text below each product in cart "Note: Order qty has been ammended to max stock avilable"
2) Change cart so that at time of user submitting order, order qty (count) is subtracted from existing stock in SQL database 'stock_level'. i.e. Stock is kept current.
3) Im not a coder, so not sure what implcations there are for multiple customers ordering at the same time. i.e. Check again before submitting/lodging order?


Website uses SQL database for products, PHP and smarty.

At time of order submission this bit of code is used to fetch product details and may be the place to update stock ('stock_level'='stock_level-'count') back into SQL database? (2)

if (is_array($items)) {
foreach($items as $key => $value) {
$product = $productData->GetProduct($key);
if ($product) {
array_push($products, array(
'id' => $product_id,
'external_key' => $product['external_key'],
'name' => $product['name'],
'size_x' => $product['size_x'],
'size_y' => $product['size_y'],
'size_z' => $product['size_z'],
'weight' => $product['weight'],
'count' => $value,
'stock_level' => $product['stock_level'],
'price' => $product['price']));

Im not a coder so not sure what additional information would be required to bid or complete the job. Well, obviously more.

Looking to make some money?

  • Set your budget and the timeframe
  • Outline your proposal
  • Get paid for your work

Hire Freelancers who also bid on this project

    • Forbes
    • The New York Times
    • Time
    • Wall Street Journal
    • Times Online