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

solgraphix
Ensign (ENS)
Ensign (ENS)
Posts: 11
Joined: Thu Apr 10, 2008 9:20 pm

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

Post by solgraphix » Sat Apr 12, 2008 10:14 pm

I am trying to figure out how to default a option to the first choice? normally it just is blank...but i need it to come up with the first one in the option choices....i currently have business cards for sale...but for qty i have say 1K, 2K & 5K...it default to nothing so my price when people look at the cart says Price: $0.00. i want it to default to 1K so on the page is says, say Price: $50.00...

User avatar
Naveed
Rear Admiral (RADM)
Rear Admiral (RADM)
Posts: 611
Joined: Thu Apr 03, 2008 4:48 am

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

Post by Naveed » Sun Apr 13, 2008 11:41 pm

I think currently there is no administrator option available to select a choice as default option choice. I will discuss this feature with my senior team mates.

wave_werks
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 91
Joined: Mon Sep 22, 2008 8:37 pm
Location: Northeast Ohio
Contact:

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

Post by wave_werks » Fri Sep 26, 2008 4:18 pm

Has anyone found a solution to set a default option to appear in the blank menus on the drop-downs?

I searched the forum, submitted a bug report directly to the developers, and posted a feature request here on the forums. The bug response was to check the forum - which I've already done. The feature request was posted in the "feature request" section of the forum on the 22nd and has yet to see a response.

... is it really possible that this cart produces blank menus for options? Makes the product page look broken!

Thanks to all for any advise or suggestions you may have.

- Jeff
- Jeff
Wave Werks

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

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

Post by jmestep » Fri Sep 26, 2008 4:24 pm

Yes, it really does that and I think there was a reply on a topic yesterday that it was for performance problems. I had changed one of my sites by taking out the empty string that was in the code before the options were displayed, but an Able developer said that wouldn't work if there was inventory control on the options.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx

wave_werks
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 91
Joined: Mon Sep 22, 2008 8:37 pm
Location: Northeast Ohio
Contact:

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

Post by wave_werks » Fri Sep 26, 2008 5:23 pm

Thanks for the quick reply.

It's really quite disturbing that there's not some text such as "Please Select..." on the blank menus so that at least something shows up when a customer arrives at the product page. As of now they land on a page that looks like it is not populated with a product or is broken, or better yet thinks that maybe the shop owner doesn't know what he/she is doing.

This one really needs to be fixed.
- Jeff
Wave Werks

User avatar
Shopping Cart Admin
AbleCommerce Admin
AbleCommerce Admin
Posts: 3055
Joined: Mon Dec 01, 2003 8:41 pm
Location: Vancouver, WA
Contact:

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

Post by Shopping Cart Admin » Fri Sep 26, 2008 5:57 pm

Hello,
This one really needs to be fixed.
It's not broken, it's a feature enhancement.

Moved to feature enhancement thread so it's not lost, thank you for your suggestion.
Thanks for your support

Shopping Cart Guru
AbleCommerce.com
Follow us on Facebook

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

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

Post by mazhar » Fri Sep 26, 2008 10:14 pm

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.

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

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

Post by mazhar » Fri Sep 26, 2008 11:48 pm

Here is another workaround. In this workaround instead of selecting the first choice by default we will show a <Select Option> list item instead of having blank space. Edit the App_Code/ProductHelper.Cs file and locate the following code in the BuildProductOptions method and locate the following line of code

Code: Select all

aspOptions.Items.Add(String.Empty);
and make it look like

Code: Select all

aspOptions.Items.Add("<Select Option>");

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

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

Post by jmestep » Sat Sep 27, 2008 9:11 am

This is great if it works.
Removing this code is what I had done before, and Logan said it wouldn't work under some conditions, so it's good there is another workaround.
aspOptions.Items.Add(String.Empty);
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

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

Post by jmestep » Mon Oct 06, 2008 1:11 pm

I tried this method and nothing changed:

Code: Select all

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;
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

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

Post by mazhar » Mon Oct 20, 2008 11:52 am

Did you removed the following statement?

Code: Select all

aspOptions.Items.Add(String.Empty);

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

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

Post by jmestep » Mon Oct 20, 2008 2:54 pm

I had done that in the past, but not after this post. Logan said if the product had inventory (I think that's what he said) it wouldn't work to remove that. I thought maybe your code bypassed that.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx

User avatar
Sean@WMS
Ensign (ENS)
Ensign (ENS)
Posts: 20
Joined: Tue Nov 20, 2007 8:23 pm
Location: NW California
Contact:

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

Post by Sean@WMS » Tue Oct 21, 2008 3:24 pm

Thanks for this, Mazhar.

However, as by default the first option is a blank option, to get the first "real" option to show, this should be set to look for the second item in the array:

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[1].Selected = true;
That is, not:

Code: Select all

aspOptions.Items[0].Selected = true;
but

Code: Select all

aspOptions.Items[1].Selected = true;
This will set the first actual option to "selected". Otherwise, your other method is solid for those who would prefer "Please Select" in lieu of the blank selected option.
Sean Connors
Web Merchant Services
Supplying the services you need to succeed online
www.WMSmerchantservices.com

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

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

Post by jmestep » Tue Oct 21, 2008 5:11 pm

This worked great. I'm going to leave this in
aspOptions.Items.Add(String.Empty);

unless you know for sure it's OK to take out.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx

User avatar
Sean@WMS
Ensign (ENS)
Ensign (ENS)
Posts: 20
Joined: Tue Nov 20, 2007 8:23 pm
Location: NW California
Contact:

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

Post by Sean@WMS » Tue Oct 21, 2008 5:15 pm

I've a question: If I edit App_Code/ProductHelper.Cs directly, it will get overwritten by upgrades. However, I can't find any reference call to this file in the source code so that I could modify it in something like App_Code/Custom/ProductHelper.Cs

Any suggestions on how to handle this?
Sean Connors
Web Merchant Services
Supplying the services you need to succeed online
www.WMSmerchantservices.com

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

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

Post by jmestep » Tue Oct 21, 2008 5:17 pm

Just make sure you save a backup. I think there are one or two conlibs I have found that don't work from the Custom folder also.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

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

Post by mazhar » Wed Oct 22, 2008 5:31 am

I've a question: If I edit App_Code/ProductHelper.Cs directly, it will get overwritten by upgrades. However, I can't find any reference call to this file in the source code so that I could modify it in something like App_Code/Custom/ProductHelper.Cs

Any suggestions on how to handle this?
App_Code is a special ASP.NET folder and the classes in it are automatically available all across the application. If you want to create some custom version of class then create Custom folder inside the App_Code folder place a copy of file in it, provide some namespace for this newly created class. Now you can use this custom version where ever you need it.

User avatar
Jaz
Captain (CAPT)
Captain (CAPT)
Posts: 245
Joined: Wed Nov 05, 2008 4:04 am
Location: Torrance, CA
Contact:

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

Post by Jaz » Wed Nov 04, 2009 4:15 pm

Is there an update on how to make the first option show on 7.03? Tried the method listed here, but it crashed my site.

I noticed:

aspOptions.Items.Add(String.Empty);

Changed to:

aspOptions.Items.Add(option.HeaderText);

Not being a programmer, I don't know what changes I need to make.
David Jasiewicz
President
Trick Concepts - Metal Fab. Engineering and Product Design
http://www.trickconcepts.com-- If you are an ASP or PHP programmer or CSS web specialist I will gladly trade for graphic design, mechanical engineering or metal fabrication service! --

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

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

Post by jmestep » Thu Nov 05, 2009 6:32 am

This line
aspOptions.Items.Add(option.HeaderText)
picks up whatever you put into the header text field when you are setting up the options.
I tried taking that out in 7.0.3 and ran into problems with the displayed price not updating as someone changes option choices with more than one option. I haven't tested with only one option.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx

User avatar
Jaz
Captain (CAPT)
Captain (CAPT)
Posts: 245
Joined: Wed Nov 05, 2008 4:04 am
Location: Torrance, CA
Contact:

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

Post by Jaz » Fri Nov 06, 2009 2:19 pm

So I am guessing for now we just can't put in a default option? It was nice to be able to do this before because puting in a default (popular option) it reduced phone calls and customer confusion.
David Jasiewicz
President
Trick Concepts - Metal Fab. Engineering and Product Design
http://www.trickconcepts.com-- If you are an ASP or PHP programmer or CSS web specialist I will gladly trade for graphic design, mechanical engineering or metal fabrication service! --

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

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

Post by jmestep » Fri Nov 06, 2009 5:13 pm

Yes you can put in a default. Instead of this:
aspOptions.Items.Add(option.HeaderText)
you could have something like
aspOptions.Items.Add("Please select...");
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx

User avatar
Jaz
Captain (CAPT)
Captain (CAPT)
Posts: 245
Joined: Wed Nov 05, 2008 4:04 am
Location: Torrance, CA
Contact:

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

Post by Jaz » Fri Nov 06, 2009 6:01 pm

Not as good as showing the first option, but it will have to do.

Thanks,
David Jasiewicz
President
Trick Concepts - Metal Fab. Engineering and Product Design
http://www.trickconcepts.com-- If you are an ASP or PHP programmer or CSS web specialist I will gladly trade for graphic design, mechanical engineering or metal fabrication service! --

lliberty
Ensign (ENS)
Ensign (ENS)
Posts: 3
Joined: Wed Sep 09, 2009 2:47 pm

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

Post by lliberty » Wed Jan 20, 2010 2:55 pm

Hi,
I had edited the file: ProductHelper.Cs
I then uploaded it to our site. When I tried to access AbleCommerce, I got an error.
I had saved the original file and I just put it back, but that didn't help.
Is there anything I can do to get this issue resolved as soon as possible.
Please visit this page:
page:http://arcoide.com/product.aspx?PageId=270 and try to choose add to cart.
You will see the error.
Please help.

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

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

Post by mazhar » Thu Jan 21, 2010 8:17 am

just tested your link at it seems to work. I think you were able resolve the problem.

User avatar
Kalamazoo
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 42
Joined: Wed Apr 01, 2009 6:10 pm

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

Post by Kalamazoo » Sun Jul 18, 2010 2:17 pm

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

Post Reply