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',
|
title => 'help edit parameter title',
|
||||||
body => 'help edit parameter body',
|
body => 'help edit parameter body',
|
||||||
fields => [
|
fields => [
|
||||||
|
{
|
||||||
|
title => 'edit parameter name',
|
||||||
|
description => 'edit parameter name description',
|
||||||
|
namespace => 'ProductManager',
|
||||||
|
},
|
||||||
],
|
],
|
||||||
related => [
|
related => [
|
||||||
]
|
]
|
||||||
|
|
@ -79,6 +84,26 @@ our $HELP = {
|
||||||
title => 'help edit option title',
|
title => 'help edit option title',
|
||||||
body => 'help edit option body',
|
body => 'help edit option body',
|
||||||
fields => [
|
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 => [
|
related => [
|
||||||
]
|
]
|
||||||
|
|
@ -95,6 +120,26 @@ our $HELP = {
|
||||||
title => 'help edit variant title',
|
title => 'help edit variant title',
|
||||||
body => 'help edit variant body',
|
body => 'help edit variant body',
|
||||||
fields => [
|
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 => [
|
related => [
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -137,7 +137,7 @@ sub www_editProduct {
|
||||||
);
|
);
|
||||||
$f->submit;
|
$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 = WebGUI::HTMLForm->new;
|
||||||
$f->hidden('op', 'editProductParameterSave');
|
$f->hidden(
|
||||||
$f->hidden('parameterId', $parameterId);
|
-name => 'op',
|
||||||
$f->hidden('productId', $productId);
|
-value => 'editProductParameterSave',
|
||||||
|
);
|
||||||
|
$f->hidden(
|
||||||
|
-name => 'parameterId',
|
||||||
|
-value => $parameterId,
|
||||||
|
);
|
||||||
|
$f->hidden(
|
||||||
|
-name => 'productId',
|
||||||
|
-value => $productId,
|
||||||
|
);
|
||||||
$f->readOnly(
|
$f->readOnly(
|
||||||
-label => $i18n->get('parameter ID'),
|
-label => $i18n->get('parameter ID'),
|
||||||
-value => $parameterId,
|
-value => $parameterId,
|
||||||
|
|
@ -199,12 +208,13 @@ sub www_editProductParameter {
|
||||||
$f->text(
|
$f->text(
|
||||||
-name => 'name',
|
-name => 'name',
|
||||||
-label => $i18n->get('edit parameter name'),
|
-label => $i18n->get('edit parameter name'),
|
||||||
|
-hoverHelp => $i18n->get('edit parameter name description'),
|
||||||
-value => $session{form}{name} || $parameter->{name},
|
-value => $session{form}{name} || $parameter->{name},
|
||||||
-maxlength => 64,
|
-maxlength => 64,
|
||||||
);
|
);
|
||||||
$f->submit;
|
$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 = WebGUI::HTMLForm->new;
|
||||||
$f->hidden('op', 'editProductParameterOptionSave');
|
$f->hidden(
|
||||||
$f->hidden('optionId', $optionId);
|
-name => 'op',
|
||||||
$f->hidden('parameterId', $session{form}{parameterId});
|
-value => 'editProductParameterOptionSave',
|
||||||
|
);
|
||||||
|
$f->hidden(
|
||||||
|
-name => 'optionId',
|
||||||
|
-value => $optionId,
|
||||||
|
);
|
||||||
|
$f->hidden(
|
||||||
|
-name => 'parameterId',
|
||||||
|
-value => $session{form}{parameterId},
|
||||||
|
);
|
||||||
$f->readOnly(
|
$f->readOnly(
|
||||||
-label => $i18n->get('option ID'),
|
-label => $i18n->get('option ID'),
|
||||||
-value => $optionId
|
-value => $optionId
|
||||||
|
|
@ -269,30 +288,34 @@ sub www_editProductParameterOption {
|
||||||
$f->text(
|
$f->text(
|
||||||
-name => 'value',
|
-name => 'value',
|
||||||
-label => $i18n->get('edit option value'),
|
-label => $i18n->get('edit option value'),
|
||||||
|
-hoverHelp => $i18n->get('edit option value description'),
|
||||||
-value => $session{form}{value} || $option->{value},
|
-value => $session{form}{value} || $option->{value},
|
||||||
-maxlength => 64,
|
-maxlength => 64,
|
||||||
);
|
);
|
||||||
$f->float(
|
$f->float(
|
||||||
-name => 'priceModifier',
|
-name => 'priceModifier',
|
||||||
-label => $i18n->get('edit option price modifier'),
|
-label => $i18n->get('edit option price modifier'),
|
||||||
|
-hoverHelp => $i18n->get('edit option price modifier description'),
|
||||||
-value => $session{form}{priceModifier} || $option->{priceModifier},
|
-value => $session{form}{priceModifier} || $option->{priceModifier},
|
||||||
-maxlength => 11,
|
-maxlength => 11,
|
||||||
);
|
);
|
||||||
$f->float(
|
$f->float(
|
||||||
-name => 'weightModifier',
|
-name => 'weightModifier',
|
||||||
-label => $i18n->get('edit option weight modifier'),
|
-label => $i18n->get('edit option weight modifier'),
|
||||||
|
-hoverHelp => $i18n->get('edit option weight modifier description'),
|
||||||
-value => $session{form}{weightModifier} || $option->{weightModifier},
|
-value => $session{form}{weightModifier} || $option->{weightModifier},
|
||||||
-maxlength => 7,
|
-maxlength => 7,
|
||||||
);
|
);
|
||||||
$f->text(
|
$f->text(
|
||||||
-name => 'skuModifier',
|
-name => 'skuModifier',
|
||||||
-label => $i18n->get('edit option sku modifier'),
|
-label => $i18n->get('edit option sku modifier'),
|
||||||
|
-hoverHelp => $i18n->get('edit option sku modifier description'),
|
||||||
-value => $session{form}{skuModifier} || $option->{skuModifier},
|
-value => $session{form}{skuModifier} || $option->{skuModifier},
|
||||||
-maxlength => 64,
|
-maxlength => 64,
|
||||||
);
|
);
|
||||||
$f->submit;
|
$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(
|
$f->float(
|
||||||
-name => 'price',
|
-name => 'price',
|
||||||
-label => $i18n->get('price override'),
|
-label => $i18n->get('price override'),
|
||||||
|
-hoverHelp => $i18n->get('price override description'),
|
||||||
-value => $variant->{priceOverride} ? $variant->{price} : ''
|
-value => $variant->{priceOverride} ? $variant->{price} : ''
|
||||||
);
|
);
|
||||||
$f->float(
|
$f->float(
|
||||||
-name => 'weight',
|
-name => 'weight',
|
||||||
-label => $i18n->get('weight override'),
|
-label => $i18n->get('weight override'),
|
||||||
|
-hoverHelp => $i18n->get('weight override description'),
|
||||||
-value => $variant->{weightOverride} ? $variant->{weight} : ''
|
-value => $variant->{weightOverride} ? $variant->{weight} : ''
|
||||||
);
|
);
|
||||||
$f->text(
|
$f->text(
|
||||||
-name => 'sku',
|
-name => 'sku',
|
||||||
-label => $i18n->get('sku override'),
|
-label => $i18n->get('sku override'),
|
||||||
|
-hoverHelp => $i18n->get('sku override description'),
|
||||||
-value => $variant->{skuOverride} ? $variant->{sku} : ''
|
-value => $variant->{skuOverride} ? $variant->{sku} : ''
|
||||||
);
|
);
|
||||||
$f->yesNo(
|
$f->yesNo(
|
||||||
-name => 'available',
|
-name => 'available',
|
||||||
-label => $i18n->get('available'),
|
-label => $i18n->get('available'),
|
||||||
|
-hoverHelp => $i18n->get('available description'),
|
||||||
-value => $variant->{available}
|
-value => $variant->{available}
|
||||||
);
|
);
|
||||||
$f->submit;
|
$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;
|
$f->submit;
|
||||||
$output .= $f->print;
|
$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>';
|
$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::submit;
|
||||||
$output .= WebGUI::Form::formFooter;
|
$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>';
|
$output .= '<br>';
|
||||||
}
|
}
|
||||||
|
|
||||||
return _submenu($output, 'manage product', 'manage product');
|
return _submenu($output, 'manage product', 'manage product', 'ProductManager');
|
||||||
}
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
|
|
||||||
|
|
@ -375,22 +375,24 @@ are:<p>
|
||||||
message => q|Parameters define the variables of your product, like 'Color' or
|
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
|
'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
|
for the name of the template variable pointing to this parameter in the
|
||||||
SKU Template.<br>
|
SKU Template.<p>
|
||||||
<br>
|
|
||||||
<span style="font-weight: bold;">Name</span><br>
|
|
||||||
<div style="margin-left: 40px;">The name of this parameter.<br>
|
|
||||||
</div>
|
|
||||||
<br>
|
|
||||||
If you add a new parameter, you will be taken to the SKU Template edit
|
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
|
screen when you click on 'Save'. This allows you to add this parameter
|
||||||
to the SKU Template of the product.<br>
|
to the SKU Template of the product.<p>
|
||||||
<br>
|
|
||||||
If you edit an existing parameter the SKU Template should be
|
If you edit an existing parameter the SKU Template should be
|
||||||
updated automatically and you will be taken back to the Manage product
|
updated automatically and you will be taken back to the Manage product
|
||||||
screen after clicking 'Save'.<br>|,
|
screen after clicking 'Save'.<p>
|
||||||
lastUpdated => 0,
|
|,
|
||||||
|
lastUpdated => 1122609076,
|
||||||
context => q|The body of the edit parameter help page|
|
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' => {
|
'help edit option title' => {
|
||||||
message => q|Edit option|,
|
message => q|Edit option|,
|
||||||
lastUpdated => 0,
|
lastUpdated => 0,
|
||||||
|
|
@ -398,34 +400,34 @@ screen after clicking 'Save'.<br>|,
|
||||||
},
|
},
|
||||||
'help edit option body' => {
|
'help edit option body' => {
|
||||||
message => q|Options are the values a parameter can take, like 'Blue', 'Red' or
|
message => q|Options are the values a parameter can take, like 'Blue', 'Red' or
|
||||||
'Grey'.<br>
|
'Grey'.<p>
|
||||||
<br>
|
Options consist of several modifiers.<p>
|
||||||
Options consist of several modifiers.<br>
|
|,
|
||||||
<br>
|
lastUpdated => 1122609429,
|
||||||
<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,
|
|
||||||
context => q|The body of the edit option help page|
|
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' => {
|
'help list variants title' => {
|
||||||
message => q|List product variants|,
|
message => q|List product variants|,
|
||||||
lastUpdated => 0,
|
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
|
message => q|Product variants have their price, weight and SKU automatically
|
||||||
generated by WebGUI. Mostly this is exactly what you want, but
|
generated by WebGUI. Mostly this is exactly what you want, but
|
||||||
sometimes you'll want to override one or more of these properties. For
|
sometimes you'll want to override one or more of these properties. For
|
||||||
example if you want to discount some variants. <br>
|
example if you want to discount some variants. <p>
|
||||||
<br>
|
|
||||||
This is the place to set those overrides. Form fields that are empty
|
This is the place to set those overrides. Form fields that are empty
|
||||||
have their value automatically calculated by WebGUI where those that
|
have their value automatically calculated by WebGUI where those that
|
||||||
contain data will set the corresponding property to that value.<br>
|
contain data will set the corresponding property to that value.<p>
|
||||||
<br>
|
|
||||||
If you have overridden a field but want to return it to the generated
|
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.
|
value simply empty it and WebGUI will regenerate the value for it.
|
||||||
Please note that a field containing only spaces is not empty.<br>
|
Please note that a field containing only spaces is not empty.<p>
|
||||||
<br>
|
|
||||||
The overrides you can set for a product variant are:<br>
|
The overrides you can set for a product variant are:<p>
|
||||||
<br>
|
|,
|
||||||
<span style="font-weight: bold;">Price override<br>
|
lastUpdated => 1122609743,
|
||||||
</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,
|
|
||||||
context => q|The body of the edit variant help page|
|
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' => {
|
'help edit sku template title' => {
|
||||||
message => q|Edit SKU template|,
|
message => q|Edit SKU template|,
|
||||||
lastUpdated => 0,
|
lastUpdated => 0,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue