makeholer Posted September 18, 2011 Share Posted September 18, 2011 Hello, I just added the command to my database: ALTER TABLE `products` CHANGE `products_weight` `products_weight` DECIMAL( 5, 0 ) NOT NULL And now my website shows the weight in Grams, but i need it back in Kg, what is the command to "undo" this one? Thx. Link to comment Share on other sites More sharing options...
Supertex Posted October 26, 2011 Share Posted October 26, 2011 "DECIMAL( 5, 0 )" means 5 places overall in the weight entry; so 99999 (no decimals). I'm using intuition here, but it seems that it defaults to the assumption that the entry becomes grams if there are no decimals, because few sites will be shipping items that weigh 10,000 Kg. ALTER TABLE 'products' CHANGE 'products_weight' 'products_weight' DECIMAL(5,2) NOT NULL Should restore the DB to the default. If you changed it to (7, 4) then you would be able to enter 7 places overall, with 4 decimals, I.E. 999.9999 Kg If I'm wrong in this, I'd appreciate a more experienced voice's input. I found this post while trying to figure out how to get my site to handle weight resolution in pounds greater than 1/100th. When I saw your post, a light went on for me. At first, I tried changing from 5,2 (default) to 5,4...but that limited my entry to 9.9999. So, swapping 5 for 7 added two places to my whole-number entries. Now I can accurately enter weight for items up to 999.0 lb, yet I can also accommodate very small items that weigh as little as .0001 lb. I'm also assuming that the entry is the same whether using lb or kg...simply a matter of telling the store which unit you're using in Admin UI under: configuration > Shipping/Packaging. osC v2.3.1 MySQL v8.0.32 PHP v5.6.40 Installed addons: . Attribute Sets Plus .. Create Account & Manual Order Maker .. Customer Testimonials 2.3.4 .. Customer Blacklist .. Dynamic Info Pages .. FedEx Web Svcs v9 .. Filtered Sales Report .. Generic Box .. Google XML Sitemap SEO .. Maximum Order Value .. Modular Front Page .. Monthly Sales & Tax Report .. Multiple Products Manager .. Must Accept Terms & Conditions .. Order Editior .. PDF Customer Invoice .. Price in Cart Only .. Product Sort/Order .. Product Sort in Cart .. Quantity Discounts .. Restrict Delivery Methods .. SEO Header Tags - Reloaded .. Separate Pricing Per Customer .. Simpler Admin Session Length Control .. Sitemap SEO .. Show Free Ship + Modules .. Specials by Category for SPPC .. Store Mode (open|closed|maintenance) .. Store Pickup Shipping .. Theme Switcher .. Ultimate SEO URLs 5 Pro .. UPS XML Rates & Svcs 1.4 .. USPS methods 7.3.1 .. Who's Online Dashboard . Fixes: Add to cart -> 'product not found' : FIX Login issues with IE 11 : FIX Tools: Incredibly Handy: osC Xref Link to comment Share on other sites More sharing options...
♥geoffreywalton Posted October 26, 2011 Share Posted October 26, 2011 The weight is not shown in kg, grams or lbs because of the field size, it is down to what you enter for the wt. The unit of wt, to reflect what you entered can be set in the language files. HTH G Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile Virus Threat Scanner My Contributions Basic install answers. Click here for Contributions / Add Ons. UK your site. Site Move. Basic design info. For links mentioned in old answers that are no longer here follow this link Useful Threads. If this post was useful, click the Like This button over there ======>>>>>. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.