Missing Table

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
12 лет назад
When looking at the Object Model for v1.9, I'm noticing a "Product Variant Attribute" table, however there is no such table in the actual database. I'm trying to pull data that's linked between product attributes, product variant attribute values, and product variant attribute combinations. How is Nop able to pull those tables together when adding/modifying a product variant?
12 лет назад
The table you are looking for is:

Nop_ProductVariant_ProductAttribute_Mapping
12 лет назад
Thank you for the response. I'm trying to develop an inventory report and we're using product variant attribute combinations as a means for keeping the stock. Would you have any insight on how to incorporate this table, or any other one for that matter, to help produce inventory results based on combinations of product variant attributes?
12 лет назад
For the attribute combinations stock quantity you should be using the ProductVariantAttributeCombination table.
It maps a product to its attribute combinations together with the stock quantity for these combinations.

The AttributesXml field in this table keeps the ProductVariantAttributeIds and their selected values for the combination. ProductVariantAttributeId is the id of the mapping between the product and product attribute and is taken from the table that I mentioned in the previous post: ProductVariant_ProductAttribute_Mapping
The value is the id of the value of the attribute for this product-attribute mapping (ProductVariantAttribute) and this id is taken from the ProductVariantAttributeValue table.

The xml for the AttributesXml looks like this:


<Attributes>
  <ProductVariantAttribute ID="24">
    <ProductVariantAttributeValue>
      <Value>63</Value>
    </ProductVariantAttributeValue>
  </ProductVariantAttribute>
  <ProductVariantAttribute ID="28">
    <ProductVariantAttributeValue>
      <Value>70</Value>
    </ProductVariantAttributeValue>
  </ProductVariantAttribute>
</Attributes>


Hope this helps.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.