Coder Social home page Coder Social logo

drhenner / ror_ecommerce Goto Github PK

View Code? Open in Web Editor NEW
1.2K 73.0 410.0 8.83 MB

Ruby on Rails Ecommerce platform, perfect for your small business solution.

Home Page: www.ror-e.com

License: MIT License

Ruby 49.98% JavaScript 21.13% CSS 0.43% HTML 18.47% SCSS 7.28% Jupyter Notebook 2.72%

ror_ecommerce's Introduction

ROR Ecommerce

Project Overview

Please create a ticket on github if you have issues. They will be addressed ASAP.

Please look at the homepage for more details. Or take a look at the github page

RoR Ecommerce. Code Climate

This is a Rails e-commerce platform. ROR Ecommerce is a Rails 5.1 application with the intent to allow developers to create an ecommerce solution easily. This solution includes an Admin for Purchase Orders, Product creation, Shipments, Fulfillment and creating Orders. There is a minimal customer facing shopping cart understanding that this will be customized. The cart allows you to track your customers' cart history and includes a double entry accounting system.

The project has Solr searching, Compass and Zurb Foundation for CSS and uses jQuery. Currently the most complete Rails solution for your small business.

Please use Ruby 2.4 and enjoy Rails 5.1.

ROR Ecommerce is designed so that if you understand Rails you will understand ROR_ecommerce. There is nothing in this project besides what you might see in a normal Rails application. If you don't like something, you are free to just change it like you would in any other Rails app.

Contributors are welcome! We will always need help with UI, documentation, and code, so feel free to pitch in. To get started, simply fork this repo, make any changes (big or small), and create a pull request.

DEMO

Take a look at The Demo. The login name is [email protected] with a password => test123

NOTE: Given that everyone has admin rights to the demo it is frequently looking less than "beautiful".

Getting Started

Please feel free to ask/answer questions in our Google Group.

Install RVM with Ruby 2.4. If you have 2.4 on your system you're good to go. Please refer to the RVM site for more details.

Copy the database.yml for your setup. For SQLite3, cp config/database.yml.sqlite3 config/database.yml. For MySQL, cp config/database.yml.mysql config/database.yml and update your username/password.

If you are using the mysql dmg file to install mysql you will need to edit your ~/.bash_profile and include this:

export DYLD_LIBRARY_PATH=/usr/local/mysql/lib:$DYLD_LIBRARY_PATH

Install gems and build the app

gem install bundler
bundle install
rake secret # copy/paste the output as `encryption_key` in `config/settings.yml`
rake db:create:all
rake db:migrate db:seed
RAILS_ENV=test rake db:test:prepare
RAILS_ENV=test rake db:seed

Once everything is set up, start the server with rails server and direct your web browser to localhost:3000/admin/overviews. Write down the username/password (these are only shown once) and follow the directions.

Environmental Variables

Most users are using Amazon S3 or Heroku. Thus we have decided to have a setup easy to get your site up and running as quickly as possible in this production environment. Hence you should add the following ENV variables:

FOG_DIRECTORY     => your bucket on AWS
AWS_ACCESS_KEY_ID => your access key on AWS
AWS_SECRET_ACCESS_KEY => your secret key on AWS
AUTHNET_LOGIN     => if you use authorize.net otherwise change config/settings.yml && config/environments/*.rb
AUTHNET_PASSWORD  => if you use authorize.net otherwise change config/settings.yml && config/environments/*.rb

On linux:

export FOG_DIRECTORY=xxxxxxxxxxxxxxx
export AWS_ACCESS_KEY_ID=xxxxxxxxxxxxxxx
export AWS_SECRET_ACCESS_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
export AUTHNET_LOGIN=xxxxxxxxxxx
export AUTHNET_PASSWORD=xxxxxxxxxxxxxxx

On Heroku:

heroku config:add FOG_DIRECTORY=xxxxxxxxxxxxxxx
heroku config:add AWS_ACCESS_KEY_ID=xxxxxxxxxxxxxxx
heroku config:add AWS_SECRET_ACCESS_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
heroku config:add AUTHNET_LOGIN=xxxxxxxxxxx
heroku config:add AUTHNET_PASSWORD=xxxxxxxxxxxxxxx

heroku labs:enable user-env-compile -a myapp

This is needed for using sendgrid on heroku(config/initializers/mail.rb):

heroku config:add SENDGRID_USERNAME=xxxxxxxxxxx
heroku config:add SENDGRID_PASSWORD=xxxxxxxxxxxxxxx

Quick Evaluation

If you just want to see what ror_ecommerce looks like, before you enter any products into the database, run the following command:

rake db:seed_fake

If you have not already done so point your browser to http://lvh.me:3000/admin/overviews and set up the admin user.

You should now have a minimal dataset, and be able to see a demo of the various parts of the app. Note: make sure you have config/settings.yml set up correctly before you try to checkout. Also, please take a look at The 15 minute e-commerce video.

ImageMagick and rMagick on OS X 10.8


If installing rMagick on OS X 10.8 and using Homebrew to install ImageMagick, you will need to symlink across some files or rMagick will not be able to build.

Do the following in the case of a Homebrew installed ImageMagick(and homebrew had issues):

* cd /usr/local/Cellar/imagemagick/6.8.9-8/lib
* ln -s libMagick++-6.Q16.5.dylib   libMagick++.dylib
* ln -s libMagickCore-6.Q16.2.dylib libMagickCore.dylib
* ln -s libMagickWand-6.Q16.2.dylib libMagickWand.dylib

* you may need to change the version path if the imagemagick has been updated

YARDOCS

If you would like to read the docs, you can generate them with the following command:

yardoc --no-private --protected app/models/*.rb

Payment Gateways

First, create config/settings.yml and change the encryption key and paypal/auth.net information. You can also change config/settings.yml.example to config/settings.yml until you get your real info.

To change from authlogic to any other gateway look at the documentation HERE

Paperclip

Paperclip will throw errors if not configured correctly. You will need to find out where Imagemagick is installed. Type: which identify in the terminal and set

Paperclip.options[:command_path]

equal to that path in config/initializers/paperclip.rb.

Example:

Change:

Paperclip.options[:command_path] = "/usr/local/bin"

Into:

Paperclip.options[:command_path] = "/usr/bin"

Adding Dalli For Cache and the Session Store

While optional, for a speedy site, using memcached is a good idea.

Install memcached. If you're on a Mac, the easiest way to install Memcached is to use homebrew:

brew install memcached

memcached -vv

To Turn On the Dalli Cookie Store

Remove the cookie store on line one of config/initializers/session_store.rb. In your Gemfile add:

gem 'dalli'

then:

bundle install

Finally uncomment the next two lines in config/initializers/session_store.rb

require 'action_dispatch/middleware/session/dalli_store'
Hadean::Application.config.session_store :dalli_store, :key => '_hadean_session_ugrdr6765745ce4vy'

To Turn On the Dalli Cache Store

It is also recommended to change the cache store in config/environments/*.rb

config.cache_store = :dalli_store

Adding Solr Search

brew install solr

Uncomment the following in your gemfile:

#gem 'sunspot_solr'
#gem 'sunspot_rails'

then:

bundle install

Start Solr before starting your server:

rake sunspot:solr:start

Go to product.rb and uncomment:

#include ProductSolr

Also remove the method:

def self.standard_search

Take a look at setting up Solr - Solr in 5 minutes

If you get the error, Errno::ECONNREFUSED (Connection refused - connect(2)): when you try to create a product or upload an image, you have not started Solr search. You need to run rake sunspot:solr:start, or remove Solr completely.

Remember to run rake sunspot:reindex before doing your search if you already have data in the DB

TODO:

  • more documentation

SETUP assets on S3 with CORS

Putting assets on S3 can cause issues with FireFox/IE. You can read about the issue if you search for "S3 & CORS". Basically FF & IE are keeping things more secure but in the process you are required to do some setup.

I ran into the same thing with assets not being public for IE and FireFox but Chrome seemed to work fine. There is a work around for this though. There is something called a CORS Config that opens up your assets to whatever domains you specify.

Here's how to open up your assets to your website. (Thanks @DTwigs)

  • Click on your bucket.
  • Click on the properties button to open the properties tab.
  • Expand the "Permissions" accordion and click " Add CORS Configuration"

Now paste this code in there:

<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<CORSRule>
<AllowedOrigin>*</AllowedOrigin>
<AllowedMethod>GET</AllowedMethod>
<MaxAgeSeconds>3000</MaxAgeSeconds>
<AllowedHeader>Content-*</AllowedHeader>
<AllowedHeader>Host</AllowedHeader>
</CORSRule>
</CORSConfiguration>

Image Groups

Typically a product has many variants. (Variant ~= specific size of a given shoe)

If you have many variants with the same image don't bother with an image group, just use the "products.images".

Use ImageGroups for something like shoes. Lets say you have 3 colors, and each color has 10 sizes. You would create 3 images groups (one for each color). The image for each size would be the same and hence each variant would be associated to the same image_group for a given color.

Author

RoR Ecommerce was created by David Henner. Contributors.

FYI:

Shipping categories are categories based off price:

you might have two shipping categories (light items) & (heavy items) where heavy items are charged per item purchased and light items are charged once for all items purchased. (hence buying 30 feathers has the same shipping charges as one feather)

Have fun!!!

ror_ecommerce's People

Contributors

bindiry avatar bitsapien avatar bryant1410 avatar chrismccord avatar cnorm35 avatar deanpcmad avatar deco81 avatar denispeplin avatar dkonishi avatar drhenner avatar freemanoid avatar gregorym avatar gustavoguichard avatar jiazhen avatar jrbasso avatar kdbaker avatar koriroys avatar lakesare avatar mitfik avatar nick26 avatar qinwenshi avatar romiras avatar sullivanli avatar westonganger avatar yuxisteem avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ror_ecommerce's Issues

Count pending from supplier not updated

When I create new Purchase order for supplier and waiting for deliver, count_pending_from_supplier (in inventory model) is not updated it always is 0.

It should be amount of items which are shipped to us from supplier, right?

Payment integration - external hosted UI

I just start work on integration with payments system using ActiveMerchant (unfortunately this payment gateway which I want to use does not work, so I need to rewrite) but I see that there is one missing part in ror-e (correct me if I am wrong)

Right now there is assumption that store owner will host UI for payment (user need to fill credit card info on store webpage).
But as I know this is related with PCI [1] and some special requirements (and of course security issue).
As I can see ror-e of course do not store credit cards data so maybe this is not so big deal but any way.

In my case I do not want to host ui for credit card I prefer to send user to much more secure webpage and just get confirmation about status of this payment. So the question is: how can I do that and how this influence on payments flow?

[1] https://www.pcisecuritystandards.org/

simple-form-bootstrap branch status?

I was wondering how far the simple-form-bootstrap branch was taken. I would like to use ror-ecommerce but would prefer to use boostrap. I am curious how complete the simple-form-bootstrap branch is? I might be willing to try to bring that branch up to date as much as possible with master but implement all the frontend code with simpel_form and boostrap.

Thoughts?

Product Active Status

Within the product details for any given product you have a nifty green button for active product and a red button for an inactive product.

Clicking on the green or red button brings up a dialogue box to change the active/inactive status. It seems that choosing "Cancel" does the same thing as "OK".

Remove product (just use deleted_at)

Hi

Could you help me understand how to remove product from ror-e?
I see that is just question of set up flag for it but I do not see any functionality for that in UI (I use the new one from @deanperry )
But as I remember either in the old one this feature was missing.

To make question clear:

Right now in product.rb model we have active flag and deleted_at of course differences between those two are quite obvious (active means that is at store but is not visible on user side, deleted_at means that product was removed from our inventory)

but in method destroy instead of setup deleted_at is just active = false which confuse a little bit. Shouldn't be there deleted_at ?
And one more question: because right now delete means: setup flag and hide product, is there possibility to remove it from database or this can be done only from console?

Test fail for Deal

Hi

I just start working with payment system and I found one weird thing. In spec/model/deal_spec.rb few test fail because in order.rb model method:

def number_of_a_given_product_type
  ...
     return_hash.delete_if{|k,v| k == 1}  #<<< here

end

return always empty hash because there is only one type of product with id 1.
what for is that? when I will just return in this method return_hash without delete_if all test pass.

Variant Brand ?

Shouldn't the brand be a property of the Product rather than the Variant.

I don't understand what it would mean to have one product with variants from different brands.

(btw: nice though that brands and suppliers are not the same)

Variant with primary properties

When I try add new variant with selected primary? (to get properties from primary product, right?)

I've got error message (normally does not appear because is missing that part in the view, i add that in latest pull request) that variant can't be empty

dynamic_form plugin removal

Every time I start something in ror_ecommerce, the warning is displayed:

DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/01/04/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /home/den/ror_ecommerce/config/environment.rb:33)

I tried this:

$ rails plugin remove dynamic_form

Then this:

$ rspec

.... some failures...

then after adding into Gemfile:

gem 'dynamic_form'

And running again

$ rspec

No failures.

So what about replacing plugin with gem?

I just don't want to remove something without asking...

Checkout - address validation

When user go through checkout process he add new address (let assume that this is his first time) after that go to next step address is added to database but for his address there is no shipping method yet. There is no information about that.
He should get some information that for his address store do not ship products.
Of course in next step where user need to choose shipping method there is no option to choose and when user go to next step application crash.

Also it should be possibility to back to last step. For example to change address or to change other parameters.

Missing livereload.js

after go to new admin panel my firebug alert me that there is missing resources: livereload.js

stylesheets should be consolidated

two options:

  1. have the files generated by compass not in version control

  2. remove compass and use the rails3 spockets / assest pipeline

The generated compass stylesheets do not need to be checked into the repo.

Problem with storing country and state

During add new tax rate in admin panel if user will type something wrong and send form, he will loose country and state which he selected. The same for edit.

Default prperty throws error

When creating a product no error was given when default property was left empty and when viewing the product i get

undefined method `property' for nil:NilClass
Extracted source (around line #38):

35: <%# variant.primary_property.each do |variant_property| %>
36: <div id='variant_<%= i %>'
37: class='variant_select' >
38: <%= raw variant.primary_property.property.display_name %>: <%= raw variant.primary_property.description %>
39:

And when I go back to edit the property, I can not. It is not in the list.
PS: I only found this out by creating another product. ie it could say so on the screen (but off course the code should check)

Dashboard

Hi

I have idea to replace history tab in admin panel by dashboard.
Because right now history do not provide anything interesting just list of orders.
It will be good to have main page with all statistics like:

  • revenue (per day, month, year)
  • orders (per day, moth, year)
  • amount of new users
  • actiivity
  • most popular product
  • ....

Everything with all nice charts of course :)

What do you think?

Surname validation chokes on mine

When I checkout on the store, putting in the address, my surname contains a german umlaut (Rüger)

It says it's invalid and while I understand it may be difficult to pronounce, my passport backs me up on the fact that it is not invalid :-)

Product creation screen

(Prototype should be optional as discussed)

  • permalink should be prefilled if left empty
    -permalink is not checked for spaces or the like
  • keywords and description may be blank

bundle exec rake db:test:prepare breaks with sqlite

rake aborted!
Please install the mysql2 adapter: gem install activerecord-mysql2-adapter (mysql2 is not part of the bundle. Add it to Gemfile.)

Gemfile includes below and I ran this to install (I think you can have different rvm setups for this kind of different gem version testing, but you probably knew that)
bundle install --without production

group :test, :development do
gem 'sqlite3'
end
group :production do
gem 'mysql2', '~> 0.3.10'
end

Move from paperclip to carrierwave

I have used Carrierwave on many of my projects and I really like it. They also have a compatibility mode for people moving from Paperclip to Carrierwave. I suggest you take a look :)

Translate content

Hi,

There is possibility to translate content ?
I would like to provide content (products description, specification) in different languages

No direct way of changing inentory

While I really do appreciate the suppier order/receive process, there are just times when one takes one item from the shelf.

Or one does an inventory (count has against should) and one just needs to adjust the number.

single page checkout

Is there a way to put billing address, shipping address, shipping method and payment information on a single page? And also, have you tried testing with stripe (a new payment processor)? Sorry, this might not be an issue, but wasn't sure where else to post.

Thank you.

NoMethodError in Admin/overviews#index

Showing C:/Users/sam/Desktop/ror_ecommerce/app/views/shared/admin/_header_bar.html.erb where line #2 raised:

undefined method `name' for nil:NilClass
Extracted source (around line #2):

1:


2: <%= current_user.name %>

3: <%= link_to 'Logout', logout_path, :id => 'admin-logout-button' %>
4:

5:
Trace of template inclusion: app/views/layouts/admin.html.erb

Rails.root: C:/Users/sam/Desktop/ror_ecommerce

app/views/shared/admin/_header_bar.html.erb:2:in _app_views_shared_admin__header_bar_html_erb__828043663_60317820' app/views/layouts/admin.html.erb:32:in_app_views_layouts_admin_html_erb__914310686_60436752'

too many files under version control

When I pull I get some conflicts which I think come from the fact that too many files are under version control.

db/schema.rb varies (slightly) for every db. I'm quite sure it shouldn't be under version control
public/stylesheets/ don't remember : if assets are used, the generated assets should not be checked in, as they are different in deve/production. So I have flles overriden where only the metadata has changed
.bundle/ should not be checked in as it differs per machine ( ie I use --without production on my dev machine and thus mysql is never installed)

product_keyword

Why product_keyword in product model is text instead of string ?

Is there any reason for that?

Tests!

Hey David, First of all.. thanks for the props in the Readme!

I was looking around for stories for Ruby5 today, and I got all excited when I found this great example Rails application. Then I looked at the tests, and well.. yeah..

Can't really endorse anyone using this code without a full test suite. Not that I expect you to write one, it'd be a lot of work. But if you do, definitely drop me a line.

-Gregg

rename Tax Status

Too me at least status may mean active or not, but what it seems t be is Category

Ie, rename to TaxCategory is my proposal for better understanding.

model order_item cause ActiveRecord error in postgresql

when order processed, after selecting the given address, "ActiveRecord::StatementInvalid in Shopping::ShippingMethodsController#index" error raised.
the detail description :
PG::Error: ERROR: column "order_items.id" must appear in the GROUP BY clause or be used in an aggregate function
LINE 1: SELECT order_items., count() as quantity,

this is caused by SQL statement error in order_item, line 103 - 107....
using the following as instead:
:select => "order_items.*, count(order_items.id) as quantity,
products.shipping_category_id as shipping_category_id,
SUM(order_items.price) as sum_price,
SUM(order_items.total) as sum_total",
:group => "order_items.id, order_items.variant_id, products.shipping_category_id")
the code snippet is test ok in postgresql and gain more DB performance.

State required during checkout

Same address form (during checkout), I need to put in a state.

We have no states in my country.

But a country field may be useful.

make Prototype optional

It is my understanding that a Prototype would be of help when creating many similar Products (all with the same properties).
As such its use should be optional. Ie one either creates a product from a prototype (link from the prototype) or not, in which case the prototype is not relevant.

Or to be precise: The prototype is irrelevant to a product. It is only helpful in creating the product.

I get Prototype can't be blank
when trying to create a Product without a prototype. But imo it should be ok.

activate link throws routing error

(I'll keep these small, it's easier to manage)

http://localhost:3000/admin/merchandise/products/ipuro-mental/activate

results in

Routing Error

No route matches [GET] "/admin/merchandise/products/ipuro-mental/activate"

btw: you seem to use the edit by permalink way as spree does. I think it's fine to use the id (as per rails standard) and thus get gid off all the problems associates with the permalink-aproach. And those do exist:

  • what if the permalink does become invalid ?
  • what if you have 2 products with the same (off course that _should not happen)
  • when you edit the permalink

tax_rate edit

When I edit a tax rate in admin config, the list of states I get is State-to_s ie some address.

Looked into fixing it but wasn't sure about the correct select syntax. Countries work.

BTW: I just saw the vat global flag. Would you start a wiki page about how that works. I can flesh it out, but if you give the tech scoop that would clear it up for me.

Country and state

As I see right now country is very strong related with state, in some places like tax rate, there is no possibility to choose country without choose state. How I can I achieve:

  • add tax rate for country where all states has the same tax rate
  • add tax rate to country without states

P.S. How to add state for country? (rails c ?:> )

Credit card payment in checkout

Wouldn't that need choice (like the shipment), like paypal, check, bill etc, So there is a place to add those payment methods and a give the user a choice.

Also one should avoid asking for cc info on site. And to be useful (general) bills and cash should be options.
And in different countries different (paypal-like) systems exist.

Add Product (todo before activation)

In the admin, display what needs to be done before the product is ready for activation.

(like if there are no images Give an indicator that the product isn't ready for activation)

Can't upload an image - seems like a paperclip issue

Paperclip::CommandNotFoundError (Paperclip::CommandNotFoundError):
app/models/image.rb:28:in find_dimensions' app/controllers/admin/merchandise/images/products_controller.rb:10:inupdate'

I have imagemagick installed (and libmagickwand-dev).
I tried installing rmagick gem but it didn't help.
I tested the imagemagick commands - convent and identify from another template and it seems to be fine.

I'll updatet the issue if I find a solution.

New supplier fails

on a fresh new pulled system when I press new supplier I get

developement/ruby/1.9.1/gems/actionpack-3.1.2/lib/action_view/helpers/form_helper.rb:353:in form_for' developement/ruby/1.9.1/gems/haml-3.1.3/lib/haml/helpers/action_view_mods.rb:182:inform_for_with_haml'
developement/ruby/1.9.1/gems/haml-3.1.3/lib/haml/helpers/xss_mods.rb:132:in form_for_with_haml_xss' app/views/admin/inventory/suppliers/new.html.erb:5:in_app_views_admin_inventory_suppliers_new_html_erb__130282221389504744_2204996240'
developement/ruby/1.9.1/gems/actionpack-3.1.2/lib/action_view/template.rb:171:in block in render' developement/ruby/1.9.1/gems/activesupport-3.1.2/lib/active_support/notifications.rb:55:ininstrument'
developement/ruby/1.9.1/gems/actionpack-3.1.2/lib/action_view/template.rb:169:in render' developement/ruby/1.9.1/gems/actionpack-3.1.2/lib/action_view/renderer/template_renderer.rb:40:inblock (2 levels) in render_template'
developement/ruby/1.9.1/gems/actionpack-3.1.2/lib/action_view/renderer/abstract_renderer.rb:33:in block in instrument' developement/ruby/1.9.1/gems/activesupport-3.1.2/lib/active_support/notifications.rb:53:inblock in instrument'

PS: actually new Purchase order fails similarly
PPS with the inventory issue this leaves me (a very willing candidate) without a way to test checkout

Move to Devise for authentication?

I feel Devise would be a much better way of authenticating users. What are your thoughts? Also are user roles required? Maybe have a separate admin user model for authenticating admins into the admin backend and then the user model for normal users.
What do you guys think?

My main reason for either moving to Devise or custom authentication, is because I've noticed that some of the code for authenticating users is quite large, especially in the application controller:

###  Authlogic helper methods
def current_user_session
  return @current_user_session if defined?(@current_user_session)
  @current_user_session = UserSession.find
end

def current_user
  return @current_user if defined?(@current_user)
  @current_user = current_user_session && current_user_session.record
end

def current_user_id
  return @current_user_id if defined?(@current_user_id)
  @current_user_id = current_user_session && current_user_session.record && current_user_session.record.id
end

Coupons type problem

Can't mass-assign protected attributes: type

The Coupons type field needs to be renamed to coupon_type

admin/overviews and README

README install instructions mention

git submodule init
git submodule update
gem install compass
gem install fancy-buttons

but I don't think any of them are needed. But it fails to mention rvm or bundle exec (needed for 1.8 system users)

also the overview has no mention on how to create stock, so no checkout, no testing, ...

installing autotest-fsevent fails

bundle install shows me this error:
Installing autotest-fsevent (0.2.3) with native extensions /home/oren/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/rubygems/installer.rb:483:in `rescue in block in build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)

/home/oren/.rvm/rubies/ruby-1.9.2-p0/bin/ruby extconf.rb
extconf.rb:19:in `

': Only Darwin (Mac OS X) systems are supported (RuntimeError)

system info:
Ubuntu 10.10, ruby-1.9.2-r0 (RVM)

I commented this gem in Gemfile and the install was successful.

rake db:migrate shows me:

rake aborted!
No such file or directory - config/config.yml
/home/oren/misc/projects/test/ror_ecommerce/config/environment.rb:5:in `read'

which is accurate - there is no config.yml file

Thanks!

CSS toolkit

Hi,

I have 2 thought regarding css toolkit:

  1. I would like to propose using bootstrap toolkit from twitter instead of blueprint.

Why not use blueprint:

  • blueprint is not maintain more then one year
  • is ugly
  • do not support any mobile platform (nowadays every body has tablet to administrate his store ;) )

Why use bootstrap:

  • provided by twitter
  • still maintain (and for long time it will not change)
  • looks much better then blueprint
  • very good documentation
  • support mobile platform
  • clean source code (easy to modify)

The advantages are quite obvious, just take a look on it[1] and think about that.

  1. I would like also propose to do not use sass:
    Why:
  • it provide unnecessary layout on top of css
  • hard to work for people who do not know scss
  • code is not so clean and obvious as with standard css
  • rails provide by default possibility to include ruby code in css to achieve that what should provide scss
  • extra gem in huge list of dependencies
  • we do not use so much scss right now and I think all which we need can be done by standard features from assets rails.

[1] http://twitter.github.com/bootstrap/index.html

purchase order ui

We have over 1000 variants, so a dropdown doesn't really work for choosing a variant

Also, any PO will have many products on it, but after adding each, ti goes back to the list of PO's. So there is a lot of unneccessary clicking

Also the cost should be prefilled, and when I leave it empty, I get an SQLite3::ConstraintException in Admin::Inventory::PurchaseOrdersController#update
purchase_order_variants.cost may not be NULL

which indicates that there is a db-level restriction without a matching model validation

And when I press add variant I actually get 2 new variant entry fields ( running on mac 10.6.8 with chrome 15.0)

Edit Product

there just seems no way to edit
-properties

  • metas
  • shipping
    -tax (missing from the info)

no way to abort editing variants

sample data

Now that the db:test:prepare works i'm surprised that there isn't really any data in there.
I had almost wondered about that, as I saw that the test:prepare seems to call the seed (?)

Anyway, for your meetup (and people giving ror-e a quick tryout) I would suggest some simple sample data: Apple products or something safe. Just a few (2-5). Mainly all the setup should be done, ie tax/shipping rates method, properties, product_types etc.

It makes for a learning experience to input those, but a slightly frustrating one as the system is new and unknown. A better experience is a ready setup, where one can edit and try out the things that interest most. That would be how an order is created in many cases and having to do a lot of work to get there can be off-putting.

One of the first things I actually did i spree was to write an import/export tool load/dump[file], i can point to the source if you like. But I recently found a good tool too yaml_db , actually does a lot of it and my for improves the syntax.

The point being that it is a very handy thing to be able to transfer data back and forth between production/development. Ie I did all my first setup on a dev machine and dumped it as yaml, and then when setting up my first production just imported all the setup ymls.

Nowadays I backup my production as yaml and as a benefit I get to import it into my dev (remember different dbs) and test new features on the real data. Very very handy.

Tax rate - active country

Hi,

I have question about how to active country id to make possibility to choose those country in tax rate admin.
Is only chance to do that is to change that in country.rb model ?

Maybe it will be good idea to add extra field into country model like: active, which user could define in admin panel which country he wants to use in his store, it will prevent to have huge list of countries in select boxes like this one in tax rate.

I could provide functionality for that, just give me know.

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.