ePages 7.26.0 - DE_EPAGES/ShippingOption/API/ShippingOptionChoice.pm

Package DE_EPAGES::ShippingOption::API::ShippingOptionChoice

Provides functions to insert and save changed choices.

@EXPORT_OK
InsertChoice
NewChoiceImage
GetChoicesNewNames

Functions

GetChoicesNewNames
InsertChoice
NewChoiceImage

GetChoicesNewNames

Returs a data structure with the new names, languageids of a choice.

Syntax
GetChoicesNewNames($Object, $Choice, $FilePath);
Input
$ahFormValues (array.ref)
array of hashes
Return
$hChoicesNewNames (hash.ref)
  • Names - {'Name', 'LangID'} - array of hashes
  • ExistsValue - exists a not empty name - integer

InsertChoice

Inserts a new Choice.

Syntax
InsertChoice($Servlet, $Object, $ahNames, $hValues);
Input
$Servlet (object)
current servlet (contains form data)
$Object (object)
servlet object
$ahNames (array.ref)
array of hashes with localized name and languageid
$hValues (hash.ref)
  • Filename - filename - string
  • Position - choice list position - integer
Return
$Choice (object)
the new choice object

NewChoiceImage

Sets a new choice image for an exsisting choice.

Syntax
NewChoiceImage($Object, $Choice, $FilePath);
Input
$Object (object)
servlet object
$Choice (object)
choice object
$FilePath (string)
image filepath
Return
$AddVars (hash.ref)
return of ScaleImageSizes