How do I add multiple Images to my ProductManufacturers - php

So im using the CMS Shopware 6 and I want to be able to add multiple Media-Entities (e.g. Images and Videos) to my ProductManufacturers just like it is possible to add multiple images/media to products.
I have found this tutorial on the developer.shopware page: https://developer.shopware.com/docs/guides/plugins/plugins/framework/custom-field/add-custom-field
Also I have looked into the ProductManufacturerDefinition Class and noticed that it just needs another OneToManyAssociationField.
Click Here to open IMG
Does anybody know if theres a way to overwrite this class or some other way to get this to work?
Thx :)

No, it doesn't help just with adding a new association. You can add custom fields to add media, but one custom field can add one image only. So, one way is to create custom fields for multiple media if it's limited and you know how many images/media needs to add.
OR
You have to add multiple media upload component in the Product Manufacturers module by making a custom plugin.

Related

Kanboard Custom Fields

Customization work regarding Kanboard
I need to add custom fields to the create new task form. Can this be achieved using Metadata Manager plugin?
Will I need to hire a developer to get this done?
Currently there's only Title, Description & Tags available. I Just need to add three more fields to show in the task box in Kanban view.
Thanks!
No, the Metadata plugin will not achieve that. There is a plugin that will allow you to create custom fields that will be included on the create task form, but since you didn't ask, I cannot tell you which plugin (I tried already, and it was downvoted and deleted because it didn't answer your question apparently)
No, you will not need to hire a developer to get this done, assuming you can find the plugin I am referring to.
With said plugin, you will be able to add as many custom fields as you wish, as well as, including them in task exports, filtering, change their type, etc...
Good luck in your search!

Creating a relationship between two custom types in WordPress

This is perhaps a very basic Wordpress development question. I am aware about creating custom types in Wordpress. So I created a Product type and a Version type and I would like to be able to keep a one-to-many relationship between the two i.e. for every Product, I would like to be able to associate one or more Version items from the admin editor. What is the way to do this? I am not in favor of using plugins, so I was thinking, I would use some kind of a custom field array of IDs, to connect the two. Am I on the right way? If I have to use a plugin, which one should it be?
The easy way to do this would be to add a meta box on your product admin page. That way you can create a drop down list on your product page with your versions. You can get more on adding meta boxes using add_meta_box here.
You add all required functions to your themes' functions.php, but to summarise you will need the following wp functions amongst others.
add_action
add_meta_box
update_post_meta
Looking up these functions in the Wordpress Codex (using google) will get you on your way. If you get stuck, post some code of what you have tried and take it from there. There are a number of tutorials/examples around. If you can do enough to create custom types this should not take you long.

Modx custom tv with multiple inputs

I need to build a custom tv in modx that will all a user to select a image, a title and a date.
Can't seem to find any help other than the docs with although detailed don't answer my problem.
Anyone done this before and are able to advise me further
Cheers
I'm not 100% sure, if this is what you're trying to archieve, but I think multiItemsGridTv (MIGX) for modX revolution is what you want.
From the docs:
MIGX (multiItemsGridTv for modx) is a custom-tv-input-type for adding
multiple items into one TV-value and a snippet for listing this items
on your frontend.
It has a configurable grid and a configurable tabbed
editor-window to add and edit items. Each item can have multiple
fields.
For each field you can use another tv-input-type.
Essentially, you can make up a set of multiple different template variables (including images), that always belong together. If you then assign your MIGX tv to a template, you can enter as much of these sets as needed per resource.
You can download it via package management or from the modX Extras Repository.

Adding values to a magento dropdown or multi-select product attribute while adding a new product

I'm wondering if anyone has found or written an extension that would allow a magento website administrator the ability to add values to their products attribute while adding the product. For example, if I sell books and want the book author to be in a drop down list so that it would be used in layered navigation, it seems odd that I would have to add the author via the attributes section before adding the product. From a workflow standpoint it really makes sense to have an "add new value" button next to the drop down on my add product screen.
Anyone have any thoughts or insight?
It's a piece of cake to do, if you know jquery and the (if I may guess) extremely simple model behind magento.
As the other guy said, throw some money and I'll do it ;)
Otherwise, real easy -> find where that dropdown is generated, add a button next to it that opens a popup which you fill "create a new thingie" stuff, create button -> +create +close +refresh your dropdown.
Definitely easy.
And considering the attribute dialog already exists in the tool you cold probably take most from there and just add the popup handlers / button / +refresh .
This extension can Import/Export products and customers from/to CSV file. Create categories, add attribute options, import images and media galleries, reindex, refresh cache, media and price rules automatically. In addition you can backup the entire database in SQL format.
So from above, once you make the csv file, you just have to add the Author header and it would build the list from there. However, the attribute must exist first. I am using this method for the creation of my own manufacturer attribute options.
AMartinez_CustomImportExport
Can't say I have, but I've developed something similar that creates an attribute and adds it to multiple products, it's completely possible, you just need to add something that will call the add attribute on the add product page or change the new product flow to allow a new attribute and add it if needed.
Don't let them scare you, it's not as hard as some people might describe :)
My curiosity finally took over my laziness and I managed to create the module author requested. It's available on github.
Please feel free to check it out and update it if you wish. Maybe in some near future I'll post it on Magento Connect, if feedback is good.
Here's some code that checks if an attribute value exists and adds it if it doesn't: http://www.magentocommerce.com/boards/viewthread/26234/
Shouldn't be too hard to integrate it with the "Add product" form.

Change the product image when visitor makes an attribute selection in Ubercart

Current Setup
Each product on the store has multiple images. When the visitor visits a product page they see a main image and a series of thumbnails (view). When they click on a thumbnail that image is instantly displayed in the main image area.
Each product also has an attribute selection dropdown for example "Colour".
Drupal / Ubercart Configuration
I'm using Drupal 6. There is a Product content-type that has a custom image field of type file. This image field accepts multiple values (i.e. multiple images).
I then use a view (views module) to display a series of thumbnails and javascript to change the main image when a thumbnail is clicked.
What I'm trying to achieve
What I would like in addition to the thumbnails is when the visitor selects a colour option from the colour attribute dropdown is for one of the available images be displayed (basically the one that matches the colour selection).
What I've looked at
I am aware of Ubercart Option Image but this forces you to upload a new image for each attribute and is not per product. For example the attribute colour is used for multiple different products that all share the same colours.
With option image module all products that share the same attribute would display the same image. So this is a no go.
Also I don't wan't to upload a new image I want to be able to use one of the existing images from the product node.
This should possible but in a somewhat roundabout way. Perhaps the following method will be worth the pain?
Create a new content type. Call it ImagefieldAttribute. Let that content type store an unlimited number of imagefields. Also associate the ImagefieldAttribute content type with a taxonomy vocabulary called attribute. Essentially the ImagefieldAttribute content type will store all product images having the same attribute
Now create a node reference field in the Product content type. The nodereference field will only link to the ImagefieldAttribute content type. (edit: make sure that nodereference field can have unlimited number of nodereferences. This is so that you can refer to an arbitrary number of ImageFieldAttribute content types -- each of them containing all images with a specific attribute)
You will need to change the view and thumbnails to reflect an additional level of indirection in the Product content type. If you're experienced in views you'll just recognize this as a case of creating a views relationship.
You should also be able to create exposed filters. Please note that again you will need to use relationships as the filters would be in the ImagefieldAttribute content type (which you will get through using the nodereference relationship). You can restrict the attributes which will be on display (e.g. If there is no yellow color amongst any of the items) you should not get yellow in the drop down. This you can achieve by using the http://drupal.org/project/views_taxonomy_selective_filter module.
It can be tedious to have to create an ImagefieldAttribute everytime and then nodereference it to your Product. This can be made easy using http://drupal.org/project/popups_reference
Obviously I haven't tried this out so you could encounter unforeseen problems along the way. It might also be a good idea to not have a taxonomy vocabulary for attributes but simply CCK select list. However, the views taxonomy selective filter will not work subsequently.
If I understand what you are attempting to accomplish, I have done something similar at http://homespun-at-heart.com/product/gracie. What I did to accomplish this was simply customize the option_images module's javascript and preloading functionality to update the main product image instead of option_image's image like it does by default.
The one major drawback of what I did was that duplicate images are stored at two places on the server and therefore separately downloaded. This was a small project that was done on a budget so I didn't have the freedom to invest the time to do it "right". But, if that is all you need...it works!
On this site we aren't attaching more than one image directly to the product, instead they are attached to the attributes with the option images module. It also wouldn't take an awful lot of work to write some js so that the color selection would be update when the thumbnail is clicked.
Update 1:
I'm not sure how much you are willing to invest it this project, but as I have thought about this a little more, it seems to me what you need it is to specify which attribute options apply to which pictures. What I would visualize is that when you are uploading the images on the product you would be able to make these selections.
Then, when the visitor selects an option that is attached to an image or when a thumbnail is clicked, the options are updated.
I haven't thought about it long enough to visualize the interface yet. Maybe some of your other requirements would dictate that.
Update 2:
After your comment below, here are some more suggestions.
On the edit/options screen of you product, you could have a dropdown that would allow you to select which images apply to which of the specific options. This will allow you to overcome the issue of having your image uploaded to your server multiple times.
To accomplish this would require a substantial amount of work and probably another table or at least a field added to the uc_product_options table to store the relationship between the product and the image. I would use the uc_option_image module as a starting point. It would give you a lot of direction on accomplishing what is needed.
What I did to overcome the issue of having the attributes attached to multiple products is have my customer put all the possible colors on the attribute then they select only the ones apply to the specific product. The other option that we considered but vetoed was setting up a lot of different attributes that would roughly correspond to each different product. I forget all the reasons we didn't go this route but some of them are pretty obvious. :-)

Categories