Skip to content

Commit

Permalink
Merge pull request #90 from tatiana-scandi/bugfix/add-to-cart-from-wi…
Browse files Browse the repository at this point in the history
…shlist

#3490 - add product with attachment to cart from wishlist
  • Loading branch information
carinadues authored Oct 22, 2021
2 parents 07f5fe2 + 3ff5919 commit 0e3fc8c
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ public function execute(CartItem $cartItem): array

[$optionType, $optionId, $optionValue] = $optionData;

// Handle previously uploaded file when add product with 'File' customizable option to wishlist
if(strpos($optionValue, "file-") === 0){
[$filePrefix, $encodedFileInfo] = \explode('-', $optionValue);
$optionValue = json_decode(base64_decode($encodedFileInfo));
}

if ($optionType == self::OPTION_TYPE) {
$customizableOptionsData[$optionId][] = $optionValue;
}
Expand Down

0 comments on commit 0e3fc8c

Please sign in to comment.