<%= render component("ui/button").new( tag: :a, title: t(".back"), icon: "arrow-left-line", scheme: :secondary, href: solidus_admin.products_path ) %>

<%= @product.name %> <%= render component("products/status").new(product: @product) %>

<%= render component("feedback").new %> <%= render component("ui/button").new( tag: :a, text: t(".duplicate"), href: spree.clone_admin_product_path(@product), scheme: :ghost ) %> <%= render component("ui/button").new( tag: :a, text: t(".view"), href: SolidusAdmin::Config.storefront_product_path(@product), target: :_blank, scheme: :ghost ) %> <%= render component("ui/button").new(tag: :button, text: t(".save"), form: form_id) %>
<%= form_for @product, url: solidus_admin.product_path(@product), html: { id: form_id } do |f| %>
<%= render component('ui/panel').new do %> <%= render component("ui/forms/field").text_field(f, :name) %> <%= render component("ui/forms/field").text_field(f, :slug) %> <%= render component("ui/forms/field").text_area(f, :description) %> <% end %> <%= render component('ui/panel').new(title: 'SEO', title_hint: 'Search Engine Optimization') do %> <%= render component("ui/forms/field").text_field(f, :meta_title) %> <%= render component("ui/forms/field").text_field(f, :meta_description) %> <%= render component("ui/forms/field").text_area(f, :meta_keywords) %> <% end %> <%= render component('ui/panel').new(title: "Media") do |panel| %> <% panel.with_action( name: t(".manage_images"), href: spree.admin_product_images_path(@product) ) %> <% end %> <%= render component('ui/panel').new(title: 'Pricing') do %> <%= render component("ui/forms/field").text_field(f, :price) %>
<%= render component("ui/forms/field").text_field(f, :cost_price) %> <%= render component("ui/forms/field").text_field(f, :cost_currency) %>
<% end %> <%= render component('ui/panel').new(title: 'Stock') do |panel| %> <%= render component("ui/forms/field").text_field(f, :sku) %> <% panel.with_action( name: t(".manage_stock"), href: spree.admin_product_stock_path(@product) ) %> <% end %> <%= render component('ui/panel').new(title: 'Shipping') do %> <%= render component("ui/forms/field").select( f, :shipping_category_id, [[t(".none"), nil]] + Spree::ShippingCategory.order(:name).pluck(:name, :id), tip: t(".hints.shipping_category_html"), ) %> <%= render component("ui/forms/field").select( f, :tax_category_id, [[t(".none"), nil]] + Spree::TaxCategory.order(:name).pluck(:name, :id), tip: t( ".hints.tax_category_html", default_tax_category: Spree::TaxCategory.default&.name ), ) %> <% end %> <%= render component('ui/panel').new(title: "Options") do %> <%= render component("ui/forms/field").select( f, :option_type_ids, option_type_options, multiple: true, "size" => option_type_options.size, ) %> <% end %> <%= render component('ui/panel').new(title: "Specifications") do |panel| %> <% panel.with_action( name: t(".manage_properties"), href: spree.admin_product_product_properties_path(@product) ) %> <% end %>
<% end %>
<%= form_for @product, url: solidus_admin.product_path(@product), method: :delete do %> <%= render component("ui/button").new( tag: :button, text: t(".delete"), scheme: :danger, "data-action": "click->#{stimulus_id}#confirmDelete", "data-#{stimulus_id}-message-param": t(".delete_confirmation"), ) %> <% end %>
<%= render component("ui/button").new(tag: :button, text: t(".save"), form: form_id) %>