-products-url-value="<%= solidus_admin.variants_for_order_path(@order) %>" data-action=" <%= component('ui/forms/search').stimulus_id %>:search-><%= stimulus_id %>#search <%= component('ui/forms/search').stimulus_id %>:submit-><%= stimulus_id %>#selectResult " > <%= render component('ui/panel').new(title: t('.title')) do |panel| %> <% panel.with_section do %> <%= render component('ui/forms/search').new( placeholder: t('.search_placeholder'), id: :order_cart, ) %> <% end %> <% panel.with_section(wide: true, high: true) do %>
> <% @order.line_items.each do |line_item| %> <% end %>
Product Quantity Price Actions
<%= render component("ui/resource_item").new( thumbnail: (line_item.variant.images.first || line_item.variant.product.gallery.images.first)&.url(:small), title: line_item.variant.name, subtitle: "#{line_item.variant.sku}#{line_item.variant.options_text.presence&.prepend("- ")}", ) %> <%= form_for(line_item, url: solidus_admin.order_line_item_path(@order, line_item), html: { "data-controller": "readonly-when-submitting" }) do |f| %> <%= render component("ui/forms/input").new( name: "#{f.object_name}[quantity]", type: :number, value: line_item.quantity, "aria-label": "Quantity", min: 0, class: "!w-16 inline-block", "data-action": "input->#{stimulus_id}#updateLineItem", ) %> <% render component("ui/button").new(type: :submit, text: "Update", class: "inline-block") %> <% end %> <%= line_item.single_money.to_html %> <%= form_for(line_item, url: solidus_admin.order_line_item_path(@order, line_item), method: :delete) do |f| %> <%= render component('ui/button').new( scheme: :ghost, size: :s, title: t("spree.delete"), icon: 'close-line', "data-controller": "confirm", "data-confirm-text-value": t("spree.are_you_sure"), ) %> <% end %>
<% end %> <% end %>