Skip to content
  • There are no suggestions because the search field is empty.

Testing Magento Product and Inventory Updates

Test Magento Product and Inventory Updates

Magento 1 and 2


Scenarios for disappearing products, see https://support.omnivore.com.au/testing-products-that-should-not-be-listed

Key points

Fields

  • metadata
    • active
    • processed
    • parent ids
    • lastChangedInFeed
    • lastUpdatedFromFeed
  • product
    • lifecycle

Steps

  • retrieve metadata
    • before retrieving metadata
    • retrieving metadata
    • after retrieving metadata
  • metadata to multi-variant product
  • metadata to single-variant product

Scenarios


Magento

  • Created Simple
  • Created Configurable (grouped)
  • Created (Disabled)
  • No Change
  • Updated
  • Parent Updated
  • Child Updated
  • Disabled
  • Vanished
  • Enable
  • Reappeared 
  • Child Added
  • Child Removed
  • Parent Added
  • Parent Removed
  • SKU changed
  • SKU re-used
  • SKU re-used and type changes?

Omnivore

  • Field Mapping Change
  • Grouped products configuration change
  • Bundle products configuration change
  • Quantity cap
  • Stock override

Data Source

  • Product Summary Interface to Metadata records (Magento 1 and 2)
  • Product discover, Queued Product, Magento API calls (Magento 1)
  • "Update from Magento" button (Magento API calls, Magento 1)
  • Download Product Summary (in one big JSON file, Magento 1 - one retailer only)

Metadata

  • simples before parent
  • parent before simples
  • simples before and after parent

Filtering

  • status is disabled
  • visibility is 'not visible individually' (Note: grouped products and useInvisibleSimpleProducts behaviour)
  • config exclude metadata rules
  • type is not simple, configurable, grouped and bundle depending on configuration
  • 'is blocked' mapped field
    • in Magento 2 stops metadata import
    • in Magento 1 the metadata is still imported

Issues

  • metadata.parent_ids is updated when processing metadata to multi variant products
  • product.metadata and metadata.product soft and hard releationships

More disappearing Magento products scenarios


A simple Magento product corresponding to a single variant Omnivore product is deleted, ie the product metadata in Omnivore becomes active = false.

Addressed in Magento2Service.inactivateProducts()

Tested in ...

A configurable or grouped product corresponding to a multi variant Omnivore product is deleted.

Addressed in Magento2Service.inactivateProducts()

A simple Magento product corresponding to a single variant of a multi variant Omnivore product is deleted, but the master configurable is not changed at all.

Addressed in ...


Inventory updates


Assume no stock buffer.

Simple Magento product corresponding to a single variant Omnivore product.

Quantity goes from 1 to 2.

Quantity goes from 2 to 0.

Quantity goes from 0 to 1.

A simple Magento product corresponding to a single variant of a multi variant Omnivore product, the master configurable/grouped does not change in Magento.

Quantity goes from 1 to 2.

Quantity goes from 2 to 0.

Quantity goes from 0 to 1.

Both variants of a 2 variant Omnivore product go from 1 to 0.

Both variants of a 2 variant Omnivore product go from 0 to 2.


Magento 2 notes

Magento to Metadata

How metadata records change based on changes in Magento.

Key fields:

  • sku
  • retailerRef
  • info (rawinfo), rawmedia, rawquantity, rawxml - behave differently between Magento 1 and 2
  • errorMessage
  • isComplete
  • active
  • processed
  • lastChangedInFeed
  • lastUpdatedFromFeed
  • ignore
  • parent ids
  • owner

Note: the Metadata's owner and the Product's metadata fields can cause issue (mess).

Steps

  • before
    • BaseRetailerAdapterService.beforeRetrieveProductsViaApi > BaseRetailerAdapterService.deactivateProductMetadataUpdatedBefore
      • deactivateProductMetadataUpdatedBefore is @Transactional
      • Magento 1, all retailer metadata, 
        • where active and lastUpdatedFromFeed < theDate
        • active = false & processed = false
      • Magento 2, all retailer metadata, 
        • where active and lastUpdatedFromFeed < theDate, 
        • active = false
  • update

  • after
    • Magento 1, MagentoProductService.afterRetrieveProductSummaries
      • site.ignoreUnchangedMetadata
        • metadata.processed = false where parent changed
      • sku mismatches
        • update PRODUCT, 
        • mark as dead AND clear product.metadata, 
        • where 
          • metadata.externalId = product.retailerRef AND
          • sku are different
    • Magento 2, Magento2Service.afterRetrieveProducts
      • Magento2Service.inactivateProducts
        • find active products with inactive metadata joined by metadata.id
          • mark product as dead (commented out, waiting on testing)
      • site.ignoreUnchangedMetadata
        • metadata.processed = false where parent changed
      • site.scratch[magento-cleanup]
        • sku mismatches
          • update PRODUCT, 
          • mark as dead AND clear product.metadata, 
          • where 
            • metadata.externalId = product.retailerRef AND
            • sku are different
        • duplicate simple (COMMENTED OUT)
          • update PRODUCT,
          • mark as dead AND clear product.metadata, 
          • where
            • product is not dead AND
            • metadata.id = product.metadataId AND 
            • metadata has parents

Metadata to Product

How metadata records change as metadata is process into products

How product records change as metadata is process into products

Clean Up

What clean up steps exist

How metadata, product and marketplace products are changed during clean up steps