figuring out how to do "As Low As - $"

Post feature requests to this forum and a pre-configured poll will automatically be created for you.

How important is this enhancement to you?

It's a critical enhancement that I must have.
12
52%
It's an important enhancement but others are more critical.
5
22%
I'd like to have it but it's not that important.
5
22%
I'd never use this feature.
1
4%
 
Total votes: 23

crazyjoe
Commander (CMDR)
Commander (CMDR)
Posts: 172
Joined: Mon Apr 26, 2010 2:20 pm

Re: figuring out how to do "As Low As - $"

Post by crazyjoe » Thu Sep 01, 2011 9:35 am

I did Kalamazoo's change and it worked like a dream! Exactly what I was looking for! However, when placing an order in the admin, if I need to add a product that only has 1 variant, the "Add to Cart" button never appears in the pop-up because it doesn't think i've chosen an option. Any idea of a work around for that? My sales dept. often places orders in the admin for call in's.
Crazy Joe Sadloski
Webmaster
Hot Leathers Inc.
http://www.hotleathers.com

jdarby
Commander (CMDR)
Commander (CMDR)
Posts: 151
Joined: Thu Sep 25, 2008 2:21 pm

Re: figuring out how to do "As Low As - $"

Post by jdarby » Thu Jan 10, 2013 3:51 pm

Is there an appropriate change for this issue in 7.0.7? The code below is not the same in ProductHelper.cs
mazhar wrote:Hello All
Please give a try to the following workaround. Edit the App_Code/ProductHelper.Cs file and locate the following code in the BuildProductOptions method

Code: Select all

aspOptions.Items.Add(String.Empty);
                    // GET THE COLLECTION OF OPTIONS THAT ARE AVAILABLE FOR THE CURRENT SELECTIONS
                    OptionChoiceCollection availableOptions = OptionChoiceDataSource.GetAvailableChoices(product.ProductId, option.OptionId, selectedChoices);
                    foreach (OptionChoice optionOption in availableOptions)
                    {
                        aspOptions.Items.Add(new ListItem(optionOption.Name, optionOption.OptionChoiceId.ToString()));
                    }
and make it look like

Code: Select all

                    // GET THE COLLECTION OF OPTIONS THAT ARE AVAILABLE FOR THE CURRENT SELECTIONS
                    OptionChoiceCollection availableOptions = OptionChoiceDataSource.GetAvailableChoices(product.ProductId, option.OptionId, selectedChoices);
                    foreach (OptionChoice optionOption in availableOptions)
                    {
                        aspOptions.Items.Add(new ListItem(optionOption.Name, optionOption.OptionChoiceId.ToString()));
                    }
if (aspOptions.Items.Count > 0)
                        aspOptions.Items[0].Selected = true;
This change will select the first available choice as default in the dropdown boxes and will remove the blank one.

jdarby
Commander (CMDR)
Commander (CMDR)
Posts: 151
Joined: Thu Sep 25, 2008 2:21 pm

Re: figuring out how to do "As Low As - $"

Post by jdarby » Wed Jan 23, 2013 9:31 am

Kalamazoo wrote:I am in version 7.04. We were looking for a way to use the admin header text for options in a useful and purposeful way. If you enter in a value and leave it, you force a selection, if you do not enter in a value then this automatically selects the top option by default and makes it selected so you don't have to waste so much time of a customer to buy your product (in the right cases....)

just replace this in ProductHelper.cs

Code: Select all

aspOptions.Items.Add(option.HeaderText);


with

Code: Select all

if (!string.IsNullOrEmpty(option.HeaderText))
                    {
                        aspOptions.Items.Add(option.HeaderText);
                    }
Seems to work like a champ and I hope others will try it and see if it works for you as well. I don't know how to keep changes being made to this file so just document for any upgrade. If anyone else has a better idea that would be great.

Thanks,

Phil Chrisman
I made this change (v7.0.7) and it works as far as loading the first option when the product page loads instead of blank dropdowns. However, it does not update the price from $0.00 to reflect what is setup for the variant. Any ideas?

Post Reply