购物车为空

Attribute Cross-Validation


The attribute cross-validation module allows shop owners to create dependencies/exclusions between one or more options/option value combinations (something you will see referenced throughout the code documentation as "px_id") and one or more option/option value combinations.

The px_id is directly related to
(and equivalent to) products_options_values_to_products_options_id in the products_options_values_to_products_options
table. in other words, the px_id is a subset of all products_options_values_to_products_options_id.

The products_attrib_cross_validation table relates products_options_values_to_products_options_id (px_id's) to other
products_options_values_to_products_options_id (rel_px_id's) through an action value (act_value) which establishes the
dependency. Action values either establish a dependency between the px_id and rel_px_id (px_id "needs" rel_px_id) or
establishes exclusions (px_id "cannot exist" with rel_px_id).

Ok, here is a less technical example regarding options that cannot exist with other options:

I sell a shirt. The customer can order this shirt with a number of required options (color, size, etc.). Ok, no problem there -
ZenCart handles that out of the box. The shirt also has non-required options: It can be monogrammed with initials entered in a
text box. If the customer wants monogramming, though, they have to tell us where to put the monogram (right sleeve, left sleeve
shirt tail), right? You see where this is going?

If the customer enters INITIALS (in a text box) but doesn't tell us where to put the initials (i.e. "none" on the drop down),
then the system will issue an error and say that INITIALS cannot exists with "none", and conversely "none" cannot exist
with INITIALS. Incidentally, the messages are built dynamically based on the language files and the rule that was violated.

Since we don't know the customer's intent (does he really want initials or not), "cannot exist" rules display messages
for both options included in the setup table (in this case the Initials Text Box and the Initials Location Drop Down error out).

The error messages look like this:

_ On the Option for: Optional Initials "AAA" Cannot Co-exist With Optional Initials Location "none" _
_ On the Option for: Optional Initials Location "none" Cannot Co-exist With Optional Initials "AAA" _


On a similar note here is and example regarding options that require (need) other options:

The customer tells us where to put the initials (eg shirt tail), but doesn't enter text in the text box. In this case we
have set up a rule that says the shirt tail option "needs" text in the initials text box option. When the customer tries to
add the item to the cart, it errors out and says just that -

_ On the Option for: Optional Initials Location "Shirt Tail" Needs Optional Initials "TEXT" _


You can check this out at www.marcyjets.com.


插件版本: 1.2

该商品加入分类的日期为 2015年 01月 03日