separating sku docs from main commerce docs
This commit is contained in:
parent
0701adf7e0
commit
9538fc0440
1 changed files with 69 additions and 0 deletions
69
designdocs/sku.pod
Normal file
69
designdocs/sku.pod
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
=head1 SKU (base product class)
|
||||
|
||||
The SKU class is what all other products will be subclassed from. It
|
||||
needs to be simple so it can be extended to fit any need.
|
||||
|
||||
=head2 Data Dictionary
|
||||
|
||||
The following fields are needed to construct this assets table called
|
||||
E<acirc>E<128>E<156>SKUE<acirc>E<128>E<157>.
|
||||
|
||||
Field Schema Description
|
||||
assetId guid The unique id assigned to this sku that may never change. It's with all assets
|
||||
sku varchar(35) unique The unique id that the shop keeper assigns to this item. It may be changed by the shop keeper. By default this is set equal to assetId.
|
||||
vendorId guid The unique id of the vendor associated with this sku, if any
|
||||
|
||||
=head2 Method Dictionary
|
||||
|
||||
The following methods will be available from the WebGUI::Asset::Sku
|
||||
class.
|
||||
|
||||
=head3 addToCart
|
||||
|
||||
Adds this sku to the shopping cart.
|
||||
|
||||
=head3 applyOptions
|
||||
|
||||
Accepts a configuration data hash reference that can configure a sku a
|
||||
certain way. For example, E<acirc>E<128>E<156>a size XL red
|
||||
t-shirtE<acirc>E<128>E<157> instead of just E<acirc>E<128>E<156>a
|
||||
t-shirtE<acirc>E<128>E<157>.
|
||||
|
||||
param: options E<acirc>E<128>E<147> a hash reference containing the
|
||||
configuration properties returned from getConfiguration()
|
||||
|
||||
=head3 getOptions
|
||||
|
||||
Returns a hash reference of configuration data that can return this sku
|
||||
to a configured state. See applyConfiguration() for details.
|
||||
|
||||
=head3 getMaxAllowedInCart
|
||||
|
||||
By default returns 99999999. Should be overridden by subclasses. For
|
||||
unique items should return 1. For items that have a count in stock,
|
||||
should return the number that are currently in stock.
|
||||
|
||||
=head3 getPrice
|
||||
|
||||
By default return 0.00. Should be overridden by subclasses.
|
||||
|
||||
=head3 isShippingRequired
|
||||
|
||||
By default return 0. Should be overridden by subclasses.
|
||||
|
||||
=head3 newBySku
|
||||
|
||||
Instanciates based on an existing sku, rather than an assetId.
|
||||
|
||||
param: session E<acirc>E<128>E<147> a reference to the current session
|
||||
|
||||
param: sku E<acirc>E<128>E<147> the sku to instanciate
|
||||
|
||||
=head3 processStyle
|
||||
|
||||
Looks up the style from the container and and wrappers the product in
|
||||
it.
|
||||
|
||||
param: html E<acirc>E<128>E<147> the HTML output to be wrapped by the
|
||||
style
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue