Results 1 to 5 of 5

Comma and point in quantity field (,.)

This is a discussion on Comma and point in quantity field (,.) within the osCmax v2 Installation issues forums, part of the osCmax v2.0 Forums category; Hi, In my shop I want to use point and comma in quantity field (eg. 1,5 and 1.5) because in ...

      
  1. #1
    New Member
    Join Date
    Mar 2007
    Posts
    6
    Rep Power
    0


    Arrow Comma and point in quantity field (,.)

    Hi,

    In my shop I want to use point and comma in quantity field (eg. 1,5 and 1.5) because in my country we use comma as decimal separator (eg. 1,7cm). In google I found this:
    open application_top from /catalog/includes/ and find all relevant
    lines in the switch branch "update_product" and "add_product"

    then use str_replace like this:
    $HTTP_POST_VARS['cart_quantity'][$i] = str_replace(",", ".",
    $HTTP_POST_VARS['cart_quantity'][$i]);
    I use this code in application_top and now in shopping card clients can use , and . in quantity field. But I don't know where to put this code so as to clients use dots and commas (.,) on product page (add_product).

    I will be thankful for your any help or suggestion.

    Ps. sorry for my English. I hope that you understand me

  2. #2
    jpf
    jpf is offline
    osCMax Testing Team
    jpf's Avatar
    Join Date
    Sep 2003
    Location
    Manitoba, Canada
    Posts
    2,688
    Rep Power
    22


    Default Re: Comma and point in quantity field (,.)

    First of all make sure your properly setting the in your main language file - ie: english.php or french.php:

    @setlocale(LC_TIME, 'fr_FR.ISO_8859-1');

    See if finding the correct ISO local might change that for you - but I thought this was for date display.

  3. #3
    New Member
    Join Date
    Mar 2007
    Posts
    6
    Rep Power
    0


    Default Re: Comma and point in quantity field (,.)

    In polish.php I have: setlocale(LC_TIME, 'pl_PL'); I was trying @setlocale(LC_TIME, 'pl_PL.ISO_8859-2'); but nothing change - when I use comma (,) i quantity field, eg. 1,5cm in shopping cart show 1cm.

  4. #4
    jpf
    jpf is offline
    osCMax Testing Team
    jpf's Avatar
    Join Date
    Sep 2003
    Location
    Manitoba, Canada
    Posts
    2,688
    Rep Power
    22


    Default Re: Comma and point in quantity field (,.)

    I tried entering fraction and all I get is whole numbers. French does numbers the same way as your self and that is what came to my mind with commas. You can set your dollars/money to use commas - but for qty they do not STORE fracrtion and only use interger number.

    I think thyou need to change intergers to FLOATS.

    Look at:
    osCommerce: Order fractions or Decimal Quantity


    Good luck!

  5. #5
    New Member
    Join Date
    Mar 2007
    Posts
    6
    Rep Power
    0


    Default Re: Comma and point in quantity field (,.)

    It's strange but nothing change after installing this contribution.
    But thanks for your help.

Similar Threads

  1. Set Start Point Order Number
    By torweb in forum osCMax v2 Features Discussion
    Replies: 1
    Last Post: 06-30-2006, 04:54 PM
  2. Point of Sale program that will use Oscmax database?
    By Redeye_Joe in forum osCmax v2 Customization/Mods
    Replies: 3
    Last Post: 02-08-2006, 12:18 AM
  3. Point of Sale
    By KCount in forum osCmax v1.7 Discussion
    Replies: 0
    Last Post: 11-14-2004, 08:39 AM
  4. Point to Verify help
    By judoka in forum osCommerce 2.2 Modification Help
    Replies: 1
    Last Post: 07-08-2003, 09:31 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
  •