Announcement

Collapse
No announcement yet.

Disable quantity selector

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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.

  • #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


    • #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


      • #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


        • #5
          Perfect. Works like a charm.

          Thanks Josh.

          Comment


          • #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


            • #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


              • #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


                • #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


                  • #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


                    • #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?

                      http://dev.tulsaopera.com/?model_number=3783386

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

                      Comment


                      • #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


                        • #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


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

                            Comment


                            • #15
                              Originally posted by jjones View Post
                              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...
                              X