Pictures for each product variant

Posted: 3 years ago Quote #24016
Yes Spino I was able to do this, and it got messy... lol. I added a new ProductVariantPicture table to the database with an extra column called AssociatedAttributeValue, that way I could relate the color to the single product variant.

After that I had to modify the Entity Model with the following procedure:

1. Create a new table in database (for example, Nop_ProductVariantPicture)
2. "Update model from database" for NopModel.edmx
3. Create an appropriate class in your business logic (for example, ProductVariantPicture.cs)
4. Add an appropriate ObjectSet property to NopObjectContext file

Then you have to add and modify all kinds of properties around the libraries.

The way I started was that I searched for the ProductPicture.cs object around the libraries and made my new object look exactly the same as the original one. I think it will take about 4 days of work to do this tops, but you´ll learn a lot while doing.

Also you need to copy the old administration GUI and add a new one with an attribute value column.

Regards,

Abe
Bogotá, Colombia
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Posted: 3 years ago Quote #24018
Spino, there is another way you could do this, add a single table that has two coulms, one for the PictureID and the other for the productattributevalue, after that it is a matter of adding your own database interaction methods and call them from your forms. This is easier than messing with the Object Model I assure you, and probably safer if you need to upgrade the app in the future as you mess less with the original app code. You can create your own project that work along with the original ones.

Cheers.

Abe
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Posted: 3 years ago Quote #24019
@ sipno

have a look at these two posts

http://www.nopcommerce.com/boards/t/3742/attach-css-to-radio-button-options-for-colour-etc.aspx
http://www.nopcommerce.com/boards/t/5045/changing-images-on-attributes.aspx


I know there was someone who did something similar to what you were asking - I've searched the forums but I can't find the posting -
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
FAQ's   and   SCREENCASTS  : http://www.nopcommerce.com/boards/t/8011/default.aspx

nop SPONSORSHIP:  http://www.nopcommerce.com/p/41/default.aspx

NOMINATE nopCommerce  http://www.packtpub.com/open-source-awards-home/nominate-best-open-source-business-application
Posted: 3 years ago Quote #24429
Thanks Abe and Haydie.

I'll think i just modify the object model as i have to add some more custom fields to products as well.
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Posted: 3 years ago Quote #24518
Actually after looking at it a little more i'm considering setting it up so a product has many variants. Each variant will have a size attribute and each variant will be a different color. Any positive or negatives for doing it this way or the other way (having the size and color as attributes)?

Also, was looking at gift cards and am considering have a gift card with one variant and the variant would have an attribute for price. Or i was thinking of having a product and a variant for each of the different prices. Can't decide. Again any positive or negatives for these scenarios?

I don't mind modifying the code. Just trying to modify it less so it's easier to update to future releases.
Thanks in advance
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Posted: 3 years ago Quote #24523
Hello Spino,

The thing that finally tipped the balance for me was inventory management. Having too many variants, each with a color -size just kind of became a usability nightmare for the store admin. That´s why we decided to use the attribute combinations inventory management and set up size and color as attributes. Each product has only one variant.

Try and imagine how the admin will have to manage inventory before taking the final decision.

Regards,

Abe
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Posted: 3 years ago Quote #30728
I wish nopCommerce have that feature(Association of colors with images) in 1.8 but i think its not there because i really want this.
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Posted: 3 years ago Quote #30740
Hi:
I think it is important to be able to have several images per variant. For selling clothing the name of the game is visualization of products. It is requyired to show sometimes diferent views for product which come in different colours. For example see www.ninewest.com, wher products come in various colours (variants) and several images are displayed for each variant. I think the best would be an enhacement having in admin a special tab for adding several pictures per variant in a similar way as it is done at product level; and the single image now available for each variant could be used as the "swatch image" (mini picture for displaying the colour or colour detail or the product as in www.ninewest.com).

Has anybody an idea how can this be achieved?
Thanks
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Regards

Eduardo
Posted: 3 years ago Quote #30743
Hello:

Yes this thread is exactly about doing that eduardo. I did it at http://www.opposite.com.co/ . The idea is to modify the database, regenerate the object model and replicate the code used in the product pictures. After that it works quite well, even using AJAX as I did.

I´d be glad to help you if you need more info.

Cheers,

Abe

PD. Generating the different color image swatches at the category page is easy after you got multiple imgaes for each variant.
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Posted: 3 years ago Quote #30746
I have visited the http://www.opposite.com.co/  but i don't see associations between Color Drop downlist and the image thumbnail.
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
nopCommerce on facebook