Convert Options Dropdown to RadioButtons
-
- Ensign (ENS)
- Posts: 17
- Joined: Wed Sep 29, 2010 1:34 am
Convert Options Dropdown to RadioButtons
Hello all, hope you're having a fantastic day~
I have a situation with our trading card games site. We came to a point where our products have 8 variants each, the combination of 3 options (Language [english, spanish], Condition [Mint, Played], Style [Non-Foil, Foil]). We want to make the site more user-friendly, so we wanted to try and move away from having 3 dropdown menus on each product page to hopefully one list of 8 radiobuttons that could each have the current stock by its side, and even if at all possible an "add to cart" button and how many to add right by them instead of the radiobutton. An example of the current situation would be this link:
http://www.gamingzoneonline.com/Serra-Angel-P128.aspx
In this example we have 24 units of English, Non-Foil, Mint versions and 72 units of Spanish, Non-Foil, Mint versions. We have 0 of all foil and played versions of this example at the moment. The user is unable to select the options that are 0s, which is great, but we would rather not have the user do so much work as to drop down 3 menus and select almost obvious data given the current stock.
I want to figure this out because its just too hard for clients to put together their decks (think about it, theyre looking for 60 cards sometimes, its too many dropdown menus.)
In addition, I'm quite new to this so if you have some advise on how to better other functionalities around the site, feel free to critizice away; your opinion and help is much appreciated.
Thank you so much in advance for your assistance in this matter. I truly appreciate you as much as our clients will.
Very Respectfully,
Bladegrasp~
I have a situation with our trading card games site. We came to a point where our products have 8 variants each, the combination of 3 options (Language [english, spanish], Condition [Mint, Played], Style [Non-Foil, Foil]). We want to make the site more user-friendly, so we wanted to try and move away from having 3 dropdown menus on each product page to hopefully one list of 8 radiobuttons that could each have the current stock by its side, and even if at all possible an "add to cart" button and how many to add right by them instead of the radiobutton. An example of the current situation would be this link:
http://www.gamingzoneonline.com/Serra-Angel-P128.aspx
In this example we have 24 units of English, Non-Foil, Mint versions and 72 units of Spanish, Non-Foil, Mint versions. We have 0 of all foil and played versions of this example at the moment. The user is unable to select the options that are 0s, which is great, but we would rather not have the user do so much work as to drop down 3 menus and select almost obvious data given the current stock.
I want to figure this out because its just too hard for clients to put together their decks (think about it, theyre looking for 60 cards sometimes, its too many dropdown menus.)
In addition, I'm quite new to this so if you have some advise on how to better other functionalities around the site, feel free to critizice away; your opinion and help is much appreciated.
Thank you so much in advance for your assistance in this matter. I truly appreciate you as much as our clients will.
Very Respectfully,
Bladegrasp~
-
- Ensign (ENS)
- Posts: 17
- Joined: Wed Sep 29, 2010 1:34 am
Re: Convert Options Dropdown to RadioButtons
Well after some more intensive research around the forums I found out about Product3.aspx, which I'm playing with at the moment. But now I can't seem to find a way to show the current stock level of each of the variants I'm displaying, which is a huge issue, along with the fact that options with 0 stock need to go away!
If someone knows how to get it in there, please let me know at your earliest convenience!
I'd still like to figure out how to do it with the radiobuttons, but this is an ok fix for now if I can't get it to work otherwise.
Thank you much~
Bladegrasp
If someone knows how to get it in there, please let me know at your earliest convenience!
I'd still like to figure out how to do it with the radiobuttons, but this is an ok fix for now if I can't get it to work otherwise.
Thank you much~
Bladegrasp
Re: Convert Options Dropdown to RadioButtons
In order to get in-stock value on option list control you need to make some code changes in Website/ConLib/BuyProductDialogOptionsList.ascx.cs file. Edit Website/ConLib/BuyProductDialogOptionsList.ascx.cs file and locate following code block
and replace it with
Then locate following code block
and replace it with
Finally locate following code block
and replace it with
Now make sure that the products with variants that you are going to test has inventory tracking set to variants and on manage variants screen you have some In Stock value from some variants. Open desired product in retail side to confirm that changes worked.
Code: Select all
if (ShowPrice)
{
dcol = new DataColumn("Price", typeof(System.String));
_DataTable.Columns.Add(dcol);
}
Code: Select all
if (ShowPrice)
{
dcol = new DataColumn("Price", typeof(System.String));
_DataTable.Columns.Add(dcol);
}
dcol = new DataColumn("InStock", typeof(System.String));
_DataTable.Columns.Add(dcol);
Code: Select all
if (ShowPrice) drow["Price"] = variant.Price.ToString("ulc");
Code: Select all
if (ShowPrice) drow["Price"] = variant.Price.ToString("ulc");
drow["InStock"] = variant.InStock.ToString();
Code: Select all
if (ShowPrice)
{
tf = new TemplateField();
tf.HeaderTemplate = new PriceLabelTemplate(DataControlRowType.Header, "Price", _ProductId);
tf.ItemTemplate = new PriceLabelTemplate(DataControlRowType.DataRow, "Price", _ProductId);
VariantGrid.Columns.Add(tf);
}
Code: Select all
if (ShowPrice)
{
tf = new TemplateField();
tf.HeaderTemplate = new PriceLabelTemplate(DataControlRowType.Header, "Price", _ProductId);
tf.ItemTemplate = new PriceLabelTemplate(DataControlRowType.DataRow, "Price", _ProductId);
VariantGrid.Columns.Add(tf);
}
tf = new TemplateField();
tf.HeaderTemplate = new LabelTemplate(DataControlRowType.Header, "InStock");
tf.ItemTemplate = new LabelTemplate(DataControlRowType.DataRow, "InStock");
VariantGrid.Columns.Add(tf);
-
- Ensign (ENS)
- Posts: 17
- Joined: Wed Sep 29, 2010 1:34 am
Re: Convert Options Dropdown to RadioButtons
Hahah wow you're amazing! That worked immediately!
I do wanted to ask you if it's not too much trouble; Is it possible for item variants that are out of stock to dissapear from that list? Like, if only the 2nd and 5th variants have stock > 1, for them to be the only ones that show?
Thank you so much already, I should be ok nonetheless. I appreciate your time tenfold!
Have a good day,
Bladegrasp~
I do wanted to ask you if it's not too much trouble; Is it possible for item variants that are out of stock to dissapear from that list? Like, if only the 2nd and 5th variants have stock > 1, for them to be the only ones that show?
Thank you so much already, I should be ok nonetheless. I appreciate your time tenfold!
Have a good day,
Bladegrasp~
Re: Convert Options Dropdown to RadioButtons
What is the version of your AbleCommerce application? I think out of stock variant used to disappear from variant list on retail in version 7.0.5. Anyhow if this is not happening for you then you can do that by doing something like this
in code file locate following code block
and then make it look like
This should do the trick.
in code file locate following code block
Code: Select all
foreach (ProductVariant variant in _AvailableVariants)
{
Code: Select all
bool showIfInstockIsZero = (_Product.InventoryMode != InventoryMode.Variant || _Product.AllowBackorder);
foreach (ProductVariant variant in _AvailableVariants)
foreach (ProductVariant variant in _AvailableVariants)
{
//DON'T SHOW OUT OF STOCK VARIANTS
if (!variant.Available || (variant.InStock <= 0 && !showIfInstockIsZero))
continue;
-
- Ensign (ENS)
- Posts: 17
- Joined: Wed Sep 29, 2010 1:34 am
Re: Convert Options Dropdown to RadioButtons
Awesome it did work! I noticed there was a doubled foreach after I got an error and it worked out just fine as soon as I commented it!
I have a last question for you, I'll try to leave you alone soon I promise~ (We have 7.0.4 btw, I'm insanely scared of upgrading just yet due to deadlines we want to meet for promotion purposes)
Now that this is working very well, I don't seem to understand something. I cannot find a way to see a report that shows me what we're seeing now on our product pages. What I mean is, I can't find how to see a stock report, like everything that I have in my shop. It's weird because its obviously here somewhere but I can't seem to find it. When I go into Reports > Products, I only see reports associated to actual sales, like product sales breakdown etc. but nothing like an actual Product Report (whatever it is that I have, how much it costs, how many I have, etc.)
Given that we manage 90% of our items by variants and the other 10% by product, how could I see something like this which would let me know generally what I have, how many I have and basic info like that?
Thanks again for your amazing and lightning-fast responses!
Very Respectfully,
Bladegrasp~
I have a last question for you, I'll try to leave you alone soon I promise~ (We have 7.0.4 btw, I'm insanely scared of upgrading just yet due to deadlines we want to meet for promotion purposes)
Now that this is working very well, I don't seem to understand something. I cannot find a way to see a report that shows me what we're seeing now on our product pages. What I mean is, I can't find how to see a stock report, like everything that I have in my shop. It's weird because its obviously here somewhere but I can't seem to find it. When I go into Reports > Products, I only see reports associated to actual sales, like product sales breakdown etc. but nothing like an actual Product Report (whatever it is that I have, how much it costs, how many I have, etc.)
Given that we manage 90% of our items by variants and the other 10% by product, how could I see something like this which would let me know generally what I have, how many I have and basic info like that?
Thanks again for your amazing and lightning-fast responses!
Very Respectfully,
Bladegrasp~
Re: Convert Options Dropdown to RadioButtons
There is a low inventory report in the system, you can access that at following location Administration > Reports > Products > Low Inventory
It will show you out of stock variants and will allow you to enter new stock values on same report.
It will show you out of stock variants and will allow you to enter new stock values on same report.
-
- Ensign (ENS)
- Posts: 17
- Joined: Wed Sep 29, 2010 1:34 am
Re: Convert Options Dropdown to RadioButtons
I see it. Is it possible to change the amount of items I see each page? Like for it to not have pages 1,2,3,4 etc but to all just continue to cascade down?
Don't know if I have access to the code of the AbleCommerce interface
V/R,
Bladegrasp~
Don't know if I have access to the code of the AbleCommerce interface
V/R,
Bladegrasp~
Re: Convert Options Dropdown to RadioButtons
Sorry you can access this report from main navigation using Mange -> Low Inventory option. In order to disable paging give a try by editing Website/Admin/Reports/LowInventory.aspx file. Then locate following code in the file
and make
Hopefully that will remove the pagination from report.
Code: Select all
AllowPaging="True"
Code: Select all
AllowPaging="False"
-
- Ensign (ENS)
- Posts: 17
- Joined: Wed Sep 29, 2010 1:34 am
Re: Convert Options Dropdown to RadioButtons
It actually didn't but right by it was a property called "PageSize" and I tried changing it to a big number and it worked! I went and did it to my batch edit too which I desperately needed to enlarge due to the nature of my product.
Thanks again for all your help Mazhar! I'll let you be now heheheh
Have a great day!
Bladegrasp~
Thanks again for all your help Mazhar! I'll let you be now heheheh
Have a great day!
Bladegrasp~
Re: Convert Options Dropdown to RadioButtons
Sounds good that you manged to resolve that
cheers
