Page 1 of 3 123 LastLast
Results 1 to 10 of 23
  1. #1
    Join Date
    Jan 2013
    Posts
    808
    Plugin Contributions
    0

    Default min/max display function

    lets say i have a product that has a min/max of 14.33, this value shows in the qty box on product page. i also have buttons that customer can press qty up or qty down, when pressed it give a qty of 1, i would like it to double the min/max value, ex. 14.33 they click up and value should shows 18.66. or now if they click down it'll go back to 14.33 how can this be accomplished?

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

    Default Re: min/max display function

    Sounds like you also have a unit quantity of 14.33 unless on the third press of increase you expect 57.32 to be the new value.

    Not sure how detailed you are looking for a solution, but you would use the zen_get_products_quantity_order_min($product_id) function to get the minimum value for a given product. To obtain the unit value (can only add in "multiples" of the unit value) then that is obtained from zen_get_products_quantity_order_units($product_id).
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,399
    Plugin Contributions
    87

    Default Re: min/max display function

    @jimmie, could you identify separately, what the product's "Quantity Min", "Quantity Max" and "Quantity Units" settings are. As @mc12345678 indicated above, your description is a bit confusing.

  4. #4
    Join Date
    Jan 2013
    Posts
    808
    Plugin Contributions
    0

    Default Re: min/max display function

    Min and max are both set to 14.33 and unit of 1. 14.33 sq ft per box. Thay arrive at cart and see $1.45 a sq ft. I can only sell by the box so they see 14.33 in qty box if they need to boxes they click up and it goes to 15, they should see 18.66 fir two boxes. Each product has different min max set.
    Last edited by jimmie; 10 Oct 2019 at 03:42 PM.

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

    Default Re: min/max display function

    Quote Originally Posted by jimmie View Post
    Min and max are both set to 14.33 and unit of 1. 14.33 sq ft per box. Thay arrive at cart and see $1.45 a sq ft. I can only sell by the box so they see 14.33 in qty box if they need to boxes they click up and it goes to 15, they should see 18.66 fir two boxes. Each product has different min max set.
    I believe there is a misunderstanding of the fields min, max and unit...

    Min: minimum quantity of product that must be purchased to get any quantity of the product.
    Max: the maximum quantity of the product that can be purchased during any one checkout.
    Unit: the "quantities" at which the product may be purchased at. I.e. A unit of 1 means that can not purchase a part of a quantity and must purchase a multiple that is a whole number. In your situation, you want your customer to purchase in multiples of 14.33 and therefore the unit would need to be set to 14.33 if going to continue offering product in portions of a whole (instead of selling product that come in sizes of 14.33 as a single unit).

    Essentially in this setup, a customer would not be able to add the product to the cart: min of 14.33, max of 14.33 and unit of 1 means that can not exceed 14.33, can not go less than 14.33 and because unit of 1, can not add 14.33 because it is not a multiple of 1.

    To support purchasing in quantities of 14.33 and to default the selection to the first increment, would suggest a minimum of 14.33, unit of 14.33 and maximum to be the largest anticipated maximum to handle that is a multiple of 14.33 or just leave it at the default to not impose a maximum. The same results may be available by not providing a minimum; however, I don't think the code is quite intelligent enough to propose the first unit of quantity if the minimum is less than the unit nor the first unit of quantity acceptable if the unit is less than the minimum.

    Anyways, your button would need to increase/decrease by a unit factor to not go below the minimum nor above the maximum where the initial value is multiple of unit and beginning at a value greater than the minimum.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  6. #6
    Join Date
    Jan 2013
    Posts
    808
    Plugin Contributions
    0

    Default Re: min/max display function

    This is hiw it wirks on a live site Berkeley Plus 12 Mil Luxury Vinyl Plank - Clayton Smoke PFE566 [PFE566] - $1.61 : Flooring Tools & Installation Supplies | jnsflooringandsupplies.com, Wholesale Flooring Tools & Installation Supplies
    http://jnsflooringandsupplies.com/Fl...n_Smoke_PFE566

  7. #7
    Join Date
    Jan 2013
    Posts
    808
    Plugin Contributions
    0

    Default Re: min/max display function

    Zen v 1.51 doesnt have the qty up and down buttons, on 1.56

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

    Default Re: min/max display function

    Quote Originally Posted by jimmie View Post
    Zen v 1.51 doesnt have the qty up and down buttons, on 1.56
    ZC 1.5.1 didn't either. That was something that was added by a module or code change. I know I wrote something to provide up/down buttons/arrows and made it available as a plugin with a forum thread, but it is/was not something built into ZC 1.5.1.

    As far as review of that other site, it works as I suggested by use of min and units only. Unfortunately for them/their customers, the calculator doesn't quite work right. If I put that I had 76 square feet to cover, it only calculated 1 box at 51.33 square feet. I get that there may be some "filler" type dimensions, but that seems extreme. Though I didn't play with the calculator much more, it looks like there is a rounding issue which is why that hard split. Less than 0.5 of a box then no additional boc, more than 0.5 of a box then count as an additional box.

    In either case, I'm not usre what the message about comparison with that site was intending to infer.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  9. #9
    Join Date
    Jan 2013
    Posts
    808
    Plugin Contributions
    0

    Default Re: min/max display function

    that site calculator rounds to nearest box if you put in 76 in you got 51.33, i havent found a way to make the calculator round up no matter what. it suppose to be 101.66 you have to buy by the box, and max when set still allows a customer to add more than max? from site link i sent earlier

  10. #10
    Join Date
    Jan 2013
    Posts
    808
    Plugin Contributions
    0

    Default Re: min/max display function

    Quote Originally Posted by mc12345678 View Post
    ZC 1.5.1 didn't either. That was something that was added by a module or code change. I know I wrote something to provide up/down buttons/arrows and made it available as a plugin with a forum thread, but it is/was not something built into ZC 1.5.1.

    As far as review of that other site, it works as I suggested by use of min and units only. Unfortunately for them/their customers, the calculator doesn't quite work right. If I put that I had 76 square feet to cover, it only calculated 1 box at 51.33 square feet. I get that there may be some "filler" type dimensions, but that seems extreme. Though I didn't play with the calculator much more, it looks like there is a rounding issue which is why that hard split. Less than 0.5 of a box then no additional boc, more than 0.5 of a box then count as an additional box.

    In either case, I'm not usre what the message about comparison with that site was intending to infer.
    also that calculator is what im trying to get working on my 1.56 site i asked you about an edit that i need to put in categories, on another topic

 

 
Page 1 of 3 123 LastLast

Similar Threads

  1. v153 Styleable Min/Max/Unit/Mixed Display
    By lat9 in forum All Other Contributions/Addons
    Replies: 5
    Last Post: 5 Aug 2017, 12:38 PM
  2. Min Unit Max alignment
    By dw08gm in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 19 Oct 2010, 03:09 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