Add character limit to product and variant names in cart sidebar

This commit is contained in:
Matt-Yorkley
2020-06-12 11:17:59 +02:00
parent 2cc02d9711
commit ed086c2db5
2 changed files with 3 additions and 2 deletions

View File

@@ -1,3 +1,4 @@
Darkswarm.controller "CartCtrl", ($scope, Cart, CurrentHub) ->
$scope.Cart = Cart
$scope.CurrentHub = CurrentHub
$scope.max_characters = 20

View File

@@ -16,9 +16,9 @@
%td.image
%img{'ng-src' => '{{ line_item.variant.thumb_url }}'}
%td
%span {{ line_item.variant.extended_name }}
%span {{ line_item.variant.extended_name | truncate: max_characters }}
%br
%span.options-text {{ line_item.variant.options_text }}
%span.options-text {{ line_item.variant.options_text | truncate: max_characters }}
%td.text-right
%span.quantity {{ line_item.quantity }}
%td