Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2009
    Location
    Longs, SC
    Posts
    626
    Plugin Contributions
    2

    Default Add text attribute boxes based on quantity ordered

    I'm working on an event site. The event registration is set up as a product with a drop down attribute for the number of days to attend and a text box for name and shirt size. My client want to have one text box for name and a shirt size drop down for each registration ordered to replace the single text box.

    I'm not sure how I'm going to attack this but before I do I thought I'd ask if anyone was aware of an existing mod that does this or something similar. Any suggestions on possible solutions would be helpful too.

  2. #2
    Join Date
    Jul 2012
    Posts
    16,816
    Plugin Contributions
    17

    Default Re: Add text attribute boxes based on quantity ordered

    I'm confused about what "special" action is being considered. It sounds to me like you are adding several option names to the product.
    One option name: days (dropdown of how many days to participate, or possibly some sort of combination like 1, 3, 4 (skipping day 2 of a 4 day event).
    A text box (name)
    And a dropdown of size(s).
    Three option names, two having option values provided.

    I don't otherwise see where anything "dynamically" adjusts or needs adjustment.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    Aug 2009
    Location
    Longs, SC
    Posts
    626
    Plugin Contributions
    2

    Default Re: Add text attribute boxes based on quantity ordered

    Quote Originally Posted by mc12345678 View Post
    I'm confused about what "special" action is being considered. It sounds to me like you are adding several option names to the product.
    One option name: days (dropdown of how many days to participate, or possibly some sort of combination like 1, 3, 4 (skipping day 2 of a 4 day event).
    A text box (name)
    And a dropdown of size(s).
    Three option names, two having option values provided.

    I don't otherwise see where anything "dynamically" adjusts or needs adjustment.
    It's currently set up with a drop down for days and a text box for them to write the name and shirt size. What they want is to have a drop down for shirt size and a text box for name. The number of these would be based on the quantity being added to the cart. So assuming that the quantity is 1 when the product page loads the would be a drop dow for the number of days, a drop down for shirt size, and a text box for the name. If the quantity is changed the number of shirt size and name text boxes would be changed to the quantity to be added to the cart.

  4. #4
    Join Date
    Jul 2012
    Posts
    16,816
    Plugin Contributions
    17

    Default Re: Add text attribute boxes based on quantity ordered

    Quote Originally Posted by badarac View Post
    It's currently set up with a drop down for days and a text box for them to write the name and shirt size. What they want is to have a drop down for shirt size and a text box for name. The number of these would be based on the quantity being added to the cart. So assuming that the quantity is 1 when the product page loads the would be a drop dow for the number of days, a drop down for shirt size, and a text box for the name. If the quantity is changed the number of shirt size and name text boxes would be changed to the quantity to be added to the cart.
    Ahhh...

    That's actually what I was afraid of...

    So, if there is not something specifically like this already around, I would say that "some" of the downstream processing is addressed by product attributes grid (effectively creates a unique product being added to the cart and a way to "process" each new product while adding it to the cart). The upfront part appears to be javascript related, or requiring a reload of the page when the "number" is changed at which point the javascript would be limited (because the reload should populate the screen with the necessary field(s), but for each of the attributes would suggest grouping the "pair" within a bounded grouping (product attributes grid uses the hidden tag of product_id (instead of products_id) to associate the attribute(s) to the "unique" product.) The thing(s) to take from the product attributes grid would be the final html output (would have to work out how to generate that information) and the downstream extra_cart_actions to cycle through the "product" and capture one of each of those selections. Some of the internal detail of that plugin is more specific to it than to what you are trying to accomplish.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

 

 

Similar Threads

  1. Seperate quantity boxes for attribute products
    By leest35 in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 6 Aug 2010, 04:43 PM
  2. Quantity text boxes?
    By davec in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 31 Aug 2008, 01:09 AM
  3. Product Discounts based on quantity ordered
    By rmn in forum General Questions
    Replies: 8
    Last Post: 23 Nov 2007, 05:12 PM
  4. Simple attribute (not based on quantity purchased)
    By GTrotter in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 12 Sep 2007, 10:24 AM
  5. Setting Quantity based on attribute
    By decoxjr in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 6 Apr 2007, 06:26 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg