convert to hover help
This commit is contained in:
parent
3015b7877b
commit
2264a7a2a4
3 changed files with 153 additions and 82 deletions
|
|
@ -71,6 +71,11 @@ our $HELP = {
|
|||
title => 'help edit parameter title',
|
||||
body => 'help edit parameter body',
|
||||
fields => [
|
||||
{
|
||||
title => 'edit parameter name',
|
||||
description => 'edit parameter name description',
|
||||
namespace => 'ProductManager',
|
||||
},
|
||||
],
|
||||
related => [
|
||||
]
|
||||
|
|
@ -79,6 +84,26 @@ our $HELP = {
|
|||
title => 'help edit option title',
|
||||
body => 'help edit option body',
|
||||
fields => [
|
||||
{
|
||||
title => 'edit option value',
|
||||
description => 'edit option value description',
|
||||
namespace => 'ProductManager',
|
||||
},
|
||||
{
|
||||
title => 'edit option price modifier',
|
||||
description => 'edit option price modifier description',
|
||||
namespace => 'ProductManager',
|
||||
},
|
||||
{
|
||||
title => 'edit option weight modifier',
|
||||
description => 'edit option weight modifier description',
|
||||
namespace => 'ProductManager',
|
||||
},
|
||||
{
|
||||
title => 'edit option sku modifier',
|
||||
description => 'edit option sku modifier description',
|
||||
namespace => 'ProductManager',
|
||||
},
|
||||
],
|
||||
related => [
|
||||
]
|
||||
|
|
@ -95,6 +120,26 @@ our $HELP = {
|
|||
title => 'help edit variant title',
|
||||
body => 'help edit variant body',
|
||||
fields => [
|
||||
{
|
||||
title => 'price override',
|
||||
description => 'price override description',
|
||||
namespace => 'ProductManager',
|
||||
},
|
||||
{
|
||||
title => 'weight override',
|
||||
description => 'weight override description',
|
||||
namespace => 'ProductManager',
|
||||
},
|
||||
{
|
||||
title => 'sku override',
|
||||
description => 'sku override description',
|
||||
namespace => 'ProductManager',
|
||||
},
|
||||
{
|
||||
title => 'available',
|
||||
description => 'available description',
|
||||
namespace => 'ProductManager',
|
||||
},
|
||||
],
|
||||
related => [
|
||||
]
|
||||
|
|
|
|||
|
|
@ -137,7 +137,7 @@ sub www_editProduct {
|
|||
);
|
||||
$f->submit;
|
||||
|
||||
return _submenu($f->print, 'edit product', 'edit product');
|
||||
return _submenu($f->print, 'edit product', 'edit product', 'ProductManager');
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -189,9 +189,18 @@ sub www_editProductParameter {
|
|||
}
|
||||
|
||||
$f = WebGUI::HTMLForm->new;
|
||||
$f->hidden('op', 'editProductParameterSave');
|
||||
$f->hidden('parameterId', $parameterId);
|
||||
$f->hidden('productId', $productId);
|
||||
$f->hidden(
|
||||
-name => 'op',
|
||||
-value => 'editProductParameterSave',
|
||||
);
|
||||
$f->hidden(
|
||||
-name => 'parameterId',
|
||||
-value => $parameterId,
|
||||
);
|
||||
$f->hidden(
|
||||
-name => 'productId',
|
||||
-value => $productId,
|
||||
);
|
||||
$f->readOnly(
|
||||
-label => $i18n->get('parameter ID'),
|
||||
-value => $parameterId,
|
||||
|
|
@ -199,12 +208,13 @@ sub www_editProductParameter {
|
|||
$f->text(
|
||||
-name => 'name',
|
||||
-label => $i18n->get('edit parameter name'),
|
||||
-hoverHelp => $i18n->get('edit parameter name description'),
|
||||
-value => $session{form}{name} || $parameter->{name},
|
||||
-maxlength => 64,
|
||||
);
|
||||
$f->submit;
|
||||
|
||||
return _submenu($f->print, 'edit parameter', 'edit parameter');
|
||||
return _submenu($f->print, 'edit parameter', 'edit parameter', 'ProductManager');
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -259,9 +269,18 @@ sub www_editProductParameterOption {
|
|||
}
|
||||
|
||||
$f = WebGUI::HTMLForm->new;
|
||||
$f->hidden('op', 'editProductParameterOptionSave');
|
||||
$f->hidden('optionId', $optionId);
|
||||
$f->hidden('parameterId', $session{form}{parameterId});
|
||||
$f->hidden(
|
||||
-name => 'op',
|
||||
-value => 'editProductParameterOptionSave',
|
||||
);
|
||||
$f->hidden(
|
||||
-name => 'optionId',
|
||||
-value => $optionId,
|
||||
);
|
||||
$f->hidden(
|
||||
-name => 'parameterId',
|
||||
-value => $session{form}{parameterId},
|
||||
);
|
||||
$f->readOnly(
|
||||
-label => $i18n->get('option ID'),
|
||||
-value => $optionId
|
||||
|
|
@ -269,30 +288,34 @@ sub www_editProductParameterOption {
|
|||
$f->text(
|
||||
-name => 'value',
|
||||
-label => $i18n->get('edit option value'),
|
||||
-hoverHelp => $i18n->get('edit option value description'),
|
||||
-value => $session{form}{value} || $option->{value},
|
||||
-maxlength => 64,
|
||||
);
|
||||
$f->float(
|
||||
-name => 'priceModifier',
|
||||
-label => $i18n->get('edit option price modifier'),
|
||||
-hoverHelp => $i18n->get('edit option price modifier description'),
|
||||
-value => $session{form}{priceModifier} || $option->{priceModifier},
|
||||
-maxlength => 11,
|
||||
);
|
||||
$f->float(
|
||||
-name => 'weightModifier',
|
||||
-label => $i18n->get('edit option weight modifier'),
|
||||
-hoverHelp => $i18n->get('edit option weight modifier description'),
|
||||
-value => $session{form}{weightModifier} || $option->{weightModifier},
|
||||
-maxlength => 7,
|
||||
);
|
||||
$f->text(
|
||||
-name => 'skuModifier',
|
||||
-label => $i18n->get('edit option sku modifier'),
|
||||
-hoverHelp => $i18n->get('edit option sku modifier description'),
|
||||
-value => $session{form}{skuModifier} || $option->{skuModifier},
|
||||
-maxlength => 64,
|
||||
);
|
||||
$f->submit;
|
||||
|
||||
return _submenu($f->print, 'edit option', 'edit option');
|
||||
return _submenu($f->print, 'edit option', 'edit option', 'ProductManager');
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -342,26 +365,30 @@ sub www_editProductVariant {
|
|||
$f->float(
|
||||
-name => 'price',
|
||||
-label => $i18n->get('price override'),
|
||||
-hoverHelp => $i18n->get('price override description'),
|
||||
-value => $variant->{priceOverride} ? $variant->{price} : ''
|
||||
);
|
||||
$f->float(
|
||||
-name => 'weight',
|
||||
-label => $i18n->get('weight override'),
|
||||
-hoverHelp => $i18n->get('weight override description'),
|
||||
-value => $variant->{weightOverride} ? $variant->{weight} : ''
|
||||
);
|
||||
$f->text(
|
||||
-name => 'sku',
|
||||
-label => $i18n->get('sku override'),
|
||||
-hoverHelp => $i18n->get('sku override description'),
|
||||
-value => $variant->{skuOverride} ? $variant->{sku} : ''
|
||||
);
|
||||
$f->yesNo(
|
||||
-name => 'available',
|
||||
-label => $i18n->get('available'),
|
||||
-hoverHelp => $i18n->get('available description'),
|
||||
-value => $variant->{available}
|
||||
);
|
||||
$f->submit;
|
||||
|
||||
return _submenu($f->print, 'edit variant', 'edit variant');
|
||||
return _submenu($f->print, 'edit variant', 'edit variant', 'ProductManager');
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -405,7 +432,7 @@ sub www_editSkuTemplate {
|
|||
$f->submit;
|
||||
$output .= $f->print;
|
||||
|
||||
return _submenu($output, 'edit sku composition label', 'edit sku template');
|
||||
return _submenu($output, 'edit sku composition label', 'edit sku template', 'ProductManager');
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -445,7 +472,7 @@ sub www_listProducts {
|
|||
}
|
||||
$output .= '</table>';
|
||||
|
||||
return _submenu($output, 'list products', 'list products');
|
||||
return _submenu($output, 'list products', 'list products', 'ProductManager');
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -507,7 +534,7 @@ sub www_listProductVariants {
|
|||
$output .= WebGUI::Form::submit;
|
||||
$output .= WebGUI::Form::formFooter;
|
||||
|
||||
return _submenu($output, 'list variants label', 'list variants');
|
||||
return _submenu($output, 'list variants label', 'list variants', 'ProductManager');
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -571,7 +598,7 @@ sub www_manageProduct {
|
|||
$output .= '<br>';
|
||||
}
|
||||
|
||||
return _submenu($output, 'manage product', 'manage product');
|
||||
return _submenu($output, 'manage product', 'manage product', 'ProductManager');
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
|
|||
|
|
@ -375,22 +375,24 @@ are:<p>
|
|||
message => q|Parameters define the variables of your product, like 'Color' or
|
||||
'Size'. A parameter only has a name. This name will also be used
|
||||
for the name of the template variable pointing to this parameter in the
|
||||
SKU Template.<br>
|
||||
<br>
|
||||
<span style="font-weight: bold;">Name</span><br>
|
||||
<div style="margin-left: 40px;">The name of this parameter.<br>
|
||||
</div>
|
||||
<br>
|
||||
SKU Template.<p>
|
||||
If you add a new parameter, you will be taken to the SKU Template edit
|
||||
screen when you click on 'Save'. This allows you to add this parameter
|
||||
to the SKU Template of the product.<br>
|
||||
<br>
|
||||
to the SKU Template of the product.<p>
|
||||
|
||||
If you edit an existing parameter the SKU Template should be
|
||||
updated automatically and you will be taken back to the Manage product
|
||||
screen after clicking 'Save'.<br>|,
|
||||
lastUpdated => 0,
|
||||
screen after clicking 'Save'.<p>
|
||||
|,
|
||||
lastUpdated => 1122609076,
|
||||
context => q|The body of the edit parameter help page|
|
||||
},
|
||||
|
||||
'edit parameter name description' => {
|
||||
message => q|The name of this parameter.<p>|,
|
||||
lastUpdated => 1122609059,
|
||||
},
|
||||
|
||||
'help edit option title' => {
|
||||
message => q|Edit option|,
|
||||
lastUpdated => 0,
|
||||
|
|
@ -398,34 +400,34 @@ screen after clicking 'Save'.<br>|,
|
|||
},
|
||||
'help edit option body' => {
|
||||
message => q|Options are the values a parameter can take, like 'Blue', 'Red' or
|
||||
'Grey'.<br>
|
||||
<br>
|
||||
Options consist of several modifiers.<br>
|
||||
<br>
|
||||
<span style="font-weight: bold;">Value</span><br>
|
||||
<div style="margin-left: 40px;">The value of this option (ie. 'Blue').<br>
|
||||
</div>
|
||||
<br>
|
||||
<span style="font-weight: bold;">Price modifier<br>
|
||||
</span>
|
||||
<div style="margin-left: 40px;">The amount this option adds to the
|
||||
default price for product variants containig this option.<br>
|
||||
<br>
|
||||
</div>
|
||||
<span style="font-weight: bold;">Weight modifier<br>
|
||||
</span>
|
||||
<div style="margin-left: 40px;">The weight this option adds to the
|
||||
default weight for product variants consisting of this option.<br>
|
||||
<br>
|
||||
</div>
|
||||
<span style="font-weight: bold;">SKU modifier<br>
|
||||
</span>
|
||||
<div style="margin-left: 40px;">The value that the template variable of
|
||||
the parameter this is an option of in the SKU template takes.<br>
|
||||
</div>|,
|
||||
lastUpdated => 0,
|
||||
'Grey'.<p>
|
||||
Options consist of several modifiers.<p>
|
||||
|,
|
||||
lastUpdated => 1122609429,
|
||||
context => q|The body of the edit option help page|
|
||||
},
|
||||
'edit option value description' => {
|
||||
message => q|The value of this option (ie. 'Blue').<p>|,
|
||||
lastUpdated => 1122609417,
|
||||
},
|
||||
|
||||
'edit option price modifier description' => {
|
||||
message => q|The amount this option adds to the
|
||||
default price for product variants containig this option.<p>|,
|
||||
lastUpdated => 1122609417,
|
||||
},
|
||||
|
||||
'edit option weight modifier description' => {
|
||||
message => q|The weight this option adds to the
|
||||
default weight for product variants consisting of this option.<p>|,
|
||||
lastUpdated => 1122609417,
|
||||
},
|
||||
|
||||
'edit option sku modifier description' => {
|
||||
message => q|The value that the template variable of
|
||||
the parameter this is an option of in the SKU template takes.<p>|,
|
||||
lastUpdated => 1122609417,
|
||||
},
|
||||
'help list variants title' => {
|
||||
message => q|List product variants|,
|
||||
lastUpdated => 0,
|
||||
|
|
@ -472,44 +474,41 @@ button next to the variant you want to edit.<br>|,
|
|||
message => q|Product variants have their price, weight and SKU automatically
|
||||
generated by WebGUI. Mostly this is exactly what you want, but
|
||||
sometimes you'll want to override one or more of these properties. For
|
||||
example if you want to discount some variants. <br>
|
||||
<br>
|
||||
example if you want to discount some variants. <p>
|
||||
|
||||
This is the place to set those overrides. Form fields that are empty
|
||||
have their value automatically calculated by WebGUI where those that
|
||||
contain data will set the corresponding property to that value.<br>
|
||||
<br>
|
||||
contain data will set the corresponding property to that value.<p>
|
||||
|
||||
If you have overridden a field but want to return it to the generated
|
||||
value simply empty it and WebGUI will regenerate the value for it.
|
||||
Please note that a field containing only spaces is not empty.<br>
|
||||
<br>
|
||||
The overrides you can set for a product variant are:<br>
|
||||
<br>
|
||||
<span style="font-weight: bold;">Price override<br>
|
||||
</span>
|
||||
<div style="margin-left: 40px;">Here you can set the price for this
|
||||
varaint.<br>
|
||||
</div>
|
||||
<br>
|
||||
<span style="font-weight: bold;">Weight override<br>
|
||||
</span>
|
||||
<div style="margin-left: 40px;">Here you can set yhe weight of this
|
||||
variant.<br>
|
||||
</div>
|
||||
<br>
|
||||
<span style="font-weight: bold;">SKU override<br>
|
||||
</span>
|
||||
<div style="margin-left: 40px;">Here you can set the SKU of this
|
||||
variant.<br>
|
||||
</div>
|
||||
<br>
|
||||
<span style="font-weight: bold;">Available<br>
|
||||
</span>
|
||||
<div style="margin-left: 40px;">This sets whether this variant is
|
||||
available for purchase.<br>
|
||||
</div>|,
|
||||
lastUpdated => 0,
|
||||
Please note that a field containing only spaces is not empty.<p>
|
||||
|
||||
The overrides you can set for a product variant are:<p>
|
||||
|,
|
||||
lastUpdated => 1122609743,
|
||||
context => q|The body of the edit variant help page|
|
||||
},
|
||||
'price override description' => {
|
||||
message => q|Here you can set the price for this variant.<p>|,
|
||||
lastUpdated => 1122609731,
|
||||
},
|
||||
|
||||
'weight override description' => {
|
||||
message => q|Here you can set yhe weight of this variant.<p>|,
|
||||
lastUpdated => 1122609731,
|
||||
},
|
||||
|
||||
'sku override description' => {
|
||||
message => q|Here you can set the SKU of this variant.<p>|,
|
||||
lastUpdated => 1122609731,
|
||||
},
|
||||
|
||||
'available description' => {
|
||||
message => q|This sets whether this variant is available for purchase.<p>|,
|
||||
lastUpdated => 1122609731,
|
||||
},
|
||||
|
||||
'help edit sku template title' => {
|
||||
message => q|Edit SKU template|,
|
||||
lastUpdated => 0,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue