ePages 7.26.0 - DE_EPAGES/MeinPaket/API/MeinPaketUtil.pm

Package DE_EPAGES::MeinPaket::Hooks::Product

provides utility function for MeinPaket

Package DE_EPAGES::MeinPaket::API::MeinPaketUtil

Functions

getOffersContainingProductWithParent
isLastUploadProductInOffer
isOfferOnline
new
wasOfferUploaded
wasProductUploaded

getOffersContainingProductWithParent

Gets a list of all offers that contain the passed product or sub-product.

Syntax
getOffersContainingProductWithParent( $ProductOrSubProduct );
Input
$ProductOrSubProduct (object)
product to check for offers
Return
(refarray)
list of all offers that contain
the passed product or sub-product.

isLastUploadProductInOffer

Determines wether or not the passed product or sub-product is the last remaining uploaded product in the passed offer.

Syntax
isLastUploadProductInOffer( $ProductOrSubProduct, $MeinPaketOffer );
Input
$ProductOrSubProduct (object)
product to check
$MeinPaketOffer (object)
offer to check
Return
(boolean
0 - otherwise)
1 - if the passed product is the last remaining
uploaded product in the passed offer

isOfferOnline

Determines if the passed offer is marked as online.

Syntax
isOfferOnline( $MeinPaketOffer );
Input
$MeinPaketOffer (DE_EPAGES::MeinPaket::API::Object::MeinPaketOffer)
Offer to check
Return
(boolean)
1 - in case the offer is marked as online
0 - otherwise

new

constructor

Syntax
new();
Return
$self (DE_EPAGES::MeinPaket::API::MeinPaketUtil)
self

wasOfferUploaded

Determines wether or not the passed offer was uploaded

Syntax
wasOfferUploaded( $MeinPaketOffer );
Input
$MeinPaketOffer (object)
offer to check
Return
(boolean
0 - otherwise)
1 - if the offer was uploaded

wasProductUploaded

Determines wether or not the passed product or sub-product has a MeinPaketID attached to it, which is attached once it was successfuly exported to MeinPaket.

Syntax
wasProductUploaded( $ProductOrSubProduct );
Input
$ProductOrSubProduct (object)
product or sub-product to check
Return
(boolean)
1 - if the products has a MeinPaketID
0 - otherwise