The original developer of this e-commerce site quit abruptly. The goal of this project is to refactor and add AJAX to shopping cart and product features.
$ git clone
this repository$ cd e-commerce-refector
$ bundle
$ rake db:create
$ rake db:migrate
$ rake db:test:prepare
(for testing environment)$ rake db:seed
$ rake db:reset
(to perform database create, migrate, & seed in single command)$ rails s
to start the server, then navigate to localhost:3000 in your browser.
To use Stripe for credit card payment:
- Visit Stripe
- Login or create an account to get your API keys.
- Paste the following text in the .env file and add your own API keys:
PUBLISHABLE_KEY=your key here
SECRET_KEY=your key here
- added ajax request for updating the carts items when new item added.
- added ajax request for updating the cart when an item is deleted.
- show product details with ajax and jquery.
- added flash notice for sign in and sign out.
- fixed deprecated callback method by changing
before_filter
tobefore_action
in the Products Controller. - added validation for order item quantity.
- change the cart item method to update quantity when more than one item of the same order_item is added to the cart. Moved method to the application helper for access throughout the app.
- added Stripe for charges.
- added route to admin and new product page.
- changed orders total_price column from string to decimal to fix charges.
- added thanks route to charges.
- added Paperclip to handle image uploading.
- added avatar to users sign in and and upload for new users.
- add photo to products details page and upload for new products.
- Ruby-on-Rails
- ActiveRecord
- AJAX