This project is a follow-up work of our previous project:
Now the new tasks for new project are as follows.
* Configure products in admin to define total number of free
toppings and apply the free cost at the shop
* Adding 6 Portions of toppings in admin and configuring them to have
default prices set at admin/restaurant.
* Add a simple coupon code discount calculation in checkout
To create the coupon discount:
-there will be a coupon_discount table
-table will contain fields:
no_use (how many times this coupon-code can be used:
no_used (how many times coupon_code has been used)
percent (YES/NO, if yes discount applied as percent else
min_amount (Minimum total amount when discount can be applied)
currency (if discount is an amount, then what currency)
log_in (YES/NO, if yes then customer must login to apply the
restaurant_id (if the coupon code is bind to a restaurant,
then what is the restaurant_id)
The coupon code will look like "some_characters-some_number-some_characters".
The some_number is the "discount amount OR discount percent". Example:
abc-05.50-xyz. In this coupon code the discount amount will be
5.5(converted currency) OR 5.5% of products TOTAL (we do not give discount
from service charges like home delivery fee)
During checkout (in [login to view URL]) file we will add a text field to feed
coupon code and a button to Apply discount and calculate TOTAL after
The system has a BONUS system where a registered customer is given bonus
points. Now if the customer is using a coupon code, the bonus points
should turn to zero.
When a login is necessary, we need to make available login and
registration facilities available. For these, we just link the system
login/registration in checkout.php. These links will be opened in a new
window. Once the customer has successfully registered and/or logged in,
the window will be closed automatically and [login to view URL] file window will
be reloaded filled with logged in user detail.
* in Checkout, when we choose COD(Cash On Delivery) payment method the
checkout window is closed and redirected to the home page but when we
chose Online Bank payment method the we are being redirected to home page
inside the checkout window without being closed the checkout window.
In Online Bank payment the checkout window needs to be closed after we
return from the payment process.
Also the redirections should be as follows:
- (When payment method is COD) OR (when payment method is Online Bank
payment and payment has been created successfully) AND customer is logged
in, he will be redirected to the newly created order information in his
- But (if the customer is not logged + (payment method is COD) OR (payment
method is Online bank and paid successfully) then he will be redirected to
[login to view URL]