ivangarnett Posted May 6, 2005 Share Posted May 6, 2005 what is the UNIT of the weight in osCOMMERCE product :'( lb(s) OR KG OR GRM Link to comment Share on other sites More sharing options...
boxtel Posted May 7, 2005 Share Posted May 7, 2005 what is the UNIT of the weight in osCOMMERCE product :'( lb(s) OR KG OR GRM <{POST_SNAPBACK}> whatever you want as long as you use the same site-wide Treasurer MFC Link to comment Share on other sites More sharing options...
boxtel Posted May 7, 2005 Share Posted May 7, 2005 whatever you want as long as you use the same site-wide <{POST_SNAPBACK}> personally I use grams but if the weight gets too large I use : if ($weight >= 1000) { $unit = 'kg'; $weight = $weight / 1000; } else { $unit = DEFAULT_UNIT; } echo $weight . ' ' . $unit; Treasurer MFC Link to comment Share on other sites More sharing options...
ivangarnett Posted May 7, 2005 Author Share Posted May 7, 2005 personally I use grams but if the weight gets too large I use : if ($weight >= 1000) { $unit = 'kg'; $weight = $weight / 1000; } else { $unit = DEFAULT_UNIT; } echo $weight . ' ' . $unit; <{POST_SNAPBACK}> thanks a lot that means the OScommerce using 'Grams",right? however,many shipping modules are using "lbs" ,then how to change"lbs" to "gram"? Do you have the PHP code for this changing? :'( Link to comment Share on other sites More sharing options...
boxtel Posted May 8, 2005 Share Posted May 8, 2005 thanks a lot that means the OScommerce using 'Grams",right? however,many shipping modules are using "lbs" ,then how to change"lbs" to "gram"? Do you have the PHP code for this changing? :'( <{POST_SNAPBACK}> no no, it means that MY osc uses grams because I say that my units in the DB are grams because I enter grams for the weight when inserting products and I calculate everything in grams and my shipping table rate definitions are in grams. You may say they are pounds or kg's or whatever. the modules that have lbs in them usually have that in the language files. So in the language file of table rate simply change the text "lbs" to your unit. Treasurer MFC Link to comment Share on other sites More sharing options...
boxtel Posted May 8, 2005 Share Posted May 8, 2005 no no, it means that MY osc uses grams because I say that my units in the DB are grams because I enter grams for the weight when inserting products and I calculate everything in grams and my shipping table rate definitions are in grams. You may say they are pounds or kg's or whatever. the modules that have lbs in them usually have that in the language files. So in the language file of table rate simply change the text "lbs" to your unit. <{POST_SNAPBACK}> example of the language file of shipping module zones.php : define('MODULE_SHIPPING_ZONES_TEXT_UNITS', 'Gram'); Treasurer MFC Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.