Page 1 of 4 123 ... LastLast
Results 1 to 10 of 37
  1. #1
    Join Date
    Dec 2006
    Posts
    87
    Plugin Contributions
    0

    Default Is It Possible To Make Add To Cart Minimum Unit .5 Like: 1.5 Units

    I Am Trying To Make The Site Go By Yards, Customers Should Be Able To Purchase Like 1.5 or 1 and 1/2 Yards?
    The Prices Vary For Different Fabrics.

    I'm Thinking If They Could Put 1.5 In The Quantity or if there Could be a DropDown box That Shows 1/2 In It. That's Doable in Attributes But Then I have To Enter Two Prices Each time. Like If One Item Is $5 A Yard, I Need To Make The 1/2 In The Attribute to $2.50 And Etc For All The Different Prices.

    So Any Help Or Opinion Is Definitely Appreciated.


    Thanks in Advance.

  2. #2
    Join Date
    Jun 2003
    Posts
    33,721
    Plugin Contributions
    0

    Default Re: Is It Possible To Make Add To Cart Minimum Unit .5 Like: 1.5 Units

    Yes, you can have .5 as a minimum.
    Please do not PM for support issues: a private solution doesn't benefit the community.

    Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

  3. #3
    Join Date
    Dec 2006
    Posts
    87
    Plugin Contributions
    0

    Default Re: Is It Possible To Make Add To Cart Minimum Unit .5 Like: 1.5 Units

    Thank You For Replying.

    Doesn't Seem To Work. I Changed The Minimum Value to 0.5

    I get This Error When I Try To Place An Order:


    Please update your order ...
    Product Name: Blue Dalmations on Cream ... Quantity Units errors -
    You ordered a total of: 0.5 Min: 0.5

  4. #4
    Join Date
    Jan 2004
    Posts
    66,450
    Plugin Contributions
    81

    Default Re: Is It Possible To Make Add To Cart Minimum Unit .5 Like: 1.5 Units

    Try changing /includes/functions/functions_general.php

    from this:
    Code:
    // replacement for fmod to manage values < 1
        function fmod_round($x, $y) {
          $i = fmod($x*1000,$y*1000);
          return $i;
        }
    to this instead:
    Code:
    // replacement for fmod to manage values < 1
      function fmod_round($x, $y) {
        $zc_round =(int)(strval($x)*1000)/(strval($y)*1000);
        $multiplier = $zc_round * $y;
        $results = abs(round($x - $multiplier, 6));
        return $results;
      }
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #5
    Join Date
    Dec 2006
    Posts
    87
    Plugin Contributions
    0

    Default Re: Is It Possible To Make Add To Cart Minimum Unit .5 Like: 1.5 Units

    Thank you for the fast reply.

    It's still not working. It doesn't give the error anymore but it rounds .5 to a 1 anyway.

    Here's the link to the product I'm trying it on: http://www.fabrichotel.com/index.php...roducts_id=670

    Thanks Again.

  6. #6
    Join Date
    Jan 2004
    Posts
    66,450
    Plugin Contributions
    81

    Default Re: Is It Possible To Make Add To Cart Minimum Unit .5 Like: 1.5 Units

    Admin->Configuration->Stock ... what is your setting for "Product Quantity Decimals" ?
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  7. #7
    Join Date
    Dec 2006
    Posts
    87
    Plugin Contributions
    0

    Default Re: Is It Possible To Make Add To Cart Minimum Unit .5 Like: 1.5 Units

    I Have The Option 1 Selected for "Product Quantity Decimals"

    Now I See That In The Cart, It Shows the subtotal as half the actual price and total as full price of 1, and when you actually checkout it's back to the price of Quantity as 1 and not .5

    See below for pictures:




    Last edited by AATECH; 11 Oct 2007 at 10:38 AM.

  8. #8
    Join Date
    Dec 2006
    Posts
    87
    Plugin Contributions
    0

    Default Re: Is It Possible To Make Add To Cart Minimum Unit .5 Like: 1.5 Units

    DrByte Anymore Suggestions? or Anyone who could help?

    Thanks.

  9. #9
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Is It Possible To Make Add To Cart Minimum Unit .5 Like: 1.5 Units

    What are your mininum and unit settings for this product?

    What happens if you switch to Classic Template, does it make a difference?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  10. #10
    Join Date
    Nov 2006
    Posts
    6
    Plugin Contributions
    0

    Default Re: Is It Possible To Make Add To Cart Minimum Unit .5 Like: 1.5 Units

    thanks guys. i had this exact question and believe that it now works fine. values:

    zencart version 1.3.6
    product minimum: 0.5
    product unit: 1
    Product Quantity Decimals: 1

    i also changed the code DrByte referenced to eliminate the cart errors.

 

 
Page 1 of 4 123 ... LastLast

Similar Threads

  1. '0 units in stock', and No Add to Cart
    By WhitePhantom in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 10 Feb 2010, 08:10 PM
  2. Add to Cart Quantity alway shows 1 unit [TPP]
    By digulu in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 24 Jan 2010, 04:38 AM
  3. Can I make zen cart look like this?
    By jwitt98 in forum Templates, Stylesheets, Page Layout
    Replies: 9
    Last Post: 17 Feb 2009, 12:40 AM
  4. Add to Cart Area: Units
    By DesignbyDemeter in forum Basic Configuration
    Replies: 5
    Last Post: 5 Jul 2006, 07:34 PM

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