开发者

Add a product refers to one-or-many distributors in Magento [closed]

开发者 https://www.devze.com 2023-03-29 13:10 出处:网络
Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed. This question is off-topic. It is not currently accepting answers.

Want to improve this question? Update the question so it's on-topic for Stack Overflow.

Closed 11 years ago.

Improve this question

I am using Magento to build a bookshop

A book includes:

  • has many attributes such as: name, prices, w开发者_开发知识库eight, etc...
  • belong to one publisher
  • belong to one-or-many categories
  • has many distributors which includes many attributes:
    • name
    • address
    • phone/email

So, when I create a book in Admin Management Panel, how I could:

  1. Make a list of distributors.
  2. Add a book (product) refer to one-or-many distributors?


Make a multiselect attribute called distributors. This will give you the possibility of adding one or multiple distributors to products. However, the attribute options only have IDs, label fields, and nothing else.

To extend this, you will need to write you own module with a database table containing your fields and a reference to the attribute option:

  • Distributor ID (reference to option_id in eav_attribute_option)
  • Name
  • Address
  • Phone
  • Email

You will probably also need to write a backend interface for editing this data, and some functions to access distributor data by attribute option ID etc.

0

精彩评论

暂无评论...
验证码 换一张
取 消