Results 1 to 7 of 7
  1. #1
    Join Date
    Jul 2017
    Location
    United States
    Posts
    24
    Plugin Contributions
    0

    Default How to NOT show a radio button attribute with item in cart if it's "None"

    Hi,

    I am testing something with attributes and Radio buttons. If a customer selects one radio button attribute, but then wants to change that to the "None" option (I have to have that ability, or be able to clear all radio buttons), I would like that attribute to NOT be included in the item/price/description in the shopping cart and saved order.

    Example options (The * is the button):

    * None, * Blue, * Red, * Green

    (The customer accidentally selects "Green", but then wants "None", for clarity, and to avoid problems with the order fulfillment, I don't want the item to show the "None" option)

    Has anyone done this, or know a way in the system to do it?

    Thanks!

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

    Default Re: How to NOT show a radio button attribute with item in cart if it's "None"

    So, problem generally speaking in the overall "easy" way to do this (remove the attribute from the cart itself when the product is added to the cart) is that if the customer were to select the link on the shopping cart to return to the product, the selection of none would not be selected as it would not have been in the cart when generating the attributes option.

    An alternative would be to simply not display the attribute when viewing the cart listing (and beyond as applicable) which would be either an omission of the attribute by option value, attribute_id or similar at each such step. In this way the data remains present internally but the value/option is not displayed for viewing. Alternatively also could use some form of css, but again such hiding would need to be applied across all options.

    So... why is this "necessary"? What problem is it causing to be there? Could it be reworded to provide a better result/condition? None what? Maybe "No specific color"? Is it a random choosing? Etc...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    Jul 2017
    Location
    United States
    Posts
    24
    Plugin Contributions
    0

    Default Re: How to NOT show a radio button attribute with item in cart if it's "None"

    Thanks for the reply.

    I'm looking at using Zen Cart for a Pizza ordering app for a company. They / we tried an app on the market and after 6 months of finding bugs, we scrapped it.

    Zen Cart is about 80% of the way there already, with some modifications, I think it would work for them, and give them time to see if this even works out.

    There could be dozens of attributes for each item, for example, you start with a "Cheese Pizza" and there are a couple dozen Meats, Veggies and Fruits that could be added.

    I've worked out a great way to do whole/left half/right half toppings, but the NONE option is tricky.

    I don't want 24 toppings listed in an order to show up at the kitchen with ONLY TWO actually needed... ie; Pepperoni & Sausage. They simply do not need to be included with the item at all. I would not want the kitchen to get an order like this:

    12" Cheese Pizza
    Pepperoni - Whole
    Sausage - None
    Bacon - None
    Meatballs - None
    Mushrooms - Whole
    Brocolli - Left Half
    Onions - None
    Peppers - Right Half
    Pineapple - None

    (You get the picture from there)

    I like the thought of just not displaying it, but it also needs to be removed from any emails, printed invoices, downloaded orders, etc. I think that would end up being much more work in the long run.

    I'm sure I can figure out code to eliminate the "None" completely, but why reinvent the wheel if somebody else has already figured out a good way to do it.

  4. #4
    Join Date
    Dec 2007
    Location
    Payson, AZ
    Posts
    1,076
    Plugin Contributions
    15

    Default Re: How to NOT show a radio button attribute with item in cart if it's "None"

    Quote Originally Posted by vtstuff View Post
    Thanks for the reply.

    I'm looking at using Zen Cart for a Pizza ordering app for a company. They / we tried an app on the market and after 6 months of finding bugs, we scrapped it.

    Zen Cart is about 80% of the way there already, with some modifications, I think it would work for them, and give them time to see if this even works out.

    There could be dozens of attributes for each item, for example, you start with a "Cheese Pizza" and there are a couple dozen Meats, Veggies and Fruits that could be added.

    I've worked out a great way to do whole/left half/right half toppings, but the NONE option is tricky.

    I don't want 24 toppings listed in an order to show up at the kitchen with ONLY TWO actually needed... ie; Pepperoni & Sausage. They simply do not need to be included with the item at all. I would not want the kitchen to get an order like this:

    12" Cheese Pizza
    Pepperoni - Whole
    Sausage - None
    Bacon - None
    Meatballs - None
    Mushrooms - Whole
    Brocolli - Left Half
    Onions - None
    Peppers - Right Half
    Pineapple - None

    (You get the picture from there)

    I like the thought of just not displaying it, but it also needs to be removed from any emails, printed invoices, downloaded orders, etc. I think that would end up being much more work in the long run.

    I'm sure I can figure out code to eliminate the "None" completely, but why reinvent the wheel if somebody else has already figured out a good way to do it.
    Sounds like a need for check boxes instead of radio... check box doesn't care if the other is checked or not and only the check one is sent with the ordered item!
    Dave
    Always forward thinking... Lost my mind!

  5. #5
    Join Date
    Jul 2012
    Posts
    16,718
    Plugin Contributions
    17

    Default Re: How to NOT show a radio button attribute with item in cart if it's "None"

    So there is another "pizza guy" that uses ZC for his business. I can't recall who, but he has been using ZC for a while to do similar things.

    Without pulling in his method of accomplishing a similar task and based on the above description, one way I could see this going is:
    1. For say a cheese pizza that allows adding toppings:
    2. All toppings are presented with a default selection of none.
    3. Toppings are chosen or ignored.
    4. Upon submission to the cart, each option name/value pair is evaluated against a known list of option values that represent "none". If they are none, then the selection is "dropped" from the submitted values.
    5. The result in the cart is just the values that have been selected other than none.
    6. Selecting the product from the cart to go back and edit the selections results in the options that were selected to be reselected and the associated default value for any attributes not selected to be at their default (none). Therefore, they could "change" their product. But...
    7. Selection to return to the product does not automatically remove the previous product from the cart, so it would be as if they would be adding a second pizza rather than a revision of the product. This would require a little more "coordination" to return back to the product with the previous selection(s) but to then when submitting a change to remove the previous and then add this modified product with the new selection(s) (even if the selections were the same as previous). Otherwise, if they navigate to another product/location, want to preserve the item that was in the cart... This could possibly handled through an additional button if the applicable product is already in the cart such that the additional button does an update/change instead of an add...

    A process to "filter" out the attributes could be by use of a file in the includes/extra_cart_actions folder. In the shopping cart, the link to return back to the product may need an additional parameter added to it to help indicate the need to modify the product (and thus present the additional button to submit as a modification). Then to circle back around, if the modify button was selected, ideally the page contains an identifier for the particular product identifier, that then that original product is removed and the selected option(s) are then processed like they were before.

    So other pizzas, say a Hawaiian, would have some alternate default options selected, but the same concept would likely apply.

    Only thing from there is handling additional fees for additional or substituted attributes (ie already charged for a particular topping, adding an additional as compared to swapping out, etc...)

    All of this considering no javascript (yet) such that those without or having disabled it can continue to order and not hurt business...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  6. #6
    Join Date
    Jul 2012
    Posts
    16,718
    Plugin Contributions
    17

    Default Re: How to NOT show a radio button attribute with item in cart if it's "None"

    Quote Originally Posted by davewest View Post
    Sounds like a need for check boxes instead of radio... check box doesn't care if the other is checked or not and only the check one is sent with the ordered item!
    Would kind of agree, but when discussing left, right, all, extra, normal, light... checkboxes tend to get messy. Though there could be a checkbox and radio button combination (check to use the topping and radio to identify "position") but then even position would always be submitted and need evaluation as compared to the lack of checkbox submission...

    Out-of-the-box as identified, something has to be done/incorporated to address providing the customer the best experience and ability to choose having the pizza made to order. So then the question becomes what works for the customer and how much effort is needed to get there? Once discussing a three part condition (left, right, all) then the need for something "extra" becomes almost essential...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  7. #7
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,106
    Plugin Contributions
    11

    Default Re: How to NOT show a radio button attribute with item in cart if it's "None"

    Just another reason of the many that I miss Ceon. He was so close to finishing a mod that would make this (and many other scenarios) instantly viable.

    We SO need the ability to have attributes that are reliant on their predecessor. Select the size of pizza and you are then asked if you want all spinach lovers or half and half. With all, you'd be sent down a single path to your perfect pizza. With half, you'd begin down two joint (or, one then the other) threads to finalize your order. And, all that with the system knowing you are out of anchovies!

    Like needing an auto part. Year>> Make>> Model>> etc would step us through to the part we need.

    Hopefully someday............

 

 

Similar Threads

  1. Quantity Discount box and "add to cart" button does not show up in "Category" view
    By petro in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 10 Nov 2013, 09:48 PM
  2. Replies: 0
    Last Post: 2 Jan 2011, 01:14 PM
  3. How can I show several product on same page - each with its own "add to cart" button?
    By Dianne in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 28 Nov 2008, 04:17 AM
  4. Help: "add to cart" button disappeared. How to make it show up?
    By bonafide2001 in forum General Questions
    Replies: 2
    Last Post: 28 Oct 2008, 05:01 AM
  5. Replacing option radio button with "Buy Now" button
    By GavCaz in forum Setting Up Categories, Products, Attributes
    Replies: 6
    Last Post: 31 Aug 2007, 10:17 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR