1

I'm trying to deface the product form in spreecommerce admin panel.

I have 5 taxonomies and many taxons. Adding all of them from a form is getting difficult.

So, I'm trying add different fields for the taxons in each taxonomy. ie, there will be 5 fields for taxons.

I'm started defacing the product form like this,

app/overrides/add_category_to_product_edit.rb

Deface::Override.new(:virtual_path => 'spree/admin/products/_form',
  :name => 'add_category_to_product_edit',
  :insert_after =>"[data-hook='admin_product_form_taxons']",
  :text => "
          <%= f.field_container :categories, class: ['form-group'] do %>
          <%= f.label :, Spree.t(:categories) %>
          <%= f.collection_select(:) %>
          <%= f.error_message_on :%>
          <% end %>

  ")

I want to display the taxons belongs to a taxonomy id in that menu. How to get the taxons of a particular taxonomy? How can I complete this deface script?

Community
  • 1
  • 1
thatkid
  • 41
  • 7

0 Answers0