Thread: decimals

Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2008
    Location
    Cleethorpes
    Posts
    1,229
    Plugin Contributions
    6

    red flag decimals

    Hi I need to set up a product that's minimum quantity is 0.01 and the minimum quantity will be 0.01p

    Also the quantity box on the front end needs to accept the decimal with the minimum quantity a person can enter being 0.01.

    If someone comes along and adds say 2.14 quantity then the price would calculate as £2.14

    How would I do this and ensure the quantity box on the front end can accept decimals in the correct place.

    The reason for the above is because I need to set up a product where a customer can pay whatever amount they like in pounds. This is because the payments collected will be on account, they won't be ordering products through the cart, it is literally to collect payments. So in other words the quantity box needs to calculate as if it were calculating a currency value.
    Nick Smith - Venture Design and Print
    https://venturedesignandprint.co.uk

  2. #2
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: 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.

  3. #3
    Join Date
    Sep 2008
    Location
    Cleethorpes
    Posts
    1,229
    Plugin Contributions
    6

    red flag Re: decimals

    Ok thanks for that. Seems to have done what I want although the Unit price seems to want to display as £1 instead of £0.01.

    The total price is more important though and don't need to display a Unit price so can use the stylesheet to disable the display.

    .cartUnitDisplay {
    display:none;
    }
    Nick Smith - Venture Design and Print
    https://venturedesignandprint.co.uk

 

 

Similar Threads

  1. Removing Decimals from Prices
    By voltage in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 16 Oct 2012, 06:00 AM
  2. low prices and decimals
    By procella in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 2
    Last Post: 12 Aug 2009, 07:41 PM
  3. Gift certificate decimals in database...
    By pasi in forum Bug Reports
    Replies: 1
    Last Post: 21 Apr 2007, 03:02 PM
  4. add to cart decimals
    By Parafanaylya in forum Managing Customers and Orders
    Replies: 1
    Last Post: 17 Jun 2006, 06:02 AM

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