Missing Weights in the Product Packaging Settings

Started by cmb, August 19, 2012, 23:47:32 PM

Previous topic - Next topic

cmb

Some weights are missing from the Product Unit options. In Administrator > Components > VirtueMart > Products, select a product for editing, then select the Product Dimensions and Weight tab. In the Product Unit line, more weight options should be added. For instance, the user cannot select pounds even though pounds option is available in the Product Weight setting just above.

Following line 469 of \administrator\components\com_virtuemart\helpers\shopfunctions.php, add:
, 'Pounds'   => JText::_ ('COM_VIRTUEMART_UNIT_SYMBOL_LB')
and others as desired. It would be nice to have Ounces also but see the note on the misspelling below.

Source Code Misspellings
To remove some of the confusion from the source code, the spelling of the weight unit default string should always be the same. In some cases, it is weight_unit_default. Elsewhere it is weigth_unit_default. All the latter instances should be changed to the former. In \administrator\components\com_virtuemart\helpers\shopfunctions.php, change weigth_unit_default to weight_unit_default at lines 454, 455, 462, 469 and 478.

Another confusing item is the misspelled COM_VIRTUEMART_UNIT_SYMBOL_ONCE. It should be COM_VIRTUEMART_UNIT_SYMBOL_OUNCE. Make the changes at:
line 1690 of \administrator\language\de-DE\de-DE.com_virtuemart.ini
line 1622 of \administrator\language\en-GB\en-GB.com_virtuemart.ini
line 1870 of \administrator\language\es-ES\es-ES.com_virtuemart.ini
line 1871 of \administrator\language\fr-FR\fr-FR.com_virtuemart.ini
line 1870 of \administrator\language\it-IT\it-IT.com_virtuemart.ini
line 1870 of \administrator\language\pt-BR\pt-BR.com_virtuemart.ini
line 1870 of \administrator\language\th-TH\th-TH.com_virtuemart.ini

Also correct the spelling if it has been added following line 469 of \administrator\components\com_virtuemart\helpers\shopfunctions.php as part of the changes requested above.

VirtueMart Version 2.0.9b, Joomla 2.5.6
Charles

Milbo

The problem with the weights is that I first added the ones which are requested by the law, ISO blablub.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/