GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Interchange6::Cart::Product(3) User Contributed Perl Documentation Interchange6::Cart::Product(3)

Interchange6::Cart::Product - Cart product class for Interchange6 Shop Machine

Cart product class for Interchange6.

See Interchange6::Role::Costs for details of cost attributes and methods.

See also "ATTRIBUTES" in Interchange6::Role::Costs.

Each cart product has the following attributes:

Can be used by subclasses, e.g. primary key value for cart products in the database.

A reference to the Cart object that this Cart::Product belongs to.
Writer: "set_cart"

Product name is required.

Product price is required and a positive number or zero.

Price is required, because you want to maintain the price that was valid at the time of adding to the cart. Should the price in the shop change in the meantime, it will maintain this price.

Writer: "set_price"

Selling price is the price after group pricing, tier pricing or promotional discounts have been applied. If it is not set then it defaults to "price".
Writer: "set_selling_price"

This is the integer discount percentage calculated from the difference between "price" and "selling_price". This attribute should not normally be set since as it is a calculated value.

"discount_percent" is cleared if either "set_price" or set_selling_price methods are called.

Product quantity is optional and has to be a natural number greater than zero. Default for quantity is 1.

Unique product identifier is required.

If this product is a variant of a "parent" product then "canonical_sku" is the sku of the parent product.

Subtotal calculated as "price" * "quantity". Lazy set via builder.

Product uri

Weight of quantity 1 of this product.

Hash reference of extra things the cart product might want to store such as:
  • variant attributes in order to be able to change variant within cart
  • simple attributes to allow display of them within cart

Indicate whether products with the same SKU should be combined in the Cart
Writer: "combine"

See also "METHODS" in Interchange6::Role::Costs.

  • get_extra($key, $key2, $key3...)

    See "get" in Data::Perl::Role::Collection::Hash

  • set_extra($key => $value, $key2 => $value2...)

    See "set" in Data::Perl::Role::Collection::Hash

  • delete_extra($key, $key2, $key3...)

    See "set" in Data::Perl::Role::Collection::Hash

  • keys_extra

    See "keys" in Data::Perl::Role::Collection::Hash

  • clear_extra

    See "clear" in Data::Perl::Role::Collection::Hash

  • exists_extra($key)

    See "exists" in Data::Perl::Role::Collection::Hash

  • defined_extra($key)

    See "defined" in Data::Perl::Role::Collection::Hash

  • clear_subtotal

    Clears "subtotal".

  • has_subtotal

    predicate on "subtotal".

Returns 1 if "canonical_sku" is defined else 0.

Returns 0 if "canonical_sku" is defined else 1.

Determines whether a product should be combined by sku based on the value of "combine".

If "combine" isa CodeRef the result of applying that CodeRef is returned otherwise: Returns 0 if a product should not be combined Returns 1 if a product should be combined

2016-05-23 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.