Skip to content

Commit

Permalink
Merge pull request #60 from findify/feature/FI-7646-add-collection-ha…
Browse files Browse the repository at this point in the history
…ndle

added collection slot
  • Loading branch information
wolff95 authored May 2, 2024
2 parents 6a344a6 + cd10888 commit 40aec31
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions snippets/findify-product-card-connector.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@
assign class = query_parameters | split: "class=" | last | split: "&" | first
endif
assign widget = query_parameters | split: "widget=" | last | split: "&" | first


# Product Collection Slot
if query_parameters contains "collectionSlot="
assign collection_slot = query_parameters | split: "collectionSlot=" | last | split: "&" | first
endif
# Product metadata
assign colormap = query_parameters | split: "colormap=" | last | split: "&" | first | split: ';'
assign position = query_parameters | split: "position=" | last | split: "&" | first
Expand Down Expand Up @@ -60,9 +64,9 @@
assign price = query_parameters | split: "price=" | last | split: "&" | first
endif
if product.url contains "?"
assign product_url = product.url | append: "&variant=" | append: selected_variant_id
assign product_url = collection_slot | append:product.url | append: "&variant=" | append: selected_variant_id
else
assign product_url = product.url | append: "?variant=" | append: selected_variant_id
assign product_url = collection_slot | append:product.url | append: "?variant=" | append: selected_variant_id
endif
if query_parameters contains "quantity="
assign quantity = query_parameters | split: "quantity=" | last | split: "&" | first
Expand Down

0 comments on commit 40aec31

Please sign in to comment.