osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 
 

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


Go Back   osCommerce and osCMax shopping cart software forums > osCMax v2.0 Forums > osCMax v2 Installation issues

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Reply

 

LinkBack Thread Tools
  #1  
Old 06-04-2007, 04:10 AM
New Member
 
Join Date: Mar 2007
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
nexx is on a distinguished road
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:
Quote:
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Advertisement
  #2  
Old 06-04-2007, 10:53 AM
jpf's Avatar
jpf jpf is offline
Moderator

 
Join Date: Sep 2003
Location: Manitoba, Canada
Posts: 1,808
Thanks: 5
Thanked 105 Times in 91 Posts
Rep Power: 12
jpf is a name known to alljpf is a name known to alljpf is a name known to alljpf is a name known to alljpf is a name known to alljpf is a name known to all
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3  
Old 06-04-2007, 02:34 PM
New Member
 
Join Date: Mar 2007
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
nexx is on a distinguished road
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4  
Old 06-04-2007, 02:45 PM
jpf's Avatar
jpf jpf is offline
Moderator

 
Join Date: Sep 2003
Location: Manitoba, Canada
Posts: 1,808
Thanks: 5
Thanked 105 Times in 91 Posts
Rep Power: 12
jpf is a name known to alljpf is a name known to alljpf is a name known to alljpf is a name known to alljpf is a name known to alljpf is a name known to all
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!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5  
Old 06-05-2007, 04:11 AM
New Member
 
Join Date: Mar 2007
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
nexx is on a distinguished road
Default Re: Comma and point in quantity field (,.)

It's strange but nothing change after installing this contribution.
But thanks for your help.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Advertisement
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Set Start Point Order Number torweb osCMax v2 Features Discussion 1 06-30-2006 04:54 PM
Point of Sale program that will use Oscmax database? Redeye_Joe osCMax v2 Customization/Mods 3 02-08-2006 12:18 AM
Point of Sale KCount osCMax v1.7 Discussion 0 11-14-2004 08:39 AM
Point to Verify help judoka osCommerce 2.2 Modification Help 1 07-08-2003 09:31 PM


All times are GMT -8. The time now is 10:16 PM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
http://www.oscmax.com/forums/
Copyright 2008 osCMax