• Toll-free  888-665-8637
  • International  +1 717-220-0012
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

amarion
#1 Posted : Wednesday, February 10, 2010 12:23:06 AM(UTC)
amarion

Rank: Member

Joined: 2/4/2009(UTC)
Posts: 3

Hi,

I'm trying to modify a BV 5 SP3.2 site that's configured to use the BVC 2004 Product Layout. This is a clothing store that has product variations/choices for Color and Sizes on items.

In the Product detail page, the drop downs appear for Color: and Sizes: and the site works fine in that if you select a combination that doesn't have any inventory, then the message
"Size is out of stock. Select a Different Size" appears above the large product image.

However, the customer doesn't want to see all the colors in the drop down list, nor all the sizes in the drop down list if those selections don't have any inventory.

I'm looking at the BVModules/Controls/VariantsDisplay.ascx and VariantsDisplay.ascx.vb which generates the drop down lists.

Do I need to modify this code to somehow pull out the inventory values for that product choice and remove it from the list before databinding?

I couldn't find any way in the Admin part of the site to make this type of modification. I know how to make a custom Product layout if necessary, but I don't think that will help me as the variants/choices lists are built using the drop down list or radio button or image radio button as selected by the user in the Admin section when they setup the product variations.

The reason for all this is the shoppers of the site find it frustrating when the item has say 6 choices for sizes (6, 7, 8, 9, 10, 11) but only sizes 8 and 11 are in stock. They have no way of knowing unless they choose size 6, then 7, then 8 and often times they miss the little warning about "Size is out of stock. Select a Different Size". They want the list to only show 8 and 11 (or whatever sizes are in stock based on inventory).

This seems rather difficult to do as the inventory is based on the cross-product of the combination of the variants (color AND size). So I'm not sure how this can be accomplished.

Any ideas?

Thank you!
Aaron
#2 Posted : Wednesday, February 10, 2010 9:12:13 AM(UTC)
Aaron

Rank: Administration

Joined: 4/2/2004(UTC)
Posts: 2,393
United States
Location: Hummelstown, PA

Thanks: 6 times
Was thanked: 163 time(s) in 158 post(s)
Modifying the VariantsDisplay stuff isn't a lot of fun. In general terms what you should probably do is make the choices dependent (since they are). In other words, if your choices are color and size, make size the first choice and don't show any values in the color dropdown until the customer chooses a size. Alternately you could show all values in each dropdown until a value is selected in either choice; the choices would update with the remaining options. I'm sure this will require significant modifications, but it would be better
Aaron Sherrick
BV Commerce
Toll-free 888-665-8637 - Int'l +1 717-220-0012
amarion
#3 Posted : Wednesday, February 10, 2010 5:34:16 PM(UTC)
amarion

Rank: Member

Joined: 2/4/2009(UTC)
Posts: 3

Yes, this is proving to be quite difficult. I still haven't found a way to do it.

Is there a class/method to use in the BVSoftware.Bvc5.Core that will get me a list of choice options for a color that has inventory?

As I'm thinking through the possible scenarios, I'm running into issues such as what if there are no sizes for a particular color? The customer wants the color to be removed from the drop down.

So, in my Product view, I have Color first and then Size below it. So in the BVModules/ProductChoices/Drop Down List/View.ascx.vb in the Display() method is where the list of choices is bound to the drop down list.

However, the choice.ChoiceOptions returns a list of all possible choices for the "color" choice the first time this control is added to the VariantsPlaceHolder control. The second time the ProductChoices/Drop Down List/View.ascx.vb is called is when the choice is set to "size" and the choice.ChoiceOptions list is bound to the drop down list and added to the VariantsPlaceHolder control after the first drop down list.

So, the lists are really independent of each other when they are added to the page.

So far, what I'm thinking is somehow I have to determine when View.ascx.vb is called with "color" choices the first time, I have to go through each color choice and then find all the sizes in that color and see if they have any inventory. If all sizes for that color have no inventory, then I should remove that color from the list (I'm not sure if I should do this before databinding or after and remove the list items themselves from the control). Of course, it may end up that all colors are empty and then I'd have an empty drop down list. That's another problem...

However, the sizes is even more difficult because I have to show only sizes that have inventory for the currently selected color (assuming there is a color left over from step 1 above).

Yet another problem is that the "default" color choice may be removed by step 1 if there was no inventory for all sizes of that color. Then I'd have to make sure something is selected.

Then there's the issue of handling the SelectedIndexChanged event when the user changes the color in the top drop-down list, this needs to re-populate the sizes drop-down with only the sizes with inventory for that particular color.

I'm trying to find useful methods in the Bvc5.core that might make this easier, but the ChoiceOptions list has Catalog.ProductChoiceOption objects and the bvin property there doesn't let me find the inventory with something like:

Dim inventory As Catalog.ProductInventory = Catalog.ProductInventory.FindByBvin(productChoiceOption.Bvin)

It could be our bvc_ProductChoiceCombinations table is giving us problems because the ChoiceOptionId column is populated by an external application that pushes products into the database via the web service calls. Our table looks like this:

bvin ChoiceId ChoiceOptionId ProductId ParentProductId Available LastUpdated

10db1293-ab41-4b7e-b945-0e9d5398ceec 1385-11-Color 1385-11-Color-BLACK 8ad963b0-f170-4c50-a338-d9fc37e646c4 1385-11 False 2010-02-10 14:05:48.570
2339be27-734c-43e2-91e0-12673d0c2774 1385-11-Color 1385-11-Color-BLACK 03fc0c91-e5ad-4e2a-af7c-45d6fd7ee125 1385-11 True 2010-02-10 14:05:48.503
3774f3b9-31c9-41de-9526-291a421a4eff 1385-11-Color 1385-11-Color-BLACK 07ff551b-0551-4751-a9f6-1495779b745b 1385-11 False 2010-02-10 14:05:48.537

But I noticed if I manually create a new ChoiceOption for color like "red" , then the ProductChoiceCombinations table is populated with GUIDs in the ChoiceOptionId field.

Could this be causing me retrieval problems with the inventory? Or should I be using a different method?

Is Marcus available to help out?

Thank you!
amarion attached the following image(s):
bvc_ProductChoiceCombinations table.JPG (109kb) downloaded 42 time(s).

You cannot view/download attachments. Try to login or register.
Aaron
#4 Posted : Wednesday, February 10, 2010 5:57:26 PM(UTC)
Aaron

Rank: Administration

Joined: 4/2/2004(UTC)
Posts: 2,393
United States
Location: Hummelstown, PA

Thanks: 6 times
Was thanked: 163 time(s) in 158 post(s)
I haven't spent much time modifying this part of BV; that's been done by another developer in our company. However, I know that he has complained about the way the front end is architected. You might do better to create a new VariantsDisplay control that would allow you to more easily handle changed events. Sorry I can't be much help without really digging into the code.
Aaron Sherrick
BV Commerce
Toll-free 888-665-8637 - Int'l +1 717-220-0012
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

©2024 Develisys. All rights reserved.
  • Toll-free  888-665-8637
  • International  +1 717-220-0012