klaviyo / magento2-klaviyo

37 stars 51 forks source link

Updates Added to Cart event to use simple product images where applicable #298

Closed cykolln closed 1 month ago

cykolln commented 1 month ago

Description

Previously we synced the configurable product image path instead of the simple product that was added to the cart. This PR updates that behavior to use the simple product image if applicable, and fall back on the configurable product if we cannot find an image on the simple product.

It also adds 2 new event fields for Added to cart: StoreId and AddedSimpleProductId. These are stored at the top level and can be used for additional filtration or use in catalog tags in email templates.

Manual Testing Steps

  1. Tested simple products, bundles, groups, and configurable products. Made sure the correct fields were syncing to klaviyo. Validated that the behavior for bundles and grouped products was unchanged. Verified that simple product information is syncing correctly for simple product and configurable product carts.
  1. Tested

Pre-Submission Checklist:

NOTE: Please use the Changelogger cli tool to manage versioned file upgrades.