I would like to display the shipping options in a table if possible or at least, with radio button selection as you can with an attribute. Can anyone shed any light on how to this? Any help much appreciated.
Jethro
Jethro
# # Start the SELECT tag # $sSelectHTML = "<SELECT ID='lstClass' NAME='ShippingClass'>\n"; foreach $phashShipping (@::s_arrSortedShippingHashes) # for each shipping option { # # Handle the label by appending the cost if we're displaying prices # $sClassLabel = $$phashShipping{ShippingLabel}; if ($::s_Ship_bDisplayPrices) # displaying prices? { my (@PriceResponse) = ActinicOrder::FormatPrice($$phashShipping{Cost}, $::TRUE, \%::s_Ship_PriceFormatBlob); $sClassLabel .= sprintf($sPriceLabelFormat, $PriceResponse[2]); # add the price to the label } # # Set the SELECTED attribute # $sClassID = $$phashShipping{ShippingClass}; my $sSelected = ($sClassID eq $::s_hashShipData{'ShippingClass'}) ? # if this one is the current selection 'SELECTED ': # make it the selected value else ''; # just another value # # Format as an OPTION tag # $sSelectHTML .= sprintf("<OPTION %s Value='%s'>%s\n", $sSelected, $sClassID, $sClassLabel); } # # End the SELECT tag # $sSelectHTML .= "</SELECT>\n"; }
# # Start the RADIO list # $sSelectHTML = ''; foreach $phashShipping (@::s_arrSortedShippingHashes) # for each shipping option { # # Handle the label by appending the cost if we're displaying prices # $sClassLabel = $$phashShipping{ShippingLabel}; if ($::s_Ship_bDisplayPrices) # displaying prices? { my (@PriceResponse) = ActinicOrder::FormatPrice($$phashShipping{Cost}, $::TRUE, \%::s_Ship_PriceFormatBlob); $sClassLabel .= sprintf($sPriceLabelFormat, $PriceResponse[2]); # add the price to the label } # # Set the CHECKED attribute # $sClassID = $$phashShipping{ShippingClass}; my $sSelected = ($sClassID eq $::s_hashShipData{'ShippingClass'}) ? # if this one is the current selection 'checked ': # make it the selected value else ''; # just another value # # Format as an RADIO tag # $sSelectHTML .= sprintf("<input type='radio' %s NAME='ShippingClass' Value='%s'>%s\n", $sSelected, $sClassID, $sClassLabel); } }
$sSelectHTML .= sprintf("<input type='radio' %s NAME='ShippingClass' Value='%s'>%s\n",
$sSelectHTML .= sprintf("<input type='radio' %s NAME='ShippingClass' Value='%s'>%s<br>\n",
Comment