ZenMagick 0.9.10


zenmagick.store.shared.services.plugins.types\ZMCreditClass
services\plugins\types\ZMCreditClass.php at line 34

Interface ZMCreditClass

ZMCreditClass

public interface ZMCreditClass

Credit class interface.

Author:
DerManoMann
Todo:
return types

Method Summary
void

applyCredit(ZMRequest request)

Apply the available credit.

void

cartIsCovered()

Check if the cart is compeletely covered by credits and skip payments if so.

void

cleanup()

Cleanup.

array

getRedemptionBlockInfo()

Get credit form data for this plugin.

void

updateCreditAccount(ZMShoppingCartItem item)

Update credit account.

boolean

validateRequest(ZMRequest request)

Process checkout.

Method Detail

services\plugins\types\ZMCreditClass.php at line 83

applyCredit

public void applyCredit(ZMRequest request)

Apply the available credit.

Parameters:
request - The current request.
Todo:
should there be some reference object coming from validateRequest or updateCreditAccount?

services\plugins\types\ZMCreditClass.php at line 75

cartIsCovered

public void cartIsCovered()

Check if the cart is compeletely covered by credits and skip payments if so.

Todo:
this is to be implemented in ot_zenmagic only!

services\plugins\types\ZMCreditClass.php at line 88

cleanup

public void cleanup()

Cleanup.


services\plugins\types\ZMCreditClass.php at line 45

getRedemptionBlockInfo

public array getRedemptionBlockInfo()

Get credit form data for this plugin.

In the context of a credit class, this usually consists of form elements to enter a gift voucher number or redemption code.

Returns:
Form data details.
Todo:
specify?

services\plugins\types\ZMCreditClass.php at line 58

updateCreditAccount

public void updateCreditAccount(ZMShoppingCartItem item)

Update credit account.

It's purpose is to decide whether each product in the cart should add something to a credit account. e.g. for the Gift Voucher it checks whether the product is a Gift voucher and then adds the amount to the Gift Voucher account.

Another use would be to check if the product would give reward points and add these to the points/reward account.

Parameters:
item - A single item.
Todo:
drop item, give cart and leave it to implementatio; also, return some reference object to be used later to apply...

services\plugins\types\ZMCreditClass.php at line 68

validateRequest

public boolean validateRequest(ZMRequest request)

Process checkout.

Allows a plugin to process the checkout data (ie. gift voucher, coupon code or other). This is the place to validate that data.

Parameters:
request - The current request.
Returns:
true if the request data is valid with respect to this plugins credit data.

ZenMagick 0.9.10