Variant Prices not Showing up

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
User avatar
Jaz
Captain (CAPT)
Captain (CAPT)
Posts: 245
Joined: Wed Nov 05, 2008 4:04 am
Location: Torrance, CA
Contact:

Variant Prices not Showing up

Post by Jaz » Sat Nov 15, 2008 1:26 am

I am having a problem with my Variants on all my products. Some of my variants have price mods. When I select a variant, the price is changed appropriately, however the price mod is not shown next to the option. There is no way for a customer to know how much the option is costing them. I have seen this working on other sites, so I am trying to figure out what I need to do to get it to work. I have searched the forum extensively and have not found anything.

The problem can be seen here:

http://216.139.236.188/Tibetan-Palm-Torches-P36C5.aspx

Check the Quantity Option

If I need to manually add the price difference to the description, I can, but I figured there is another way.

Thanks,

~Jaz
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
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Variant Prices not Showing up

Post by mazhar » Sat Nov 15, 2008 6:27 am

Are you talking about the override option for variant price on variant manager.

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

Re: Variant Prices not Showing up

Post by jmestep » Sat Nov 15, 2008 8:07 am

He might be talking about either. Right now, the override or the modify price doesn't show up win the dropdown list for options so customer doesn't know it is extra price until they select it and the price display changes. It would be nice to have the dropdown something like
black
red (+10.00)
blue (+12.00)
If you have a code snippet change for that in the current version you could post here, that would be great. I've got one client who has been putting that into the name of the option choice, but if the price changes he needs to remember to update 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
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Variant Prices not Showing up

Post by mazhar » Sat Nov 15, 2008 9:05 am

Well this could be done. For this first edit the App_Code/ProductHelper.cs file and locate the following line of code in BuildProductOptions(Product product, PlaceHolder phOptions) method

Code: Select all

aspOptions.Items.Add(new ListItem(optionOption.Name, optionOption.OptionChoiceId.ToString()));
and make it look like

Code: Select all

aspOptions.Items.Add(new ListItem(optionOption.Name+" ("+optionOption.PriceModifier.ToString("ulc")+")", optionOption.OptionChoiceId.ToString()));
Now specify the price modifier for each choice, have a look at the screen shot below

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

Re: Variant Prices not Showing up

Post by jmestep » Sat Nov 15, 2008 2:44 pm

That's great. I had experimented some, but that should do it.
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: Variant Prices not Showing up

Post by Jaz » Wed Nov 19, 2008 3:55 am

I took that code and modified it a little so that no price change is shown if the varian is $0.00 and to better display negative numbers.

I am not a programer, but it seems to be working

Code: Select all

if (optionOption.PriceModifier > 0)
					   {
					    aspOptions.Items.Add(new ListItem(optionOption.Name+"  ( +"+optionOption.PriceModifier.ToString("ulc")+")", optionOption.OptionChoiceId.ToString()));
                    }
					else if (optionOption.PriceModifier < 0)
					{
					 aspOptions.Items.Add(new ListItem(optionOption.Name+"  ( "+optionOption.PriceModifier.ToString("ulc")+")", optionOption.OptionChoiceId.ToString()));
					 }
					 else
					 {
					 aspOptions.Items.Add(new ListItem(optionOption.Name, optionOption.OptionChoiceId.ToString()));
					}
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! --

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

Re: Variant Prices not Showing up

Post by wave_werks » Thu Dec 04, 2008 8:49 pm

Is there a way to do the same thing but instead to remove the " - ($10.00)" from a $10 product in a kit? I'm using a combination of variants and kits but don't like that the kits show the price while the variants hide the price. My preference is to use the option drop-down menus as a calculator that only shows the price change at the top and not on the menu itself.

Thanks in advance!
Last edited by wave_werks on Mon Dec 29, 2008 9:58 pm, edited 1 time in total.
- Jeff
Wave Werks

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

Re: Variant Prices not Showing up

Post by wave_werks » Mon Dec 29, 2008 9:58 pm

Thought I'd ask again...

Is there a way to do the same thing that is being asked above but instead remove the " - ($10.00)" from a $10 product in a kit? I'm using a combination of variants and kits but don't like that the kits show the price while the variants hide the price. My preference is to use the option drop-down menus as a calculator that only shows the price change at the top and not on the menu itself.

Thanks in advance!
- Jeff
Wave Werks

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

Re: Variant Prices not Showing up

Post by mazhar » Fri Jan 09, 2009 6:34 am

Please read the following post
viewtopic.php?f=44&t=9451

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

Re: Variant Prices not Showing up

Post by jdarby » Thu Jan 24, 2013 10:53 am

mazhar wrote:Well this could be done. For this first edit the App_Code/ProductHelper.cs file and locate the following line of code in BuildProductOptions(Product product, PlaceHolder phOptions) method

Code: Select all

aspOptions.Items.Add(new ListItem(optionOption.Name, optionOption.OptionChoiceId.ToString()));
and make it look like

Code: Select all

aspOptions.Items.Add(new ListItem(optionOption.Name+" ("+optionOption.PriceModifier.ToString("ulc")+")", optionOption.OptionChoiceId.ToString()));
Now specify the price modifier for each choice, have a look at the screen shot below
Is there an updated version of this for v7.0.7? I looked at the original code you posted in there and it is different in 7.0.7.

thanks.

Post Reply