rubyonrailsin

A Ruby and Rails talk

Thursday, April 1, 2010


[spree-user] alias orders in admin section?

by rubyonrailsin 0 comments

Tag


Share this post:
Design Float
StumbleUpon
Reddit

Hi,

I'm trying to figure out the best way to create another tab in the
admin system for wholesale orders. My requirement is that wholesale
orders should behave exactly like normal orders except not charge
tax. I've already added a flag on orders for this and the frontend is
working as expected.

So to view the wholesale orders I had hoped there would be a way to
expose a tab of only these orders but only making a route change. But
if I add in _tabs.html.erb:

<%= tab :wholesale_orders, :payments, :creditcard_payments, :shipments
%>

is there a way to set up a route alias for orders to make this work
fairly seemlessly? I tried

admin.resources :wholesale_orders, :controller => :orders

and

admin.resources :orders, :as => :wholesale_orders

without any luck. Does anyone have a better solution?

Thanks in advance, Phil

--
You received this message because you are subscribed to the Google Groups "Spree" group.
To post to this group, send email to spree-user@googlegroups.com.
To unsubscribe from this group, send email to spree-user+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/spree-user?hl=en.

No comments:

Post a Comment

Subscribe feeds via e-mail

Blog Archive