Disable quantity selector

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • EHS_Web
    Junior Member
    • Feb 2014
    • 32

    #1

    Disable quantity selector

    We are a non-profit, member-based organization, so among the things we want to sell are memberships. We have three types of membership, each with two options. I can see how to set these up, in fact, there might be more than one way. But what I can't see is how to ensure that only one membership is bought at a time. To do this, I would like to NOT have the quantity selector box even show up on these particular products. Just an "add to cart" button that automatically adds one membership to the cart. Am I missing something obvious? We have support from a web developer, so even a way to hack these particular products would work for us. If this can be done, then we are prepared to purchase at least the lite version, if not the full version.

    I think the plugin will work well for all our other products, but if I can't solve this issue, then I may have to keep looking for a shopping cart that will do all we want to do.

    TIA.
  • admin
    Administrator
    • Feb 2013
    • 59
    • ***************************
      Josh Jones
      Level Four Development, llc
      ***************************

    #2
    Sure, the best way to go about that then is to use simple CSS to hide the quantity selector box on that particular product page... It would be really easy for a web developer to look at and find the style and the page ID for that particular page and target just the quantity boxes on that page... no reason you can't do that.

    Comment

    • EHS_Web
      Junior Member
      • Feb 2014
      • 32

      #3
      Well, my web developer is extremely busy these days and I have done some web coding in the past, so I thought I might give it a try myself.

      Here is what I think I know so far:

      1. I can add a custom CSS to the window in Store Settings/Advanced Options.
      2. I can use the product ID listed in the Manage Products window as the page id for the product page I want to change.
      3. I think the quantify selector variable is something like product_quantity_input
      4. The CSS command is display:none.

      I'm trying to swat up on my css coding, but I keep getting interrupted, so I wondered if I could shortcut it by simply asking what the correct coding was. At least something to start with.

      TIA.

      Jon

      Comment

      • admin
        Administrator
        • Feb 2013
        • 59
        • ***************************
          Josh Jones
          Level Four Development, llc
          ***************************

        #4
        amazingly, your steps are actually right on... that's what you would do... You can do it per page, which would target a specific product, or you can specify it globally... here are both.


        globally:

        .ec_product_details_quantity {
        display: none;
        }


        or by page:

        .
        page-id-607 .ec_product_details_quantity {
        display: none;
        }


        just replace the page number with yours in the body tag... should work for you.

        Comment

        • EHS_Web
          Junior Member
          • Feb 2014
          • 32

          #5
          Perfect. Works like a charm.

          Thanks Josh.

          Comment

          • EHS_Web
            Junior Member
            • Feb 2014
            • 32

            #6
            Spoke too soon.

            I added this to the Custom CSS:

            .page-id-257 .ec_product_details_quantity {
            display: none;
            }

            But it seems to be acting oddly. It certainly works with the page specified. And other existing products that I checked were not affected. But I just put a new product up, product-id 261, and the quantity selector was disabled on that page as well.

            Any advice?

            TIA

            Jon

            Comment

            • admin
              Administrator
              • Feb 2013
              • 59
              • ***************************
                Josh Jones
                Level Four Development, llc
                ***************************

              #7
              Only thing I can imagine is the page id is the same, changed, perhaps a product removed and it rearranged the page ids? do you have a url I could look at it on both of them?

              thanks

              Comment

              • EHS_Web
                Junior Member
                • Feb 2014
                • 32

                #8
                OK Solved it. I had the wrong page id. I guess the Product ID is not the page ID I needed. I set up the product, added it to a menu then opened it up in my browser and used firebug to determine the page id. Put that into the code and it changed that page but did not affect the other one. So it looks like I'm good now.

                Jon

                Comment

                • ALA
                  Junior Member
                  • Sep 2015
                  • 3

                  #9
                  Thanks for these instructions. This is just what I was looking for. However, when I enter the global css code under the Store Settings/Advanced Options/ Custom CSS, the quantity buttons still show. Do I need to also make changes on the individual products' Advance Product Tracking Options?

                  Comment

                  • admin
                    Administrator
                    • Feb 2013
                    • 59
                    • ***************************
                      Josh Jones
                      Level Four Development, llc
                      ***************************

                    #10
                    I don't know what code you put int he custom CSS section, but something like this would disable ALL quantity selection boxes

                    .ec_product_details_quantity {
                    display: none;
                    }

                    Notice it's just missing the page ID of it.

                    Comment

                    • loriwalderich
                      Junior Member
                      • Jun 2016
                      • 2

                      #11
                      I am having the same issue with quantity showing up on the donations. My client really wants this to disappear.
                      (we have other products that still need quantity selectors so I don't want to eliminate them globally ??? just by product!)

                      The odd thing is that my individual products do not have their own pages. The product detail page instead shows the model number?



                      Please help me figure out the right CSS to remove the quantity selector on all my donation items!

                      Comment

                      • admin
                        Administrator
                        • Feb 2013
                        • 59
                        • ***************************
                          Josh Jones
                          Level Four Development, llc
                          ***************************

                        #12
                        So the best thing to do is first go to advanced settings and turn ON the 'Use Custom Post Types'. This will give every product their own CSS and custom post page in wordpress... this way you can target indvidual products that way with CSS.

                        Then you simply find the page ID in the body tag and target it like this.

                        .page-id-XXX .ec_product_details_quantity {
                        display: none;
                        }

                        Comment

                        • dfloyd8717
                          Junior Member
                          • Jun 2016
                          • 3

                          #13
                          I followed your instructions (cut and pasted) to disable the quantity selector box but it does not work for me. What am I overlooking?

                          Comment

                          • admin
                            Administrator
                            • Feb 2013
                            • 59
                            • ***************************
                              Josh Jones
                              Level Four Development, llc
                              ***************************

                            #14
                            Did you replace the XXX with your page id number?

                            Comment

                            • ALA
                              Junior Member
                              • Sep 2015
                              • 3

                              #15
                              Originally posted by jjones
                              I don't know what code you put int he custom CSS section, but something like this would disable ALL quantity selection boxes

                              .ec_product_details_quantity {
                              display: none;
                              }

                              Notice it's just missing the page ID of it.
                              That is exactly what I've had listed there for over a year now. It has NEVER worked for me. Is there another solution?

                              Comment

                              Working...