Skip to content

Commit

Permalink
fix matrice delle varianti. closes #248
Browse files Browse the repository at this point in the history
  • Loading branch information
madbob committed Jan 14, 2024
1 parent 20c0c56 commit ed796b0
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion code/resources/views/variant/matrix.blade.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
<x-larastrap::modal :title="_i('Varianti')">
<?php $combos = $product->sortedVariantCombos ?>
<?php
/*
Qui non usare $product->sortedVariantCombos perché ritorna solo le combo
attualmente attive (mentre qui le voglio ovviamente tutte)
*/
$combos = $product->variant_combos->sortBy(function($combo, $key) {
return $combo->values->pluck('value')->join(' ');
}, SORT_NATURAL);
?>

<x-larastrap::form classes="inner-form" method="POST" :action="route('variants.updatematrix', $product->id)">
<input type="hidden" name="close-modal" value="1">
Expand Down

0 comments on commit ed796b0

Please sign in to comment.