milano_jack Posted June 4, 2007 Posted June 4, 2007 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 relevantlines 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 :)
dux Posted June 28, 2007 Posted June 28, 2007 anyone? :'( You also have to change a something a few lines below: $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']))+ $HTTP_POST_VARS['quantity'] , $HTTP_POST_VARS['id']); to $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']))+ $HTTP_POST_VARS['quantity'] = str_replace(",", ".", $HTTP_POST_VARS['quantity']), $HTTP_POST_VARS['id']); I have a heavy modded oscommerce so it might look a bit different for you. My line is found 9 lines below the line you describe.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.