I've been posting on here quite a bit, and for that I apologize. I'm a
first-time spree user and relatively new to rails, but I know my way around
rails pretty well. I wanted to make sure I was organizing my site properly.
I apologize in advance for the length.

I'm building an ecommerce clothing store with three primary taxonomies:
women, men, and kids, and then several static pages, such as about,
locations, etc.

Within each primary taxonomy I have multiple taxons, such as pants, shorts,
shoes, etc. I'm trying to build my site so that when you visit
http://mywebsite.com/women you will be taken to a page with all of the
taxons in the women taxonomy. Once on that page you can click on pants and
it will take you http://mywebsite.com/women/pants which will display all
the womens pants. Pretty straightforward.

Spree however is confusing me. I currently have a 'women' action inside of
'controllers/spree/home_controller.rb and right now I'm just pulling all
products onto that page with @products = Spree::Product.all.

I'm not really sure where to go from here. Do I create another action
called 'pants' inside of the home_controller and in my routes.rb file just
do a match '/women/pants' => 'spree/home#pants'?

Or am I going about this wrong?

How do I query for only the products within the 'women' taxonomy? And
furthermore, how do I query for products only inside the women => pants
taxon?

Thank you. Again I apologize for all the questions. I'd be happy to
compensate someone if need be.

Jameson

--
You received this message because you are subscribed to the Google Groups "Spree" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spree-user+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Tony at Mar 11, 2013 at 7:27 pm
    Hi, not sure if this what you want. You can create children taxon named pants under women taxonomy. Once created, you can access through /t/women/pants

    Tony.
    On Mar 7, 2013, at 2:46 PM, Jameson Trinker wrote:

    I've been posting on here quite a bit, and for that I apologize. I'm a first-time spree user and relatively new to rails, but I know my way around rails pretty well. I wanted to make sure I was organizing my site properly. I apologize in advance for the length.

    I'm building an ecommerce clothing store with three primary taxonomies: women, men, and kids, and then several static pages, such as about, locations, etc.

    Within each primary taxonomy I have multiple taxons, such as pants, shorts, shoes, etc. I'm trying to build my site so that when you visit http://mywebsite.com/women you will be taken to a page with all of the taxons in the women taxonomy. Once on that page you can click on pants and it will take you http://mywebsite.com/women/pants which will display all the womens pants. Pretty straightforward.

    Spree however is confusing me. I currently have a 'women' action inside of 'controllers/spree/home_controller.rb and right now I'm just pulling all products onto that page with @products = Spree::Product.all.

    I'm not really sure where to go from here. Do I create another action called 'pants' inside of the home_controller and in my routes.rb file just do a match '/women/pants' => 'spree/home#pants'?

    Or am I going about this wrong?

    How do I query for only the products within the 'women' taxonomy? And furthermore, how do I query for products only inside the women => pants taxon?

    Thank you. Again I apologize for all the questions. I'd be happy to compensate someone if need be.

    Jameson
    --
    You received this message because you are subscribed to the Google Groups "Spree" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to spree-user+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
    --
    You received this message because you are subscribed to the Google Groups "Spree" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to spree-user+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Jameson Trinker at Mar 11, 2013 at 8:37 pm
    Thanks, Tony. I got it. I appreciate your help.
    On Monday, March 11, 2013 2:26:53 PM UTC-5, Tony Nguyen wrote:

    Hi, not sure if this what you want. You can create children taxon named
    pants under women taxonomy. Once created, you can access through
    /t/women/pants

    Tony.

    On Mar 7, 2013, at 2:46 PM, Jameson Trinker wrote:

    I've been posting on here quite a bit, and for that I apologize. I'm a
    first-time spree user and relatively new to rails, but I know my way around
    rails pretty well. I wanted to make sure I was organizing my site properly.
    I apologize in advance for the length.

    I'm building an ecommerce clothing store with three primary taxonomies:
    women, men, and kids, and then several static pages, such as about,
    locations, etc.

    Within each primary taxonomy I have multiple taxons, such as pants,
    shorts, shoes, etc. I'm trying to build my site so that when you visit
    http://mywebsite.com/women you will be taken to a page with all of the
    taxons in the women taxonomy. Once on that page you can click on pants and
    it will take you http://mywebsite.com/women/pants which will display all
    the womens pants. Pretty straightforward.

    Spree however is confusing me. I currently have a 'women' action inside of
    'controllers/spree/home_controller.rb and right now I'm just pulling all
    products onto that page with @products = Spree::Product.all.

    I'm not really sure where to go from here. Do I create another action
    called 'pants' inside of the home_controller and in my routes.rb file just
    do a match '/women/pants' => 'spree/home#pants'?

    Or am I going about this wrong?

    How do I query for only the products within the 'women' taxonomy? And
    furthermore, how do I query for products only inside the women => pants
    taxon?

    Thank you. Again I apologize for all the questions. I'd be happy to
    compensate someone if need be.

    Jameson

    --
    You received this message because you are subscribed to the Google Groups
    "Spree" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to spree-user+...@googlegroups.com <javascript:>.
    For more options, visit <https://groups.google.com/groups/opt_out>
    https://groups.google.com/groups/opt_out.


    --
    You received this message because you are subscribed to the Google Groups "Spree" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to spree-user+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Jameson Trinker at Mar 11, 2013 at 8:37 pm
    Thank you, Calvin!
    On Sunday, March 10, 2013 8:48:53 PM UTC-5, Calvin wrote:

    It would be really easy to copy Spree::TaxonsController to do what you
    need. Your route would end up looking something like this:

    match '/women/*id', :to => 'my_taxons#show', :as => :my_nested_taxons,
    :root_taxon => 'women'

    Then in your version of the controller build the taxon permalink by
    combining the root_taxon and id.

    Calvin




    On Thu, Mar 7, 2013 at 3:46 PM, Jameson Trinker <jameson...@gmail.com<javascript:>
    wrote:
    I've been posting on here quite a bit, and for that I apologize. I'm a
    first-time spree user and relatively new to rails, but I know my way around
    rails pretty well. I wanted to make sure I was organizing my site properly.
    I apologize in advance for the length.

    I'm building an ecommerce clothing store with three primary taxonomies:
    women, men, and kids, and then several static pages, such as about,
    locations, etc.

    Within each primary taxonomy I have multiple taxons, such as pants,
    shorts, shoes, etc. I'm trying to build my site so that when you visit
    http://mywebsite.com/women you will be taken to a page with all of the
    taxons in the women taxonomy. Once on that page you can click on pants and
    it will take you http://mywebsite.com/women/pants which will display all
    the womens pants. Pretty straightforward.

    Spree however is confusing me. I currently have a 'women' action inside
    of 'controllers/spree/home_controller.rb and right now I'm just pulling all
    products onto that page with @products = Spree::Product.all.

    I'm not really sure where to go from here. Do I create another action
    called 'pants' inside of the home_controller and in my routes.rb file just
    do a match '/women/pants' => 'spree/home#pants'?

    Or am I going about this wrong?

    How do I query for only the products within the 'women' taxonomy? And
    furthermore, how do I query for products only inside the women => pants
    taxon?

    Thank you. Again I apologize for all the questions. I'd be happy to
    compensate someone if need be.

    Jameson

    --
    You received this message because you are subscribed to the Google Groups
    "Spree" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to spree-user+...@googlegroups.com <javascript:>.
    For more options, visit https://groups.google.com/groups/opt_out.

    --
    You received this message because you are subscribed to the Google Groups "Spree" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to spree-user+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Jarrod Payne at Nov 25, 2013 at 8:28 pm
    Tony,

    Would you mind posting your solution?


    On Thursday, March 7, 2013 3:46:16 PM UTC-5, Jameson Trinker wrote:

    I've been posting on here quite a bit, and for that I apologize. I'm a
    first-time spree user and relatively new to rails, but I know my way around
    rails pretty well. I wanted to make sure I was organizing my site properly.
    I apologize in advance for the length.

    I'm building an ecommerce clothing store with three primary taxonomies:
    women, men, and kids, and then several static pages, such as about,
    locations, etc.

    Within each primary taxonomy I have multiple taxons, such as pants,
    shorts, shoes, etc. I'm trying to build my site so that when you visit
    http://mywebsite.com/women<http://www.google.com/url?q=http%3A%2F%2Fmywebsite.com%2Fwomen&sa=D&sntz=1&usg=AFQjCNHrGK3v0Ud22vSmWQ1hQ3PhUNLm9g>you will be taken to a page with all of the taxons in the women taxonomy.
    Once on that page you can click on pants and it will take you
    http://mywebsite.com/women/pants<http://www.google.com/url?q=http%3A%2F%2Fmywebsite.com%2Fwomen%2Fpants&sa=D&sntz=1&usg=AFQjCNEdT2WA78mSCBcqtpECdgMmKnELpQ>which will display all the womens pants. Pretty straightforward.

    Spree however is confusing me. I currently have a 'women' action inside of
    'controllers/spree/home_controller.rb and right now I'm just pulling all
    products onto that page with @products = Spree::Product.all.

    I'm not really sure where to go from here. Do I create another action
    called 'pants' inside of the home_controller and in my routes.rb file just
    do a match '/women/pants' => 'spree/home#pants'?

    Or am I going about this wrong?

    How do I query for only the products within the 'women' taxonomy? And
    furthermore, how do I query for products only inside the women => pants
    taxon?

    Thank you. Again I apologize for all the questions. I'd be happy to
    compensate someone if need be.

    Jameson

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupspree-user @
categoriesrubyonrails
postedMar 7, '13 at 8:46p
activeNov 25, '13 at 8:28p
posts5
users3
websitespreecommerce.com
irc#RubyOnRails

People

Translate

site design / logo © 2022 Grokbase