# `PhoenixKit.Modules.Shop.Import.CSVParser`
[🔗](https://github.com/BeamLabEU/phoenix_kit/blob/v1.7.71/lib/modules/shop/import/csv_parser.ex#L1)

Parse Shopify CSV and group rows by Handle.

Shopify CSV structure:
- First row with product data contains title, description, etc.
- Subsequent rows for same Handle contain variant data only (empty title/description)
- Each variant row has Option1/Option2 values and prices

# `main_row`
[🔗](https://github.com/BeamLabEU/phoenix_kit/blob/v1.7.71/lib/modules/shop/import/csv_parser.ex#L59)

Get the first (main) row for a product group.
Contains title, description, and other product-level data.

# `parse_and_group`
[🔗](https://github.com/BeamLabEU/phoenix_kit/blob/v1.7.71/lib/modules/shop/import/csv_parser.ex#L30)

Parse CSV file and group rows by Handle (product identifier).

Returns a map where keys are handles and values are lists of row maps.

## Examples

    CSVParser.parse_and_group("/path/to/products.csv")
    # => %{
    #   "product-handle" => [
    #     %{"Handle" => "product-handle", "Title" => "Product", ...},
    #     %{"Handle" => "product-handle", "Option1 Value" => "Small", ...},
    #     ...
    #   ],
    #   ...
    # }

# `variant_rows`
[🔗](https://github.com/BeamLabEU/phoenix_kit/blob/v1.7.71/lib/modules/shop/import/csv_parser.ex#L66)

Get all variant rows (rows with price data).

---

*Consult [api-reference.md](api-reference.md) for complete listing*
