Jump to content

Assign more than a manufacturer to a product


evs_mlp

Recommended Posts

Hi Eva,

 

A product can only have one 'manufacturer', so that won't work for you.

Maybe better to use Tags? Found some blog about it here:

http://mohsart-prestashop.blogspot.com/2010/06/prestashop-as-bookstore-part-1-authors.html

 

A little old post, but maybe look at it first and see if you like the idea, and then see how far you manage to adapt it to 1.6.x. yourself Ask questions if you get stuck.

 

pascal.

Link to comment
Share on other sites

Hi Pascal,

 

thanks!

If it was a new shop it would be a good option.

 

So, if I create in the table product a second manufacturer, and add it to product.tpl, to show them it would'nt work? There is no way to change the relationship manufacturer-product from one-one to many-one?

Link to comment
Share on other sites

Of course you could re-code it so that it will be a one to many relationship. This would require additional table(s) and changing the Product class, your input and display screens, reports etc. If you're familiar with php/smarty, this is an option, if you have some free time at hand. (I would then recommend to try to make it as an add-on module, to isolate it as much as possible from the core code. EDIT: I would then not use the manufacturer, but really add an additional property 'authors', and link these to a product)

 

Another option would be to use the supplier as author, instead of manufacturer. This is a one to many relationship already. Maybe give that some thought, and see if that gives other problems...

 

My 2 cents,

pascal

Link to comment
Share on other sites

One other option would be to use 1 or more features as an author field. One problem would be that for a second author, you would maybe duplicate some values of the first author.

 

feature_id = 1, name = "author". Author values: Dickens C., Shakespeare W., ...

feature_id = 2 name = "2nd author" 2nd Author values: Shakespeare W., Twain M., ...

 

and then for a product

"Famous English books through the ages"

Author: Dickens C.

2nd Author: Shakespeare W.

 

etc. So you sometimes need to duplicate authors as they may be a 2nd writer, or the primary writer etc.

 

Any way, wanted to mention it as an option.

 

pascal

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...